diff --git a/test/fixtures/wpt/README.md b/test/fixtures/wpt/README.md index fea9ea89123875..c587a8d021fd40 100644 --- a/test/fixtures/wpt/README.md +++ b/test/fixtures/wpt/README.md @@ -28,7 +28,7 @@ Last update: - resource-timing: https://github.com/web-platform-tests/wpt/tree/22d38586d0/resource-timing - resources: https://github.com/web-platform-tests/wpt/tree/6a2f322376/resources - streams: https://github.com/web-platform-tests/wpt/tree/bc9dcbbf1a/streams -- url: https://github.com/web-platform-tests/wpt/tree/fc3e651593/url +- url: https://github.com/web-platform-tests/wpt/tree/7a3645b79a/url - urlpattern: https://github.com/web-platform-tests/wpt/tree/a2e15ad405/urlpattern - user-timing: https://github.com/web-platform-tests/wpt/tree/5ae85bf826/user-timing - wasm/jsapi: https://github.com/web-platform-tests/wpt/tree/65a2134d50/wasm/jsapi diff --git a/test/fixtures/wpt/url/IdnaTestV2-removed.window.js b/test/fixtures/wpt/url/IdnaTestV2-removed.any.js similarity index 97% rename from test/fixtures/wpt/url/IdnaTestV2-removed.window.js rename to test/fixtures/wpt/url/IdnaTestV2-removed.any.js index 0f70f84816acd7..7e5d27b50bfc02 100644 --- a/test/fixtures/wpt/url/IdnaTestV2-removed.window.js +++ b/test/fixtures/wpt/url/IdnaTestV2-removed.any.js @@ -1,3 +1,5 @@ +// META: global=window + promise_test(() => fetch("resources/IdnaTestV2-removed.json").then(res => res.json()).then(runTests), "Loading data…"); function runTests(idnaTests) { diff --git a/test/fixtures/wpt/url/IdnaTestV2.window.js b/test/fixtures/wpt/url/IdnaTestV2.any.js similarity index 97% rename from test/fixtures/wpt/url/IdnaTestV2.window.js rename to test/fixtures/wpt/url/IdnaTestV2.any.js index 4bfa3118acec94..0c2fdee0392e00 100644 --- a/test/fixtures/wpt/url/IdnaTestV2.window.js +++ b/test/fixtures/wpt/url/IdnaTestV2.any.js @@ -1,3 +1,5 @@ +// META: global=window + promise_test(() => fetch("resources/IdnaTestV2.json").then(res => res.json()).then(runTests), "Loading data…"); function runTests(idnaTests) { diff --git a/test/fixtures/wpt/url/resources/urltestdata.json b/test/fixtures/wpt/url/resources/urltestdata.json index 690a48870fd0d9..e88d22690361ee 100644 --- a/test/fixtures/wpt/url/resources/urltestdata.json +++ b/test/fixtures/wpt/url/resources/urltestdata.json @@ -1044,6 +1044,21 @@ "search": "", "hash": "" }, + { + "input": "http:/", + "base": "http://example.com/", + "href": "http://example.com/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, { "input": "ftp:/example.com/", "base": "http://example.org/foo/bar", @@ -10342,6 +10357,52 @@ "search": "", "hash": "" }, + "# Non-special relative URL and backslashes", + { + "comment": "Non-special relative: \\ should not enter RelativeSlash state", + "input": "\\a", + "base": "foo://foo/a", + "href": "foo://foo/\\a", + "protocol": "foo:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/\\a", + "search": "", + "hash": "" + }, + { + "comment": "Non-special relative: \\ should not enter RelativeSlash, so / is a path separator", + "input": "\\/a", + "base": "foo://foo/a", + "href": "foo://foo/\\/a", + "protocol": "foo:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/\\/a", + "search": "", + "hash": "" + }, + { + "comment": "Non-special relative: \\\\ should not trigger authority parsing", + "input": "\\\\a", + "base": "foo://foo/a", + "href": "foo://foo/\\\\a", + "protocol": "foo:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/\\\\a", + "search": "", + "hash": "" + }, { "comment": "Fragment with <> on data: URI", "input": "data:text/plain,test# ", diff --git a/test/fixtures/wpt/versions.json b/test/fixtures/wpt/versions.json index b69eafd6741950..7c7f8ce122dff8 100644 --- a/test/fixtures/wpt/versions.json +++ b/test/fixtures/wpt/versions.json @@ -72,7 +72,7 @@ "path": "streams" }, "url": { - "commit": "fc3e651593fab938433613eb5ad0b4dbd5a4e167", + "commit": "7a3645b79ade98a05066a09ce88e143daac31535", "path": "url" }, "urlpattern": {