From 17e2892f29ca0118f0066d257e8b05413f757dd5 Mon Sep 17 00:00:00 2001 From: Daijiro Wachi Date: Mon, 20 Mar 2017 11:43:30 -0700 Subject: [PATCH] test: synchronize WPT url setters tests data Synchronize url-setter-test to upstream. Refs: https://github.com/w3c/web-platform-tests/pull/5112 PR-URL: https://github.com/nodejs/node/pull/11887 Reviewed-By: James M Snell Reviewed-By: Timothy Gu Reviewed-By: Joyee Cheung --- test/fixtures/url-setter-tests.json | 51 ++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/test/fixtures/url-setter-tests.json b/test/fixtures/url-setter-tests.json index 4876b9940c1d98..d0138204b3fe6c 100644 --- a/test/fixtures/url-setter-tests.json +++ b/test/fixtures/url-setter-tests.json @@ -111,6 +111,55 @@ "protocol": "http:" } }, + { + "href": "gopher://example.net:1234", + "new_value": "file", + "expected": { + "href": "gopher://example.net:1234/", + "protocol": "gopher:" + } + }, + { + "href": "wss://x:x@example.net:1234", + "new_value": "file", + "expected": { + "href": "wss://x:x@example.net:1234/", + "protocol": "wss:" + } + }, + { + "comment": "Can’t switch from file URL with no host", + "href": "file://localhost/", + "new_value": "http", + "expected": { + "href": "file:///", + "protocol": "file:" + } + }, + { + "href": "file:///test", + "new_value": "gopher", + "expected": { + "href": "file:///test", + "protocol": "file:" + } + }, + { + "href": "file:", + "new_value": "wss", + "expected": { + "href": "file:///", + "protocol": "file:" + } + }, + { + "href": "file://hi/path", + "new_value": "s", + "expected": { + "href": "file://hi/path", + "protocol": "file:" + } + }, { "href": "https://example.net", "new_value": "s", @@ -1177,4 +1226,4 @@ } } ] -} \ No newline at end of file +}