From f274a23a8cfb5ae628a7740210667fdb2dbe668b Mon Sep 17 00:00:00 2001 From: "Node.js GitHub Bot" Date: Sat, 8 Mar 2025 18:09:26 +0000 Subject: [PATCH 1/2] test: update WPT for urlpattern to 3b6b19853a --- test/fixtures/wpt/README.md | 2 +- .../resources/urlpatterntestdata.json | 37 ++++++++++++++++--- test/fixtures/wpt/versions.json | 2 +- 3 files changed, 33 insertions(+), 8 deletions(-) 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": { From 6472be3bbd044fb79b84ec029dfc1dfea81dd898 Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Sat, 8 Mar 2025 13:14:18 -0500 Subject: [PATCH 2/2] test: update urlpattern.json --- test/wpt/status/urlpattern.json | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) 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\"}]" ] } }