Skip to content

Commit

Permalink
Bug 1728654 [wpt PR 30290] - URLPattern: Support constructor strings …
Browse files Browse the repository at this point in the history
…with ipv6 addresses., a=testonly

Automatic update from web-platform-tests
URLPattern: Support constructor strings with ipv6 addresses.

This adds support for constructor strings like:

  new URLPattern("http://[\\:\\:1]/");

As discussed in spec issue #113:

  whatwg/urlpattern#113

Fixed: 1245760
Change-Id: I712341e72a5c2af745dbbdbb8673a79809a98425
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3138336
Commit-Queue: Ben Kelly <wanderview@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/main@{#917682}

--

wpt-commits: 4a8e1e081701c95a7f2d27eff2d2a9ee96691edc
wpt-pr: 30290
  • Loading branch information
wanderview authored and moz-wptsync-bot committed Sep 5, 2021
1 parent 1b4e51c commit 5f0f0a5
Showing 1 changed file with 49 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2150,6 +2150,55 @@
"pathname": { "input": "/data:channel.html", "groups": {} }
}
},
{
"pattern": [ "http://[\\:\\:1]/" ],
"inputs": [ "http://[::1]/" ],
"exactly_empty_components": [ "username", "password", "port", "search",
"hash" ],
"expected_obj": {
"protocol": "http",
"hostname": "[\\:\\:1]",
"pathname": "/"
},
"expected_match": {
"protocol": { "input": "http", "groups": {} },
"hostname": { "input": "[::1]", "groups": {} },
"pathname": { "input": "/", "groups": {} }
}
},
{
"pattern": [ "http://[\\:\\:1]:8080/" ],
"inputs": [ "http://[::1]:8080/" ],
"exactly_empty_components": [ "username", "password", "search", "hash" ],
"expected_obj": {
"protocol": "http",
"hostname": "[\\:\\:1]",
"port": "8080",
"pathname": "/"
},
"expected_match": {
"protocol": { "input": "http", "groups": {} },
"hostname": { "input": "[::1]", "groups": {} },
"port": { "input": "8080", "groups": {} },
"pathname": { "input": "/", "groups": {} }
}
},
{
"pattern": [ "http://[\\:\\:a]/" ],
"inputs": [ "http://[::a]/" ],
"exactly_empty_components": [ "username", "password", "port", "search",
"hash" ],
"expected_obj": {
"protocol": "http",
"hostname": "[\\:\\:a]",
"pathname": "/"
},
"expected_match": {
"protocol": { "input": "http", "groups": {} },
"hostname": { "input": "[::a]", "groups": {} },
"pathname": { "input": "/", "groups": {} }
}
},
{
"pattern": [ "https://foo{{@}}example.com" ],
"inputs": [ "https://foo@example.com" ],
Expand Down

0 comments on commit 5f0f0a5

Please sign in to comment.