diff --git a/test/fixtures/wpt/README.md b/test/fixtures/wpt/README.md index e464af4932d4a1..a528d2035ccaf5 100644 --- a/test/fixtures/wpt/README.md +++ b/test/fixtures/wpt/README.md @@ -29,7 +29,7 @@ Last update: - resources: https://github.com/web-platform-tests/wpt/tree/1e140d63ec/resources - streams: https://github.com/web-platform-tests/wpt/tree/bc9dcbbf1a/streams - url: https://github.com/web-platform-tests/wpt/tree/a23788b77a/url -- urlpattern: https://github.com/web-platform-tests/wpt/tree/ef6d83d789/urlpattern +- urlpattern: https://github.com/web-platform-tests/wpt/tree/3b6b19853a/urlpattern - user-timing: https://github.com/web-platform-tests/wpt/tree/5ae85bf826/user-timing - wasm/jsapi: https://github.com/web-platform-tests/wpt/tree/cde25e7e3c/wasm/jsapi - wasm/webapi: https://github.com/web-platform-tests/wpt/tree/fd1b23eeaa/wasm/webapi diff --git a/test/fixtures/wpt/urlpattern/resources/urlpatterntestdata.json b/test/fixtures/wpt/urlpattern/resources/urlpatterntestdata.json index 1d2ba25ff7d696..3d5ddce1eab21e 100644 --- a/test/fixtures/wpt/urlpattern/resources/urlpatterntestdata.json +++ b/test/fixtures/wpt/urlpattern/resources/urlpatterntestdata.json @@ -1202,6 +1202,14 @@ { "pattern": [{ "protocol": "http", "port": "80 " }], "inputs": [{ "protocol": "http", "port": "80" }], + "exactly_empty_components": ["port"], + "expected_match": { + "protocol": { "input": "http", "groups": {} } + } + }, + { + "pattern": [{ "protocol": "http", "port": "100000" }], + "inputs": [{ "protocol": "http", "port": "100000" }], "expected_obj": "error" }, { @@ -2424,7 +2432,11 @@ }, { "pattern": [{ "hostname": "bad#hostname" }], - "expected_obj": "error" + "inputs": [{ "hostname": "bad" }], + "exactly_empty_components": ["port"], + "expected_match": { + "hostname": { "input": "bad", "groups": {} } + } }, { "pattern": [{ "hostname": "bad%hostname" }], @@ -2432,7 +2444,10 @@ }, { "pattern": [{ "hostname": "bad/hostname" }], - "expected_obj": "error" + "inputs": [{ "hostname": "bad" }], + "expected_match": { + "hostname": { "input": "bad", "groups": {} } + } }, { "pattern": [{ "hostname": "bad\\:hostname" }], @@ -2464,7 +2479,8 @@ }, { "pattern": [{ "hostname": "bad\\\\hostname" }], - "expected_obj": "error" + "inputs": [{ "hostname": "badhostname" }], + "expected_match": null }, { "pattern": [{ "hostname": "bad^hostname" }], @@ -2476,15 +2492,24 @@ }, { "pattern": [{ "hostname": "bad\nhostname" }], - "expected_obj": "error" + "inputs": [{ "hostname": "badhostname" }], + "expected_match": { + "hostname": { "input": "badhostname", "groups": {} } + } }, { "pattern": [{ "hostname": "bad\rhostname" }], - "expected_obj": "error" + "inputs": [{ "hostname": "badhostname" }], + "expected_match": { + "hostname": { "input": "badhostname", "groups": {} } + } }, { "pattern": [{ "hostname": "bad\thostname" }], - "expected_obj": "error" + "inputs": [{ "hostname": "badhostname" }], + "expected_match": { + "hostname": { "input": "badhostname", "groups": {} } + } }, { "pattern": [{}], diff --git a/test/fixtures/wpt/versions.json b/test/fixtures/wpt/versions.json index 413aa54e8b8027..589996f58a81b0 100644 --- a/test/fixtures/wpt/versions.json +++ b/test/fixtures/wpt/versions.json @@ -76,7 +76,7 @@ "path": "url" }, "urlpattern": { - "commit": "ef6d83d789483763207af8cedcbf1f3c1317b981", + "commit": "3b6b19853a928ec9bfa28e9046c3cf601f160e42", "path": "urlpattern" }, "user-timing": { diff --git a/test/wpt/status/urlpattern.json b/test/wpt/status/urlpattern.json index 58877b85017280..6df26fd66a7d2b 100644 --- a/test/wpt/status/urlpattern.json +++ b/test/wpt/status/urlpattern.json @@ -11,28 +11,26 @@ "urlpattern.any.js": { "fail": { "expected": [ - "Pattern: [{\"protocol\":\"http\",\"port\":\"80 \"}] Inputs: [{\"protocol\":\"http\",\"port\":\"80\"}]", "Pattern: [\"https://{sub.}?example{.com/}foo\"] Inputs: [\"https://example.com/foo\"]", - "Pattern: [{\"hostname\":\"bad#hostname\"}] Inputs: undefined", - "Pattern: [{\"hostname\":\"bad/hostname\"}] Inputs: undefined", - "Pattern: [{\"hostname\":\"bad\\\\\\\\hostname\"}] Inputs: undefined", - "Pattern: [{\"hostname\":\"bad\\nhostname\"}] Inputs: undefined", - "Pattern: [{\"hostname\":\"bad\\rhostname\"}] Inputs: undefined", - "Pattern: [{\"hostname\":\"bad\\thostname\"}] Inputs: undefined" + "Pattern: [{\"hostname\":\"bad#hostname\"}] Inputs: [{\"hostname\":\"bad\"}]", + "Pattern: [{\"hostname\":\"bad/hostname\"}] Inputs: [{\"hostname\":\"bad\"}]", + "Pattern: [{\"hostname\":\"bad\\\\\\\\hostname\"}] Inputs: [{\"hostname\":\"badhostname\"}]", + "Pattern: [{\"hostname\":\"bad\\nhostname\"}] Inputs: [{\"hostname\":\"badhostname\"}]", + "Pattern: [{\"hostname\":\"bad\\rhostname\"}] Inputs: [{\"hostname\":\"badhostname\"}]", + "Pattern: [{\"hostname\":\"bad\\thostname\"}] Inputs: [{\"hostname\":\"badhostname\"}]" ] } }, "urlpattern.https.any.js": { "fail": { "expected": [ - "Pattern: [{\"protocol\":\"http\",\"port\":\"80 \"}] Inputs: [{\"protocol\":\"http\",\"port\":\"80\"}]", "Pattern: [\"https://{sub.}?example{.com/}foo\"] Inputs: [\"https://example.com/foo\"]", - "Pattern: [{\"hostname\":\"bad#hostname\"}] Inputs: undefined", - "Pattern: [{\"hostname\":\"bad/hostname\"}] Inputs: undefined", - "Pattern: [{\"hostname\":\"bad\\\\\\\\hostname\"}] Inputs: undefined", - "Pattern: [{\"hostname\":\"bad\\nhostname\"}] Inputs: undefined", - "Pattern: [{\"hostname\":\"bad\\rhostname\"}] Inputs: undefined", - "Pattern: [{\"hostname\":\"bad\\thostname\"}] Inputs: undefined" + "Pattern: [{\"hostname\":\"bad#hostname\"}] Inputs: [{\"hostname\":\"bad\"}]", + "Pattern: [{\"hostname\":\"bad/hostname\"}] Inputs: [{\"hostname\":\"bad\"}]", + "Pattern: [{\"hostname\":\"bad\\\\\\\\hostname\"}] Inputs: [{\"hostname\":\"badhostname\"}]", + "Pattern: [{\"hostname\":\"bad\\nhostname\"}] Inputs: [{\"hostname\":\"badhostname\"}]", + "Pattern: [{\"hostname\":\"bad\\rhostname\"}] Inputs: [{\"hostname\":\"badhostname\"}]", + "Pattern: [{\"hostname\":\"bad\\thostname\"}] Inputs: [{\"hostname\":\"badhostname\"}]" ] } }