summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/url/resources/setters_tests.json
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/url/resources/setters_tests.json')
-rw-r--r--testing/web-platform/tests/url/resources/setters_tests.json44
1 files changed, 44 insertions, 0 deletions
diff --git a/testing/web-platform/tests/url/resources/setters_tests.json b/testing/web-platform/tests/url/resources/setters_tests.json
index 82adf4cdce..3850606d66 100644
--- a/testing/web-platform/tests/url/resources/setters_tests.json
+++ b/testing/web-platform/tests/url/resources/setters_tests.json
@@ -826,6 +826,17 @@
}
},
{
+ "comment": "Stuff after a ? delimiter is ignored, trailing 'port'",
+ "href": "http://example.net/path",
+ "new_value": "example.com?stuff:8080",
+ "expected": {
+ "href": "http://example.com/path",
+ "host": "example.com",
+ "hostname": "example.com",
+ "port": ""
+ }
+ },
+ {
"comment": "Stuff after a ? delimiter is ignored",
"href": "http://example.net/path",
"new_value": "example.com:8080?stuff",
@@ -925,6 +936,39 @@
}
},
{
+ "comment": "Anything other than ASCII digit stops the port parser in a setter but is not an error",
+ "href": "http://example.net:8080",
+ "new_value": "example.com:invalid",
+ "expected": {
+ "href": "http://example.com:8080/",
+ "host": "example.com:8080",
+ "hostname": "example.com",
+ "port": "8080"
+ }
+ },
+ {
+ "comment": "Anything other than ASCII digit stops the port parser in a setter but is not an error",
+ "href": "http://example.net:8080/test",
+ "new_value": "[::1]:invalid",
+ "expected": {
+ "href": "http://[::1]:8080/test",
+ "host": "[::1]:8080",
+ "hostname": "[::1]",
+ "port": "8080"
+ }
+ },
+ {
+ "comment": "IPv6 without port",
+ "href": "http://example.net:8080/test",
+ "new_value": "[::1]",
+ "expected": {
+ "href": "http://[::1]:8080/test",
+ "host": "[::1]:8080",
+ "hostname": "[::1]",
+ "port": "8080"
+ }
+ },
+ {
"comment": "Port numbers are 16 bit integers",
"href": "http://example.net/path",
"new_value": "example.com:65535",