From 58a16b29923013a334c630d9bba610f91d65aade Mon Sep 17 00:00:00 2001 From: "Node.js GitHub Bot" Date: Mon, 24 Mar 2025 00:05:15 +0000 Subject: [PATCH 1/2] test: update WPT for urlpattern to a8c62524f6 --- test/fixtures/wpt/README.md | 2 +- .../resources/urlpatterntestdata.json | 21 ++++++++++++++----- test/fixtures/wpt/versions.json | 2 +- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/test/fixtures/wpt/README.md b/test/fixtures/wpt/README.md index 563148c0dbe4e0..9f26ab6ad95bcf 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/d86fcc9e87/url -- urlpattern: https://github.com/web-platform-tests/wpt/tree/6ceca69d26/urlpattern +- urlpattern: https://github.com/web-platform-tests/wpt/tree/a8c62524f6/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 f92ab76b71df5a..75f1cf8694523b 100644 --- a/test/fixtures/wpt/urlpattern/resources/urlpatterntestdata.json +++ b/test/fixtures/wpt/urlpattern/resources/urlpatterntestdata.json @@ -1202,10 +1202,11 @@ { "pattern": [{ "protocol": "http", "port": "80 " }], "inputs": [{ "protocol": "http", "port": "80" }], - "exactly_empty_components": ["port"], - "expected_match": { - "protocol": { "input": "http", "groups": {} } - } + "expected_obj": { + "protocol": "http", + "port": "80" + }, + "expected_match": null }, { "pattern": [{ "protocol": "http", "port": "100000" }], @@ -1874,7 +1875,17 @@ { "pattern": [ "https://{sub.}?example{.com/}foo" ], "inputs": [ "https://example.com/foo" ], - "expected_obj": "error" + "exactly_empty_components": [ "port" ], + "expected_obj": { + "protocol": "https", + "hostname": "{sub.}?example.com", + "pathname": "*" + }, + "expected_match": { + "protocol": { "input": "https", "groups": {} }, + "hostname": { "input": "example.com", "groups": {} }, + "pathname": { "input": "/foo", "groups": { "0": "/foo" } } + } }, { "pattern": [ "{https://}example.com/foo" ], diff --git a/test/fixtures/wpt/versions.json b/test/fixtures/wpt/versions.json index 5eeb76397f83ba..f77b8d0444380d 100644 --- a/test/fixtures/wpt/versions.json +++ b/test/fixtures/wpt/versions.json @@ -76,7 +76,7 @@ "path": "url" }, "urlpattern": { - "commit": "6ceca69d26b8ecde9952d6633c17694e03a086f7", + "commit": "a8c62524f649ca5fa69e0f7411f16955edadb851", "path": "urlpattern" }, "user-timing": { From 12e6a518968d50e453ffddf87df798b1bc625ab6 Mon Sep 17 00:00:00 2001 From: "Node.js GitHub Bot" Date: Tue, 25 Mar 2025 00:04:58 +0000 Subject: [PATCH 2/2] test: update WPT for urlpattern to f07d05f49c --- test/fixtures/wpt/README.md | 2 +- .../resources/urlpatterntestdata.json | 28 +++++++++++++++++++ test/fixtures/wpt/versions.json | 2 +- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/test/fixtures/wpt/README.md b/test/fixtures/wpt/README.md index 9f26ab6ad95bcf..b5af76a203a8c1 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/d86fcc9e87/url -- urlpattern: https://github.com/web-platform-tests/wpt/tree/a8c62524f6/urlpattern +- urlpattern: https://github.com/web-platform-tests/wpt/tree/f07d05f49c/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 75f1cf8694523b..a613b6a74b5a90 100644 --- a/test/fixtures/wpt/urlpattern/resources/urlpatterntestdata.json +++ b/test/fixtures/wpt/urlpattern/resources/urlpatterntestdata.json @@ -1230,6 +1230,34 @@ "port": { "input": "80", "groups": {}} } }, + { + "pattern": [{ "port": "80" }], + "inputs": [{ "port": "8\t0" }], + "expected_match": { + "port": { "input": "80", "groups": {}} + } + }, + { + "pattern": [{ "port": "80" }], + "inputs": [{ "port": "80x" }], + "expected_match": { + "port": { "input": "80", "groups": {}} + } + }, + { + "pattern": [{ "port": "80" }], + "inputs": [{ "port": "80?x" }], + "expected_match": { + "port": { "input": "80", "groups": {}} + } + }, + { + "pattern": [{ "port": "80" }], + "inputs": [{ "port": "80\\x" }], + "expected_match": { + "port": { "input": "80", "groups": {}} + } + }, { "pattern": [{ "port": "(.*)" }], "inputs": [{ "port": "invalid80" }], diff --git a/test/fixtures/wpt/versions.json b/test/fixtures/wpt/versions.json index f77b8d0444380d..69fb1876e80e02 100644 --- a/test/fixtures/wpt/versions.json +++ b/test/fixtures/wpt/versions.json @@ -76,7 +76,7 @@ "path": "url" }, "urlpattern": { - "commit": "a8c62524f649ca5fa69e0f7411f16955edadb851", + "commit": "f07d05f49c679a62dd112e18aa07405859745952", "path": "urlpattern" }, "user-timing": {