Files
ladybird/Tests/LibWeb/Text/expected/wpt-import/url/url-setters.any.txt

282 lines
21 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Harness status: OK
Found 267 tests
267 Pass
Pass Loading data…
Pass URL: Setting <a://example.net>.protocol = '' The empty string is not a valid scheme. Setter leaves the URL unchanged.
Pass URL: Setting <a://example.net>.protocol = 'b'
Pass URL: Setting <javascript:alert(1)>.protocol = 'defuse'
Pass URL: Setting <a://example.net>.protocol = 'B' Upper-case ASCII is lower-cased
Pass URL: Setting <a://example.net>.protocol = 'é' Non-ASCII is rejected
Pass URL: Setting <a://example.net>.protocol = '0b' No leading digit
Pass URL: Setting <a://example.net>.protocol = '+b' No leading punctuation
Pass URL: Setting <a://example.net>.protocol = 'bC0+-.'
Pass URL: Setting <a://example.net>.protocol = 'b,c' Only some punctuation is acceptable
Pass URL: Setting <a://example.net>.protocol = 'bé' Non-ASCII is rejected
Pass URL: Setting <http://test@example.net>.protocol = 'file' Cant switch from URL containing username/password/port to file
Pass URL: Setting <https://example.net:1234>.protocol = 'file'
Pass URL: Setting <wss://x:x@example.net:1234>.protocol = 'file'
Pass URL: Setting <file://localhost/>.protocol = 'http' Cant switch from file URL with no host
Pass URL: Setting <file:///test>.protocol = 'https'
Pass URL: Setting <file:>.protocol = 'wss'
Pass URL: Setting <http://example.net>.protocol = 'b' Cant switch from special scheme to non-special
Pass URL: Setting <file://hi/path>.protocol = 's'
Pass URL: Setting <https://example.net>.protocol = 's'
Pass URL: Setting <ftp://example.net>.protocol = 'test'
Pass URL: Setting <mailto:me@example.net>.protocol = 'http' Cannot-be-a-base URL doesnt have a host, but URL in a special scheme must.
Pass URL: Setting <ssh://me@example.net>.protocol = 'http' Cant switch from non-special scheme to special
Pass URL: Setting <ssh://me@example.net>.protocol = 'https'
Pass URL: Setting <ssh://me@example.net>.protocol = 'file'
Pass URL: Setting <ssh://example.net>.protocol = 'file'
Pass URL: Setting <nonsense:///test>.protocol = 'https'
Pass URL: Setting <http://example.net>.protocol = 'https:foo : bar' Stuff after the first ':' is ignored
Pass URL: Setting <data:text/html,<p>Test>.protocol = 'view-source+data:foo : bar' Stuff after the first ':' is ignored
Pass URL: Setting <http://foo.com:443/>.protocol = 'https' Port is set to null if it is the default for new scheme.
Pass URL: Setting <http://test/>.protocol = 'h
tt ps' Tab and newline are stripped
Pass URL: Setting <http://test/>.protocol = 'https
'
Pass URL: Setting <http://test/>.protocol = 'https' Non-tab/newline C0 controls result in no-op
Pass URL: Setting <http://test/>.protocol = 'https '
Pass URL: Setting <http://test/>.protocol = 'https'
Pass URL: Setting <http://test/>.protocol = 'https '
Pass URL: Setting <file:///home/you/index.html>.username = 'me' No host means no username
Pass URL: Setting <unix:/run/foo.socket>.username = 'me' No host means no username
Pass URL: Setting <mailto:you@example.net>.username = 'me' Cannot-be-a-base means no username
Pass URL: Setting <javascript:alert(1)>.username = 'wario'
Pass URL: Setting <http://example.net>.username = 'me'
Pass URL: Setting <http://:secret@example.net>.username = 'me'
Pass URL: Setting <http://me@example.net>.username = ''
Pass URL: Setting <http://me:secret@example.net>.username = ''
Pass URL: Setting <http://example.net>.username = '
 !"#$%&'()*+,-./09:;<=>?@AZ[\]^_`az{|}~€Éé' UTF-8 percent encoding with the userinfo encode set.
Pass URL: Setting <http://example.net>.username = '%c3%89té' Bytes already percent-encoded are left as-is.
Pass URL: Setting <sc:///>.username = 'x'
Pass URL: Setting <javascript://x/>.username = 'wario'
Pass URL: Setting <file://test/>.username = 'test'
Pass URL: Setting <file:///home/me/index.html>.password = 'secret' No host means no password
Pass URL: Setting <unix:/run/foo.socket>.password = 'secret' No host means no password
Pass URL: Setting <mailto:me@example.net>.password = 'secret' Cannot-be-a-base means no password
Pass URL: Setting <http://example.net>.password = 'secret'
Pass URL: Setting <http://me@example.net>.password = 'secret'
Pass URL: Setting <http://:secret@example.net>.password = ''
Pass URL: Setting <http://me:secret@example.net>.password = ''
Pass URL: Setting <http://example.net>.password = '
 !"#$%&'()*+,-./09:;<=>?@AZ[\]^_`az{|}~€Éé' UTF-8 percent encoding with the userinfo encode set.
Pass URL: Setting <http://example.net>.password = '%c3%89té' Bytes already percent-encoded are left as-is.
Pass URL: Setting <sc:///>.password = 'x'
Pass URL: Setting <javascript://x/>.password = 'bowser'
Pass URL: Setting <file://test/>.password = 'test'
Pass URL: Setting <sc://x/>.host = '' Non-special scheme
Pass URL: Setting <sc://x/>.host = ' '
Pass URL: Setting <sc://x/>.host = '
'
Pass URL: Setting <sc://x/>.host = '
'
Pass URL: Setting <sc://x/>.host = ' '
Pass URL: Setting <sc://x/>.host = '#'
Pass URL: Setting <sc://x/>.host = '/'
Pass URL: Setting <sc://x/>.host = '?'
Pass URL: Setting <sc://x/>.host = '@'
Pass URL: Setting <sc://x/>.host = 'ß'
Pass URL: Setting <https://x/>.host = 'ß' IDNA Nontransitional_Processing
Pass URL: Setting <mailto:me@example.net>.host = 'example.com' Cannot-be-a-base means no host
Pass URL: Setting <data:text/plain,Stuff>.host = 'example.net' Cannot-be-a-base means no host
Pass URL: Setting <http://example.net>.host = 'example.com:8080'
Pass URL: 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:8080>.host = 'example.com:' Port number is unchanged if not specified
Pass URL: Setting <http://example.net>.host = '' The empty host is not valid for special schemes
Pass URL: Setting <view-source+http://example.net/foo>.host = '' The empty host is OK for non-special schemes
Pass URL: Setting <a:/foo>.host = 'example.net' Path-only URLs can gain a host
Pass URL: Setting <http://example.net>.host = '0x7F000001:8080' IPv4 address syntax is normalized
Pass URL: Setting <http://example.net>.host = '[::0:01]:2' IPv6 address syntax is normalized
Pass URL: Setting <http://example.net>.host = '[2001:db8::2]:4002' IPv6 literal address with port, crbug.com/1012416
Pass URL: Setting <http://example.net>.host = 'example.com:80' Default port number is removed
Pass URL: Setting <https://example.net>.host = 'example.com: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:8080>.host = 'example.com:80' Port number is removed if new port is scheme default and existing URL has a non-default port
Pass URL: 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/stuff' Stuff after a / delimiter is ignored
Pass URL: 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?stuff:8080' Stuff after a ? delimiter is ignored, trailing 'port'
Pass URL: Setting <http://example.net/path>.host = 'example.com:8080?stuff' Stuff after a ? delimiter is ignored
Pass URL: 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#stuff' Stuff after a # delimiter is ignored
Pass URL: Setting <http://example.net/path>.host = 'example.com\stuff' Stuff after a \ delimiter is ignored for special schemes
Pass URL: Setting <http://example.net/path>.host = 'example.com:8080\stuff' Stuff after a \ delimiter is ignored for special schemes
Pass 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
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
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 <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 URL: Setting <http://example.net:8080>.host = 'example.com:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error
Pass URL: Setting <http://example.net:8080/test>.host = '[::1]:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error
Pass URL: Setting <http://example.net:8080/test>.host = '[::1]' IPv6 without port
Pass URL: Setting <http://example.net/path>.host = 'example.com:65535' Port numbers are 16 bit integers
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 URL: Setting <http://example.net/>.host = '[google.com]' Broken IPv6
Pass URL: Setting <http://example.net/>.host = '[::1.2.3.4x]'
Pass URL: Setting <http://example.net/>.host = '[::1.2.3.]'
Pass URL: Setting <http://example.net/>.host = '[::1.2.]'
Pass URL: Setting <http://example.net/>.host = '[::1.]'
Pass URL: Setting <file://y/>.host = 'x:123'
Pass URL: Setting <file://y/>.host = 'loc%41lhost'
Pass URL: Setting <file://hi/x>.host = ''
Pass URL: Setting <sc://test@test/>.host = ''
Pass URL: Setting <sc://test:12/>.host = ''
Pass URL: Setting <http://example.com/>.host = '///bad.com' Leading / is not stripped
Pass URL: Setting <sc://example.com/>.host = '///bad.com' Leading / is not stripped
Pass URL: Setting <https://example.com/>.host = 'a%C2%ADb'
Pass URL: Setting <https://example.com/>.host = '­'
Pass URL: Setting <https://example.com/>.host = '%C2%AD'
Pass URL: Setting <https://example.com/>.host = 'xn--'
Pass URL: Setting <https://test.invalid/>.host = '*'
Pass URL: Setting <https://test.invalid/>.host = 'x@x'
Pass URL: Setting <https://test.invalid/>.host = 'foo
bar'
Pass URL: Setting <https://test.invalid/>.host = '><'
Pass URL: Setting <sc://x/>.hostname = '' Non-special scheme
Pass URL: Setting <sc://x/>.hostname = ' '
Pass URL: Setting <sc://x/>.hostname = '
'
Pass URL: Setting <sc://x/>.hostname = '
'
Pass URL: Setting <sc://x/>.hostname = ' '
Pass URL: Setting <sc://x/>.hostname = '#'
Pass URL: Setting <sc://x/>.hostname = '/'
Pass URL: Setting <sc://x/>.hostname = '?'
Pass URL: Setting <sc://x/>.hostname = '@'
Pass URL: Setting <mailto:me@example.net>.hostname = 'example.com' Cannot-be-a-base means no host
Pass URL: Setting <data:text/plain,Stuff>.hostname = 'example.net' Cannot-be-a-base means no host
Pass URL: Setting <http://example.net:8080>.hostname = 'example.com'
Pass URL: Setting <http://example.net>.hostname = '' The empty host is not valid for special schemes
Pass URL: Setting <view-source+http://example.net/foo>.hostname = '' The empty host is OK for non-special schemes
Pass URL: Setting <a:/foo>.hostname = 'example.net' Path-only URLs can gain a host
Pass URL: Setting <http://example.net:8080>.hostname = '0x7F000001' IPv4 address syntax is normalized
Pass URL: Setting <http://example.net>.hostname = '[::0:01]' IPv6 address syntax is normalized
Pass URL: Setting <http://example.net/path>.hostname = 'example.com:8080' : delimiter invalidates entire value
Pass URL: Setting <http://example.net:8080/path>.hostname = 'example.com:' : delimiter invalidates entire value
Pass URL: Setting <http://example.net/path>.hostname = 'example.com/stuff' Stuff after a / delimiter is ignored
Pass URL: Setting <http://example.net/path>.hostname = 'example.com?stuff' Stuff after a ? delimiter is ignored
Pass URL: Setting <http://example.net/path>.hostname = 'example.com#stuff' Stuff after a # delimiter is ignored
Pass URL: Setting <http://example.net/path>.hostname = 'example.com\stuff' Stuff after a \ delimiter is ignored for special schemes
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
Pass URL: Setting <http://example.net/>.hostname = '[google.com]' Broken IPv6
Pass URL: Setting <http://example.net/>.hostname = '[::1.2.3.4x]'
Pass URL: Setting <http://example.net/>.hostname = '[::1.2.3.]'
Pass URL: Setting <http://example.net/>.hostname = '[::1.2.]'
Pass URL: Setting <http://example.net/>.hostname = '[::1.]'
Pass URL: Setting <file://y/>.hostname = 'x:123'
Pass URL: Setting <file://y/>.hostname = 'loc%41lhost'
Pass URL: Setting <file://hi/x>.hostname = ''
Pass URL: Setting <sc://test@test/>.hostname = ''
Pass URL: Setting <sc://test:12/>.hostname = ''
Pass URL: Setting <non-spec:/.//p>.hostname = 'h' Drop /. from path
Pass URL: Setting <non-spec:/.//p>.hostname = ''
Pass URL: Setting <http://example.com/>.hostname = '///bad.com' Leading / is not stripped
Pass URL: Setting <sc://example.com/>.hostname = '///bad.com' Leading / is not stripped
Pass URL: Setting <https://example.com/>.hostname = 'a%C2%ADb'
Pass URL: Setting <https://example.com/>.hostname = '­'
Pass URL: Setting <https://example.com/>.hostname = '%C2%AD'
Pass URL: Setting <https://example.com/>.hostname = 'xn--'
Pass URL: Setting <https://test.invalid/>.hostname = '*'
Pass URL: Setting <https://test.invalid/>.hostname = 'x@x'
Pass URL: Setting <https://test.invalid/>.hostname = 'foo
bar'
Pass URL: Setting <https://test.invalid/>.hostname = '><'
Pass URL: Setting <http://example.net>.port = '8080'
Pass URL: Setting <http://example.net:8080>.port = '' Port number is removed if empty is the new value
Pass URL: Setting <http://example.net:8080>.port = '80' Default port number is removed
Pass URL: Setting <https://example.net:4433>.port = '443' Default port number is removed
Pass URL: Setting <https://example.net>.port = '80' Default port number is only removed for the relevant scheme
Pass URL: Setting <http://example.net/path>.port = '8080/stuff' Stuff after a / delimiter is ignored
Pass URL: Setting <http://example.net/path>.port = '8080?stuff' Stuff after a ? delimiter is ignored
Pass URL: Setting <http://example.net/path>.port = '8080#stuff' Stuff after a # delimiter is ignored
Pass URL: Setting <http://example.net/path>.port = '8080\stuff' Stuff after a \ delimiter is ignored for special schemes
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
Pass 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 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 URL: Setting <http://example.net/path>.port = '65535' Port numbers are 16 bit integers
Pass URL: Setting <http://example.net:8080/path>.port = '65536' Port numbers are 16 bit integers, overflowing is an error
Pass URL: Setting <http://example.net:8080/path>.port = 'randomstring' Setting port to a string that doesn't parse as a number
Pass URL: Setting <non-special://example.net:8080/path>.port = '65536' Port numbers are 16 bit integers, overflowing is an error
Pass URL: Setting <file://test/>.port = '12'
Pass URL: Setting <file://localhost/>.port = '12'
Pass URL: Setting <non-base:value>.port = '12'
Pass URL: Setting <sc:///>.port = '12'
Pass URL: Setting <sc://x/>.port = '12'
Pass URL: Setting <javascript://x/>.port = '12'
Pass URL: Setting <https://domain.com:443>.port = ' 8080' Leading u0009 on special scheme
Pass URL: Setting <wpt++://domain.com:443>.port = ' 8080' Leading u0009 on non-special scheme
Pass URL: Setting <https://www.google.com:4343>.port = '4wpt' Should use all ascii prefixed characters as port
Pass URL: Setting <mailto:me@example.net>.pathname = '/foo' Opaque paths cannot be set
Pass URL: Setting <data:original>.pathname = 'new value'
Pass URL: Setting <sc:original>.pathname = 'new value'
Pass URL: Setting <file:///some/path>.pathname = '' Special URLs cannot have their paths erased
Pass URL: Setting <foo://somehost/some/path>.pathname = '' Non-special URLs can have their paths erased
Pass URL: Setting <foo:///some/path>.pathname = '' Non-special URLs with an empty host can have their paths erased
Pass URL: Setting <foo:/some/path>.pathname = '' Path-only URLs cannot have their paths erased
Pass URL: Setting <foo:/some/path>.pathname = 'test' Path-only URLs always have an initial slash
Pass URL: Setting <unix:/run/foo.socket?timeout=10>.pathname = '/var/log/../run/bar.socket'
Pass URL: Setting <https://example.net#nav>.pathname = 'home'
Pass URL: Setting <https://example.net#nav>.pathname = '../home'
Pass 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 <view-source+http://example.net/home?lang=fr#nav>.pathname = '\a\%2E\b\%2e.\c' \ is *not* a segment delimiter for non-'special' URLs
Pass URL: Setting <a:/>.pathname = '
 !"#$%&'()*+,-./09:;<=>?@AZ[\]^_`az{|}~€Éé' UTF-8 percent encoding with the default encode set. Tabs and newlines are removed.
Pass 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 <http://example.net>.pathname = '?' ? needs to be encoded
Pass URL: Setting <http://example.net>.pathname = '#' # needs to be encoded
Pass URL: Setting <sc://example.net>.pathname = '?' ? needs to be encoded, non-special scheme
Pass URL: Setting <sc://example.net>.pathname = '#' # needs to be encoded, non-special scheme
Pass URL: Setting <http://example.net>.pathname = '/?é' ? doesn't mess up encoding
Pass URL: Setting <http://example.net>.pathname = '/#é' # doesn't mess up encoding
Pass URL: Setting <file://monkey/>.pathname = '\\' File URLs and (back)slashes
Pass URL: Setting <file:///unicorn>.pathname = '//\/' File URLs and (back)slashes
Pass URL: Setting <file:///unicorn>.pathname = '//monkey/..//' File URLs and (back)slashes
Pass URL: Setting <non-spec:/>.pathname = '/.//p' Serialize /. in path
Pass URL: Setting <non-spec:/>.pathname = '/..//p'
Pass URL: Setting <non-spec:/>.pathname = '//p'
Pass URL: Setting <non-spec:/.//>.pathname = 'p' Drop /. from path
Pass URL: Setting <data:/nospace>.pathname = 'space ' Non-special URLs with non-opaque paths percent-encode U+0020
Pass URL: Setting <sc:/nospace>.pathname = 'space '
Pass URL: Setting <http://example.net>.pathname = ' ' Trailing space should be encoded
Pass URL: Setting <http://example.net>.pathname = '' Trailing C0 control should be encoded
Pass URL: Setting <https://example.net#nav>.search = 'lang=fr'
Pass URL: Setting <https://example.net?lang=en-US#nav>.search = 'lang=fr'
Pass URL: Setting <https://example.net?lang=en-US#nav>.search = '?lang=fr'
Pass URL: Setting <https://example.net?lang=en-US#nav>.search = '??lang=fr'
Pass URL: Setting <https://example.net?lang=en-US#nav>.search = '?'
Pass URL: Setting <https://example.net?lang=en-US#nav>.search = ''
Pass URL: Setting <https://example.net?lang=en-US>.search = ''
Pass URL: Setting <https://example.net>.search = ''
Pass URL: Setting <a:/>.search = '
 !"#$%&'()*+,-./09:;<=>?@AZ[\]^_`az{|}~€Éé' UTF-8 percent encoding with the query encode set. Tabs and newlines are removed.
Pass URL: Setting <http://example.net>.search = '%c3%89té' Bytes already percent-encoded are left as-is
Pass URL: Setting <data:space ?query>.search = '' Trailing spaces and opaque paths
Pass URL: Setting <sc:space ?query>.search = ''
Pass URL: Setting <data:space ?query#fragment>.search = '' Trailing spaces and opaque paths
Pass URL: Setting <sc:space ?query#fragment>.search = ''
Pass URL: Setting <http://example.net>.search = ' ' Trailing space should be encoded
Pass URL: Setting <http://example.net>.search = '' Trailing C0 control should be encoded
Pass URL: Setting <https://example.net>.hash = 'main'
Pass URL: Setting <https://example.net#nav>.hash = 'main'
Pass URL: Setting <https://example.net?lang=en-US>.hash = '##nav'
Pass URL: Setting <https://example.net?lang=en-US#nav>.hash = '#main'
Pass URL: Setting <https://example.net?lang=en-US#nav>.hash = '#'
Pass URL: Setting <https://example.net?lang=en-US#nav>.hash = ''
Pass URL: Setting <http://example.net>.hash = '#foo bar'
Pass URL: Setting <http://example.net>.hash = '#foo"bar'
Pass URL: Setting <http://example.net>.hash = '#foo<bar'
Pass URL: Setting <http://example.net>.hash = '#foo>bar'
Pass URL: Setting <http://example.net>.hash = '#foo`bar'
Pass URL: Setting <a:/>.hash = '
 !"#$%&'()*+,-./09:;<=>?@AZ[\]^_`az{|}~€Éé' Simple percent-encoding; tabs and newlines are removed
Pass URL: Setting <http://example.net>.hash = 'ab' Percent-encode NULLs in fragment
Pass URL: Setting <non-spec:/>.hash = 'ab' Percent-encode NULLs in fragment
Pass URL: Setting <http://example.net>.hash = '%c3%89té' Bytes already percent-encoded are left as-is
Pass URL: Setting <javascript:alert(1)>.hash = 'castle'
Pass URL: Setting <data:space #fragment>.hash = '' Trailing spaces and opaque paths
Pass URL: Setting <sc:space #fragment>.hash = ''
Pass URL: Setting <data:space ?query#fragment>.hash = '' Trailing spaces and opaque paths
Pass URL: Setting <sc:space ?query#fragment>.hash = ''
Pass URL: Setting <http://example.net>.hash = ' ' Trailing space should be encoded
Pass URL: Setting <http://example.net>.hash = '' Trailing C0 control should be encoded
Pass URL: Setting <file:///var/log/system.log>.href = 'http://0300.168.0xF0'