Bug 1591894 [wpt PR 19858] - Support IPv6 literals in KURL::SetHostAndPort, a=testonly
authorAdam Rice <ricea@chromium.org>
Mon, 04 Nov 2019 11:12:46 +0000
changeset 564763 ba9a25564533962318bba8bda7f5f5bd8d8c659a
parent 564762 2e965792fc82b6729811b28cc8041243cf2e2b19
child 564764 f48ee0598e4c655906f1ff918c0492b50a65e32a
push id12351
push userffxbld-merge
push dateMon, 02 Dec 2019 11:32:26 +0000
treeherdermozilla-beta@dba4410526a2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1591894, 19858, 1012416, 1871449, 710668
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1591894 [wpt PR 19858] - Support IPv6 literals in KURL::SetHostAndPort, a=testonly Automatic update from web-platform-tests Support IPv6 literals in KURL::SetHostAndPort KURL::SetHostAndPort would corrupt IPv6 literals because they contain ":" characters. Make it check for "[]" characters and use the first ":" after an IPv6 address as the start of the port number if one is present. Fixed: 1012416 Change-Id: If07a671b48c8c1b24b16883fb9072a86b0de7ebc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1871449 Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Adam Rice <ricea@chromium.org> Cr-Commit-Position: refs/heads/master@{#710668} -- wpt-commits: 5e2d3b33d4dc2d9221446c32c2fd6a3d79768406 wpt-pr: 19858 Differential Revision: https://phabricator.services.mozilla.com/D53553
testing/web-platform/tests/url/resources/setters_tests.json
--- a/testing/web-platform/tests/url/resources/setters_tests.json
+++ b/testing/web-platform/tests/url/resources/setters_tests.json
@@ -682,16 +682,27 @@
             "expected": {
                 "href": "http://[::1]:2/",
                 "host": "[::1]:2",
                 "hostname": "[::1]",
                 "port": "2"
             }
         },
         {
+            "comment": "IPv6 literal address with port, crbug.com/1012416",
+            "href": "http://example.net",
+            "new_value": "[2001:db8::2]:4002",
+            "expected": {
+                "href": "http://[2001:db8::2]:4002/",
+                "host": "[2001:db8::2]:4002",
+                "hostname": "[2001:db8::2]",
+                "port": "4002"
+             }
+        },
+        {
             "comment": "Default port number is removed",
             "href": "http://example.net",
             "new_value": "example.com:80",
             "expected": {
                 "href": "http://example.com/",
                 "host": "example.com",
                 "hostname": "example.com",
                 "port": ""