Skip to content

Commit 12befd8

Browse files
annevkmoz-wptsync-bot
authored andcommitted
Bug 1953756 [wpt PR 51316] - URLPattern: correct port and hostname-related test, a=testonly
Automatic update from web-platform-tests URLPattern: correct port and hostname-related test For whatwg/urlpattern#260 (port) and whatwg/urlpattern#252 (hostname). -- wpt-commits: a8c62524f649ca5fa69e0f7411f16955edadb851 wpt-pr: 51316
1 parent acf4ea2 commit 12befd8

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

testing/web-platform/tests/urlpattern/resources/urlpatterntestdata.json

+16-5
Original file line numberDiff line numberDiff line change
@@ -1202,10 +1202,11 @@
12021202
{
12031203
"pattern": [{ "protocol": "http", "port": "80 " }],
12041204
"inputs": [{ "protocol": "http", "port": "80" }],
1205-
"exactly_empty_components": ["port"],
1206-
"expected_match": {
1207-
"protocol": { "input": "http", "groups": {} }
1208-
}
1205+
"expected_obj": {
1206+
"protocol": "http",
1207+
"port": "80"
1208+
},
1209+
"expected_match": null
12091210
},
12101211
{
12111212
"pattern": [{ "protocol": "http", "port": "100000" }],
@@ -1874,7 +1875,17 @@
18741875
{
18751876
"pattern": [ "https://{sub.}?example{.com/}foo" ],
18761877
"inputs": [ "https://example.com/foo" ],
1877-
"expected_obj": "error"
1878+
"exactly_empty_components": [ "port" ],
1879+
"expected_obj": {
1880+
"protocol": "https",
1881+
"hostname": "{sub.}?example.com",
1882+
"pathname": "*"
1883+
},
1884+
"expected_match": {
1885+
"protocol": { "input": "https", "groups": {} },
1886+
"hostname": { "input": "example.com", "groups": {} },
1887+
"pathname": { "input": "/foo", "groups": { "0": "/foo" } }
1888+
}
18781889
},
18791890
{
18801891
"pattern": [ "{https://}example.com/foo" ],

0 commit comments

Comments
 (0)