diff options
Diffstat (limited to 'testing/web-platform/tests/url')
-rw-r--r-- | testing/web-platform/tests/url/WEB_FEATURES.yml | 4 | ||||
-rw-r--r-- | testing/web-platform/tests/url/resources/setters_tests.json | 44 |
2 files changed, 48 insertions, 0 deletions
diff --git a/testing/web-platform/tests/url/WEB_FEATURES.yml b/testing/web-platform/tests/url/WEB_FEATURES.yml new file mode 100644 index 0000000000..4711efc1fa --- /dev/null +++ b/testing/web-platform/tests/url/WEB_FEATURES.yml @@ -0,0 +1,4 @@ +features: +- name: url-canparse + files: + - url-statics-canparse.* 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", |