mirror of
https://github.com/servo/servo.git
synced 2025-08-18 11:55:39 +01:00
Update web-platform-tests to revision 8a2ceb5f18911302b7a5c1cd2791f4ab50ad4326
This commit is contained in:
parent
462c272380
commit
1f531f66ea
5377 changed files with 174916 additions and 84369 deletions
|
@ -1,10 +1,10 @@
|
|||
@mikewest
|
||||
@tomalec
|
||||
@rubys
|
||||
@zcorpan
|
||||
@xiaojunwu
|
||||
@smola
|
||||
@domenic
|
||||
@Sebmaster
|
||||
@annevk
|
||||
@GPHemsley
|
||||
@TimothyGu
|
||||
|
|
|
@ -259,6 +259,16 @@
|
|||
"href": "view-source+data:text/html,<p>Test",
|
||||
"protocol": "view-source+data:"
|
||||
}
|
||||
},
|
||||
{
|
||||
"comment": "Port is set to null if it is the default for new scheme.",
|
||||
"href": "http://foo.com:443/",
|
||||
"new_value": "https",
|
||||
"expected": {
|
||||
"href": "https://foo.com/",
|
||||
"protocol": "https:",
|
||||
"port": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"username": [
|
||||
|
|
|
@ -23,9 +23,11 @@ test(function() {
|
|||
}, "URLSearchParams constructor, no arguments")
|
||||
|
||||
test(() => {
|
||||
params = new URLSearchParams(DOMException.prototype);
|
||||
params = new URLSearchParams(DOMException);
|
||||
assert_equals(params.toString(), "INDEX_SIZE_ERR=1&DOMSTRING_SIZE_ERR=2&HIERARCHY_REQUEST_ERR=3&WRONG_DOCUMENT_ERR=4&INVALID_CHARACTER_ERR=5&NO_DATA_ALLOWED_ERR=6&NO_MODIFICATION_ALLOWED_ERR=7&NOT_FOUND_ERR=8&NOT_SUPPORTED_ERR=9&INUSE_ATTRIBUTE_ERR=10&INVALID_STATE_ERR=11&SYNTAX_ERR=12&INVALID_MODIFICATION_ERR=13&NAMESPACE_ERR=14&INVALID_ACCESS_ERR=15&VALIDATION_ERR=16&TYPE_MISMATCH_ERR=17&SECURITY_ERR=18&NETWORK_ERR=19&ABORT_ERR=20&URL_MISMATCH_ERR=21"A_EXCEEDED_ERR=22&TIMEOUT_ERR=23&INVALID_NODE_TYPE_ERR=24&DATA_CLONE_ERR=25")
|
||||
}, "URLSearchParams constructor, DOMException.prototype as argument")
|
||||
assert_throws(new TypeError(), () => new URLSearchParams(DOMException.prototype),
|
||||
"Constructing a URLSearchParams from DOMException.prototype should throw due to branding checks");
|
||||
}, "URLSearchParams constructor, DOMException as argument")
|
||||
|
||||
test(() => {
|
||||
params = new URLSearchParams('');
|
||||
|
|
|
@ -36,6 +36,21 @@ test(function() {
|
|||
params.delete('first');
|
||||
assert_false(params.has('first'), 'Search params object has no "first" name');
|
||||
}, 'Deleting appended multiple');
|
||||
|
||||
test(function() {
|
||||
var url = new URL('http://example.com/?param1¶m2');
|
||||
url.searchParams.delete('param1');
|
||||
url.searchParams.delete('param2');
|
||||
assert_equals(url.href, 'http://example.com/', 'url.href does not have ?');
|
||||
assert_equals(url.search, '', 'url.search does not have ?');
|
||||
}, 'Deleting all params removes ? from URL');
|
||||
|
||||
test(function() {
|
||||
var url = new URL('http://example.com/?');
|
||||
url.searchParams.delete('param1');
|
||||
assert_equals(url.href, 'http://example.com/', 'url.href does not have ?');
|
||||
assert_equals(url.search, '', 'url.search does not have ?');
|
||||
}, 'Removing non-existent param removes ? from URL');
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
||||
|
|
|
@ -47,4 +47,11 @@
|
|||
}
|
||||
}, "URL parse and sort: " + val.input)
|
||||
})
|
||||
|
||||
test(function() {
|
||||
const url = new URL("http://example.com/?")
|
||||
url.searchParams.sort()
|
||||
assert_equals(url.href, "http://example.com/")
|
||||
assert_equals(url.search, "")
|
||||
}, "Sorting non-existent params removes ? from URL")
|
||||
</script>
|
||||
|
|
|
@ -5564,6 +5564,63 @@
|
|||
"search": "",
|
||||
"hash": ""
|
||||
},
|
||||
"# Windows drive letter quirk in the file slash state",
|
||||
{
|
||||
"input": "/c:/foo/bar",
|
||||
"base": "file:///c:/baz/qux",
|
||||
"href": "file:///c:/foo/bar",
|
||||
"protocol": "file:",
|
||||
"username": "",
|
||||
"password": "",
|
||||
"host": "",
|
||||
"hostname": "",
|
||||
"port": "",
|
||||
"pathname": "/c:/foo/bar",
|
||||
"search": "",
|
||||
"hash": ""
|
||||
},
|
||||
{
|
||||
"input": "/c|/foo/bar",
|
||||
"base": "file:///c:/baz/qux",
|
||||
"href": "file:///c:/foo/bar",
|
||||
"protocol": "file:",
|
||||
"username": "",
|
||||
"password": "",
|
||||
"host": "",
|
||||
"hostname": "",
|
||||
"port": "",
|
||||
"pathname": "/c:/foo/bar",
|
||||
"search": "",
|
||||
"hash": ""
|
||||
},
|
||||
{
|
||||
"input": "file:\\c:\\foo\\bar",
|
||||
"base": "file:///c:/baz/qux",
|
||||
"href": "file:///c:/foo/bar",
|
||||
"protocol": "file:",
|
||||
"username": "",
|
||||
"password": "",
|
||||
"host": "",
|
||||
"hostname": "",
|
||||
"port": "",
|
||||
"pathname": "/c:/foo/bar",
|
||||
"search": "",
|
||||
"hash": ""
|
||||
},
|
||||
{
|
||||
"input": "/c:/foo/bar",
|
||||
"base": "file://host/path",
|
||||
"href": "file:///c:/foo/bar",
|
||||
"protocol": "file:",
|
||||
"username": "",
|
||||
"password": "",
|
||||
"host": "",
|
||||
"hostname": "",
|
||||
"port": "",
|
||||
"pathname": "/c:/foo/bar",
|
||||
"search": "",
|
||||
"hash": ""
|
||||
},
|
||||
"# Windows drive letter quirk with not empty host",
|
||||
{
|
||||
"input": "file://example.net/C:/",
|
||||
|
@ -5746,6 +5803,24 @@
|
|||
"base": "about:blank",
|
||||
"failure": true
|
||||
},
|
||||
"Port overflow (2^32 + 81)",
|
||||
{
|
||||
"input": "http://f:4294967377/c",
|
||||
"base": "http://example.org/",
|
||||
"failure": true
|
||||
},
|
||||
"Port overflow (2^64 + 81)",
|
||||
{
|
||||
"input": "http://f:18446744073709551697/c",
|
||||
"base": "http://example.org/",
|
||||
"failure": true
|
||||
},
|
||||
"Port overflow (2^128 + 81)",
|
||||
{
|
||||
"input": "http://f:340282366920938463463374607431768211537/c",
|
||||
"base": "http://example.org/",
|
||||
"failure": true
|
||||
},
|
||||
"# Non-special-URL path tests",
|
||||
{
|
||||
"input": "sc://ñ",
|
||||
|
@ -6382,6 +6457,88 @@
|
|||
"search": "?a",
|
||||
"hash": "#%GH"
|
||||
},
|
||||
"Bad bases",
|
||||
{
|
||||
"input": "test-a.html",
|
||||
"base": "a",
|
||||
"failure": true
|
||||
},
|
||||
{
|
||||
"input": "test-a-slash.html",
|
||||
"base": "a/",
|
||||
"failure": true
|
||||
},
|
||||
{
|
||||
"input": "test-a-slash-slash.html",
|
||||
"base": "a//",
|
||||
"failure": true
|
||||
},
|
||||
{
|
||||
"input": "test-a-colon.html",
|
||||
"base": "a:",
|
||||
"failure": true
|
||||
},
|
||||
{
|
||||
"input": "test-a-colon-slash.html",
|
||||
"base": "a:/",
|
||||
"href": "a:/test-a-colon-slash.html",
|
||||
"protocol": "a:",
|
||||
"username": "",
|
||||
"password": "",
|
||||
"host": "",
|
||||
"hostname": "",
|
||||
"port": "",
|
||||
"pathname": "/test-a-colon-slash.html",
|
||||
"search": "",
|
||||
"hash": ""
|
||||
},
|
||||
{
|
||||
"input": "test-a-colon-slash-slash.html",
|
||||
"base": "a://",
|
||||
"href": "a:///test-a-colon-slash-slash.html",
|
||||
"protocol": "a:",
|
||||
"username": "",
|
||||
"password": "",
|
||||
"host": "",
|
||||
"hostname": "",
|
||||
"port": "",
|
||||
"pathname": "/test-a-colon-slash-slash.html",
|
||||
"search": "",
|
||||
"hash": ""
|
||||
},
|
||||
{
|
||||
"input": "test-a-colon-b.html",
|
||||
"base": "a:b",
|
||||
"failure": true
|
||||
},
|
||||
{
|
||||
"input": "test-a-colon-slash-b.html",
|
||||
"base": "a:/b",
|
||||
"href": "a:/test-a-colon-slash-b.html",
|
||||
"protocol": "a:",
|
||||
"username": "",
|
||||
"password": "",
|
||||
"host": "",
|
||||
"hostname": "",
|
||||
"port": "",
|
||||
"pathname": "/test-a-colon-slash-b.html",
|
||||
"search": "",
|
||||
"hash": ""
|
||||
},
|
||||
{
|
||||
"input": "test-a-colon-slash-slash-b.html",
|
||||
"base": "a://b",
|
||||
"href": "a://b/test-a-colon-slash-slash-b.html",
|
||||
"protocol": "a:",
|
||||
"username": "",
|
||||
"password": "",
|
||||
"host": "b",
|
||||
"hostname": "b",
|
||||
"port": "",
|
||||
"pathname": "/test-a-colon-slash-slash-b.html",
|
||||
"search": "",
|
||||
"hash": ""
|
||||
},
|
||||
"Null code point in fragment",
|
||||
{
|
||||
"input": "http://example.org/test?a#b\u0000c",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue