Bug 1633277 [wpt PR 23256] - URL: Percent encode NULLs in fragments, a=testonly

Automatic update from web-platform-tests
URL: percent encode NULLs in fragments

See https://github.com/whatwg/url/issues/440 and https://github.com/whatwg/url/pull/486 for context.
--

wpt-commits: efec8204e84d434d80407bb7cf8df37d33cabaa1
wpt-pr: 23256
This commit is contained in:
Rimas Misevičius 2020-04-28 11:46:25 +00:00
Родитель 44b66a789a
Коммит 5773e35270
2 изменённых файлов: 51 добавлений и 5 удалений

Просмотреть файл

@ -1848,12 +1848,30 @@
}
},
{
"comment": "Simple percent-encoding; nuls, tabs, and newlines are removed",
"comment": "Simple percent-encoding; tabs and newlines are removed",
"href": "a:/",
"new_value": "\u0000\u0001\t\n\r\u001f !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé",
"expected": {
"href": "a:/#%01%1F%20!%22#$%&'()*+,-./09:;%3C=%3E?@AZ[\\]^_%60az{|}~%7F%C2%80%C2%81%C3%89%C3%A9",
"hash": "#%01%1F%20!%22#$%&'()*+,-./09:;%3C=%3E?@AZ[\\]^_%60az{|}~%7F%C2%80%C2%81%C3%89%C3%A9"
"href": "a:/#%00%01%1F%20!%22#$%&'()*+,-./09:;%3C=%3E?@AZ[\\]^_%60az{|}~%7F%C2%80%C2%81%C3%89%C3%A9",
"hash": "#%00%01%1F%20!%22#$%&'()*+,-./09:;%3C=%3E?@AZ[\\]^_%60az{|}~%7F%C2%80%C2%81%C3%89%C3%A9"
}
},
{
"comment": "Percent-encode NULLs in fragment",
"href": "http://example.net",
"new_value": "a\u0000b",
"expected": {
"href": "http://example.net/#a%00b",
"hash": "#a%00b"
}
},
{
"comment": "Percent-encode NULLs in fragment",
"href": "non-spec:/",
"new_value": "a\u0000b",
"expected": {
"href": "non-spec:/#a%00b",
"hash": "#a%00b"
}
},
{

Просмотреть файл

@ -6672,7 +6672,7 @@
{
"input": "http://example.org/test?a#b\u0000c",
"base": "about:blank",
"href": "http://example.org/test?a#bc",
"href": "http://example.org/test?a#b%00c",
"protocol": "http:",
"username": "",
"password": "",
@ -6681,7 +6681,35 @@
"port": "",
"pathname": "/test",
"search": "?a",
"hash": "#bc"
"hash": "#b%00c"
},
{
"input": "non-spec://example.org/test?a#b\u0000c",
"base": "about:blank",
"href": "non-spec://example.org/test?a#b%00c",
"protocol": "non-spec:",
"username": "",
"password": "",
"host": "example.org",
"hostname": "example.org",
"port": "",
"pathname": "/test",
"search": "?a",
"hash": "#b%00c"
},
{
"input": "non-spec:/test?a#b\u0000c",
"base": "about:blank",
"href": "non-spec:/test?a#b%00c",
"protocol": "non-spec:",
"username": "",
"password": "",
"host": "",
"hostname": "",
"port": "",
"pathname": "/test",
"search": "?a",
"hash": "#b%00c"
},
"First scheme char - not allowed: https://github.com/whatwg/url/issues/464",
{