Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL: test setters with javascript URLs #4910

Merged
merged 1 commit into from
Feb 22, 2017
Merged

Conversation

annevk
Copy link
Member

@annevk annevk commented Feb 17, 2017

See whatwg/url#254 and
whatwg/html#2371 for changes to the standards.

@wpt-pr-bot
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot added the url label Feb 17, 2017
@ghost
Copy link

ghost commented Feb 17, 2017

Chrome (unstable channel)

Testing web-platform-tests at revision 388f156
Using browser at version 58.0.3013.3 dev
Starting 10 test iterations
All results were stable

All results

1 test ran
/url/url-setters.html
Subtest Results
OK
URL: Setting <javascript:alert(1)>.hash = 'castle' PASS
<area>: Setting <http://[email protected]>.password = 'secret' PASS
<a>: Setting <sc://x/>.hostname = '\n' FAIL
URL: Setting <https://example.net?lang=en-US#nav>.search = 'lang=fr' PASS
<a>: Setting <mailto:[email protected]>.protocol = 'http' Cannot-be-a-base URL doesn’t have a host, but URL in a special scheme must. FAIL
<a>: Setting <http://example.net:8080>.port = '' Port number is removed if empty is the new value FAIL
<area>: Setting <unix:/run/foo.socket>.password = 'secret' No host means no password PASS
URL: Setting <http://example.net/>.hostname = '[::1.2.3.4x]' FAIL
<a>: Setting <a://example.net>.protocol = 'B' Upper-case ASCII is lower-cased PASS
URL: Setting <http://example.net>.port = '8080' PASS
<area>: Setting <nonsense:///test>.protocol = 'https' FAIL
<area>: Setting <http://example.net>.port = '8080' PASS
<area>: Setting <http://:[email protected]>.username = 'me' PASS
URL: Setting <https://example.net>.search = '' PASS
<area>: Setting <file://hi/x>.hostname = '' FAIL
<a>: Setting <sc://x/>.hostname = '\r' FAIL
URL: Setting <http://example.net/path>.port = '8080\stuff' Stuff after a \ delimiter is ignored for special schemes PASS
<area>: Setting <ftp://example.net>.protocol = 'test' FAIL
<a>: Setting <https://example.net#nav>.pathname = '../home' PASS
URL: Setting <file://y/>.host = 'x:123' FAIL
URL: Setting <https://example.net#nav>.search = 'lang=fr' PASS
<area>: Setting <mailto:[email protected]>.pathname = '/foo' Cannot-be-a-base don’t have a path PASS
<area>: Setting <file:///home/me/index.html>.password = 'secret' No host means no password PASS
<a>: Setting <https://example.net#nav>.hash = 'main' PASS
URL: Setting <sc://x/>.host = '?' FAIL
<area>: Setting <sc://x/>.hostname = '@' FAIL
<a>: Setting <nonsense:///test>.protocol = 'https' FAIL
URL: Setting <file:///home/you/index.html>.username = 'me' No host means no username PASS
URL: Setting <unix:/run/foo.socket?timeout=10>.pathname = '/var/log/../run/bar.socket' FAIL
URL: Setting <http://example.net/path>.port = '8080?stuff' Stuff after a ? delimiter is ignored PASS
URL: Setting <http://example.net/>.hostname = '[::1.2.]' FAIL
URL: Setting <view-source+http://example.net/path>.host = 'example.com:8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error FAIL
URL: Setting <http://example.net/>.host = '[::1.]' FAIL
URL: Setting <sc://x/>.host = ' ' FAIL
<area>: Setting <sc://x/>.port = '12' FAIL
<area>: Setting <sc://x/>.hostname = '\r' FAIL
<area>: Setting <http://example.net/>.hostname = '[google.com]' Broken IPv6 FAIL
<a>: Setting <sc://x/>.hostname = '?' FAIL
<area>: Setting <http://example.net/path>.port = '8080/stuff' Stuff after a / delimiter is ignored PASS
<area>: Setting <sc://x/>.hostname = '#' FAIL
<a>: Setting <http://example.net>.host = '' The empty host is not valid for special schemes PASS
<a>: Setting <http://example.net/>.host = '[::1.]' FAIL
URL: Setting <http://example.net/path>.host = 'example.com:8080\stuff' Stuff after a \ delimiter is ignored for special schemes PASS
<area>: Setting <file://y/>.hostname = 'x:123' FAIL
<area>: Setting <http://example.net/>.hostname = '[::1.2.3.4x]' FAIL
<area>: Setting <ssh://[email protected]>.protocol = 'gopher' FAIL
<a>: Setting <sc://x/>.hostname = '@' FAIL
<area>: Setting <a:/>.pathname = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the default encode set. Tabs and newlines are removed.`
URL: Setting <http://example.net:8080>.port = '80' Default port number is removed PASS
URL: Setting <http://example.net/>.host = '[::1.2.]' FAIL
<area>: Setting <unix:/run/foo.socket?timeout=10>.pathname = '/var/log/../run/bar.socket' FAIL
<area>: Setting <http://example.net:8080>.hostname = '0x7F000001' IPv4 address syntax is normalized PASS
<area>: Setting <mailto:[email protected]>.username = 'me' Cannot-be-a-base means no username PASS
<area>: Setting <https://example.net?lang=en-US#nav>.search = '??lang=fr' PASS
<a>: Setting <sc:///>.username = 'x' PASS
<a>: Setting <mailto:[email protected]>.host = 'example.com' Cannot-be-a-base means no host PASS
<a>: Setting <http://example.net>.protocol = 'b' Can’t switch from special scheme to non-special FAIL
URL: Setting <a:/>.hash = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' Simple percent-encoding; nuls, tabs, and newlines are removed`
<a>: Setting <http://example.net/>.host = '[::1.2.]' FAIL
<a>: Setting <mailto:[email protected]>.hostname = 'example.com' Cannot-be-a-base means no host PASS
URL: Setting <sc://x/>.host = '@' FAIL
<a>: Setting <sc:///>.port = '12' PASS
<area>: Setting <a://example.net>.protocol = '+b' No leading punctuation PASS
<area>: Setting <sc://test@test/>.hostname = '' FAIL
<area>: Setting <http://example.net>.protocol = 'b' Can’t switch from special scheme to non-special FAIL
URL: Setting <http://example.net>.hostname = '[::0:01]' IPv6 address syntax is normalized PASS
<area>: Setting <http://example.net:8080>.port = '80' Default port number is removed PASS
URL: Setting <https://example.net?lang=en-US>.search = '' PASS
<area>: Setting <data:text/plain,Stuff>.host = 'example.net' Cannot-be-a-base means no password PASS
<a>: Setting <https://example.net?lang=en-US#nav>.search = '??lang=fr' PASS
<a>: Setting <sc://x/>.hostname = ' ' FAIL
<area>: Setting <http://example.net:8080>.port = '' Port number is removed if empty is the new value FAIL
URL: Setting <file:///home/me/index.html>.password = 'secret' No host means no password PASS
<a>: Setting <https://example.net?lang=en-US#nav>.hash = '' PASS
<a>: Setting <http://example.net:8080>.host = 'example.com' Port number is unchanged if not specified in the new value PASS
<a>: Setting <http://example.net>.password = '%c3%89té' Bytes already percent-encoded are left as-is. PASS
<area>: Setting <http://example.net>.username = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the userinfo encode set.`
<a>: Setting <https://example.net>.host = 'example.com:80' Default port number is only removed for the relevant scheme PASS
<a>: Setting <http://example.net/path>.host = 'example.com:8080/stuff' Stuff after a / delimiter is ignored PASS
<a>: Setting <a://example.net>.protocol = 'b' PASS
URL: Setting <http://[email protected]>.username = '' PASS
<a>: Setting <http://example.net/path>.hostname = 'example.com:8080' Stuff after a : delimiter is ignored FAIL
URL: Setting <file://localhost/>.port = '12' FAIL
<a>: Setting <file:///home/you/index.html>.username = 'me' No host means no username PASS
<a>: Setting <sc://x/>.hostname = '\t' FAIL
<a>: Setting <http://example.net/path>.host = 'example.com:8080?stuff' Stuff after a ? delimiter is ignored PASS
<a>: Setting <a://example.net>.protocol = 'bC0+-.' PASS
<a>: Setting <http://example.net/path>.host = 'example.com:65536' Port numbers are 16 bit integers, overflowing is an error. Hostname is still set, though. FAIL
URL: Setting <http://example.net/path>.hostname = 'example.com#stuff' Stuff after a # delimiter is ignored FAIL
<area>: Setting <file://test/>.port = '12' PASS
<area>: Setting <sc://x/>.host = '/' FAIL
<area>: Setting <http://example.net/path>.host = 'example.com#stuff' Stuff after a # delimiter is ignored FAIL
<a>: Setting <http://example.net/>.host = '[google.com]' Broken IPv6 FAIL
<area>: Setting <mailto:[email protected]>.password = 'secret' Cannot-be-a-base means no password PASS
<a>: Setting <http://example.net/path>.host = 'example.com:65535' Port numbers are 16 bit integers PASS
<area>: Setting <file://hi/x>.host = '' FAIL
<a>: Setting <a:/>.search = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the query encode set. Tabs and newlines are removed.`
<a>: Setting <http://me:[email protected]>.username = '' PASS
URL: Setting <http://example.net>.hash = '%c3%89té' Bytes already percent-encoded are left as-is FAIL
URL: Setting <http://example.net>.host = '[::0:01]:2' IPv6 address syntax is normalized FAIL
<a>: Setting <https://example.net>.hash = 'main' PASS
URL: Setting <http://example.net:8080/path>.hostname = 'example.com:' Stuff after a : delimiter is ignored FAIL
<a>: Setting <http://example.net/>.hostname = '[google.com]' Broken IPv6 FAIL
<a>: Setting <http://example.net/home?lang=fr#nav>.pathname = '\a\%2E\b\%2e.\c' \ is a segment delimiter for 'special' URLs PASS
<a>: Setting <sc://test:12/>.host = '' FAIL
<area>: Setting <https://example.net?lang=en-US#nav>.search = '?lang=fr' PASS
<a>: Setting <data:text/plain,Stuff>.host = 'example.net' Cannot-be-a-base means no password PASS
URL: Setting <sc://example.net>.pathname = '?' ? needs to be encoded, non-special scheme FAIL
<area>: Setting <file://test/>.username = 'test' PASS
<area>: Setting <view-source+http://example.net/path>.port = '8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error FAIL
URL: Setting <view-source+http://example.net/home?lang=fr#nav>.pathname = '\a\%2E\b\%2e.\c' \ is *not* a segment delimiter for non-'special' URLs FAIL
<area>: Setting <http://example.net/path>.host = 'example.com:8080\stuff' Stuff after a \ delimiter is ignored for special schemes PASS
URL: Setting <http://example.net>.pathname = '?' ? needs to be encoded PASS
<area>: Setting <file:///home/you/index.html>.username = 'me' No host means no username PASS
URL: Setting <mailto:[email protected]>.password = 'secret' Cannot-be-a-base means no password PASS
URL: Setting <http://example.net/path>.host = 'example.com:8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
URL: Setting <sc://x/>.host = '\t' FAIL
<area>: Setting <http://example.net/>.host = '[::1.]' FAIL
<area>: Setting <http://example.net/home?lang=fr#nav>.pathname = '\a\%2E\b\%2e.\c' \ is a segment delimiter for 'special' URLs PASS
<a>: Setting <a:/>.hash = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' Simple percent-encoding; nuls, tabs, and newlines are removed`
<area>: Setting <javascript:alert(1)>.hash = 'castle' PASS
<a>: Setting <sc://x/>.host = '/' FAIL
<area>: Setting <https://example.net>.port = '80' Default port number is only removed for the relevant scheme PASS
<area>: Setting <http://example.net/path>.host = 'example.com\stuff' Stuff after a \ delimiter is ignored for special schemes FAIL
URL: Setting <a://example.net>.protocol = 'B' Upper-case ASCII is lower-cased PASS
URL: Setting <https://example.net>.host = 'example.com:443' Default port number is removed PASS
URL: Setting <http://example.net/path>.host = 'example.com:65536' Port numbers are 16 bit integers, overflowing is an error. Hostname is still set, though. FAIL
<area>: Setting <http://example.net/path>.host = 'example.com:8080#stuff' Stuff after a # delimiter is ignored PASS
<a>: Setting <http://example.net/>.host = '[::1.2.3.4x]' FAIL
<a>: Setting <javascript://x/>.port = '12' FAIL
URL: Setting <mailto:[email protected]>.hostname = 'example.com' Cannot-be-a-base means no host PASS
<a>: Setting <https://example.net?lang=en-US#nav>.search = '?lang=fr' PASS
<a>: Setting <https://example.net?lang=en-US#nav>.search = '?' FAIL
URL: Setting <http://example.net:8080>.host = 'example.com' Port number is unchanged if not specified in the new value PASS
<area>: Setting <file://y/>.hostname = 'loc%41lhost' FAIL
<area>: Setting <a:/>.hash = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' Simple percent-encoding; nuls, tabs, and newlines are removed`
URL: Setting <a://example.net>.protocol = 'b' PASS
<a>: Setting <a://example.net>.protocol = '' The empty string is not a valid scheme. Setter leaves the URL unchanged. PASS
<a>: Setting <http://example.net/path>.host = 'example.com:8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
<area>: Setting <javascript:alert(1)>.username = 'wario' PASS
URL: Setting <http://example.net/path>.host = 'example.com:8080?stuff' Stuff after a ? delimiter is ignored PASS
<a>: Setting <view-source+http://example.net/path>.host = 'example.com:8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error FAIL
<a>: Setting <http://example.net/>.hostname = '[::1.]' FAIL
URL: Setting <https://example.net#nav>.pathname = 'home' PASS
URL: Setting <http://example.net/>.hostname = '[::1.]' FAIL
<area>: Setting <a://example.net>.protocol = 'b,c' Only some punctuation is acceptable PASS
<area>: Setting <http://example.net>.hash = '%c3%89té' Bytes already percent-encoded are left as-is FAIL
<a>: Setting <view-source+http://example.net/path>.hostname = 'example.com\stuff' \ is not a delimiter for non-special schemes, but still forbidden in hosts FAIL
<area>: Setting <https://example.net#nav>.pathname = 'home' PASS
<area>: Setting <http://example.net>.host = '0x7F000001:8080' IPv4 address syntax is normalized PASS
<area>: Setting <http://example.net/path>.host = 'example.com:8080?stuff' Stuff after a ? delimiter is ignored PASS
<area>: Setting <http://example.net/path>.hostname = 'example.com/stuff' Stuff after a / delimiter is ignored FAIL
<area>: Setting <javascript://x/>.username = 'wario' FAIL
<area>: Setting <a://example.net>.protocol = 'bé' Non-ASCII is rejected PASS
URL: Setting <unix:/run/foo.socket>.password = 'secret' No host means no password PASS
URL: Setting <http://example.net>.username = '%c3%89té' Bytes already percent-encoded are left as-is. PASS
<area>: Setting <http://example.net>.password = 'secret' PASS
URL: Setting <http://example.net/path>.hostname = 'example.com:8080' Stuff after a : delimiter is ignored FAIL
URL: Setting <sc://x/>.hostname = '/' FAIL
<a>: Setting <https://example.net?lang=en-US#nav>.search = '' PASS
URL: Setting <https://example.net?lang=en-US#nav>.hash = '#' FAIL
<a>: Setting <http://example.net>.pathname = '%2e%2E%c3%89té' Bytes already percent-encoded are left as-is, including %2E outside dotted segments. FAIL
<a>: Setting <javascript:alert(1)>.protocol = 'defuse' PASS
<a>: Setting <unix:/run/foo.socket>.username = 'me' No host means no username PASS
<area>: Setting <a:/foo>.host = 'example.net' Path-only URLs can gain a host FAIL
URL: Setting <http://example.net/path>.host = 'example.com\stuff' Stuff after a \ delimiter is ignored for special schemes FAIL
URL: Setting <https://example.net>.port = '80' Default port number is only removed for the relevant scheme PASS
<area>: Setting <http://example.net>.host = 'example.com:8080' PASS
<area>: Setting <file://test/>.password = 'test' PASS
<a>: Setting <http://example.net>.username = '%c3%89té' Bytes already percent-encoded are left as-is. PASS
URL: Setting <sc://x/>.host = '\n' FAIL
<area>: Setting <https://example.net?lang=en-US#nav>.search = '' PASS
<a>: Setting <https://example.net?lang=en-US#nav>.hash = '#' FAIL
URL: Setting <a://example.net>.protocol = '+b' No leading punctuation PASS
<area>: Setting <http://example.net/path>.port = '8080+2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
<area>: Setting <http://example.net>.password = '%c3%89té' Bytes already percent-encoded are left as-is. PASS
<area>: Setting <data:text/plain,Stuff>.hostname = 'example.net' Cannot-be-a-base means no password PASS
URL: Setting <file://hi/x>.host = '' FAIL
<a>: Setting <ssh://[email protected]>.protocol = 'file' FAIL
<area>: Setting <http://example.net/path>.host = 'example.com?stuff' Stuff after a ? delimiter is ignored FAIL
<a>: Setting <ftp://example.net>.protocol = 'test' FAIL
URL: Setting <sc:///>.password = 'x' PASS
URL: Setting <file://test/>.password = 'test' PASS
URL: Setting <file://y/>.hostname = 'x:123' FAIL
URL: Setting <http://example.net>.password = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the userinfo encode set.`
<area>: Setting <http://example.net/path>.port = '8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
<a>: Setting <sc://x/>.host = '#' FAIL
<area>: Setting <http://example.net>.host = '' The empty host is not valid for special schemes PASS
<a>: Setting <http://example.net>.password = 'secret' PASS
<area>: Setting <sc://x/>.hostname = '' Non-special scheme FAIL
<a>: Setting <view-source+http://example.net/home?lang=fr#nav>.pathname = '\a\%2E\b\%2e.\c' \ is *not* a segment delimiter for non-'special' URLs FAIL
URL: Setting <a://example.net>.protocol = 'é' Non-ASCII is rejected PASS
<area>: Setting <http://example.net>.hostname = '' The empty host is not valid for special schemes PASS
<area>: Setting <view-source+http://example.net/foo>.host = '' The empty host is OK for non-special schemes FAIL
URL: Setting <http://example.net>.host = '0x7F000001:8080' IPv4 address syntax is normalized PASS
<area>: Setting <https://example.net>.search = '' PASS
URL: Setting <http://me:[email protected]>.password = '' PASS
<area>: Setting <a://example.net>.protocol = '' The empty string is not a valid scheme. Setter leaves the URL unchanged. PASS
<a>: Setting <view-source+http://example.net/path>.port = '8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error FAIL
URL: Setting <http://example.net:8080>.host = 'example.com:' Port number is unchanged if not specified FAIL
<area>: Setting <http://example.net/>.host = '[::1.2.]' FAIL
URL: Setting <http://example.net>.host = 'example.com:80' Default port number is removed PASS
URL: Setting <ssh://[email protected]>.protocol = 'http' Can’t switch from non-special scheme to special FAIL
<area>: Setting <http://example.net/path>.port = '8080#stuff' Stuff after a # delimiter is ignored PASS
<a>: Setting <a://example.net>.protocol = '+b' No leading punctuation PASS
<area>: Setting <https://example.net>.host = 'example.com:443' Default port number is removed PASS
<a>: Setting <a:/foo>.host = 'example.net' Path-only URLs can gain a host FAIL
URL: Setting <a://example.net>.protocol = 'bé' Non-ASCII is rejected PASS
URL: Setting <https://example.net?lang=en-US#nav>.search = '?' FAIL
<a>: Setting <view-source+http://example.net/path>.host = 'example.com\stuff' \ is not a delimiter for non-special schemes, but still forbidden in hosts FAIL
<a>: Setting <http://example.net/path>.port = '8080+2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
<area>: Setting <http://example.net/path>.port = '65535' Port numbers are 16 bit integers PASS
<a>: Setting <http://example.net>.hostname = '' The empty host is not valid for special schemes PASS
<area>: Setting <mailto:[email protected]>.hostname = 'example.com' Cannot-be-a-base means no host PASS
URL: Setting <a://example.net>.protocol = '' The empty string is not a valid scheme. Setter leaves the URL unchanged. PASS
<area>: Setting <http://example.net/>.host = '[google.com]' Broken IPv6 FAIL
<a>: Setting <file:///home/me/index.html>.password = 'secret' No host means no password PASS
URL: Setting <data:text/plain,Stuff>.host = 'example.net' Cannot-be-a-base means no password PASS
<area>: Setting <view-source+http://example.net/path>.hostname = 'example.com\stuff' \ is not a delimiter for non-special schemes, but still forbidden in hosts FAIL
<a>: Setting <http://example.net/path>.host = 'example.com#stuff' Stuff after a # delimiter is ignored FAIL
URL: Setting <a:/foo>.hostname = 'example.net' Path-only URLs can gain a host FAIL
URL: Setting <http://example.net/path>.port = '65535' Port numbers are 16 bit integers PASS
<a>: Setting <sc://x/>.hostname = '#' FAIL
URL: Setting <http://example.net>.pathname = '#' # needs to be encoded PASS
<area>: Setting <a://example.net>.protocol = '0b' No leading digit PASS
<area>: Setting <sc://example.net>.pathname = '?' ? needs to be encoded, non-special scheme FAIL
URL: Setting <sc://test@test/>.hostname = '' FAIL
Loading data… PASS
<area>: Setting <http://example.net/path>.host = 'example.com:65536' Port numbers are 16 bit integers, overflowing is an error. Hostname is still set, though. FAIL
<a>: Setting <https://example.net>.search = '' PASS
<a>: Setting <file://y/>.hostname = 'loc%41lhost' FAIL
<a>: Setting <sc://test:12/>.hostname = '' FAIL
<a>: Setting <a://example.net>.protocol = 'bé' Non-ASCII is rejected PASS
URL: Setting <data:text/html,<p>Test>.protocol = 'view-source+data:foo : bar' Stuff after the first ':' is ignored PASS
<a>: Setting <https://example.net?lang=en-US>.hash = '##nav' PASS
URL: Setting <non-base:value>.port = '12' PASS
<area>: Setting <http://:[email protected]>.password = '' PASS
<area>: Setting <a:/foo>.hostname = 'example.net' Path-only URLs can gain a host FAIL
URL: Setting <file://test/>.port = '12' PASS
URL: Setting <http://example.net/path>.host = 'example.com:8080#stuff' Stuff after a # delimiter is ignored PASS
<area>: Setting <sc://x/>.hostname = '/' FAIL
<area>: Setting <https://example.net?lang=en-US#nav>.hash = '#' FAIL
<area>: Setting <ssh://[email protected]>.protocol = 'http' Can’t switch from non-special scheme to special FAIL
<area>: Setting <http://example.net>.host = '[::0:01]:2' IPv6 address syntax is normalized FAIL
URL: Setting <sc://test@test/>.host = '' FAIL
<a>: Setting <http://example.net/path>.host = 'example.com:8080+2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
<a>: Setting <sc://test@test/>.hostname = '' FAIL
<a>: Setting <http://example.net/path>.hostname = 'example.com?stuff' Stuff after a ? delimiter is ignored FAIL
<area>: Setting <http://example.net/path>.host = 'example.com:8080/stuff' Stuff after a / delimiter is ignored PASS
<area>: Setting <view-source+http://example.net/home?lang=fr#nav>.pathname = '\a\%2E\b\%2e.\c' \ is *not* a segment delimiter for non-'special' URLs FAIL
<a>: Setting <sc://x/>.hostname = '' Non-special scheme FAIL
<a>: Setting <https://example.net?lang=en-US#nav>.search = 'lang=fr' PASS
<area>: Setting <sc://x/>.host = '@' FAIL
<a>: Setting <http://:[email protected]>.username = 'me' PASS
<a>: Setting <data:text/plain,Stuff>.hostname = 'example.net' Cannot-be-a-base means no password PASS
URL: Setting <view-source+http://example.net/path>.hostname = 'example.com\stuff' \ is not a delimiter for non-special schemes, but still forbidden in hosts FAIL
<a>: Setting <https://example.net#nav>.search = 'lang=fr' PASS
URL: Setting <sc://x/>.hostname = '\n' FAIL
URL: Setting <http://example.net/home?lang=fr#nav>.pathname = '\a\%2E\b\%2e.\c' \ is a segment delimiter for 'special' URLs PASS
URL: Setting <http://example.net/path>.host = 'example.com?stuff' Stuff after a ? delimiter is ignored FAIL
URL: Setting <a://example.net>.protocol = 'b,c' Only some punctuation is acceptable PASS
<a>: Setting <http://example.net:8080/path>.port = '65536' Port numbers are 16 bit integers, overflowing is an error FAIL
<a>: Setting <http://example.net/path>.port = '8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
<area>: Setting <ssh://[email protected]>.protocol = 'file' FAIL
<a>: Setting <http://example.net/>.hostname = '[::1.2.3.4x]' FAIL
<area>: Setting <https://example.net?lang=en-US>.hash = '##nav' PASS
<area>: Setting <file://y/>.host = 'loc%41lhost' FAIL
<area>: Setting <https://example.net?lang=en-US>.search = '' PASS
URL: Setting <sc://x/>.host = '/' FAIL
<area>: Setting <http://me:[email protected]>.password = '' PASS
<area>: Setting <https://example.net?lang=en-US#nav>.hash = '' PASS
<area>: Setting <https://example.net?lang=en-US#nav>.hash = '#main' PASS
<a>: Setting <http://example.net>.password = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the userinfo encode set.`
<a>: Setting <data:text/html,<p>Test>.protocol = 'view-source+data:foo : bar' Stuff after the first ':' is ignored PASS
<area>: Setting <https://example.net#nav>.pathname = '../home' PASS
<a>: Setting <http://example.net:8080>.port = '80' Default port number is removed PASS
<a>: Setting <http://example.net/path>.port = '8080\stuff' Stuff after a \ delimiter is ignored for special schemes PASS
<a>: Setting <http://example.net/path>.host = 'example.com:8080\stuff' Stuff after a \ delimiter is ignored for special schemes PASS
<a>: Setting <file://y/>.host = 'x:123' FAIL
<a>: Setting <sc://x/>.hostname = '/' FAIL
<area>: Setting <a://example.net>.protocol = 'bC0+-.' PASS
<a>: Setting <file://test/>.username = 'test' PASS
URL: Setting <https://example.net>.hash = 'main' PASS
URL: Setting <http://example.net/path>.port = '8080/stuff' Stuff after a / delimiter is ignored PASS
<a>: Setting <https://example.net>.protocol = 's' FAIL
<a>: Setting <http://example.net/path>.hostname = 'example.com/stuff' Stuff after a / delimiter is ignored FAIL
<area>: Setting <sc://x/>.host = '\r' FAIL
URL: Setting <view-source+http://example.net/path>.host = 'example.com\stuff' \ is not a delimiter for non-special schemes, but still forbidden in hosts FAIL
URL: Setting <http://example.net:8080/path>.port = '65536' Port numbers are 16 bit integers, overflowing is an error FAIL
<area>: Setting <https://example.net>.protocol = 's' FAIL
<area>: Setting <sc://test@test/>.host = '' FAIL
<area>: Setting <sc://x/>.host = '#' FAIL
<area>: Setting <http://example.net/>.hostname = '[::1.]' FAIL
<area>: Setting <sc:///>.password = 'x' PASS
<a>: Setting <file://hi/x>.host = '' FAIL
<area>: Setting <http://example.net/path>.host = 'example.com:8080+2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
<a>: Setting <file://localhost/>.port = '12' FAIL
URL: Setting <http://example.net/path>.host = 'example.com#stuff' Stuff after a # delimiter is ignored FAIL
URL: Setting <https://example.net?lang=en-US#nav>.search = '?lang=fr' PASS
URL: Setting <a://example.net>.protocol = 'bC0+-.' PASS
<a>: Setting <http://example.net/>.host = '[::1.2.3.]' FAIL
<a>: Setting <http://example.net>.protocol = 'https:foo : bar' Stuff after the first ':' is ignored PASS
URL: Setting <javascript://x/>.password = 'bowser' FAIL
<area>: Setting <a://example.net>.protocol = 'b' PASS
<area>: Setting <javascript://x/>.port = '12' FAIL
<area>: Setting <sc:///>.username = 'x' PASS
<area>: Setting <sc://example.net>.pathname = '#' # needs to be encoded, non-special scheme FAIL
URL: Setting <https://example.net>.protocol = 's' FAIL
URL: Setting <sc://x/>.port = '12' FAIL
<area>: Setting <http://example.net:8080/path>.port = '65536' Port numbers are 16 bit integers, overflowing is an error FAIL
<area>: Setting <http://example.net>.host = 'example.com:80' Default port number is removed PASS
<a>: Setting <https://example.net:4433>.port = '443' Default port number is removed PASS
<area>: Setting <https://example.net?lang=en-US#nav>.search = 'lang=fr' PASS
<a>: Setting <sc://test@test/>.host = '' FAIL
<area>: Setting <mailto:[email protected]>.host = 'example.com' Cannot-be-a-base means no host PASS
<a>: Setting <http://example.net>.pathname = '#' # needs to be encoded PASS
URL: Setting <sc:///>.username = 'x' PASS
<a>: Setting <https://example.net#nav>.pathname = 'home' PASS
<area>: Setting <http://example.net/path>.port = '8080\stuff' Stuff after a \ delimiter is ignored for special schemes PASS
<area>: Setting <file://localhost/>.port = '12' FAIL
URL: Setting <mailto:[email protected]>.username = 'me' Cannot-be-a-base means no username PASS
URL: Setting <http://example.net:8080>.hostname = '0x7F000001' IPv4 address syntax is normalized PASS
<area>: Setting <mailto:[email protected]>.protocol = 'http' Cannot-be-a-base URL doesn’t have a host, but URL in a special scheme must. FAIL
<area>: Setting <https://example.net#nav>.hash = 'main' PASS
<a>: Setting <sc://x/>.host = ' ' FAIL
URL: Setting <http://example.net>.host = '' The empty host is not valid for special schemes PASS
<area>: Setting <sc:///>.port = '12' PASS
<area>: Setting <http://example.net/path>.hostname = 'example.com:8080' Stuff after a : delimiter is ignored FAIL
URL: Setting <sc://test:12/>.hostname = '' FAIL
<area>: Setting <http://example.net/path>.hostname = 'example.com#stuff' Stuff after a # delimiter is ignored FAIL
<a>: Setting <http://example.net>.search = '%c3%89té' Bytes already percent-encoded are left as-is PASS
<a>: Setting <https://example.net>.port = '80' Default port number is only removed for the relevant scheme PASS
URL: Setting <http://example.net>.protocol = 'b' Can’t switch from special scheme to non-special FAIL
<a>: Setting <http://example.net>.username = 'me' PASS
<area>: Setting <sc://x/>.host = '' Non-special scheme FAIL
<area>: Setting <sc://x/>.hostname = '\n' FAIL
<a>: Setting <http://example.net/path>.host = 'example.com\stuff' Stuff after a \ delimiter is ignored for special schemes FAIL
URL: Setting <http://[email protected]>.password = 'secret' PASS
URL: Setting <http://:[email protected]>.password = '' PASS
URL: Setting <http://example.net:8080>.port = '' Port number is removed if empty is the new value FAIL
URL: Setting <ssh://[email protected]>.protocol = 'file' FAIL
URL: Setting <http://example.net/path>.hostname = 'example.com\stuff' Stuff after a \ delimiter is ignored for special schemes FAIL
<a>: Setting <ssh://[email protected]>.protocol = 'http' Can’t switch from non-special scheme to special FAIL
<a>: Setting <http://example.net:8080>.hostname = 'example.com' PASS
URL: Setting <nonsense:///test>.protocol = 'https' FAIL
<area>: Setting <http://example.net>.username = 'me' PASS
<area>: Setting <view-source+http://example.net/foo>.hostname = '' The empty host is OK for non-special schemes FAIL
URL: Setting <file://hi/x>.hostname = '' FAIL
<a>: Setting <file://test/>.port = '12' PASS
<a>: Setting <a://example.net>.protocol = '0b' No leading digit PASS
<a>: Setting <sc://example.net>.pathname = '#' # needs to be encoded, non-special scheme FAIL
<area>: Setting <https://example.net>.hash = 'main' PASS
<a>: Setting <file://y/>.hostname = 'x:123' FAIL
<area>: Setting <sc://x/>.host = '\t' FAIL
URL: Setting <https://example.net#nav>.pathname = '../home' PASS
<a>: Setting <unix:/run/foo.socket?timeout=10>.pathname = '/var/log/../run/bar.socket' FAIL
<a>: Setting <mailto:[email protected]>.username = 'me' Cannot-be-a-base means no username PASS
<area>: Setting <http://example.net>.password = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the userinfo encode set.`
<area>: Setting <sc://x/>.host = '?' FAIL
URL: Setting <http://example.net/path>.port = '8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
<a>: Setting <http://example.net:8080>.hostname = '0x7F000001' IPv4 address syntax is normalized PASS
URL: Setting <sc://x/>.hostname = '@' FAIL
<area>: Setting <http://example.net/path>.hostname = 'example.com?stuff' Stuff after a ? delimiter is ignored FAIL
<a>: Setting <sc://x/>.host = '\t' FAIL
URL: Setting <javascript:alert(1)>.protocol = 'defuse' PASS
<area>: Setting <a:/>.search = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the query encode set. Tabs and newlines are removed.`
<a>: Setting <file://test/>.password = 'test' PASS
<a>: Setting <ssh://[email protected]>.protocol = 'gopher' FAIL
<area>: Setting <view-source+http://example.net/path>.host = 'example.com\stuff' \ is not a delimiter for non-special schemes, but still forbidden in hosts FAIL
<area>: Setting <sc://x/>.host = ' ' FAIL
<area>: Setting <http://example.net/path>.host = 'example.com/stuff' Stuff after a / delimiter is ignored FAIL
<a>: Setting <sc://x/>.host = '' Non-special scheme FAIL
URL: Setting <http://example.net/path>.host = 'example.com:8080+2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
<a>: Setting <mailto:[email protected]>.pathname = '/foo' Cannot-be-a-base don’t have a path PASS
URL: Setting <https://example.net?lang=en-US#nav>.search = '' PASS
URL: Setting <ftp://example.net>.protocol = 'test' FAIL
URL: Setting <sc://example.net>.pathname = '#' # needs to be encoded, non-special scheme FAIL
<a>: Setting <http://example.net/path>.port = '8080/stuff' Stuff after a / delimiter is ignored PASS
URL: Setting <sc://x/>.host = '' Non-special scheme FAIL
<a>: Setting <sc://x/>.host = '?' FAIL
<area>: Setting <http://[email protected]>.username = '' PASS
<a>: Setting <a://example.net>.protocol = 'b,c' Only some punctuation is acceptable PASS
URL: Setting <sc://x/>.hostname = ' ' FAIL
<a>: Setting <http://example.net/path>.host = 'example.com:8080#stuff' Stuff after a # delimiter is ignored PASS
<a>: Setting <http://example.net:8080>.host = 'example.com:' Port number is unchanged if not specified FAIL
<area>: Setting <https://example.net#nav>.search = 'lang=fr' PASS
<area>: Setting <file://y/>.host = 'x:123' FAIL
<area>: Setting <https://example.net?lang=en-US#nav>.search = '?' FAIL
URL: Setting <mailto:[email protected]>.pathname = '/foo' Cannot-be-a-base don’t have a path PASS
<a>: Setting <https://example.net>.host = 'example.com:443' Default port number is removed PASS
<area>: Setting <http://example.net>.hostname = '[::0:01]' IPv6 address syntax is normalized PASS
<a>: Setting <http://example.net>.host = '[::0:01]:2' IPv6 address syntax is normalized FAIL
<a>: Setting <sc://x/>.host = '@' FAIL
URL: Setting <http://me:[email protected]>.username = '' PASS
URL: Setting <sc://x/>.hostname = '\t' FAIL
URL: Setting <https://example.net:4433>.port = '443' Default port number is removed PASS
URL: Setting <https://example.net>.host = 'example.com:80' Default port number is only removed for the relevant scheme PASS
URL: Setting <http://example.net/>.hostname = '[::1.2.3.]' FAIL
<area>: Setting <http://example.net:8080>.hostname = 'example.com' PASS
<a>: Setting <javascript://x/>.password = 'bowser' FAIL
<a>: Setting <view-source+http://example.net/foo>.hostname = '' The empty host is OK for non-special schemes FAIL
URL: Setting <sc:///>.port = '12' PASS
URL: Setting <a:/>.pathname = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the default encode set. Tabs and newlines are removed.`
<a>: Setting <http://example.net/path>.hostname = 'example.com#stuff' Stuff after a # delimiter is ignored FAIL
URL: Setting <view-source+http://example.net/path>.port = '8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error FAIL
<a>: Setting <http://example.net>.host = 'example.com:8080' PASS
<a>: Setting <http://example.net>.host = '0x7F000001:8080' IPv4 address syntax is normalized PASS
URL: Setting <http://example.net>.username = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the userinfo encode set.`
<a>: Setting <http://example.net/>.hostname = '[::1.2.]' FAIL
URL: Setting <https://example.net?lang=en-US#nav>.hash = '' PASS
<a>: Setting <javascript://x/>.username = 'wario' FAIL
URL: Setting <http://example.net/>.host = '[google.com]' Broken IPv6 FAIL
<a>: Setting <https://example.net?lang=en-US#nav>.hash = '#main' PASS
URL: Setting <a://example.net>.protocol = '0b' No leading digit PASS
<a>: Setting <http://[email protected]>.password = 'secret' PASS
<a>: Setting <http://example.net>.hostname = '[::0:01]' IPv6 address syntax is normalized PASS
<a>: Setting <javascript:alert(1)>.hash = 'castle' PASS
<area>: Setting <http://example.net>.pathname = '?' ? needs to be encoded PASS
<area>: Setting <http://example.net/path>.port = '8080?stuff' Stuff after a ? delimiter is ignored PASS
<area>: Setting <http://example.net>.username = '%c3%89té' Bytes already percent-encoded are left as-is. PASS
URL: Setting <sc://x/>.hostname = '?' FAIL
URL: Setting <http://example.net>.protocol = 'https:foo : bar' Stuff after the first ':' is ignored PASS
<a>: Setting <sc:///>.password = 'x' PASS
<area>: Setting <http://example.net>.pathname = '#' # needs to be encoded PASS
URL: Setting <http://example.net/path>.host = 'example.com:8080/stuff' Stuff after a / delimiter is ignored PASS
<a>: Setting <http://example.net>.username = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the userinfo encode set.`
URL: Setting <sc://x/>.hostname = '' Non-special scheme FAIL
<a>: Setting <sc://example.net>.pathname = '?' ? needs to be encoded, non-special scheme FAIL
URL: Setting <view-source+http://example.net/foo>.host = '' The empty host is OK for non-special schemes FAIL
<a>: Setting <sc://x/>.host = '\r' FAIL
<a>: Setting <http://example.net>.hash = '%c3%89té' Bytes already percent-encoded are left as-is FAIL
<area>: Setting <http://example.net>.pathname = '%2e%2E%c3%89té' Bytes already percent-encoded are left as-is, including %2E outside dotted segments. FAIL
<area>: Setting <view-source+http://example.net/path>.host = 'example.com:8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error FAIL
URL: Setting <file://test/>.username = 'test' PASS
<area>: Setting <http://example.net:8080>.host = 'example.com' Port number is unchanged if not specified in the new value PASS
URL: Setting <http://example.net/>.hostname = '[google.com]' Broken IPv6 FAIL
<a>: Setting <http://example.net/path>.host = 'example.com/stuff' Stuff after a / delimiter is ignored FAIL
<area>: Setting <http://example.net>.protocol = 'https:foo : bar' Stuff after the first ':' is ignored PASS
URL: Setting <file://y/>.hostname = 'loc%41lhost' FAIL
<a>: Setting <http://example.net/path>.port = '8080?stuff' Stuff after a ? delimiter is ignored PASS
URL: Setting <https://example.net#nav>.hash = 'main' PASS
<a>: Setting <http://example.net>.port = '8080' PASS
<a>: Setting <a://example.net>.protocol = 'é' Non-ASCII is rejected PASS
<a>: Setting <sc://x/>.host = '\n' FAIL
<a>: Setting <mailto:[email protected]>.password = 'secret' Cannot-be-a-base means no password PASS
URL: Setting <http://example.net/path>.port = '8080+2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
<a>: Setting <http://example.net/path>.port = '8080#stuff' Stuff after a # delimiter is ignored PASS
URL: Setting <https://example.net?lang=en-US>.hash = '##nav' PASS
<a>: Setting <http://[email protected]>.username = '' PASS
URL: Setting <data:text/plain,Stuff>.hostname = 'example.net' Cannot-be-a-base means no password PASS
URL: Setting <file://y/>.host = 'loc%41lhost' FAIL
<area>: Setting <https://example.net:4433>.port = '443' Default port number is removed PASS
<area>: Setting <http://example.net/>.hostname = '[::1.2.]' FAIL
<a>: Setting <https://example.net?lang=en-US>.search = '' PASS
URL: Setting <http://example.net/path>.host = 'example.com/stuff' Stuff after a / delimiter is ignored FAIL
URL: Setting <https://example.net?lang=en-US#nav>.search = '??lang=fr' PASS
URL: Setting <http://example.net>.host = 'example.com:8080' PASS
URL: Setting <http://example.net>.hostname = '' The empty host is not valid for special schemes PASS
<area>: Setting <a://example.net>.protocol = 'B' Upper-case ASCII is lower-cased PASS
<area>: Setting <a://example.net>.protocol = 'é' Non-ASCII is rejected PASS
URL: Setting <view-source+http://example.net/foo>.hostname = '' The empty host is OK for non-special schemes FAIL
<a>: Setting <sc://x/>.port = '12' FAIL
<area>: Setting <http://example.net/path>.host = 'example.com:8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
<area>: Setting <http://example.net:8080>.host = 'example.com:' Port number is unchanged if not specified FAIL
<a>: Setting <non-base:value>.port = '12' PASS
<area>: Setting <sc://test:12/>.host = '' FAIL
<area>: Setting <data:text/html,<p>Test>.protocol = 'view-source+data:foo : bar' Stuff after the first ':' is ignored PASS
<area>: Setting <non-base:value>.port = '12' PASS
URL: Setting <sc://x/>.hostname = '#' FAIL
URL: Setting <sc://x/>.host = '\r' FAIL
<area>: Setting <sc://x/>.hostname = ' ' FAIL
URL: Setting <sc://x/>.hostname = '\r' FAIL
URL: Setting <sc://x/>.host = '#' FAIL
<a>: Setting <http://me:[email protected]>.password = '' PASS
URL: Setting <http://example.net/>.host = '[::1.2.3.]' FAIL
<a>: Setting <http://example.net>.pathname = '?' ? needs to be encoded PASS
<area>: Setting <sc://test:12/>.hostname = '' FAIL
<area>: Setting <http://example.net/path>.hostname = 'example.com\stuff' Stuff after a \ delimiter is ignored for special schemes FAIL
<a>: Setting <http://example.net/path>.hostname = 'example.com\stuff' Stuff after a \ delimiter is ignored for special schemes FAIL
<area>: Setting <javascript://x/>.password = 'bowser' FAIL
<a>: Setting <http://:[email protected]>.password = '' PASS
URL: Setting <http://example.net:8080>.hostname = 'example.com' PASS
<area>: Setting <sc://x/>.hostname = '\t' FAIL
<a>: Setting <view-source+http://example.net/foo>.host = '' The empty host is OK for non-special schemes FAIL
<a>: Setting <http://example.net>.host = 'example.com:80' Default port number is removed PASS
URL: Setting <https://example.net?lang=en-US#nav>.hash = '#main' PASS
<a>: Setting <a:/foo>.hostname = 'example.net' Path-only URLs can gain a host FAIL
<area>: Setting <javascript:alert(1)>.protocol = 'defuse' PASS
<area>: Setting <http://example.net>.search = '%c3%89té' Bytes already percent-encoded are left as-is PASS
URL: Setting <http://example.net>.password = '%c3%89té' Bytes already percent-encoded are left as-is. PASS
<area>: Setting <http://me:[email protected]>.username = '' PASS
<area>: Setting <http://example.net/>.hostname = '[::1.2.3.]' FAIL
<a>: Setting <javascript:alert(1)>.username = 'wario' PASS
URL: Setting <http://example.net/path>.hostname = 'example.com/stuff' Stuff after a / delimiter is ignored FAIL
<area>: Setting <https://example.net>.host = 'example.com:80' Default port number is only removed for the relevant scheme PASS
<a>: Setting <http://example.net:8080/path>.hostname = 'example.com:' Stuff after a : delimiter is ignored FAIL
URL: Setting <javascript:alert(1)>.username = 'wario' PASS
URL: Setting <javascript://x/>.username = 'wario' FAIL
<a>: Setting <file://y/>.host = 'loc%41lhost' FAIL
<area>: Setting <http://example.net/>.host = '[::1.2.3.]' FAIL
<area>: Setting <unix:/run/foo.socket>.username = 'me' No host means no username PASS
URL: Setting <a:/foo>.host = 'example.net' Path-only URLs can gain a host FAIL
<a>: Setting <http://example.net/>.hostname = '[::1.2.3.]' FAIL
<area>: Setting <http://example.net/>.host = '[::1.2.3.4x]' FAIL
URL: Setting <http://example.net>.username = 'me' PASS
URL: Setting <http://example.net>.password = 'secret' PASS
URL: Setting <http://example.net/path>.host = 'example.com:65535' Port numbers are 16 bit integers PASS
URL: Setting <http://example.net>.search = '%c3%89té' Bytes already percent-encoded are left as-is PASS
<a>: Setting <file://hi/x>.hostname = '' FAIL
<area>: Setting <http://example.net:8080/path>.hostname = 'example.com:' Stuff after a : delimiter is ignored FAIL
<area>: Setting <sc://x/>.host = '\n' FAIL
<a>: Setting <a:/>.pathname = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the default encode set. Tabs and newlines are removed.`
URL: Setting <mailto:[email protected]>.protocol = 'http' Cannot-be-a-base URL doesn’t have a host, but URL in a special scheme must. FAIL
<area>: Setting <sc://x/>.hostname = '?' FAIL
<a>: Setting <unix:/run/foo.socket>.password = 'secret' No host means no password PASS
URL: Setting <mailto:[email protected]>.host = 'example.com' Cannot-be-a-base means no host PASS
URL: Setting <ssh://[email protected]>.protocol = 'gopher' FAIL
URL: Setting <http://:[email protected]>.username = 'me' PASS
<a>: Setting <http://example.net/path>.port = '65535' Port numbers are 16 bit integers PASS
URL: Setting <javascript://x/>.port = '12' FAIL
URL: Setting <http://example.net/path>.hostname = 'example.com?stuff' Stuff after a ? delimiter is ignored FAIL
URL: Setting <http://example.net/>.host = '[::1.2.3.4x]' FAIL
<a>: Setting <http://example.net/path>.host = 'example.com?stuff' Stuff after a ? delimiter is ignored FAIL
<area>: Setting <http://example.net/path>.host = 'example.com:65535' Port numbers are 16 bit integers PASS
URL: Setting <http://example.net/path>.port = '8080#stuff' Stuff after a # delimiter is ignored PASS
URL: Setting <a:/>.search = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the query encode set. Tabs and newlines are removed.`
URL: Setting <sc://test:12/>.host = '' FAIL
URL: Setting <http://example.net>.pathname = '%2e%2E%c3%89té' Bytes already percent-encoded are left as-is, including %2E outside dotted segments. FAIL
URL: Setting <unix:/run/foo.socket>.username = 'me' No host means no username PASS

@ghost
Copy link

ghost commented Feb 17, 2017

Firefox (nightly channel)

Testing web-platform-tests at revision 388f156
Using browser at version BuildID 20170123125947; SourceStamp 36486fdc3813ef7943ae5b07b4128866d1938a6c
Starting 10 test iterations
All results were stable

All results

1 test ran
/url/url-setters.html
Subtest Results
OK
URL: Setting <javascript:alert(1)>.hash = 'castle' PASS
<area>: Setting <http://[email protected]>.password = 'secret' PASS
<a>: Setting <sc://x/>.hostname = '\n' FAIL
URL: Setting <https://example.net?lang=en-US#nav>.search = 'lang=fr' PASS
<a>: Setting <mailto:[email protected]>.protocol = 'http' Cannot-be-a-base URL doesn’t have a host, but URL in a special scheme must. FAIL
<a>: Setting <http://example.net:8080>.port = '' Port number is removed if empty is the new value PASS
URL: Setting <sc://x/>.host = '' Non-special scheme FAIL
<area>: Setting <unix:/run/foo.socket>.password = 'secret' No host means no password PASS
URL: Setting <http://example.net/>.hostname = '[::1.2.3.4x]' PASS
<a>: Setting <a://example.net>.protocol = 'B' Upper-case ASCII is lower-cased PASS
URL: Setting <http://example.net>.port = '8080' PASS
<area>: Setting <nonsense:///test>.protocol = 'https' FAIL
<area>: Setting <http://example.net>.port = '8080' PASS
<area>: Setting <http://:[email protected]>.username = 'me' FAIL
URL: Setting <https://example.net>.search = '' PASS
<area>: Setting <file://hi/x>.hostname = '' PASS
<a>: Setting <sc://x/>.hostname = '\r' FAIL
URL: Setting <http://example.net/path>.port = '8080\stuff' Stuff after a \ delimiter is ignored for special schemes PASS
<area>: Setting <ftp://example.net>.protocol = 'test' FAIL
<a>: Setting <https://example.net#nav>.pathname = '../home' PASS
URL: Setting <file://y/>.host = 'x:123' FAIL
URL: Setting <https://example.net#nav>.search = 'lang=fr' PASS
<area>: Setting <mailto:[email protected]>.pathname = '/foo' Cannot-be-a-base don’t have a path FAIL
<area>: Setting <file:///home/me/index.html>.password = 'secret' No host means no password PASS
<a>: Setting <https://example.net#nav>.hash = 'main' PASS
URL: Setting <sc://x/>.host = '?' FAIL
<area>: Setting <sc://x/>.hostname = '@' FAIL
<a>: Setting <http://example.net>.username = '%c3%89té' Bytes already percent-encoded are left as-is. PASS
URL: Setting <file:///home/you/index.html>.username = 'me' No host means no username PASS
URL: Setting <unix:/run/foo.socket?timeout=10>.pathname = '/var/log/../run/bar.socket' FAIL
URL: Setting <http://example.net/path>.port = '8080?stuff' Stuff after a ? delimiter is ignored PASS
URL: Setting <http://example.net/>.hostname = '[::1.2.]' PASS
URL: Setting <view-source+http://example.net/path>.host = 'example.com:8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error FAIL
URL: Setting <http://example.net/>.host = '[::1.]' PASS
URL: Setting <sc://x/>.host = ' ' FAIL
<area>: Setting <sc://x/>.port = '12' FAIL
<area>: Setting <sc://x/>.hostname = '\r' FAIL
<area>: Setting <http://example.net/>.hostname = '[google.com]' Broken IPv6 PASS
<a>: Setting <sc://x/>.hostname = '?' FAIL
<area>: Setting <http://example.net/path>.port = '8080/stuff' Stuff after a / delimiter is ignored PASS
<area>: Setting <sc://x/>.hostname = '#' FAIL
<a>: Setting <http://example.net>.host = '' The empty host is not valid for special schemes PASS
<a>: Setting <http://example.net/>.host = '[::1.]' PASS
URL: Setting <http://example.net/path>.host = 'example.com:8080\stuff' Stuff after a \ delimiter is ignored for special schemes PASS
<area>: Setting <file://y/>.hostname = 'x:123' FAIL
<area>: Setting <http://example.net/>.hostname = '[::1.2.3.4x]' PASS
<area>: Setting <ssh://[email protected]>.protocol = 'gopher' FAIL
<a>: Setting <sc://x/>.hostname = '@' FAIL
URL: Setting <http://example.net:8080>.port = '80' Default port number is removed PASS
URL: Setting <http://example.net/>.host = '[::1.2.]' PASS
<area>: Setting <unix:/run/foo.socket?timeout=10>.pathname = '/var/log/../run/bar.socket' FAIL
<area>: Setting <http://example.net:8080>.hostname = '0x7F000001' IPv4 address syntax is normalized PASS
<area>: Setting <mailto:[email protected]>.username = 'me' Cannot-be-a-base means no username PASS
<a>: Setting <sc://x/>.hostname = '' Non-special scheme FAIL
<area>: Setting <https://example.net?lang=en-US#nav>.search = '??lang=fr' PASS
<a>: Setting <sc:///>.username = 'x' PASS
<a>: Setting <mailto:[email protected]>.host = 'example.com' Cannot-be-a-base means no host PASS
<a>: Setting <http://example.net>.protocol = 'b' Can’t switch from special scheme to non-special FAIL
<a>: Setting <http://example.net/>.host = '[::1.2.]' PASS
<a>: Setting <mailto:[email protected]>.hostname = 'example.com' Cannot-be-a-base means no host PASS
URL: Setting <sc://x/>.host = '@' FAIL
<a>: Setting <sc:///>.port = '12' PASS
<a>: Setting <a:/>.search = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the query encode set. Tabs and newlines are removed.`
<area>: Setting <a://example.net>.protocol = '+b' No leading punctuation PASS
<area>: Setting <sc://test@test/>.hostname = '' FAIL
<area>: Setting <http://example.net>.protocol = 'b' Can’t switch from special scheme to non-special FAIL
URL: Setting <http://example.net>.hostname = '[::0:01]' IPv6 address syntax is normalized FAIL
<area>: Setting <http://example.net:8080>.port = '80' Default port number is removed PASS
URL: Setting <https://example.net?lang=en-US>.search = '' PASS
<area>: Setting <data:text/plain,Stuff>.host = 'example.net' Cannot-be-a-base means no password PASS
<a>: Setting <https://example.net?lang=en-US#nav>.search = '??lang=fr' PASS
<a>: Setting <javascript://x/>.password = 'bowser' FAIL
<area>: Setting <http://example.net:8080>.port = '' Port number is removed if empty is the new value PASS
URL: Setting <file:///home/me/index.html>.password = 'secret' No host means no password PASS
<a>: Setting <https://example.net?lang=en-US#nav>.hash = '' PASS
<a>: Setting <http://example.net:8080>.host = 'example.com' Port number is unchanged if not specified in the new value PASS
<a>: Setting <http://example.net>.password = '%c3%89té' Bytes already percent-encoded are left as-is. FAIL
<a>: Setting <https://example.net>.host = 'example.com:80' Default port number is only removed for the relevant scheme PASS
<a>: Setting <http://example.net/path>.host = 'example.com:8080/stuff' Stuff after a / delimiter is ignored PASS
<a>: Setting <a://example.net>.protocol = 'b' PASS
URL: Setting <http://[email protected]>.username = '' PASS
<a>: Setting <http://example.net/path>.hostname = 'example.com:8080' Stuff after a : delimiter is ignored FAIL
URL: Setting <file://localhost/>.port = '12' PASS
<a>: Setting <file:///home/you/index.html>.username = 'me' No host means no username PASS
<a>: Setting <sc://x/>.hostname = '\t' FAIL
<a>: Setting <http://example.net/path>.host = 'example.com:8080?stuff' Stuff after a ? delimiter is ignored PASS
<a>: Setting <a://example.net>.protocol = 'bC0+-.' PASS
<a>: Setting <http://example.net/path>.host = 'example.com:65536' Port numbers are 16 bit integers, overflowing is an error. Hostname is still set, though. PASS
<a>: Setting <a:/>.pathname = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the default encode set. Tabs and newlines are removed.`
URL: Setting <http://example.net/path>.hostname = 'example.com#stuff' Stuff after a # delimiter is ignored PASS
<area>: Setting <file://test/>.port = '12' FAIL
<area>: Setting <sc://x/>.host = '/' FAIL
<area>: Setting <http://example.net/path>.host = 'example.com#stuff' Stuff after a # delimiter is ignored PASS
<a>: Setting <http://example.net/>.host = '[google.com]' Broken IPv6 PASS
<area>: Setting <mailto:[email protected]>.password = 'secret' Cannot-be-a-base means no password PASS
<a>: Setting <http://example.net/path>.host = 'example.com:65535' Port numbers are 16 bit integers PASS
<area>: Setting <file://hi/x>.host = '' PASS
URL: Setting <a:/>.pathname = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the default encode set. Tabs and newlines are removed.`
<a>: Setting <http://me:[email protected]>.username = '' FAIL
URL: Setting <http://example.net>.hash = '%c3%89té' Bytes already percent-encoded are left as-is PASS
URL: Setting <http://example.net>.host = '[::0:01]:2' IPv6 address syntax is normalized FAIL
<a>: Setting <https://example.net>.hash = 'main' PASS
URL: Setting <http://example.net:8080/path>.hostname = 'example.com:' Stuff after a : delimiter is ignored FAIL
<a>: Setting <http://example.net/>.hostname = '[google.com]' Broken IPv6 PASS
<a>: Setting <http://example.net/home?lang=fr#nav>.pathname = '\a\%2E\b\%2e.\c' \ is a segment delimiter for 'special' URLs FAIL
<a>: Setting <sc://test:12/>.host = '' FAIL
<area>: Setting <https://example.net?lang=en-US#nav>.search = '?lang=fr' PASS
<a>: Setting <data:text/plain,Stuff>.host = 'example.net' Cannot-be-a-base means no password PASS
URL: Setting <sc://example.net>.pathname = '?' ? needs to be encoded, non-special scheme FAIL
<area>: Setting <file://test/>.username = 'test' FAIL
<area>: Setting <view-source+http://example.net/path>.port = '8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error FAIL
URL: Setting <view-source+http://example.net/home?lang=fr#nav>.pathname = '\a\%2E\b\%2e.\c' \ is *not* a segment delimiter for non-'special' URLs FAIL
<area>: Setting <http://example.net/path>.host = 'example.com:8080\stuff' Stuff after a \ delimiter is ignored for special schemes PASS
URL: Setting <http://example.net>.pathname = '?' ? needs to be encoded PASS
<area>: Setting <file:///home/you/index.html>.username = 'me' No host means no username PASS
URL: Setting <mailto:[email protected]>.password = 'secret' Cannot-be-a-base means no password PASS
URL: Setting <http://example.net/path>.host = 'example.com:8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
URL: Setting <sc://x/>.host = '\t' FAIL
<area>: Setting <http://example.net/>.host = '[::1.]' PASS
<area>: Setting <http://example.net/home?lang=fr#nav>.pathname = '\a\%2E\b\%2e.\c' \ is a segment delimiter for 'special' URLs FAIL
<area>: Setting <javascript:alert(1)>.hash = 'castle' PASS
<a>: Setting <sc://x/>.host = '/' FAIL
<area>: Setting <https://example.net>.port = '80' Default port number is only removed for the relevant scheme PASS
<area>: Setting <http://example.net/path>.host = 'example.com\stuff' Stuff after a \ delimiter is ignored for special schemes PASS
URL: Setting <a://example.net>.protocol = 'B' Upper-case ASCII is lower-cased PASS
URL: Setting <https://example.net>.host = 'example.com:443' Default port number is removed PASS
URL: Setting <http://example.net/path>.host = 'example.com:65536' Port numbers are 16 bit integers, overflowing is an error. Hostname is still set, though. PASS
<area>: Setting <sc://x/>.host = '' Non-special scheme FAIL
<area>: Setting <http://example.net/path>.host = 'example.com:8080#stuff' Stuff after a # delimiter is ignored PASS
<a>: Setting <http://example.net/>.host = '[::1.2.3.4x]' PASS
<a>: Setting <javascript://x/>.port = '12' FAIL
URL: Setting <mailto:[email protected]>.hostname = 'example.com' Cannot-be-a-base means no host PASS
<a>: Setting <https://example.net?lang=en-US#nav>.search = '?lang=fr' PASS
<a>: Setting <https://example.net?lang=en-US#nav>.search = '?' PASS
URL: Setting <http://example.net:8080>.host = 'example.com' Port number is unchanged if not specified in the new value PASS
<area>: Setting <file://y/>.hostname = 'loc%41lhost' PASS
URL: Setting <a://example.net>.protocol = 'b' PASS
<a>: Setting <a://example.net>.protocol = '' The empty string is not a valid scheme. Setter leaves the URL unchanged. PASS
<a>: Setting <http://example.net/path>.host = 'example.com:8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
<area>: Setting <javascript:alert(1)>.username = 'wario' PASS
URL: Setting <http://example.net/path>.host = 'example.com:8080?stuff' Stuff after a ? delimiter is ignored PASS
<a>: Setting <view-source+http://example.net/path>.host = 'example.com:8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error FAIL
<a>: Setting <http://example.net/>.hostname = '[::1.]' PASS
URL: Setting <https://example.net#nav>.pathname = 'home' PASS
URL: Setting <http://example.net/>.hostname = '[::1.]' PASS
<area>: Setting <a://example.net>.protocol = 'b,c' Only some punctuation is acceptable PASS
<area>: Setting <http://example.net>.hash = '%c3%89té' Bytes already percent-encoded are left as-is PASS
<a>: Setting <view-source+http://example.net/path>.hostname = 'example.com\stuff' \ is not a delimiter for non-special schemes, but still forbidden in hosts FAIL
<area>: Setting <https://example.net#nav>.pathname = 'home' PASS
<area>: Setting <http://example.net>.host = '0x7F000001:8080' IPv4 address syntax is normalized PASS
<area>: Setting <http://example.net/path>.host = 'example.com:8080?stuff' Stuff after a ? delimiter is ignored PASS
<area>: Setting <http://example.net/path>.hostname = 'example.com/stuff' Stuff after a / delimiter is ignored PASS
<area>: Setting <javascript://x/>.username = 'wario' FAIL
<area>: Setting <a://example.net>.protocol = 'bé' Non-ASCII is rejected PASS
URL: Setting <unix:/run/foo.socket>.password = 'secret' No host means no password PASS
URL: Setting <http://example.net>.username = '%c3%89té' Bytes already percent-encoded are left as-is. PASS
<area>: Setting <http://example.net>.password = 'secret' FAIL
URL: Setting <http://example.net/path>.hostname = 'example.com:8080' Stuff after a : delimiter is ignored FAIL
URL: Setting <sc://x/>.hostname = '/' FAIL
<a>: Setting <https://example.net?lang=en-US#nav>.search = '' PASS
URL: Setting <https://example.net?lang=en-US#nav>.hash = '#' PASS
<a>: Setting <http://example.net>.pathname = '%2e%2E%c3%89té' Bytes already percent-encoded are left as-is, including %2E outside dotted segments. PASS
<a>: Setting <javascript:alert(1)>.protocol = 'defuse' PASS
<a>: Setting <unix:/run/foo.socket>.username = 'me' No host means no username PASS
<area>: Setting <a:/foo>.host = 'example.net' Path-only URLs can gain a host FAIL
URL: Setting <http://example.net/path>.host = 'example.com\stuff' Stuff after a \ delimiter is ignored for special schemes PASS
URL: Setting <https://example.net>.port = '80' Default port number is only removed for the relevant scheme PASS
<area>: Setting <http://example.net>.host = 'example.com:8080' PASS
<area>: Setting <file://test/>.password = 'test' FAIL
<a>: Setting <nonsense:///test>.protocol = 'https' FAIL
URL: Setting <sc://x/>.host = '\n' FAIL
<area>: Setting <https://example.net?lang=en-US#nav>.search = '' PASS
<a>: Setting <https://example.net?lang=en-US#nav>.hash = '#' PASS
URL: Setting <a://example.net>.protocol = '+b' No leading punctuation PASS
<area>: Setting <http://example.net/path>.port = '8080+2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
<area>: Setting <http://example.net>.password = '%c3%89té' Bytes already percent-encoded are left as-is. FAIL
<area>: Setting <data:text/plain,Stuff>.hostname = 'example.net' Cannot-be-a-base means no password PASS
URL: Setting <file://hi/x>.host = '' PASS
URL: Setting <a:/>.hash = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' Simple percent-encoding; nuls, tabs, and newlines are removed`
<a>: Setting <ssh://[email protected]>.protocol = 'file' FAIL
<area>: Setting <http://example.net/path>.host = 'example.com?stuff' Stuff after a ? delimiter is ignored PASS
<a>: Setting <ftp://example.net>.protocol = 'test' FAIL
URL: Setting <sc:///>.password = 'x' PASS
URL: Setting <file://test/>.password = 'test' FAIL
URL: Setting <file://y/>.hostname = 'x:123' FAIL
<area>: Setting <http://example.net/path>.port = '8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
<a>: Setting <sc://x/>.host = '#' FAIL
<area>: Setting <http://example.net>.host = '' The empty host is not valid for special schemes PASS
<a>: Setting <http://example.net>.password = 'secret' FAIL
<a>: Setting <view-source+http://example.net/home?lang=fr#nav>.pathname = '\a\%2E\b\%2e.\c' \ is *not* a segment delimiter for non-'special' URLs FAIL
URL: Setting <a://example.net>.protocol = 'é' Non-ASCII is rejected PASS
<area>: Setting <http://example.net>.hostname = '' The empty host is not valid for special schemes PASS
<area>: Setting <view-source+http://example.net/foo>.host = '' The empty host is OK for non-special schemes FAIL
URL: Setting <http://example.net>.host = '0x7F000001:8080' IPv4 address syntax is normalized PASS
<area>: Setting <https://example.net>.search = '' PASS
URL: Setting <http://me:[email protected]>.password = '' PASS
<area>: Setting <a://example.net>.protocol = '' The empty string is not a valid scheme. Setter leaves the URL unchanged. PASS
<a>: Setting <view-source+http://example.net/path>.port = '8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error FAIL
URL: Setting <http://example.net:8080>.host = 'example.com:' Port number is unchanged if not specified PASS
<area>: Setting <http://example.net/>.host = '[::1.2.]' PASS
URL: Setting <http://example.net>.host = 'example.com:80' Default port number is removed PASS
URL: Setting <ssh://[email protected]>.protocol = 'http' Can’t switch from non-special scheme to special FAIL
<area>: Setting <http://example.net/path>.port = '8080#stuff' Stuff after a # delimiter is ignored PASS
<a>: Setting <a://example.net>.protocol = '+b' No leading punctuation PASS
<area>: Setting <https://example.net>.host = 'example.com:443' Default port number is removed PASS
<a>: Setting <a:/foo>.host = 'example.net' Path-only URLs can gain a host FAIL
URL: Setting <a://example.net>.protocol = 'bé' Non-ASCII is rejected PASS
URL: Setting <https://example.net?lang=en-US#nav>.search = '?' PASS
<a>: Setting <view-source+http://example.net/path>.host = 'example.com\stuff' \ is not a delimiter for non-special schemes, but still forbidden in hosts FAIL
<a>: Setting <http://example.net/path>.port = '8080+2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
<area>: Setting <http://example.net/path>.port = '65535' Port numbers are 16 bit integers PASS
<a>: Setting <http://example.net>.hostname = '' The empty host is not valid for special schemes PASS
<area>: Setting <mailto:[email protected]>.hostname = 'example.com' Cannot-be-a-base means no host PASS
URL: Setting <a://example.net>.protocol = '' The empty string is not a valid scheme. Setter leaves the URL unchanged. PASS
<area>: Setting <http://example.net/>.host = '[google.com]' Broken IPv6 PASS
<a>: Setting <file:///home/me/index.html>.password = 'secret' No host means no password PASS
URL: Setting <data:text/plain,Stuff>.host = 'example.net' Cannot-be-a-base means no password PASS
<area>: Setting <view-source+http://example.net/path>.hostname = 'example.com\stuff' \ is not a delimiter for non-special schemes, but still forbidden in hosts FAIL
URL: Setting <http://example.net>.username = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the userinfo encode set.`
<a>: Setting <http://example.net/path>.host = 'example.com#stuff' Stuff after a # delimiter is ignored PASS
URL: Setting <sc://x/>.hostname = '' Non-special scheme FAIL
URL: Setting <a:/foo>.hostname = 'example.net' Path-only URLs can gain a host FAIL
URL: Setting <http://example.net/path>.port = '65535' Port numbers are 16 bit integers PASS
<a>: Setting <sc://x/>.hostname = '#' FAIL
URL: Setting <http://example.net>.pathname = '#' # needs to be encoded PASS
<area>: Setting <a://example.net>.protocol = '0b' No leading digit PASS
<area>: Setting <sc://example.net>.pathname = '?' ? needs to be encoded, non-special scheme FAIL
URL: Setting <sc://test@test/>.hostname = '' FAIL
Loading data… PASS
<area>: Setting <http://example.net/path>.host = 'example.com:65536' Port numbers are 16 bit integers, overflowing is an error. Hostname is still set, though. PASS
<a>: Setting <https://example.net>.search = '' PASS
<a>: Setting <file://y/>.hostname = 'loc%41lhost' PASS
<a>: Setting <sc://test:12/>.hostname = '' FAIL
<a>: Setting <a://example.net>.protocol = 'bé' Non-ASCII is rejected PASS
URL: Setting <data:text/html,<p>Test>.protocol = 'view-source+data:foo : bar' Stuff after the first ':' is ignored PASS
<a>: Setting <https://example.net?lang=en-US>.hash = '##nav' PASS
URL: Setting <non-base:value>.port = '12' PASS
<area>: Setting <http://:[email protected]>.password = '' FAIL
<area>: Setting <a:/foo>.hostname = 'example.net' Path-only URLs can gain a host FAIL
URL: Setting <file://test/>.port = '12' FAIL
URL: Setting <http://example.net/path>.host = 'example.com:8080#stuff' Stuff after a # delimiter is ignored PASS
<area>: Setting <sc://x/>.hostname = '/' FAIL
<area>: Setting <https://example.net?lang=en-US#nav>.hash = '#' PASS
<area>: Setting <ssh://[email protected]>.protocol = 'http' Can’t switch from non-special scheme to special FAIL
<area>: Setting <http://example.net>.host = '[::0:01]:2' IPv6 address syntax is normalized FAIL
URL: Setting <sc://test@test/>.host = '' FAIL
<a>: Setting <http://example.net/path>.host = 'example.com:8080+2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
<a>: Setting <sc://test@test/>.hostname = '' FAIL
<a>: Setting <http://example.net/path>.hostname = 'example.com?stuff' Stuff after a ? delimiter is ignored PASS
<area>: Setting <http://example.net/path>.host = 'example.com:8080/stuff' Stuff after a / delimiter is ignored PASS
<area>: Setting <view-source+http://example.net/home?lang=fr#nav>.pathname = '\a\%2E\b\%2e.\c' \ is *not* a segment delimiter for non-'special' URLs FAIL
<a>: Setting <https://example.net?lang=en-US#nav>.search = 'lang=fr' PASS
<area>: Setting <sc://x/>.host = '@' FAIL
<a>: Setting <http://:[email protected]>.username = 'me' FAIL
<a>: Setting <data:text/plain,Stuff>.hostname = 'example.net' Cannot-be-a-base means no password PASS
URL: Setting <view-source+http://example.net/path>.hostname = 'example.com\stuff' \ is not a delimiter for non-special schemes, but still forbidden in hosts FAIL
<a>: Setting <https://example.net#nav>.search = 'lang=fr' PASS
URL: Setting <sc://x/>.hostname = '\n' FAIL
URL: Setting <http://example.net/home?lang=fr#nav>.pathname = '\a\%2E\b\%2e.\c' \ is a segment delimiter for 'special' URLs FAIL
URL: Setting <http://example.net/path>.host = 'example.com?stuff' Stuff after a ? delimiter is ignored PASS
URL: Setting <a://example.net>.protocol = 'b,c' Only some punctuation is acceptable PASS
<a>: Setting <http://example.net:8080/path>.port = '65536' Port numbers are 16 bit integers, overflowing is an error PASS
<a>: Setting <http://example.net/path>.port = '8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
<area>: Setting <ssh://[email protected]>.protocol = 'file' FAIL
<a>: Setting <http://example.net/>.hostname = '[::1.2.3.4x]' PASS
<area>: Setting <https://example.net?lang=en-US>.hash = '##nav' PASS
<area>: Setting <file://y/>.host = 'loc%41lhost' PASS
<area>: Setting <https://example.net?lang=en-US>.search = '' PASS
URL: Setting <sc://x/>.host = '/' FAIL
<area>: Setting <http://me:[email protected]>.password = '' PASS
<area>: Setting <https://example.net?lang=en-US#nav>.hash = '' PASS
<area>: Setting <https://example.net?lang=en-US#nav>.hash = '#main' PASS
<a>: Setting <data:text/html,<p>Test>.protocol = 'view-source+data:foo : bar' Stuff after the first ':' is ignored PASS
<area>: Setting <https://example.net#nav>.pathname = '../home' PASS
URL: Setting <http://example.net>.password = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the userinfo encode set.`
<a>: Setting <http://example.net:8080>.port = '80' Default port number is removed PASS
<a>: Setting <http://example.net/path>.port = '8080\stuff' Stuff after a \ delimiter is ignored for special schemes PASS
<a>: Setting <http://example.net/path>.host = 'example.com:8080\stuff' Stuff after a \ delimiter is ignored for special schemes PASS
<a>: Setting <file://y/>.host = 'x:123' FAIL
<a>: Setting <sc://x/>.hostname = '/' FAIL
<area>: Setting <a://example.net>.protocol = 'bC0+-.' PASS
<a>: Setting <file://test/>.username = 'test' FAIL
URL: Setting <https://example.net>.hash = 'main' PASS
URL: Setting <http://example.net/path>.port = '8080/stuff' Stuff after a / delimiter is ignored PASS
<a>: Setting <https://example.net>.protocol = 's' FAIL
<a>: Setting <http://example.net>.password = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the userinfo encode set.`
<a>: Setting <http://example.net/path>.hostname = 'example.com/stuff' Stuff after a / delimiter is ignored PASS
<area>: Setting <sc://x/>.host = '\r' FAIL
URL: Setting <view-source+http://example.net/path>.host = 'example.com\stuff' \ is not a delimiter for non-special schemes, but still forbidden in hosts FAIL
<area>: Setting <http://example.net>.password = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the userinfo encode set.`
URL: Setting <http://example.net:8080/path>.port = '65536' Port numbers are 16 bit integers, overflowing is an error PASS
<area>: Setting <https://example.net>.protocol = 's' FAIL
<area>: Setting <sc://test@test/>.host = '' FAIL
<area>: Setting <sc://x/>.host = '#' FAIL
<area>: Setting <http://example.net/>.hostname = '[::1.]' PASS
<area>: Setting <sc:///>.password = 'x' PASS
<a>: Setting <file://hi/x>.host = '' PASS
<area>: Setting <http://example.net/path>.host = 'example.com:8080+2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
<a>: Setting <file://localhost/>.port = '12' PASS
URL: Setting <http://example.net/path>.host = 'example.com#stuff' Stuff after a # delimiter is ignored PASS
URL: Setting <https://example.net?lang=en-US#nav>.search = '?lang=fr' PASS
URL: Setting <a://example.net>.protocol = 'bC0+-.' PASS
<a>: Setting <http://example.net/>.host = '[::1.2.3.]' PASS
<a>: Setting <http://example.net>.protocol = 'https:foo : bar' Stuff after the first ':' is ignored PASS
URL: Setting <javascript://x/>.password = 'bowser' FAIL
<area>: Setting <a://example.net>.protocol = 'b' PASS
<area>: Setting <javascript://x/>.port = '12' FAIL
<area>: Setting <sc:///>.username = 'x' PASS
<area>: Setting <sc://example.net>.pathname = '#' # needs to be encoded, non-special scheme FAIL
URL: Setting <https://example.net>.protocol = 's' FAIL
URL: Setting <sc://x/>.port = '12' FAIL
<area>: Setting <http://example.net:8080/path>.port = '65536' Port numbers are 16 bit integers, overflowing is an error PASS
<area>: Setting <http://example.net>.host = 'example.com:80' Default port number is removed PASS
<a>: Setting <https://example.net:4433>.port = '443' Default port number is removed PASS
<area>: Setting <https://example.net?lang=en-US#nav>.search = 'lang=fr' PASS
<a>: Setting <sc://test@test/>.host = '' FAIL
<area>: Setting <mailto:[email protected]>.host = 'example.com' Cannot-be-a-base means no host PASS
<a>: Setting <http://example.net>.pathname = '#' # needs to be encoded PASS
URL: Setting <sc:///>.username = 'x' PASS
<a>: Setting <https://example.net#nav>.pathname = 'home' PASS
<area>: Setting <http://example.net/path>.port = '8080\stuff' Stuff after a \ delimiter is ignored for special schemes PASS
<area>: Setting <file://localhost/>.port = '12' PASS
URL: Setting <mailto:[email protected]>.username = 'me' Cannot-be-a-base means no username PASS
URL: Setting <http://example.net:8080>.hostname = '0x7F000001' IPv4 address syntax is normalized PASS
<area>: Setting <mailto:[email protected]>.protocol = 'http' Cannot-be-a-base URL doesn’t have a host, but URL in a special scheme must. FAIL
<area>: Setting <https://example.net#nav>.hash = 'main' PASS
<a>: Setting <sc://x/>.host = ' ' FAIL
URL: Setting <http://example.net>.host = '' The empty host is not valid for special schemes PASS
<area>: Setting <sc:///>.port = '12' PASS
<area>: Setting <http://example.net/path>.hostname = 'example.com:8080' Stuff after a : delimiter is ignored FAIL
URL: Setting <sc://test:12/>.hostname = '' FAIL
<area>: Setting <http://example.net/path>.hostname = 'example.com#stuff' Stuff after a # delimiter is ignored PASS
<a>: Setting <http://example.net>.search = '%c3%89té' Bytes already percent-encoded are left as-is PASS
<a>: Setting <https://example.net>.port = '80' Default port number is only removed for the relevant scheme PASS
URL: Setting <http://example.net>.protocol = 'b' Can’t switch from special scheme to non-special FAIL
<a>: Setting <http://example.net>.username = 'me' PASS
<a>: Setting <non-base:value>.port = '12' PASS
<area>: Setting <sc://x/>.hostname = '\n' FAIL
<area>: Setting <a:/>.search = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the query encode set. Tabs and newlines are removed.`
<a>: Setting <http://example.net/path>.host = 'example.com\stuff' Stuff after a \ delimiter is ignored for special schemes PASS
URL: Setting <http://[email protected]>.password = 'secret' PASS
URL: Setting <http://:[email protected]>.password = '' FAIL
URL: Setting <http://example.net:8080>.port = '' Port number is removed if empty is the new value PASS
URL: Setting <ssh://[email protected]>.protocol = 'file' FAIL
URL: Setting <http://example.net/path>.hostname = 'example.com\stuff' Stuff after a \ delimiter is ignored for special schemes PASS
<a>: Setting <ssh://[email protected]>.protocol = 'http' Can’t switch from non-special scheme to special FAIL
<a>: Setting <http://example.net:8080>.hostname = 'example.com' PASS
URL: Setting <nonsense:///test>.protocol = 'https' FAIL
<area>: Setting <http://example.net>.username = 'me' PASS
<area>: Setting <view-source+http://example.net/foo>.hostname = '' The empty host is OK for non-special schemes FAIL
URL: Setting <file://hi/x>.hostname = '' PASS
<a>: Setting <file://test/>.port = '12' FAIL
<a>: Setting <a://example.net>.protocol = '0b' No leading digit PASS
<a>: Setting <sc://example.net>.pathname = '#' # needs to be encoded, non-special scheme FAIL
<area>: Setting <a:/>.hash = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' Simple percent-encoding; nuls, tabs, and newlines are removed`
<area>: Setting <https://example.net>.hash = 'main' PASS
<a>: Setting <file://y/>.hostname = 'x:123' FAIL
<area>: Setting <sc://x/>.host = '\t' FAIL
URL: Setting <https://example.net#nav>.pathname = '../home' PASS
<a>: Setting <a:/>.hash = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' Simple percent-encoding; nuls, tabs, and newlines are removed`
<a>: Setting <unix:/run/foo.socket?timeout=10>.pathname = '/var/log/../run/bar.socket' FAIL
<a>: Setting <mailto:[email protected]>.username = 'me' Cannot-be-a-base means no username PASS
<area>: Setting <sc://x/>.host = '?' FAIL
URL: Setting <http://example.net/path>.port = '8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
<a>: Setting <http://example.net:8080>.hostname = '0x7F000001' IPv4 address syntax is normalized PASS
URL: Setting <sc://x/>.hostname = '@' FAIL
<area>: Setting <http://example.net/path>.hostname = 'example.com?stuff' Stuff after a ? delimiter is ignored PASS
<a>: Setting <sc://x/>.host = '\t' FAIL
URL: Setting <javascript:alert(1)>.protocol = 'defuse' PASS
<area>: Setting <a:/>.pathname = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the default encode set. Tabs and newlines are removed.`
<a>: Setting <file://test/>.password = 'test' FAIL
<a>: Setting <ssh://[email protected]>.protocol = 'gopher' FAIL
<area>: Setting <view-source+http://example.net/path>.host = 'example.com\stuff' \ is not a delimiter for non-special schemes, but still forbidden in hosts FAIL
<area>: Setting <sc://x/>.host = ' ' FAIL
<area>: Setting <http://example.net/path>.host = 'example.com/stuff' Stuff after a / delimiter is ignored PASS
URL: Setting <http://example.net/path>.host = 'example.com:8080+2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
<a>: Setting <mailto:[email protected]>.pathname = '/foo' Cannot-be-a-base don’t have a path FAIL
URL: Setting <https://example.net?lang=en-US#nav>.search = '' PASS
URL: Setting <ftp://example.net>.protocol = 'test' FAIL
URL: Setting <a:/>.search = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the query encode set. Tabs and newlines are removed.`
URL: Setting <sc://example.net>.pathname = '#' # needs to be encoded, non-special scheme FAIL
<a>: Setting <http://example.net/path>.port = '8080/stuff' Stuff after a / delimiter is ignored PASS
<a>: Setting <sc://x/>.host = '?' FAIL
<area>: Setting <http://[email protected]>.username = '' PASS
<a>: Setting <a://example.net>.protocol = 'b,c' Only some punctuation is acceptable PASS
<area>: Setting <sc://x/>.hostname = '' Non-special scheme FAIL
URL: Setting <sc://x/>.hostname = ' ' FAIL
<a>: Setting <http://example.net/path>.host = 'example.com:8080#stuff' Stuff after a # delimiter is ignored PASS
<a>: Setting <http://example.net:8080>.host = 'example.com:' Port number is unchanged if not specified PASS
<area>: Setting <https://example.net#nav>.search = 'lang=fr' PASS
<area>: Setting <file://y/>.host = 'x:123' FAIL
<area>: Setting <https://example.net?lang=en-US#nav>.search = '?' PASS
URL: Setting <mailto:[email protected]>.pathname = '/foo' Cannot-be-a-base don’t have a path PASS
<a>: Setting <https://example.net>.host = 'example.com:443' Default port number is removed PASS
<area>: Setting <http://example.net>.hostname = '[::0:01]' IPv6 address syntax is normalized FAIL
<a>: Setting <http://example.net>.host = '[::0:01]:2' IPv6 address syntax is normalized FAIL
<a>: Setting <sc://x/>.host = '@' FAIL
URL: Setting <http://me:[email protected]>.username = '' FAIL
URL: Setting <sc://x/>.hostname = '\t' FAIL
URL: Setting <https://example.net:4433>.port = '443' Default port number is removed PASS
URL: Setting <https://example.net>.host = 'example.com:80' Default port number is only removed for the relevant scheme PASS
URL: Setting <http://example.net/>.hostname = '[::1.2.3.]' PASS
<area>: Setting <http://example.net:8080>.hostname = 'example.com' PASS
<a>: Setting <sc://x/>.hostname = ' ' FAIL
<a>: Setting <view-source+http://example.net/foo>.hostname = '' The empty host is OK for non-special schemes FAIL
URL: Setting <sc:///>.port = '12' PASS
<a>: Setting <http://example.net/path>.hostname = 'example.com#stuff' Stuff after a # delimiter is ignored PASS
URL: Setting <view-source+http://example.net/path>.port = '8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error FAIL
<a>: Setting <http://example.net>.host = 'example.com:8080' PASS
<a>: Setting <http://example.net>.host = '0x7F000001:8080' IPv4 address syntax is normalized PASS
URL: Setting <a://example.net>.protocol = '0b' No leading digit PASS
<a>: Setting <http://example.net/>.hostname = '[::1.2.]' PASS
<a>: Setting <http://example.net>.username = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the userinfo encode set.`
URL: Setting <https://example.net?lang=en-US#nav>.hash = '' PASS
<a>: Setting <javascript://x/>.username = 'wario' FAIL
URL: Setting <http://example.net/>.host = '[google.com]' Broken IPv6 PASS
<a>: Setting <https://example.net?lang=en-US#nav>.hash = '#main' PASS
<a>: Setting <http://[email protected]>.password = 'secret' PASS
<a>: Setting <http://example.net>.hostname = '[::0:01]' IPv6 address syntax is normalized FAIL
<a>: Setting <sc://x/>.host = '' Non-special scheme FAIL
<a>: Setting <javascript:alert(1)>.hash = 'castle' PASS
<area>: Setting <http://example.net>.pathname = '?' ? needs to be encoded PASS
<area>: Setting <http://example.net/path>.port = '8080?stuff' Stuff after a ? delimiter is ignored PASS
<area>: Setting <http://example.net>.username = '%c3%89té' Bytes already percent-encoded are left as-is. PASS
URL: Setting <sc://x/>.hostname = '?' FAIL
URL: Setting <http://example.net>.protocol = 'https:foo : bar' Stuff after the first ':' is ignored PASS
<a>: Setting <sc:///>.password = 'x' PASS
<area>: Setting <http://example.net>.pathname = '#' # needs to be encoded PASS
URL: Setting <http://example.net/path>.host = 'example.com:8080/stuff' Stuff after a / delimiter is ignored PASS
<a>: Setting <sc://example.net>.pathname = '?' ? needs to be encoded, non-special scheme FAIL
URL: Setting <view-source+http://example.net/foo>.host = '' The empty host is OK for non-special schemes FAIL
<a>: Setting <sc://x/>.host = '\r' FAIL
<a>: Setting <http://example.net>.hash = '%c3%89té' Bytes already percent-encoded are left as-is PASS
<area>: Setting <http://example.net>.pathname = '%2e%2E%c3%89té' Bytes already percent-encoded are left as-is, including %2E outside dotted segments. PASS
<area>: Setting <view-source+http://example.net/path>.host = 'example.com:8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error FAIL
URL: Setting <file://test/>.username = 'test' FAIL
<area>: Setting <http://example.net:8080>.host = 'example.com' Port number is unchanged if not specified in the new value PASS
URL: Setting <http://example.net/>.hostname = '[google.com]' Broken IPv6 PASS
<a>: Setting <http://example.net/path>.host = 'example.com/stuff' Stuff after a / delimiter is ignored PASS
<area>: Setting <http://example.net>.protocol = 'https:foo : bar' Stuff after the first ':' is ignored PASS
URL: Setting <file://y/>.hostname = 'loc%41lhost' PASS
<a>: Setting <http://example.net/path>.port = '8080?stuff' Stuff after a ? delimiter is ignored PASS
URL: Setting <https://example.net#nav>.hash = 'main' PASS
<a>: Setting <http://example.net>.port = '8080' PASS
<a>: Setting <a://example.net>.protocol = 'é' Non-ASCII is rejected PASS
<a>: Setting <sc://x/>.host = '\n' FAIL
<a>: Setting <mailto:[email protected]>.password = 'secret' Cannot-be-a-base means no password PASS
URL: Setting <http://example.net/path>.port = '8080+2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
<a>: Setting <http://example.net/path>.port = '8080#stuff' Stuff after a # delimiter is ignored PASS
URL: Setting <https://example.net?lang=en-US>.hash = '##nav' PASS
<a>: Setting <http://[email protected]>.username = '' PASS
URL: Setting <data:text/plain,Stuff>.hostname = 'example.net' Cannot-be-a-base means no password PASS
URL: Setting <file://y/>.host = 'loc%41lhost' PASS
<area>: Setting <https://example.net:4433>.port = '443' Default port number is removed PASS
<area>: Setting <http://example.net/>.hostname = '[::1.2.]' PASS
<a>: Setting <https://example.net?lang=en-US>.search = '' PASS
URL: Setting <http://example.net/path>.host = 'example.com/stuff' Stuff after a / delimiter is ignored PASS
URL: Setting <https://example.net?lang=en-US#nav>.search = '??lang=fr' PASS
URL: Setting <http://example.net>.host = 'example.com:8080' PASS
URL: Setting <http://example.net>.hostname = '' The empty host is not valid for special schemes PASS
<area>: Setting <a://example.net>.protocol = 'B' Upper-case ASCII is lower-cased PASS
<area>: Setting <a://example.net>.protocol = 'é' Non-ASCII is rejected PASS
URL: Setting <view-source+http://example.net/foo>.hostname = '' The empty host is OK for non-special schemes FAIL
<a>: Setting <sc://x/>.port = '12' FAIL
<area>: Setting <http://example.net/path>.host = 'example.com:8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error PASS
<area>: Setting <http://example.net:8080>.host = 'example.com:' Port number is unchanged if not specified PASS
<area>: Setting <sc://test:12/>.host = '' FAIL
<area>: Setting <data:text/html,<p>Test>.protocol = 'view-source+data:foo : bar' Stuff after the first ':' is ignored PASS
<area>: Setting <non-base:value>.port = '12' PASS
URL: Setting <sc://x/>.hostname = '#' FAIL
URL: Setting <sc://x/>.host = '\r' FAIL
<area>: Setting <sc://x/>.hostname = ' ' FAIL
URL: Setting <sc://x/>.hostname = '\r' FAIL
URL: Setting <sc://x/>.host = '#' FAIL
<a>: Setting <http://me:[email protected]>.password = '' PASS
URL: Setting <http://example.net/>.host = '[::1.2.3.]' PASS
<a>: Setting <http://example.net>.pathname = '?' ? needs to be encoded PASS
<area>: Setting <http://example.net>.username = '�\t\n\r� !"#$%&'()*+,-./09:;<=>?@AZ[\]^_\az{ }~���Éé' UTF-8 percent encoding with the userinfo encode set.`
<area>: Setting <sc://test:12/>.hostname = '' FAIL
<area>: Setting <http://example.net/path>.hostname = 'example.com\stuff' Stuff after a \ delimiter is ignored for special schemes PASS
<a>: Setting <http://example.net/path>.hostname = 'example.com\stuff' Stuff after a \ delimiter is ignored for special schemes PASS
<area>: Setting <javascript://x/>.password = 'bowser' FAIL
<a>: Setting <http://:[email protected]>.password = '' FAIL
URL: Setting <http://example.net:8080>.hostname = 'example.com' PASS
<area>: Setting <sc://x/>.hostname = '\t' FAIL
<a>: Setting <view-source+http://example.net/foo>.host = '' The empty host is OK for non-special schemes FAIL
<a>: Setting <http://example.net>.host = 'example.com:80' Default port number is removed PASS
URL: Setting <https://example.net?lang=en-US#nav>.hash = '#main' PASS
<a>: Setting <a:/foo>.hostname = 'example.net' Path-only URLs can gain a host FAIL
<area>: Setting <javascript:alert(1)>.protocol = 'defuse' PASS
<area>: Setting <http://example.net>.search = '%c3%89té' Bytes already percent-encoded are left as-is PASS
URL: Setting <http://example.net>.password = '%c3%89té' Bytes already percent-encoded are left as-is. FAIL
<area>: Setting <http://me:[email protected]>.username = '' FAIL
<area>: Setting <http://example.net/>.hostname = '[::1.2.3.]' PASS
<a>: Setting <javascript:alert(1)>.username = 'wario' PASS
URL: Setting <http://example.net/path>.hostname = 'example.com/stuff' Stuff after a / delimiter is ignored PASS
<area>: Setting <https://example.net>.host = 'example.com:80' Default port number is only removed for the relevant scheme PASS
<a>: Setting <http://example.net:8080/path>.hostname = 'example.com:' Stuff after a : delimiter is ignored FAIL
URL: Setting <javascript:alert(1)>.username = 'wario' PASS
URL: Setting <javascript://x/>.username = 'wario' FAIL
<a>: Setting <file://y/>.host = 'loc%41lhost' PASS
<area>: Setting <http://example.net/>.host = '[::1.2.3.]' PASS
<area>: Setting <unix:/run/foo.socket>.username = 'me' No host means no username PASS
URL: Setting <a:/foo>.host = 'example.net' Path-only URLs can gain a host FAIL
<a>: Setting <http://example.net/>.hostname = '[::1.2.3.]' PASS
<area>: Setting <http://example.net/>.host = '[::1.2.3.4x]' PASS
URL: Setting <http://example.net>.username = 'me' PASS
URL: Setting <http://example.net>.password = 'secret' FAIL
URL: Setting <http://example.net/path>.host = 'example.com:65535' Port numbers are 16 bit integers PASS
URL: Setting <http://example.net>.search = '%c3%89té' Bytes already percent-encoded are left as-is PASS
<a>: Setting <file://hi/x>.hostname = '' PASS
<area>: Setting <http://example.net:8080/path>.hostname = 'example.com:' Stuff after a : delimiter is ignored FAIL
<area>: Setting <sc://x/>.host = '\n' FAIL
URL: Setting <mailto:[email protected]>.protocol = 'http' Cannot-be-a-base URL doesn’t have a host, but URL in a special scheme must. FAIL
<area>: Setting <sc://x/>.hostname = '?' FAIL
<a>: Setting <unix:/run/foo.socket>.password = 'secret' No host means no password PASS
URL: Setting <mailto:[email protected]>.host = 'example.com' Cannot-be-a-base means no host PASS
URL: Setting <ssh://[email protected]>.protocol = 'gopher' FAIL
URL: Setting <http://:[email protected]>.username = 'me' FAIL
<a>: Setting <http://example.net/path>.port = '65535' Port numbers are 16 bit integers PASS
URL: Setting <javascript://x/>.port = '12' FAIL
URL: Setting <http://example.net/path>.hostname = 'example.com?stuff' Stuff after a ? delimiter is ignored PASS
URL: Setting <http://example.net/>.host = '[::1.2.3.4x]' PASS
<a>: Setting <http://example.net/path>.host = 'example.com?stuff' Stuff after a ? delimiter is ignored PASS
<area>: Setting <http://example.net/path>.host = 'example.com:65535' Port numbers are 16 bit integers PASS
URL: Setting <http://example.net/path>.port = '8080#stuff' Stuff after a # delimiter is ignored PASS
URL: Setting <sc://test:12/>.host = '' FAIL
URL: Setting <http://example.net>.pathname = '%2e%2E%c3%89té' Bytes already percent-encoded are left as-is, including %2E outside dotted segments. PASS
URL: Setting <unix:/run/foo.socket>.username = 'me' No host means no username PASS

@annevk annevk merged commit e8aa61d into master Feb 22, 2017
@annevk annevk deleted the annevk/javascript-setter-tests branch February 22, 2017 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants