Tests/LibWeb: Import the WPT URL test suite

This commit is contained in:
Shannon Booth 2025-03-09 13:14:39 +13:00 committed by Jelle Raaijmakers
parent 20890d7b70
commit 2022c9e679
Notes: github-actions[bot] 2025-03-18 09:01:32 +00:00
59 changed files with 31488 additions and 0 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,400 @@
Harness status: OK
Found 386 tests
386 Pass
Pass Loading data…
Pass Parsing origin: <http://example .
org> against <http://example.org/foo/bar>
Pass Parsing origin: <http://user:pass@foo:21/bar;par?b#c> against <http://example.org/foo/bar>
Pass Parsing origin: <https://test:@test> against <about:blank>
Pass Parsing origin: <https://:@test> against <about:blank>
Pass Parsing origin: <non-special://test:@test/x> against <about:blank>
Pass Parsing origin: <non-special://:@test/x> against <about:blank>
Pass Parsing origin: <http:foo.com> against <http://example.org/foo/bar>
Pass Parsing origin: < :foo.com
> against <http://example.org/foo/bar>
Pass Parsing origin: < foo.com > against <http://example.org/foo/bar>
Pass Parsing origin: <a: foo.com> against <http://example.org/foo/bar>
Pass Parsing origin: <http://f:21/ b ? d # e > against <http://example.org/foo/bar>
Pass Parsing origin: <http://f:/c> against <http://example.org/foo/bar>
Pass Parsing origin: <http://f:0/c> against <http://example.org/foo/bar>
Pass Parsing origin: <http://f:00000000000000/c> against <http://example.org/foo/bar>
Pass Parsing origin: <http://f:00000000000000000000080/c> against <http://example.org/foo/bar>
Pass Parsing origin: <http://f:
/c> against <http://example.org/foo/bar>
Pass Parsing origin: <> against <http://example.org/foo/bar>
Pass Parsing origin: < > against <http://example.org/foo/bar>
Pass Parsing origin: <:foo.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <:foo.com\> against <http://example.org/foo/bar>
Pass Parsing origin: <:> against <http://example.org/foo/bar>
Pass Parsing origin: <:a> against <http://example.org/foo/bar>
Pass Parsing origin: <:/> against <http://example.org/foo/bar>
Pass Parsing origin: <:\> against <http://example.org/foo/bar>
Pass Parsing origin: <:#> against <http://example.org/foo/bar>
Pass Parsing origin: <#> against <http://example.org/foo/bar>
Pass Parsing origin: <#/> against <http://example.org/foo/bar>
Pass Parsing origin: <#\> against <http://example.org/foo/bar>
Pass Parsing origin: <#;?> against <http://example.org/foo/bar>
Pass Parsing origin: <?> against <http://example.org/foo/bar>
Pass Parsing origin: </> against <http://example.org/foo/bar>
Pass Parsing origin: <:23> against <http://example.org/foo/bar>
Pass Parsing origin: </:23> against <http://example.org/foo/bar>
Pass Parsing origin: <\x> against <http://example.org/foo/bar>
Pass Parsing origin: <\\x\hello> against <http://example.org/foo/bar>
Pass Parsing origin: <::> against <http://example.org/foo/bar>
Pass Parsing origin: <::23> against <http://example.org/foo/bar>
Pass Parsing origin: <foo://> against <http://example.org/foo/bar>
Pass Parsing origin: <http://a:b@c:29/d> against <http://example.org/foo/bar>
Pass Parsing origin: <http::@c:29> against <http://example.org/foo/bar>
Pass Parsing origin: <http://&a:foo(b]c@d:2/> against <http://example.org/foo/bar>
Pass Parsing origin: <http://::@c@d:2> against <http://example.org/foo/bar>
Pass Parsing origin: <http://foo.com:b@d/> against <http://example.org/foo/bar>
Pass Parsing origin: <http://foo.com/\@> against <http://example.org/foo/bar>
Pass Parsing origin: <http:\\foo.com\> against <http://example.org/foo/bar>
Pass Parsing origin: <http:\\a\b:c\d@foo.com\> against <http://example.org/foo/bar>
Pass Parsing origin: <http://a:b@c\> against <about:blank>
Pass Parsing origin: <ws://a@b\c> against <about:blank>
Pass Parsing origin: <foo:/> against <http://example.org/foo/bar>
Pass Parsing origin: <foo:/bar.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <foo://///////> against <http://example.org/foo/bar>
Pass Parsing origin: <foo://///////bar.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <foo:////://///> against <http://example.org/foo/bar>
Pass Parsing origin: <c:/foo> against <http://example.org/foo/bar>
Pass Parsing origin: <//foo/bar> against <http://example.org/foo/bar>
Pass Parsing origin: <http://foo/path;a??e#f#g> against <http://example.org/foo/bar>
Pass Parsing origin: <http://foo/abcd?efgh?ijkl> against <http://example.org/foo/bar>
Pass Parsing origin: <http://foo/abcd#foo?bar> against <http://example.org/foo/bar>
Pass Parsing origin: <[61:24:74]:98> against <http://example.org/foo/bar>
Pass Parsing origin: <http:[61:27]/:foo> against <http://example.org/foo/bar>
Pass Parsing origin: <http://[2001::1]> against <http://example.org/foo/bar>
Pass Parsing origin: <http://[::127.0.0.1]> against <http://example.org/foo/bar>
Pass Parsing origin: <http://[0:0:0:0:0:0:13.1.68.3]> against <http://example.org/foo/bar>
Pass Parsing origin: <http://[2001::1]:80> against <http://example.org/foo/bar>
Pass Parsing origin: <http:/example.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <ftp:/example.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <https:/example.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <madeupscheme:/example.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <ftps:/example.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <gopher:/example.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <ws:/example.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <wss:/example.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <data:/example.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <javascript:/example.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <mailto:/example.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <http:example.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <ftp:example.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <https:example.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <madeupscheme:example.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <ftps:example.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <gopher:example.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <ws:example.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <wss:example.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <data:example.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <javascript:example.com/> against <http://example.org/foo/bar>
Pass Parsing origin: <mailto:example.com/> against <http://example.org/foo/bar>
Pass Parsing origin: </a/b/c> against <http://example.org/foo/bar>
Pass Parsing origin: </a/ /c> against <http://example.org/foo/bar>
Pass Parsing origin: </a%2fc> against <http://example.org/foo/bar>
Pass Parsing origin: </a/%2f/c> against <http://example.org/foo/bar>
Pass Parsing origin: <#β> against <http://example.org/foo/bar>
Pass Parsing origin: <data:text/html,test#test> against <http://example.org/foo/bar>
Pass Parsing origin: <tel:1234567890> against <http://example.org/foo/bar>
Pass Parsing origin: <ssh://example.com/foo/bar.git> against <http://example.org/>
Pass Parsing origin: <http://example.com/././foo> against <about:blank>
Pass Parsing origin: <http://example.com/./.foo> against <about:blank>
Pass Parsing origin: <http://example.com/foo/.> against <about:blank>
Pass Parsing origin: <http://example.com/foo/./> against <about:blank>
Pass Parsing origin: <http://example.com/foo/bar/..> against <about:blank>
Pass Parsing origin: <http://example.com/foo/bar/../> against <about:blank>
Pass Parsing origin: <http://example.com/foo/..bar> against <about:blank>
Pass Parsing origin: <http://example.com/foo/bar/../ton> against <about:blank>
Pass Parsing origin: <http://example.com/foo/bar/../ton/../../a> against <about:blank>
Pass Parsing origin: <http://example.com/foo/../../..> against <about:blank>
Pass Parsing origin: <http://example.com/foo/../../../ton> against <about:blank>
Pass Parsing origin: <http://example.com/foo/%2e> against <about:blank>
Pass Parsing origin: <http://example.com/foo/%2e%2> against <about:blank>
Pass Parsing origin: <http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar> against <about:blank>
Pass Parsing origin: <http://example.com////../..> against <about:blank>
Pass Parsing origin: <http://example.com/foo/bar//../..> against <about:blank>
Pass Parsing origin: <http://example.com/foo/bar//..> against <about:blank>
Pass Parsing origin: <http://example.com/foo> against <about:blank>
Pass Parsing origin: <http://example.com/%20foo> against <about:blank>
Pass Parsing origin: <http://example.com/foo%> against <about:blank>
Pass Parsing origin: <http://example.com/foo%2> against <about:blank>
Pass Parsing origin: <http://example.com/foo%2zbar> against <about:blank>
Pass Parsing origin: <http://example.com/foo%2©zbar> against <about:blank>
Pass Parsing origin: <http://example.com/foo%41%7a> against <about:blank>
Pass Parsing origin: <http://example.com/foo ‘%91> against <about:blank>
Pass Parsing origin: <http://example.com/foo%00%51> against <about:blank>
Pass Parsing origin: <http://example.com/(%28:%3A%29)> against <about:blank>
Pass Parsing origin: <http://example.com/%3A%3a%3C%3c> against <about:blank>
Pass Parsing origin: <http://example.com/foo bar> against <about:blank>
Pass Parsing origin: <http://example.com\\foo\\bar> against <about:blank>
Pass Parsing origin: <http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd> against <about:blank>
Pass Parsing origin: <http://example.com/@asdf%40> against <about:blank>
Pass Parsing origin: <http://example.com/你好你好> against <about:blank>
Pass Parsing origin: <http://example.com/‥/foo> against <about:blank>
Pass Parsing origin: <http://example.com//foo> against <about:blank>
Pass Parsing origin: <http://example.com//foo//bar> against <about:blank>
Pass Parsing origin: <http://www.google.com/foo?bar=baz#> against <about:blank>
Pass Parsing origin: <http://www.google.com/foo?bar=baz# »> against <about:blank>
Pass Parsing origin: <data:test# »> against <about:blank>
Pass Parsing origin: <http://www.google.com> against <about:blank>
Pass Parsing origin: <http://192.0x00A80001> against <about:blank>
Pass Parsing origin: <http://www/foo%2Ehtml> against <about:blank>
Pass Parsing origin: <http://www/foo/%2E/html> against <about:blank>
Pass Parsing origin: <http://%25DOMAIN:foobar@foodomain.com/> against <about:blank>
Pass Parsing origin: <http:\\www.google.com\foo> against <about:blank>
Pass Parsing origin: <http://foo:80/> against <about:blank>
Pass Parsing origin: <http://foo:81/> against <about:blank>
Pass Parsing origin: <httpa://foo:80/> against <about:blank>
Pass Parsing origin: <https://foo:443/> against <about:blank>
Pass Parsing origin: <https://foo:80/> against <about:blank>
Pass Parsing origin: <ftp://foo:21/> against <about:blank>
Pass Parsing origin: <ftp://foo:80/> against <about:blank>
Pass Parsing origin: <gopher://foo:70/> against <about:blank>
Pass Parsing origin: <gopher://foo:443/> against <about:blank>
Pass Parsing origin: <ws://foo:80/> against <about:blank>
Pass Parsing origin: <ws://foo:81/> against <about:blank>
Pass Parsing origin: <ws://foo:443/> against <about:blank>
Pass Parsing origin: <ws://foo:815/> against <about:blank>
Pass Parsing origin: <wss://foo:80/> against <about:blank>
Pass Parsing origin: <wss://foo:81/> against <about:blank>
Pass Parsing origin: <wss://foo:443/> against <about:blank>
Pass Parsing origin: <wss://foo:815/> against <about:blank>
Pass Parsing origin: <http:/example.com/> against <about:blank>
Pass Parsing origin: <ftp:/example.com/> against <about:blank>
Pass Parsing origin: <https:/example.com/> against <about:blank>
Pass Parsing origin: <madeupscheme:/example.com/> against <about:blank>
Pass Parsing origin: <ftps:/example.com/> against <about:blank>
Pass Parsing origin: <gopher:/example.com/> against <about:blank>
Pass Parsing origin: <ws:/example.com/> against <about:blank>
Pass Parsing origin: <wss:/example.com/> against <about:blank>
Pass Parsing origin: <data:/example.com/> against <about:blank>
Pass Parsing origin: <javascript:/example.com/> against <about:blank>
Pass Parsing origin: <mailto:/example.com/> against <about:blank>
Pass Parsing origin: <http:example.com/> against <about:blank>
Pass Parsing origin: <ftp:example.com/> against <about:blank>
Pass Parsing origin: <https:example.com/> against <about:blank>
Pass Parsing origin: <madeupscheme:example.com/> against <about:blank>
Pass Parsing origin: <ftps:example.com/> against <about:blank>
Pass Parsing origin: <gopher:example.com/> against <about:blank>
Pass Parsing origin: <ws:example.com/> against <about:blank>
Pass Parsing origin: <wss:example.com/> against <about:blank>
Pass Parsing origin: <data:example.com/> against <about:blank>
Pass Parsing origin: <javascript:example.com/> against <about:blank>
Pass Parsing origin: <mailto:example.com/> against <about:blank>
Pass Parsing origin: <https://example.com/aaa/bbb/%2e%2e?query> against <about:blank>
Pass Parsing origin: <http:@www.example.com> against <about:blank>
Pass Parsing origin: <http:/@www.example.com> against <about:blank>
Pass Parsing origin: <http://@www.example.com> against <about:blank>
Pass Parsing origin: <http:a:b@www.example.com> against <about:blank>
Pass Parsing origin: <http:/a:b@www.example.com> against <about:blank>
Pass Parsing origin: <http://a:b@www.example.com> against <about:blank>
Pass Parsing origin: <http://@pple.com> against <about:blank>
Pass Parsing origin: <http::b@www.example.com> against <about:blank>
Pass Parsing origin: <http:/:b@www.example.com> against <about:blank>
Pass Parsing origin: <http://:b@www.example.com> against <about:blank>
Pass Parsing origin: <http:a:@www.example.com> against <about:blank>
Pass Parsing origin: <http:/a:@www.example.com> against <about:blank>
Pass Parsing origin: <http://a:@www.example.com> against <about:blank>
Pass Parsing origin: <http://www.@pple.com> against <about:blank>
Pass Parsing origin: <http://:@www.example.com> against <about:blank>
Pass Parsing origin: </> against <http://www.example.com/test>
Pass Parsing origin: </test.txt> against <http://www.example.com/test>
Pass Parsing origin: <.> against <http://www.example.com/test>
Pass Parsing origin: <..> against <http://www.example.com/test>
Pass Parsing origin: <test.txt> against <http://www.example.com/test>
Pass Parsing origin: <./test.txt> against <http://www.example.com/test>
Pass Parsing origin: <../test.txt> against <http://www.example.com/test>
Pass Parsing origin: <../aaa/test.txt> against <http://www.example.com/test>
Pass Parsing origin: <../../test.txt> against <http://www.example.com/test>
Pass Parsing origin: <中/test.txt> against <http://www.example.com/test>
Pass Parsing origin: <http://www.example2.com> against <http://www.example.com/test>
Pass Parsing origin: <//www.example2.com> against <http://www.example.com/test>
Pass Parsing origin: <http://ExAmPlE.CoM> against <http://other.com/>
Pass Parsing origin: <http://GOOgoo.com> against <http://other.com/>
Pass Parsing origin: < http://example.com/ > against <about:blank>
Pass Parsing origin: <http://www.foo。bar.com> against <http://other.com/>
Pass Parsing origin: <https://x/<2F>?<3F>#<23>> against <about:blank>
Pass Parsing origin: <http://.com> against <http://other.com/>
Pass Parsing origin: <http://你好你好> against <http://other.com/>
Pass Parsing origin: <https://faß.ExAmPlE/> against <about:blank>
Pass Parsing origin: <sc://faß.ExAmPlE/> against <about:blank>
Pass Parsing origin: <http://%30%78%63%30%2e%30%32%35%30.01> against <http://other.com/>
Pass Parsing origin: <http://%30%78%63%30%2e%30%32%35%30.01%2e> against <http://other.com/>
Pass Parsing origin: <http://> against <http://other.com/>
Pass Parsing origin: <http://./> against <about:blank>
Pass Parsing origin: <http://../> against <about:blank>
Pass Parsing origin: <h://.> against <about:blank>
Pass Parsing origin: <http://foo:<3A><><EFBFBD>U+dca9@example.com/bar> against <http://other.com/>
Pass Parsing origin: <#> against <test:test>
Pass Parsing origin: <#x> against <mailto:x@x.com>
Pass Parsing origin: <#x> against <about:blank>
Pass Parsing origin: <#x:y> against <about:blank>
Pass Parsing origin: <#> against <test:test?test>
Pass Parsing origin: <https://@test@test@example:800/> against <http://doesnotmatter/>
Pass Parsing origin: <https://@@@example> against <http://doesnotmatter/>
Pass Parsing origin: <http://`{}:`{}@h/`{}?`{}> against <http://doesnotmatter/>
Pass Parsing origin: <http://host/?'> against <about:blank>
Pass Parsing origin: <notspecial://host/?'> against <about:blank>
Pass Parsing origin: </some/path> against <http://user@example.org/smth>
Pass Parsing origin: <> against <http://user:pass@example.org:21/smth>
Pass Parsing origin: </some/path> against <http://user:pass@example.org:21/smth>
Pass Parsing origin: <i> against <sc:/pa/pa>
Pass Parsing origin: <i> against <sc://ho/pa>
Pass Parsing origin: <i> against <sc:///pa/pa>
Pass Parsing origin: <../i> against <sc:/pa/pa>
Pass Parsing origin: <../i> against <sc://ho/pa>
Pass Parsing origin: <../i> against <sc:///pa/pa>
Pass Parsing origin: </i> against <sc:/pa/pa>
Pass Parsing origin: </i> against <sc://ho/pa>
Pass Parsing origin: </i> against <sc:///pa/pa>
Pass Parsing origin: <?i> against <sc:/pa/pa>
Pass Parsing origin: <?i> against <sc://ho/pa>
Pass Parsing origin: <?i> against <sc:///pa/pa>
Pass Parsing origin: <#i> against <sc:sd>
Pass Parsing origin: <#i> against <sc:sd/sd>
Pass Parsing origin: <#i> against <sc:/pa/pa>
Pass Parsing origin: <#i> against <sc://ho/pa>
Pass Parsing origin: <#i> against <sc:///pa/pa>
Pass Parsing origin: <about:/../> against <about:blank>
Pass Parsing origin: <data:/../> against <about:blank>
Pass Parsing origin: <javascript:/../> against <about:blank>
Pass Parsing origin: <mailto:/../> against <about:blank>
Pass Parsing origin: <sc://ñ.test/> against <about:blank>
Pass Parsing origin: <x> against <sc://ñ>
Pass Parsing origin: <sc:\../> against <about:blank>
Pass Parsing origin: <sc::a@example.net> against <about:blank>
Pass Parsing origin: <wow:%NBD> against <about:blank>
Pass Parsing origin: <wow:%1G> against <about:blank>
Pass Parsing origin: <wow:￿> against <about:blank>
Pass Parsing origin: <http://!"$&'()*+,-.;=_`{}~/> against <about:blank>
Pass Parsing origin: <sc:// !"$%&'()*+,-.;=_`{}~/> against <about:blank>
Pass Parsing origin: <ftp://%e2%98%83> against <about:blank>
Pass Parsing origin: <https://%e2%98%83> against <about:blank>
Pass Parsing origin: <http://127.0.0.1:10100/relative_import.html> against <about:blank>
Pass Parsing origin: <http://facebook.com/?foo=%7B%22abc%22> against <about:blank>
Pass Parsing origin: <https://localhost:3000/jqueryui@1.2.3> against <about:blank>
Pass Parsing origin: <h t
t p://h o
s t:9 0
0 0/p a
t h?q u
e ry#f r
a g> against <about:blank>
Pass Parsing origin: <?a=b&c=d> against <http://example.org/foo/bar>
Pass Parsing origin: <??a=b&c=d> against <http://example.org/foo/bar>
Pass Parsing origin: <http:> against <http://example.org/foo/bar>
Pass Parsing origin: <sc:> against <https://example.org/foo/bar>
Pass Parsing origin: <http://foo.bar/baz?qux#foobar> against <about:blank>
Pass Parsing origin: <http://foo.bar/baz?qux#foo"bar> against <about:blank>
Pass Parsing origin: <http://foo.bar/baz?qux#foo<bar> against <about:blank>
Pass Parsing origin: <http://foo.bar/baz?qux#foo>bar> against <about:blank>
Pass Parsing origin: <http://foo.bar/baz?qux#foo`bar> against <about:blank>
Pass Parsing origin: <http://1.2.3.4/> against <http://other.com/>
Pass Parsing origin: <http://1.2.3.4./> against <http://other.com/>
Pass Parsing origin: <http://192.168.257> against <http://other.com/>
Pass Parsing origin: <http://192.168.257.> against <http://other.com/>
Pass Parsing origin: <http://192.168.257.com> against <http://other.com/>
Pass Parsing origin: <http://256> against <http://other.com/>
Pass Parsing origin: <http://256.com> against <http://other.com/>
Pass Parsing origin: <http://999999999> against <http://other.com/>
Pass Parsing origin: <http://999999999.> against <http://other.com/>
Pass Parsing origin: <http://999999999.com> against <http://other.com/>
Pass Parsing origin: <http://10000000000.com> against <http://other.com/>
Pass Parsing origin: <http://4294967295> against <http://other.com/>
Pass Parsing origin: <http://0xffffffff> against <http://other.com/>
Pass Parsing origin: <https://0x.0x.0> against <about:blank>
Pass Parsing origin: <asdf://%43%7C/> against <about:blank>
Pass Parsing origin: <http://[1:0::]> against <http://example.net/>
Pass Parsing origin: <sc://ñ> against <about:blank>
Pass Parsing origin: <sc://ñ?x> against <about:blank>
Pass Parsing origin: <sc://ñ#x> against <about:blank>
Pass Parsing origin: <#x> against <sc://ñ>
Pass Parsing origin: <?x> against <sc://ñ>
Pass Parsing origin: <tftp://foobar.com/someconfig;mode=netascii> against <about:blank>
Pass Parsing origin: <telnet://user:pass@foobar.com:23/> against <about:blank>
Pass Parsing origin: <ut2004://10.10.10.10:7777/Index.ut2> against <about:blank>
Pass Parsing origin: <redis://foo:bar@somehost:6379/0?baz=bam&qux=baz> against <about:blank>
Pass Parsing origin: <rsync://foo@host:911/sup> against <about:blank>
Pass Parsing origin: <git://github.com/foo/bar.git> against <about:blank>
Pass Parsing origin: <irc://myserver.com:6999/channel?passwd> against <about:blank>
Pass Parsing origin: <dns://fw.example.org:9999/foo.bar.org?type=TXT> against <about:blank>
Pass Parsing origin: <ldap://localhost:389/ou=People,o=JNDITutorial> against <about:blank>
Pass Parsing origin: <git+https://github.com/foo/bar> against <about:blank>
Pass Parsing origin: <urn:ietf:rfc:2648> against <about:blank>
Pass Parsing origin: <tag:joe@example.org,2001:foo/bar> against <about:blank>
Pass Parsing origin: <blob:https://example.com:443/> against <about:blank>
Pass Parsing origin: <blob:http://example.org:88/> against <about:blank>
Pass Parsing origin: <blob:d3958f5c-0777-0845-9dcf-2cb28783acaf> against <about:blank>
Pass Parsing origin: <blob:> against <about:blank>
Pass Parsing origin: <blob:blob:> against <about:blank>
Pass Parsing origin: <blob:blob:https://example.org/> against <about:blank>
Pass Parsing origin: <blob:about:blank> against <about:blank>
Pass Parsing origin: <blob:ftp://host/path> against <about:blank>
Pass Parsing origin: <blob:ws://example.org/> against <about:blank>
Pass Parsing origin: <blob:wss://example.org/> against <about:blank>
Pass Parsing origin: <blob:http%3a//example.org/> against <about:blank>
Pass Parsing origin: <non-special:cannot-be-a-base-url-~€> against <about:blank>
Pass Parsing origin: <non-special:cannot-be-a-base-url-!"$%&'()*+,-.;<=>@[\]^_`{|}~@/> against <about:blank>
Pass Parsing origin: <https://www.example.com/path{path.html?query'=query#fragment<fragment> against <about:blank>
Pass Parsing origin: <https://user:pass[@foo/bar> against <http://example.org>
Pass Parsing origin: <foo:// !"$%&'()*+,-.;<=>@[\]^_`{|}~@host/> against <about:blank>
Pass Parsing origin: <wss:// !"$%&'()*+,-.;<=>@[]^_`{|}~@host/> against <about:blank>
Pass Parsing origin: <foo://joe: !"$%&'()*+,-.:;<=>@[\]^_`{|}~@host/> against <about:blank>
Pass Parsing origin: <wss://joe: !"$%&'()*+,-.:;<=>@[]^_`{|}~@host/> against <about:blank>
Pass Parsing origin: <foo://!"$%&'()*+,-.;=_`{}~/> against <about:blank>
Pass Parsing origin: <wss://!"$&'()*+,-.;=_`{}~/> against <about:blank>
Pass Parsing origin: <foo://host/ !"$%&'()*+,-./:;<=>@[\]^_`{|}~> against <about:blank>
Pass Parsing origin: <wss://host/ !"$%&'()*+,-./:;<=>@[\]^_`{|}~> against <about:blank>
Pass Parsing origin: <foo://host/dir/? !"$%&'()*+,-./:;<=>?@[\]^_`{|}~> against <about:blank>
Pass Parsing origin: <wss://host/dir/? !"$%&'()*+,-./:;<=>?@[\]^_`{|}~> against <about:blank>
Pass Parsing origin: <foo://host/dir/# !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~> against <about:blank>
Pass Parsing origin: <wss://host/dir/# !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~> against <about:blank>
Pass Parsing origin: <https://example.com/"quoted"> against <about:blank>
Pass Parsing origin: <https://a%C2%ADb/> against <about:blank>
Pass Parsing origin: <data://example.com:8080/pathname?search#hash> against <about:blank>
Pass Parsing origin: <data:///test> against <about:blank>
Pass Parsing origin: <data://test/a/../b> against <about:blank>
Pass Parsing origin: <javascript://example.com:8080/pathname?search#hash> against <about:blank>
Pass Parsing origin: <javascript:///test> against <about:blank>
Pass Parsing origin: <javascript://test/a/../b> against <about:blank>
Pass Parsing origin: <mailto://example.com:8080/pathname?search#hash> against <about:blank>
Pass Parsing origin: <mailto:///test> against <about:blank>
Pass Parsing origin: <mailto://test/a/../b> against <about:blank>
Pass Parsing origin: <intent://example.com:8080/pathname?search#hash> against <about:blank>
Pass Parsing origin: <intent:///test> against <about:blank>
Pass Parsing origin: <intent://test/a/../b> against <about:blank>
Pass Parsing origin: <urn://example.com:8080/pathname?search#hash> against <about:blank>
Pass Parsing origin: <urn:///test> against <about:blank>
Pass Parsing origin: <urn://test/a/../b> against <about:blank>
Pass Parsing origin: <turn://example.com:8080/pathname?search#hash> against <about:blank>
Pass Parsing origin: <turn:///test> against <about:blank>
Pass Parsing origin: <turn://test/a/../b> against <about:blank>
Pass Parsing origin: <stun://example.com:8080/pathname?search#hash> against <about:blank>
Pass Parsing origin: <stun:///test> against <about:blank>
Pass Parsing origin: <stun://test/a/../b> against <about:blank>
Pass Parsing origin: <w://x:0> against <about:blank>
Pass Parsing origin: <west://x:0> against <about:blank>
Pass Parsing origin: <android://x:0/a> against <about:blank>
Pass Parsing origin: <drivefs://x:0/a> against <about:blank>
Pass Parsing origin: <chromeos-steam://x:0/a> against <about:blank>
Pass Parsing origin: <steam://x:0/a> against <about:blank>
Pass Parsing origin: <materialized-view://x:0/a> against <about:blank>
Pass Parsing origin: <android-app://x:0> against <about:blank>
Pass Parsing origin: <chrome-distiller://x:0> against <about:blank>
Pass Parsing origin: <chrome-extension://x:0> against <about:blank>
Pass Parsing origin: <chrome-native://x:0> against <about:blank>
Pass Parsing origin: <chrome-resource://x:0> against <about:blank>
Pass Parsing origin: <chrome-search://x:0> against <about:blank>
Pass Parsing origin: <fuchsia-dir://x:0> against <about:blank>
Pass Parsing origin: <isolated-app://x:0> against <about:blank>
Pass Parsing origin: <non-special:\\opaque> against <about:blank>
Pass Parsing origin: <non-special:\\opaque/path> against <about:blank>
Pass Parsing origin: <non-special:\\opaque\path> against <about:blank>
Pass Parsing origin: <non-special:\/opaque> against <about:blank>
Pass Parsing origin: <non-special:/\path> against <about:blank>
Pass Parsing origin: <non-special://host/a\b> against <about:blank>
Pass Parsing origin: <http://example.com//U+d800<30><30><EFBFBD>U+dffeU+dfff﷐﷏﷯ﷰ￾￿??U+d800<30><30><EFBFBD>U+dffeU+dfff﷐﷏﷯ﷰ￾￿> against <about:blank>

View file

@ -0,0 +1,880 @@
Harness status: OK
Found 863 tests
863 Pass
Pass Loading data…
Pass Parsing: <http://example .
org> against <http://example.org/foo/bar>
Pass Parsing: <http://user:pass@foo:21/bar;par?b#c> against <http://example.org/foo/bar>
Pass Parsing: <https://test:@test> without base
Pass Parsing: <https://:@test> without base
Pass Parsing: <non-special://test:@test/x> without base
Pass Parsing: <non-special://:@test/x> without base
Pass Parsing: <http:foo.com> against <http://example.org/foo/bar>
Pass Parsing: < :foo.com
> against <http://example.org/foo/bar>
Pass Parsing: < foo.com > against <http://example.org/foo/bar>
Pass Parsing: <a: foo.com> against <http://example.org/foo/bar>
Pass Parsing: <http://f:21/ b ? d # e > against <http://example.org/foo/bar>
Pass Parsing: <lolscheme:x x#x x> without base
Pass Parsing: <http://f:/c> against <http://example.org/foo/bar>
Pass Parsing: <http://f:0/c> against <http://example.org/foo/bar>
Pass Parsing: <http://f:00000000000000/c> against <http://example.org/foo/bar>
Pass Parsing: <http://f:00000000000000000000080/c> against <http://example.org/foo/bar>
Pass Parsing: <http://f:b/c> against <http://example.org/foo/bar>
Pass Parsing: <http://f: /c> against <http://example.org/foo/bar>
Pass Parsing: <http://f:
/c> against <http://example.org/foo/bar>
Pass Parsing: <http://f:fifty-two/c> against <http://example.org/foo/bar>
Pass Parsing: <http://f:999999/c> against <http://example.org/foo/bar>
Pass Parsing: <non-special://f:999999/c> against <http://example.org/foo/bar>
Pass Parsing: <http://f: 21 / b ? d # e > against <http://example.org/foo/bar>
Pass Parsing: <> against <http://example.org/foo/bar>
Pass Parsing: < > against <http://example.org/foo/bar>
Pass Parsing: <:foo.com/> against <http://example.org/foo/bar>
Pass Parsing: <:foo.com\> against <http://example.org/foo/bar>
Pass Parsing: <:> against <http://example.org/foo/bar>
Pass Parsing: <:a> against <http://example.org/foo/bar>
Pass Parsing: <:/> against <http://example.org/foo/bar>
Pass Parsing: <:\> against <http://example.org/foo/bar>
Pass Parsing: <:#> against <http://example.org/foo/bar>
Pass Parsing: <#> against <http://example.org/foo/bar>
Pass Parsing: <#/> against <http://example.org/foo/bar>
Pass Parsing: <#\> against <http://example.org/foo/bar>
Pass Parsing: <#;?> against <http://example.org/foo/bar>
Pass Parsing: <?> against <http://example.org/foo/bar>
Pass Parsing: </> against <http://example.org/foo/bar>
Pass Parsing: <:23> against <http://example.org/foo/bar>
Pass Parsing: </:23> against <http://example.org/foo/bar>
Pass Parsing: <\x> against <http://example.org/foo/bar>
Pass Parsing: <\\x\hello> against <http://example.org/foo/bar>
Pass Parsing: <::> against <http://example.org/foo/bar>
Pass Parsing: <::23> against <http://example.org/foo/bar>
Pass Parsing: <foo://> against <http://example.org/foo/bar>
Pass Parsing: <http://a:b@c:29/d> against <http://example.org/foo/bar>
Pass Parsing: <http::@c:29> against <http://example.org/foo/bar>
Pass Parsing: <http://&a:foo(b]c@d:2/> against <http://example.org/foo/bar>
Pass Parsing: <http://::@c@d:2> against <http://example.org/foo/bar>
Pass Parsing: <http://foo.com:b@d/> against <http://example.org/foo/bar>
Pass Parsing: <http://foo.com/\@> against <http://example.org/foo/bar>
Pass Parsing: <http:\\foo.com\> against <http://example.org/foo/bar>
Pass Parsing: <http:\\a\b:c\d@foo.com\> against <http://example.org/foo/bar>
Pass Parsing: <http://a:b@c\> without base
Pass Parsing: <ws://a@b\c> without base
Pass Parsing: <foo:/> against <http://example.org/foo/bar>
Pass Parsing: <foo:/bar.com/> against <http://example.org/foo/bar>
Pass Parsing: <foo://///////> against <http://example.org/foo/bar>
Pass Parsing: <foo://///////bar.com/> against <http://example.org/foo/bar>
Pass Parsing: <foo:////://///> against <http://example.org/foo/bar>
Pass Parsing: <c:/foo> against <http://example.org/foo/bar>
Pass Parsing: <//foo/bar> against <http://example.org/foo/bar>
Pass Parsing: <http://foo/path;a??e#f#g> against <http://example.org/foo/bar>
Pass Parsing: <http://foo/abcd?efgh?ijkl> against <http://example.org/foo/bar>
Pass Parsing: <http://foo/abcd#foo?bar> against <http://example.org/foo/bar>
Pass Parsing: <[61:24:74]:98> against <http://example.org/foo/bar>
Pass Parsing: <http:[61:27]/:foo> against <http://example.org/foo/bar>
Pass Parsing: <http://[1::2]:3:4> against <http://example.org/foo/bar>
Pass Parsing: <http://2001::1> against <http://example.org/foo/bar>
Pass Parsing: <http://2001::1]> against <http://example.org/foo/bar>
Pass Parsing: <http://2001::1]:80> against <http://example.org/foo/bar>
Pass Parsing: <http://[2001::1]> against <http://example.org/foo/bar>
Pass Parsing: <http://[::127.0.0.1]> against <http://example.org/foo/bar>
Pass Parsing: <http://[::127.0.0.1.]> against <http://example.org/foo/bar>
Pass Parsing: <http://[0:0:0:0:0:0:13.1.68.3]> against <http://example.org/foo/bar>
Pass Parsing: <http://[2001::1]:80> against <http://example.org/foo/bar>
Pass Parsing: <http:/example.com/> against <http://example.org/foo/bar>
Pass Parsing: <ftp:/example.com/> against <http://example.org/foo/bar>
Pass Parsing: <https:/example.com/> against <http://example.org/foo/bar>
Pass Parsing: <madeupscheme:/example.com/> against <http://example.org/foo/bar>
Pass Parsing: <file:/example.com/> against <http://example.org/foo/bar>
Pass Parsing: <file://example:1/> without base
Pass Parsing: <file://example:test/> without base
Pass Parsing: <file://example%/> without base
Pass Parsing: <file://[example]/> without base
Pass Parsing: <ftps:/example.com/> against <http://example.org/foo/bar>
Pass Parsing: <gopher:/example.com/> against <http://example.org/foo/bar>
Pass Parsing: <ws:/example.com/> against <http://example.org/foo/bar>
Pass Parsing: <wss:/example.com/> against <http://example.org/foo/bar>
Pass Parsing: <data:/example.com/> against <http://example.org/foo/bar>
Pass Parsing: <javascript:/example.com/> against <http://example.org/foo/bar>
Pass Parsing: <mailto:/example.com/> against <http://example.org/foo/bar>
Pass Parsing: <http:example.com/> against <http://example.org/foo/bar>
Pass Parsing: <ftp:example.com/> against <http://example.org/foo/bar>
Pass Parsing: <https:example.com/> against <http://example.org/foo/bar>
Pass Parsing: <madeupscheme:example.com/> against <http://example.org/foo/bar>
Pass Parsing: <ftps:example.com/> against <http://example.org/foo/bar>
Pass Parsing: <gopher:example.com/> against <http://example.org/foo/bar>
Pass Parsing: <ws:example.com/> against <http://example.org/foo/bar>
Pass Parsing: <wss:example.com/> against <http://example.org/foo/bar>
Pass Parsing: <data:example.com/> against <http://example.org/foo/bar>
Pass Parsing: <javascript:example.com/> against <http://example.org/foo/bar>
Pass Parsing: <mailto:example.com/> against <http://example.org/foo/bar>
Pass Parsing: </a/b/c> against <http://example.org/foo/bar>
Pass Parsing: </a/ /c> against <http://example.org/foo/bar>
Pass Parsing: </a%2fc> against <http://example.org/foo/bar>
Pass Parsing: </a/%2f/c> against <http://example.org/foo/bar>
Pass Parsing: <#β> against <http://example.org/foo/bar>
Pass Parsing: <data:text/html,test#test> against <http://example.org/foo/bar>
Pass Parsing: <tel:1234567890> against <http://example.org/foo/bar>
Pass Parsing: <ssh://example.com/foo/bar.git> against <http://example.org/>
Pass Parsing: <file:c:\foo\bar.html> against <file:///tmp/mock/path>
Pass Parsing: < File:c|////foo\bar.html> against <file:///tmp/mock/path>
Pass Parsing: <C|/foo/bar> against <file:///tmp/mock/path>
Pass Parsing: </C|\foo\bar> against <file:///tmp/mock/path>
Pass Parsing: <//C|/foo/bar> against <file:///tmp/mock/path>
Pass Parsing: <//server/file> against <file:///tmp/mock/path>
Pass Parsing: <\\server\file> against <file:///tmp/mock/path>
Pass Parsing: </\server/file> against <file:///tmp/mock/path>
Pass Parsing: <file:///foo/bar.txt> against <file:///tmp/mock/path>
Pass Parsing: <file:///home/me> against <file:///tmp/mock/path>
Pass Parsing: <//> against <file:///tmp/mock/path>
Pass Parsing: <///> against <file:///tmp/mock/path>
Pass Parsing: <///test> against <file:///tmp/mock/path>
Pass Parsing: <file://test> against <file:///tmp/mock/path>
Pass Parsing: <file://localhost> against <file:///tmp/mock/path>
Pass Parsing: <file://localhost/> against <file:///tmp/mock/path>
Pass Parsing: <file://localhost/test> against <file:///tmp/mock/path>
Pass Parsing: <test> against <file:///tmp/mock/path>
Pass Parsing: <file:test> against <file:///tmp/mock/path>
Pass Parsing: <file:///w|m> without base
Pass Parsing: <file:///w||m> without base
Pass Parsing: <file:///w|/m> without base
Pass Parsing: <file:C|/m/> without base
Pass Parsing: <file:C||/m/> without base
Pass Parsing: <http://example.com/././foo> without base
Pass Parsing: <http://example.com/./.foo> without base
Pass Parsing: <http://example.com/foo/.> without base
Pass Parsing: <http://example.com/foo/./> without base
Pass Parsing: <http://example.com/foo/bar/..> without base
Pass Parsing: <http://example.com/foo/bar/../> without base
Pass Parsing: <http://example.com/foo/..bar> without base
Pass Parsing: <http://example.com/foo/bar/../ton> without base
Pass Parsing: <http://example.com/foo/bar/../ton/../../a> without base
Pass Parsing: <http://example.com/foo/../../..> without base
Pass Parsing: <http://example.com/foo/../../../ton> without base
Pass Parsing: <http://example.com/foo/%2e> without base
Pass Parsing: <http://example.com/foo/%2e%2> without base
Pass Parsing: <http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar> without base
Pass Parsing: <http://example.com////../..> without base
Pass Parsing: <http://example.com/foo/bar//../..> without base
Pass Parsing: <http://example.com/foo/bar//..> without base
Pass Parsing: <http://example.com/foo> without base
Pass Parsing: <http://example.com/%20foo> without base
Pass Parsing: <http://example.com/foo%> without base
Pass Parsing: <http://example.com/foo%2> without base
Pass Parsing: <http://example.com/foo%2zbar> without base
Pass Parsing: <http://example.com/foo%2©zbar> without base
Pass Parsing: <http://example.com/foo%41%7a> without base
Pass Parsing: <http://example.com/foo ‘%91> without base
Pass Parsing: <http://example.com/foo%00%51> without base
Pass Parsing: <http://example.com/(%28:%3A%29)> without base
Pass Parsing: <http://example.com/%3A%3a%3C%3c> without base
Pass Parsing: <http://example.com/foo bar> without base
Pass Parsing: <http://example.com\\foo\\bar> without base
Pass Parsing: <http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd> without base
Pass Parsing: <http://example.com/@asdf%40> without base
Pass Parsing: <http://example.com/你好你好> without base
Pass Parsing: <http://example.com/‥/foo> without base
Pass Parsing: <http://example.com//foo> without base
Pass Parsing: <http://example.com//foo//bar> without base
Pass Parsing: <http://www.google.com/foo?bar=baz#> without base
Pass Parsing: <http://www.google.com/foo?bar=baz# »> without base
Pass Parsing: <data:test# »> without base
Pass Parsing: <http://www.google.com> without base
Pass Parsing: <http://192.0x00A80001> without base
Pass Parsing: <http://www/foo%2Ehtml> without base
Pass Parsing: <http://www/foo/%2E/html> without base
Pass Parsing: <http://user:pass@/> without base
Pass Parsing: <http://%25DOMAIN:foobar@foodomain.com/> without base
Pass Parsing: <http:\\www.google.com\foo> without base
Pass Parsing: <http://foo:80/> without base
Pass Parsing: <http://foo:81/> without base
Pass Parsing: <httpa://foo:80/> without base
Pass Parsing: <http://foo:-80/> without base
Pass Parsing: <https://foo:443/> without base
Pass Parsing: <https://foo:80/> without base
Pass Parsing: <ftp://foo:21/> without base
Pass Parsing: <ftp://foo:80/> without base
Pass Parsing: <gopher://foo:70/> without base
Pass Parsing: <gopher://foo:443/> without base
Pass Parsing: <ws://foo:80/> without base
Pass Parsing: <ws://foo:81/> without base
Pass Parsing: <ws://foo:443/> without base
Pass Parsing: <ws://foo:815/> without base
Pass Parsing: <wss://foo:80/> without base
Pass Parsing: <wss://foo:81/> without base
Pass Parsing: <wss://foo:443/> without base
Pass Parsing: <wss://foo:815/> without base
Pass Parsing: <http:/example.com/> without base
Pass Parsing: <ftp:/example.com/> without base
Pass Parsing: <https:/example.com/> without base
Pass Parsing: <madeupscheme:/example.com/> without base
Pass Parsing: <file:/example.com/> without base
Pass Parsing: <ftps:/example.com/> without base
Pass Parsing: <gopher:/example.com/> without base
Pass Parsing: <ws:/example.com/> without base
Pass Parsing: <wss:/example.com/> without base
Pass Parsing: <data:/example.com/> without base
Pass Parsing: <javascript:/example.com/> without base
Pass Parsing: <mailto:/example.com/> without base
Pass Parsing: <http:example.com/> without base
Pass Parsing: <ftp:example.com/> without base
Pass Parsing: <https:example.com/> without base
Pass Parsing: <madeupscheme:example.com/> without base
Pass Parsing: <ftps:example.com/> without base
Pass Parsing: <gopher:example.com/> without base
Pass Parsing: <ws:example.com/> without base
Pass Parsing: <wss:example.com/> without base
Pass Parsing: <data:example.com/> without base
Pass Parsing: <javascript:example.com/> without base
Pass Parsing: <mailto:example.com/> without base
Pass Parsing: <https://example.com/aaa/bbb/%2e%2e?query> without base
Pass Parsing: <http:@www.example.com> without base
Pass Parsing: <http:/@www.example.com> without base
Pass Parsing: <http://@www.example.com> without base
Pass Parsing: <http:a:b@www.example.com> without base
Pass Parsing: <http:/a:b@www.example.com> without base
Pass Parsing: <http://a:b@www.example.com> without base
Pass Parsing: <http://@pple.com> without base
Pass Parsing: <http::b@www.example.com> without base
Pass Parsing: <http:/:b@www.example.com> without base
Pass Parsing: <http://:b@www.example.com> without base
Pass Parsing: <http:/:@/www.example.com> without base
Pass Parsing: <http://user@/www.example.com> without base
Pass Parsing: <http:@/www.example.com> without base
Pass Parsing: <http:/@/www.example.com> without base
Pass Parsing: <http://@/www.example.com> without base
Pass Parsing: <https:@/www.example.com> without base
Pass Parsing: <http:a:b@/www.example.com> without base
Pass Parsing: <http:/a:b@/www.example.com> without base
Pass Parsing: <http://a:b@/www.example.com> without base
Pass Parsing: <http::@/www.example.com> without base
Pass Parsing: <http:a:@www.example.com> without base
Pass Parsing: <http:/a:@www.example.com> without base
Pass Parsing: <http://a:@www.example.com> without base
Pass Parsing: <http://www.@pple.com> without base
Pass Parsing: <http:@:www.example.com> without base
Pass Parsing: <http:/@:www.example.com> without base
Pass Parsing: <http://@:www.example.com> without base
Pass Parsing: <http://:@www.example.com> without base
Pass Parsing: </> against <http://www.example.com/test>
Pass Parsing: </test.txt> against <http://www.example.com/test>
Pass Parsing: <.> against <http://www.example.com/test>
Pass Parsing: <..> against <http://www.example.com/test>
Pass Parsing: <test.txt> against <http://www.example.com/test>
Pass Parsing: <./test.txt> against <http://www.example.com/test>
Pass Parsing: <../test.txt> against <http://www.example.com/test>
Pass Parsing: <../aaa/test.txt> against <http://www.example.com/test>
Pass Parsing: <../../test.txt> against <http://www.example.com/test>
Pass Parsing: <中/test.txt> against <http://www.example.com/test>
Pass Parsing: <http://www.example2.com> against <http://www.example.com/test>
Pass Parsing: <//www.example2.com> against <http://www.example.com/test>
Pass Parsing: <file:...> against <http://www.example.com/test>
Pass Parsing: <file:..> against <http://www.example.com/test>
Pass Parsing: <file:a> against <http://www.example.com/test>
Pass Parsing: <file:.> without base
Pass Parsing: <file:.> against <http://www.example.com/test>
Pass Parsing: <http://ExAmPlE.CoM> against <http://other.com/>
Pass Parsing: <http://example example.com> against <http://other.com/>
Pass Parsing: <http://Goo%20 goo%7C|.com> against <http://other.com/>
Pass Parsing: <http://[]> against <http://other.com/>
Pass Parsing: <http://[:]> against <http://other.com/>
Pass Parsing: <http://GOO  goo.com> against <http://other.com/>
Pass Parsing: <http://GOOgoo.com> against <http://other.com/>
Pass Parsing: < http://example.com/ > without base
Pass Parsing: <http://www.foo。bar.com> against <http://other.com/>
Pass Parsing: <http://﷐zyx.com> against <http://other.com/>
Pass Parsing: <http://%ef%b7%90zyx.com> against <http://other.com/>
Pass Parsing: <https://<2F>> without base
Pass Parsing: <https://%EF%BF%BD> without base
Pass Parsing: <https://x/<2F>?<3F>#<23>> without base
Pass Parsing: <http://a.b.c.xn--pokxncvks> without base
Pass Parsing: <http://10.0.0.xn--pokxncvks> without base
Pass Parsing: <http://a.b.c.XN--pokxncvks> without base
Pass Parsing: <http://a.b.c.Xn--pokxncvks> without base
Pass Parsing: <http://10.0.0.XN--pokxncvks> without base
Pass Parsing: <http://10.0.0.xN--pokxncvks> without base
Pass Parsing: <http://.com> against <http://other.com/>
Pass Parsing: <http://.com> against <http://other.com/>
Pass Parsing: <http://%ef%bc%85%ef%bc%94%ef%bc%91.com> against <http://other.com/>
Pass Parsing: <http://.com> against <http://other.com/>
Pass Parsing: <http://%ef%bc%85%ef%bc%90%ef%bc%90.com> against <http://other.com/>
Pass Parsing: <http://你好你好> against <http://other.com/>
Pass Parsing: <https://faß.ExAmPlE/> without base
Pass Parsing: <sc://faß.ExAmPlE/> without base
Pass Parsing: <http://%zz%66%a.com> against <http://other.com/>
Pass Parsing: <http://%25> against <http://other.com/>
Pass Parsing: <http://hello%00> against <http://other.com/>
Pass Parsing: <http://%30%78%63%30%2e%30%32%35%30.01> against <http://other.com/>
Pass Parsing: <http://%30%78%63%30%2e%30%32%35%30.01%2e> against <http://other.com/>
Pass Parsing: <http://192.168.0.257> against <http://other.com/>
Pass Parsing: <http://%3g%78%63%30%2e%30%32%35%30%2E.01> against <http://other.com/>
Pass Parsing: <http://192.168.0.1 hello> against <http://other.com/>
Pass Parsing: <https://x x:12> without base
Pass Parsing: <http://> against <http://other.com/>
Pass Parsing: <http://./> without base
Pass Parsing: <http://../> without base
Pass Parsing: <h://.> without base
Pass Parsing: <http://[www.google.com]/> without base
Pass Parsing: <http://[google.com]> against <http://other.com/>
Pass Parsing: <http://[::1.2.3.4x]> against <http://other.com/>
Pass Parsing: <http://[::1.2.3.]> against <http://other.com/>
Pass Parsing: <http://[::1.2.]> against <http://other.com/>
Pass Parsing: <http://[::.1.2]> against <http://other.com/>
Pass Parsing: <http://[::1.]> against <http://other.com/>
Pass Parsing: <http://[::.1]> against <http://other.com/>
Pass Parsing: <http://[::%31]> against <http://other.com/>
Pass Parsing: <http://%5B::1]> against <http://other.com/>
Pass Parsing: <http://foo:<3A><><EFBFBD>U+dca9@example.com/bar> against <http://other.com/>
Pass Parsing: <#> against <test:test>
Pass Parsing: <#x> against <mailto:x@x.com>
Pass Parsing: <#x> against <data:,>
Pass Parsing: <#x> against <about:blank>
Pass Parsing: <#x:y> against <about:blank>
Pass Parsing: <#> against <test:test?test>
Pass Parsing: <https://@test@test@example:800/> against <http://doesnotmatter/>
Pass Parsing: <https://@@@example> against <http://doesnotmatter/>
Pass Parsing: <http://`{}:`{}@h/`{}?`{}> against <http://doesnotmatter/>
Pass Parsing: <http://host/?'> without base
Pass Parsing: <notspecial://host/?'> without base
Pass Parsing: </some/path> against <http://user@example.org/smth>
Pass Parsing: <> against <http://user:pass@example.org:21/smth>
Pass Parsing: </some/path> against <http://user:pass@example.org:21/smth>
Pass Parsing: <i> against <sc:sd>
Pass Parsing: <i> against <sc:sd/sd>
Pass Parsing: <i> against <sc:/pa/pa>
Pass Parsing: <i> against <sc://ho/pa>
Pass Parsing: <i> against <sc:///pa/pa>
Pass Parsing: <../i> against <sc:sd>
Pass Parsing: <../i> against <sc:sd/sd>
Pass Parsing: <../i> against <sc:/pa/pa>
Pass Parsing: <../i> against <sc://ho/pa>
Pass Parsing: <../i> against <sc:///pa/pa>
Pass Parsing: </i> against <sc:sd>
Pass Parsing: </i> against <sc:sd/sd>
Pass Parsing: </i> against <sc:/pa/pa>
Pass Parsing: </i> against <sc://ho/pa>
Pass Parsing: </i> against <sc:///pa/pa>
Pass Parsing: <?i> against <sc:sd>
Pass Parsing: <?i> against <sc:sd/sd>
Pass Parsing: <?i> against <sc:/pa/pa>
Pass Parsing: <?i> against <sc://ho/pa>
Pass Parsing: <?i> against <sc:///pa/pa>
Pass Parsing: <#i> against <sc:sd>
Pass Parsing: <#i> against <sc:sd/sd>
Pass Parsing: <#i> against <sc:/pa/pa>
Pass Parsing: <#i> against <sc://ho/pa>
Pass Parsing: <#i> against <sc:///pa/pa>
Pass Parsing: <about:/../> without base
Pass Parsing: <data:/../> without base
Pass Parsing: <javascript:/../> without base
Pass Parsing: <mailto:/../> without base
Pass Parsing: <sc://ñ.test/> without base
Pass Parsing: <sc://%/> without base
Pass Parsing: <sc://@/> without base
Pass Parsing: <sc://te@s:t@/> without base
Pass Parsing: <sc://:/> without base
Pass Parsing: <sc://:12/> without base
Pass Parsing: <x> against <sc://ñ>
Pass Parsing: <sc:\../> without base
Pass Parsing: <sc::a@example.net> without base
Pass Parsing: <wow:%NBD> without base
Pass Parsing: <wow:%1G> without base
Pass Parsing: <wow:￿> without base
Pass Parsing: <sc://ab/> without base
Pass Parsing: <sc://a b/> without base
Pass Parsing: <sc://a<b> without base
Pass Parsing: <sc://a>b> without base
Pass Parsing: <sc://a[b/> without base
Pass Parsing: <sc://a\b/> without base
Pass Parsing: <sc://a]b/> without base
Pass Parsing: <sc://a^b> without base
Pass Parsing: <sc://a|b/> without base
Pass Parsing: <foo://ho st/> without base
Pass Parsing: <foo://ho
st/> without base
Pass Parsing: <foo://ho st/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://a b/> without base
Pass Parsing: <http://a b/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://a b/> without base
Pass Parsing: <http://a%b/> without base
Pass Parsing: <http://a<b> without base
Pass Parsing: <http://a>b> without base
Pass Parsing: <http://a[b/> without base
Pass Parsing: <http://a]b/> without base
Pass Parsing: <http://a^b> without base
Pass Parsing: <http://a|b/> without base
Pass Parsing: <http://ab/> without base
Pass Parsing: <http://ho st/> without base
Pass Parsing: <http://ho
st/> without base
Pass Parsing: <http://ho st/> without base
Pass Parsing: <http://ho%00st/> without base
Pass Parsing: <http://ho%01st/> without base
Pass Parsing: <http://ho%02st/> without base
Pass Parsing: <http://ho%03st/> without base
Pass Parsing: <http://ho%04st/> without base
Pass Parsing: <http://ho%05st/> without base
Pass Parsing: <http://ho%06st/> without base
Pass Parsing: <http://ho%07st/> without base
Pass Parsing: <http://ho%08st/> without base
Pass Parsing: <http://ho%09st/> without base
Pass Parsing: <http://ho%0Ast/> without base
Pass Parsing: <http://ho%0Bst/> without base
Pass Parsing: <http://ho%0Cst/> without base
Pass Parsing: <http://ho%0Dst/> without base
Pass Parsing: <http://ho%0Est/> without base
Pass Parsing: <http://ho%0Fst/> without base
Pass Parsing: <http://ho%10st/> without base
Pass Parsing: <http://ho%11st/> without base
Pass Parsing: <http://ho%12st/> without base
Pass Parsing: <http://ho%13st/> without base
Pass Parsing: <http://ho%14st/> without base
Pass Parsing: <http://ho%15st/> without base
Pass Parsing: <http://ho%16st/> without base
Pass Parsing: <http://ho%17st/> without base
Pass Parsing: <http://ho%18st/> without base
Pass Parsing: <http://ho%19st/> without base
Pass Parsing: <http://ho%1Ast/> without base
Pass Parsing: <http://ho%1Bst/> without base
Pass Parsing: <http://ho%1Cst/> without base
Pass Parsing: <http://ho%1Dst/> without base
Pass Parsing: <http://ho%1Est/> without base
Pass Parsing: <http://ho%1Fst/> without base
Pass Parsing: <http://ho%20st/> without base
Pass Parsing: <http://ho%23st/> without base
Pass Parsing: <http://ho%25st/> without base
Pass Parsing: <http://ho%2Fst/> without base
Pass Parsing: <http://ho%3Ast/> without base
Pass Parsing: <http://ho%3Cst/> without base
Pass Parsing: <http://ho%3Est/> without base
Pass Parsing: <http://ho%3Fst/> without base
Pass Parsing: <http://ho%40st/> without base
Pass Parsing: <http://ho%5Bst/> without base
Pass Parsing: <http://ho%5Cst/> without base
Pass Parsing: <http://ho%5Dst/> without base
Pass Parsing: <http://ho%7Cst/> without base
Pass Parsing: <http://ho%7Fst/> without base
Pass Parsing: <http://!"$&'()*+,-.;=_`{}~/> without base
Pass Parsing: <sc:// !"$%&'()*+,-.;=_`{}~/> without base
Pass Parsing: <ftp://example.com%80/> without base
Pass Parsing: <ftp://example.com%A0/> without base
Pass Parsing: <https://example.com%80/> without base
Pass Parsing: <https://example.com%A0/> without base
Pass Parsing: <ftp://%e2%98%83> without base
Pass Parsing: <https://%e2%98%83> without base
Pass Parsing: <http://127.0.0.1:10100/relative_import.html> without base
Pass Parsing: <http://facebook.com/?foo=%7B%22abc%22> without base
Pass Parsing: <https://localhost:3000/jqueryui@1.2.3> without base
Pass Parsing: <h t
t p://h o
s t:9 0
0 0/p a
t h?q u
e ry#f r
a g> without base
Pass Parsing: <?a=b&c=d> against <http://example.org/foo/bar>
Pass Parsing: <??a=b&c=d> against <http://example.org/foo/bar>
Pass Parsing: <http:> against <http://example.org/foo/bar>
Pass Parsing: <http:> against <https://example.org/foo/bar>
Pass Parsing: <sc:> against <https://example.org/foo/bar>
Pass Parsing: <http://foo.bar/baz?qux#foobar> without base
Pass Parsing: <http://foo.bar/baz?qux#foo"bar> without base
Pass Parsing: <http://foo.bar/baz?qux#foo<bar> without base
Pass Parsing: <http://foo.bar/baz?qux#foo>bar> without base
Pass Parsing: <http://foo.bar/baz?qux#foo`bar> without base
Pass Parsing: <http://1.2.3.4/> against <http://other.com/>
Pass Parsing: <http://1.2.3.4./> against <http://other.com/>
Pass Parsing: <http://192.168.257> against <http://other.com/>
Pass Parsing: <http://192.168.257.> against <http://other.com/>
Pass Parsing: <http://192.168.257.com> against <http://other.com/>
Pass Parsing: <http://256> against <http://other.com/>
Pass Parsing: <http://256.com> against <http://other.com/>
Pass Parsing: <http://999999999> against <http://other.com/>
Pass Parsing: <http://999999999.> against <http://other.com/>
Pass Parsing: <http://999999999.com> against <http://other.com/>
Pass Parsing: <http://10000000000> against <http://other.com/>
Pass Parsing: <http://10000000000.com> against <http://other.com/>
Pass Parsing: <http://4294967295> against <http://other.com/>
Pass Parsing: <http://4294967296> against <http://other.com/>
Pass Parsing: <http://0xffffffff> against <http://other.com/>
Pass Parsing: <http://0xffffffff1> against <http://other.com/>
Pass Parsing: <http://256.256.256.256> against <http://other.com/>
Pass Parsing: <https://0x.0x.0> without base
Pass Parsing: <https://0x100000000/test> without base
Pass Parsing: <https://256.0.0.1/test> without base
Pass Parsing: <file:///C%3A/> without base
Pass Parsing: <file:///C%7C/> without base
Pass Parsing: <file://%43%3A> without base
Pass Parsing: <file://%43%7C> without base
Pass Parsing: <file://%43|> without base
Pass Parsing: <file://C%7C> without base
Pass Parsing: <file://%43%7C/> without base
Pass Parsing: <https://%43%7C/> without base
Pass Parsing: <asdf://%43|/> without base
Pass Parsing: <asdf://%43%7C/> without base
Pass Parsing: <pix/submit.gif> against <file:///C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/anchor.html>
Pass Parsing: <..> against <file:///C:/>
Pass Parsing: <..> against <file:///>
Pass Parsing: </> against <file:///C:/a/b>
Pass Parsing: </> against <file://h/C:/a/b>
Pass Parsing: </> against <file://h/a/b>
Pass Parsing: <//d:> against <file:///C:/a/b>
Pass Parsing: <//d:/..> against <file:///C:/a/b>
Pass Parsing: <..> against <file:///ab:/>
Pass Parsing: <..> against <file:///1:/>
Pass Parsing: <> against <file:///test?test#test>
Pass Parsing: <file:> against <file:///test?test#test>
Pass Parsing: <?x> against <file:///test?test#test>
Pass Parsing: <file:?x> against <file:///test?test#test>
Pass Parsing: <#x> against <file:///test?test#test>
Pass Parsing: <file:#x> against <file:///test?test#test>
Pass Parsing: <file:\\//> without base
Pass Parsing: <file:\\\\> without base
Pass Parsing: <file:\\\\?fox> without base
Pass Parsing: <file:\\\\#guppy> without base
Pass Parsing: <file://spider///> without base
Pass Parsing: <file:\\localhost//> without base
Pass Parsing: <file:///localhost//cat> without base
Pass Parsing: <file://\/localhost//cat> without base
Pass Parsing: <file://localhost//a//../..//> without base
Pass Parsing: </////mouse> against <file:///elephant>
Pass Parsing: <\//pig> against <file://lion/>
Pass Parsing: <\/localhost//pig> against <file://lion/>
Pass Parsing: <//localhost//pig> against <file://lion/>
Pass Parsing: </..//localhost//pig> against <file://lion/>
Pass Parsing: <file://> against <file://ape/>
Pass Parsing: </rooibos> against <file://tea/>
Pass Parsing: </?chai> against <file://tea/>
Pass Parsing: <C|> against <file://host/dir/file>
Pass Parsing: <C|> against <file://host/D:/dir1/dir2/file>
Pass Parsing: <C|#> against <file://host/dir/file>
Pass Parsing: <C|?> against <file://host/dir/file>
Pass Parsing: <C|/> against <file://host/dir/file>
Pass Parsing: <C|
/> against <file://host/dir/file>
Pass Parsing: <C|\> against <file://host/dir/file>
Pass Parsing: <C> against <file://host/dir/file>
Pass Parsing: <C|a> against <file://host/dir/file>
Pass Parsing: </c:/foo/bar> against <file:///c:/baz/qux>
Pass Parsing: </c|/foo/bar> against <file:///c:/baz/qux>
Pass Parsing: <file:\c:\foo\bar> against <file:///c:/baz/qux>
Pass Parsing: </c:/foo/bar> against <file://host/path>
Pass Parsing: <file://example.net/C:/> without base
Pass Parsing: <file://1.2.3.4/C:/> without base
Pass Parsing: <file://[1::8]/C:/> without base
Pass Parsing: <C|/> against <file://host/>
Pass Parsing: </C:/> against <file://host/>
Pass Parsing: <file:C:/> against <file://host/>
Pass Parsing: <file:/C:/> against <file://host/>
Pass Parsing: <//C:/> against <file://host/>
Pass Parsing: <file://C:/> against <file://host/>
Pass Parsing: <///C:/> against <file://host/>
Pass Parsing: <file:///C:/> against <file://host/>
Pass Parsing: <file:/C|/> without base
Pass Parsing: <file://C|/> without base
Pass Parsing: <file:> without base
Pass Parsing: <file:?q=v> without base
Pass Parsing: <file:#frag> without base
Pass Parsing: <file:///Y:> without base
Pass Parsing: <file:///Y:/> without base
Pass Parsing: <file:///./Y> without base
Pass Parsing: <file:///./Y:> without base
Pass Parsing: <\\\.\Y:> without base
Pass Parsing: <file:///y:> without base
Pass Parsing: <file:///y:/> without base
Pass Parsing: <file:///./y> without base
Pass Parsing: <file:///./y:> without base
Pass Parsing: <\\\.\y:> without base
Pass Parsing: <file://localhost//a//../..//foo> without base
Pass Parsing: <file://localhost////foo> without base
Pass Parsing: <file:////foo> without base
Pass Parsing: <file:///one/two> against <file:///>
Pass Parsing: <file:////one/two> against <file:///>
Pass Parsing: <//one/two> against <file:///>
Pass Parsing: <///one/two> against <file:///>
Pass Parsing: <////one/two> against <file:///>
Pass Parsing: <file:///.//> against <file:////>
Pass Parsing: <file:.//p> without base
Pass Parsing: <file:/.//p> without base
Pass Parsing: <http://[1:0::]> against <http://example.net/>
Pass Parsing: <http://[0:1:2:3:4:5:6:7:8]> against <http://example.net/>
Pass Parsing: <https://[0::0::0]> without base
Pass Parsing: <https://[0:.0]> without base
Pass Parsing: <https://[0:0:]> without base
Pass Parsing: <https://[0:1:2:3:4:5:6:7.0.0.0.1]> without base
Pass Parsing: <https://[0:1.00.0.0.0]> without base
Pass Parsing: <https://[0:1.290.0.0.0]> without base
Pass Parsing: <https://[0:1.23.23]> without base
Pass Parsing: <http://?> without base
Pass Parsing: <http://#> without base
Pass Parsing: <http://f:4294967377/c> against <http://example.org/>
Pass Parsing: <http://f:18446744073709551697/c> against <http://example.org/>
Pass Parsing: <http://f:340282366920938463463374607431768211537/c> against <http://example.org/>
Pass Parsing: <sc://ñ> without base
Pass Parsing: <sc://ñ?x> without base
Pass Parsing: <sc://ñ#x> without base
Pass Parsing: <#x> against <sc://ñ>
Pass Parsing: <?x> against <sc://ñ>
Pass Parsing: <sc://?> without base
Pass Parsing: <sc://#> without base
Pass Parsing: <///> against <sc://x/>
Pass Parsing: <////> against <sc://x/>
Pass Parsing: <////x/> against <sc://x/>
Pass Parsing: <tftp://foobar.com/someconfig;mode=netascii> without base
Pass Parsing: <telnet://user:pass@foobar.com:23/> without base
Pass Parsing: <ut2004://10.10.10.10:7777/Index.ut2> without base
Pass Parsing: <redis://foo:bar@somehost:6379/0?baz=bam&qux=baz> without base
Pass Parsing: <rsync://foo@host:911/sup> without base
Pass Parsing: <git://github.com/foo/bar.git> without base
Pass Parsing: <irc://myserver.com:6999/channel?passwd> without base
Pass Parsing: <dns://fw.example.org:9999/foo.bar.org?type=TXT> without base
Pass Parsing: <ldap://localhost:389/ou=People,o=JNDITutorial> without base
Pass Parsing: <git+https://github.com/foo/bar> without base
Pass Parsing: <urn:ietf:rfc:2648> without base
Pass Parsing: <tag:joe@example.org,2001:foo/bar> without base
Pass Parsing: <non-spec:/.//> without base
Pass Parsing: <non-spec:/..//> without base
Pass Parsing: <non-spec:/a/..//> without base
Pass Parsing: <non-spec:/.//path> without base
Pass Parsing: <non-spec:/..//path> without base
Pass Parsing: <non-spec:/a/..//path> without base
Pass Parsing: </.//path> against <non-spec:/p>
Pass Parsing: </..//path> against <non-spec:/p>
Pass Parsing: <..//path> against <non-spec:/p>
Pass Parsing: <a/..//path> against <non-spec:/p>
Pass Parsing: <> against <non-spec:/..//p>
Pass Parsing: <path> against <non-spec:/..//p>
Pass Parsing: <../path> against <non-spec:/.//p>
Pass Parsing: <non-special://%E2%80%A0/> without base
Pass Parsing: <non-special://H%4fSt/path> without base
Pass Parsing: <non-special://[1:2:0:0:5:0:0:0]/> without base
Pass Parsing: <non-special://[1:2:0:0:0:0:0:3]/> without base
Pass Parsing: <non-special://[1:2::3]:80/> without base
Pass Parsing: <non-special://[:80/> without base
Pass Parsing: <blob:https://example.com:443/> without base
Pass Parsing: <blob:http://example.org:88/> without base
Pass Parsing: <blob:d3958f5c-0777-0845-9dcf-2cb28783acaf> without base
Pass Parsing: <blob:> without base
Pass Parsing: <blob:blob:> without base
Pass Parsing: <blob:blob:https://example.org/> without base
Pass Parsing: <blob:about:blank> without base
Pass Parsing: <blob:file://host/path> without base
Pass Parsing: <blob:ftp://host/path> without base
Pass Parsing: <blob:ws://example.org/> without base
Pass Parsing: <blob:wss://example.org/> without base
Pass Parsing: <blob:http%3a//example.org/> without base
Pass Parsing: <http://0x7f.0.0.0x7g> without base
Pass Parsing: <http://0X7F.0.0.0X7G> without base
Pass Parsing: <http://[::127.0.0.0.1]> without base
Pass Parsing: <http://[0:1:0:1:0:1:0:1]> without base
Pass Parsing: <http://[1:0:1:0:1:0:1:0]> without base
Pass Parsing: <http://example.org/test?"> without base
Pass Parsing: <http://example.org/test?#> without base
Pass Parsing: <http://example.org/test?<> without base
Pass Parsing: <http://example.org/test?>> without base
Pass Parsing: <http://example.org/test?⌣> without base
Pass Parsing: <http://example.org/test?%23%23> without base
Pass Parsing: <http://example.org/test?%GH> without base
Pass Parsing: <http://example.org/test?a#%EF> without base
Pass Parsing: <http://example.org/test?a#%GH> without base
Pass Parsing: <a> without base
Pass Parsing: <a/> without base
Pass Parsing: <a//> without base
Pass Parsing: <test-a-colon.html> against <a:>
Pass Parsing: <test-a-colon-b.html> against <a:b>
Pass Parsing: <test-a-colon-slash.html> against <a:/>
Pass Parsing: <test-a-colon-slash-slash.html> against <a://>
Pass Parsing: <test-a-colon-slash-b.html> against <a:/b>
Pass Parsing: <test-a-colon-slash-slash-b.html> against <a://b>
Pass Parsing: <http://example.org/test?a#bc> without base
Pass Parsing: <non-spec://example.org/test?a#bc> without base
Pass Parsing: <non-spec:/test?a#bc> without base
Pass Parsing: <10.0.0.7:8080/foo.html> against <file:///some/dir/bar.html>
Pass Parsing: <a!@$*=/foo.html> against <file:///some/dir/bar.html>
Pass Parsing: <a1234567890-+.:foo/bar> against <http://example.com/dir/file>
Pass Parsing: <file://a­b/p> without base
Pass Parsing: <file://a%C2%ADb/p> without base
Pass Parsing: <file://loC<6F><43><EFBFBD>U+dc00<30><30><EFBFBD>U+dc0b<30><62><EFBFBD>U+dc07<30><37><EFBFBD>U+dc28<32><38><EFBFBD>U+dc2c<32><63><EFBFBD>U+dc2d/usr/bin> without base
Pass Parsing: <file://­/p> without base
Pass Parsing: <file://%C2%AD/p> without base
Pass Parsing: <file://xn--/p> without base
Pass Parsing: <#link> against <https://example.org/##link>
Pass Parsing: <non-special:cannot-be-a-base-url-~€> without base
Pass Parsing: <non-special:cannot-be-a-base-url-!"$%&'()*+,-.;<=>@[\]^_`{|}~@/> without base
Pass Parsing: <https://www.example.com/path{path.html?query'=query#fragment<fragment> without base
Pass Parsing: <https://user:pass[@foo/bar> against <http://example.org>
Pass Parsing: <foo:// !"$%&'()*+,-.;<=>@[\]^_`{|}~@host/> without base
Pass Parsing: <wss:// !"$%&'()*+,-.;<=>@[]^_`{|}~@host/> without base
Pass Parsing: <foo://joe: !"$%&'()*+,-.:;<=>@[\]^_`{|}~@host/> without base
Pass Parsing: <wss://joe: !"$%&'()*+,-.:;<=>@[]^_`{|}~@host/> without base
Pass Parsing: <foo://!"$%&'()*+,-.;=_`{}~/> without base
Pass Parsing: <wss://!"$&'()*+,-.;=_`{}~/> without base
Pass Parsing: <foo://host/ !"$%&'()*+,-./:;<=>@[\]^_`{|}~> without base
Pass Parsing: <wss://host/ !"$%&'()*+,-./:;<=>@[\]^_`{|}~> without base
Pass Parsing: <foo://host/dir/? !"$%&'()*+,-./:;<=>?@[\]^_`{|}~> without base
Pass Parsing: <wss://host/dir/? !"$%&'()*+,-./:;<=>?@[\]^_`{|}~> without base
Pass Parsing: <foo://host/dir/# !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~> without base
Pass Parsing: <wss://host/dir/# !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~> without base
Pass Parsing: <abc:rootless> against <abc://host/path>
Pass Parsing: <abc:rootless> against <abc:/path>
Pass Parsing: <abc:rootless> against <abc:path>
Pass Parsing: <abc:/rooted> against <abc://host/path>
Pass Parsing: <#> without base
Pass Parsing: <?> without base
Pass Parsing: <http://1.2.3.4.5> against <http://other.com/>
Pass Parsing: <http://1.2.3.4.5.> against <http://other.com/>
Pass Parsing: <http://0..0x300/> without base
Pass Parsing: <http://0..0x300./> without base
Pass Parsing: <http://256.256.256.256.256> against <http://other.com/>
Pass Parsing: <http://256.256.256.256.256.> against <http://other.com/>
Pass Parsing: <http://1.2.3.08> without base
Pass Parsing: <http://1.2.3.08.> without base
Pass Parsing: <http://1.2.3.09> without base
Pass Parsing: <http://09.2.3.4> without base
Pass Parsing: <http://09.2.3.4.> without base
Pass Parsing: <http://01.2.3.4.5> without base
Pass Parsing: <http://01.2.3.4.5.> without base
Pass Parsing: <http://0x100.2.3.4> without base
Pass Parsing: <http://0x100.2.3.4.> without base
Pass Parsing: <http://0x1.2.3.4.5> without base
Pass Parsing: <http://0x1.2.3.4.5.> without base
Pass Parsing: <http://foo.1.2.3.4> without base
Pass Parsing: <http://foo.1.2.3.4.> without base
Pass Parsing: <http://foo.2.3.4> without base
Pass Parsing: <http://foo.2.3.4.> without base
Pass Parsing: <http://foo.09> without base
Pass Parsing: <http://foo.09.> without base
Pass Parsing: <http://foo.0x4> without base
Pass Parsing: <http://foo.0x4.> without base
Pass Parsing: <http://foo.09..> without base
Pass Parsing: <http://0999999999999999999/> without base
Pass Parsing: <http://foo.0x> without base
Pass Parsing: <http://foo.0XFfFfFfFfFfFfFfFfFfAcE123> without base
Pass Parsing: <http://<2F><><EFBFBD>U+dca9.123/> without base
Pass Parsing: <https://y> without base
Pass Parsing: <https://x/y> without base
Pass Parsing: <https://x/?y> without base
Pass Parsing: <https://x/?#y> without base
Pass Parsing: <https://￿y> without base
Pass Parsing: <https://x/￿y> without base
Pass Parsing: <https://x/?￿y> without base
Pass Parsing: <https://x/?#￿y> without base
Pass Parsing: <non-special:y> without base
Pass Parsing: <non-special:x/y> without base
Pass Parsing: <non-special:x/?y> without base
Pass Parsing: <non-special:x/?#y> without base
Pass Parsing: <non-special:￿y> without base
Pass Parsing: <non-special:x/￿y> without base
Pass Parsing: <non-special:x/?￿y> without base
Pass Parsing: <non-special:x/?#￿y> without base
Pass Parsing: <> without base
Pass Parsing: <https://example.com/"quoted"> without base
Pass Parsing: <https://a%C2%ADb/> without base
Pass Parsing: <https://­/> without base
Pass Parsing: <https://%C2%AD/> without base
Pass Parsing: <https://xn--/> without base
Pass Parsing: <data://example.com:8080/pathname?search#hash> without base
Pass Parsing: <data:///test> without base
Pass Parsing: <data://test/a/../b> without base
Pass Parsing: <data://:443> without base
Pass Parsing: <data://test:test> without base
Pass Parsing: <data://[:1]> without base
Pass Parsing: <javascript://example.com:8080/pathname?search#hash> without base
Pass Parsing: <javascript:///test> without base
Pass Parsing: <javascript://test/a/../b> without base
Pass Parsing: <javascript://:443> without base
Pass Parsing: <javascript://test:test> without base
Pass Parsing: <javascript://[:1]> without base
Pass Parsing: <mailto://example.com:8080/pathname?search#hash> without base
Pass Parsing: <mailto:///test> without base
Pass Parsing: <mailto://test/a/../b> without base
Pass Parsing: <mailto://:443> without base
Pass Parsing: <mailto://test:test> without base
Pass Parsing: <mailto://[:1]> without base
Pass Parsing: <intent://example.com:8080/pathname?search#hash> without base
Pass Parsing: <intent:///test> without base
Pass Parsing: <intent://test/a/../b> without base
Pass Parsing: <intent://:443> without base
Pass Parsing: <intent://test:test> without base
Pass Parsing: <intent://[:1]> without base
Pass Parsing: <urn://example.com:8080/pathname?search#hash> without base
Pass Parsing: <urn:///test> without base
Pass Parsing: <urn://test/a/../b> without base
Pass Parsing: <urn://:443> without base
Pass Parsing: <urn://test:test> without base
Pass Parsing: <urn://[:1]> without base
Pass Parsing: <turn://example.com:8080/pathname?search#hash> without base
Pass Parsing: <turn:///test> without base
Pass Parsing: <turn://test/a/../b> without base
Pass Parsing: <turn://:443> without base
Pass Parsing: <turn://test:test> without base
Pass Parsing: <turn://[:1]> without base
Pass Parsing: <stun://example.com:8080/pathname?search#hash> without base
Pass Parsing: <stun:///test> without base
Pass Parsing: <stun://test/a/../b> without base
Pass Parsing: <stun://:443> without base
Pass Parsing: <stun://test:test> without base
Pass Parsing: <stun://[:1]> without base
Pass Parsing: <w://x:0> without base
Pass Parsing: <west://x:0> without base
Pass Parsing: <android://x:0/a> without base
Pass Parsing: <drivefs://x:0/a> without base
Pass Parsing: <chromeos-steam://x:0/a> without base
Pass Parsing: <steam://x:0/a> without base
Pass Parsing: <materialized-view://x:0/a> without base
Pass Parsing: <android-app://x:0> without base
Pass Parsing: <chrome-distiller://x:0> without base
Pass Parsing: <chrome-extension://x:0> without base
Pass Parsing: <chrome-native://x:0> without base
Pass Parsing: <chrome-resource://x:0> without base
Pass Parsing: <chrome-search://x:0> without base
Pass Parsing: <fuchsia-dir://x:0> without base
Pass Parsing: <isolated-app://x:0> without base
Pass Parsing: <///test> against <http://example.org/>
Pass Parsing: <///\//\//test> against <http://example.org/>
Pass Parsing: <///example.org/path> against <http://example.org/>
Pass Parsing: <///example.org/../path> against <http://example.org/>
Pass Parsing: <///example.org/../../> against <http://example.org/>
Pass Parsing: <///example.org/../path/../../> against <http://example.org/>
Pass Parsing: <///example.org/../path/../../path> against <http://example.org/>
Pass Parsing: </\/\//example.org/../path> against <http://example.org/>
Pass Parsing: <///abcdef/../> against <file:///>
Pass Parsing: </\//\/a/../> against <file:///>
Pass Parsing: <//a/../> against <file:///>
Pass Parsing: <non-special:\\opaque> without base
Pass Parsing: <non-special:\\opaque/path> without base
Pass Parsing: <non-special:\\opaque\path> without base
Pass Parsing: <non-special:\/opaque> without base
Pass Parsing: <non-special:/\path> without base
Pass Parsing: <non-special://host\a> without base
Pass Parsing: <non-special://host/a\b> without base
Pass Parsing: <http://example.com//U+d800<30><30><EFBFBD>U+dffeU+dfff﷐﷏﷯ﷰ￾￿??U+d800<30><30><EFBFBD>U+dffeU+dfff﷐﷏﷯ﷰ￾￿> without base

View file

@ -0,0 +1,401 @@
Harness status: OK
Found 387 tests
387 Pass
Pass Loading data…
Pass Origin parsing: <http://example .
org> against <http://example.org/foo/bar>
Pass Origin parsing: <http://user:pass@foo:21/bar;par?b#c> against <http://example.org/foo/bar>
Pass Origin parsing: <https://test:@test> without base
Pass Origin parsing: <https://:@test> without base
Pass Origin parsing: <non-special://test:@test/x> without base
Pass Origin parsing: <non-special://:@test/x> without base
Pass Origin parsing: <http:foo.com> against <http://example.org/foo/bar>
Pass Origin parsing: < :foo.com
> against <http://example.org/foo/bar>
Pass Origin parsing: < foo.com > against <http://example.org/foo/bar>
Pass Origin parsing: <a: foo.com> against <http://example.org/foo/bar>
Pass Origin parsing: <http://f:21/ b ? d # e > against <http://example.org/foo/bar>
Pass Origin parsing: <http://f:/c> against <http://example.org/foo/bar>
Pass Origin parsing: <http://f:0/c> against <http://example.org/foo/bar>
Pass Origin parsing: <http://f:00000000000000/c> against <http://example.org/foo/bar>
Pass Origin parsing: <http://f:00000000000000000000080/c> against <http://example.org/foo/bar>
Pass Origin parsing: <http://f:
/c> against <http://example.org/foo/bar>
Pass Origin parsing: <> against <http://example.org/foo/bar>
Pass Origin parsing: < > against <http://example.org/foo/bar>
Pass Origin parsing: <:foo.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <:foo.com\> against <http://example.org/foo/bar>
Pass Origin parsing: <:> against <http://example.org/foo/bar>
Pass Origin parsing: <:a> against <http://example.org/foo/bar>
Pass Origin parsing: <:/> against <http://example.org/foo/bar>
Pass Origin parsing: <:\> against <http://example.org/foo/bar>
Pass Origin parsing: <:#> against <http://example.org/foo/bar>
Pass Origin parsing: <#> against <http://example.org/foo/bar>
Pass Origin parsing: <#/> against <http://example.org/foo/bar>
Pass Origin parsing: <#\> against <http://example.org/foo/bar>
Pass Origin parsing: <#;?> against <http://example.org/foo/bar>
Pass Origin parsing: <?> against <http://example.org/foo/bar>
Pass Origin parsing: </> against <http://example.org/foo/bar>
Pass Origin parsing: <:23> against <http://example.org/foo/bar>
Pass Origin parsing: </:23> against <http://example.org/foo/bar>
Pass Origin parsing: <\x> against <http://example.org/foo/bar>
Pass Origin parsing: <\\x\hello> against <http://example.org/foo/bar>
Pass Origin parsing: <::> against <http://example.org/foo/bar>
Pass Origin parsing: <::23> against <http://example.org/foo/bar>
Pass Origin parsing: <foo://> against <http://example.org/foo/bar>
Pass Origin parsing: <http://a:b@c:29/d> against <http://example.org/foo/bar>
Pass Origin parsing: <http::@c:29> against <http://example.org/foo/bar>
Pass Origin parsing: <http://&a:foo(b]c@d:2/> against <http://example.org/foo/bar>
Pass Origin parsing: <http://::@c@d:2> against <http://example.org/foo/bar>
Pass Origin parsing: <http://foo.com:b@d/> against <http://example.org/foo/bar>
Pass Origin parsing: <http://foo.com/\@> against <http://example.org/foo/bar>
Pass Origin parsing: <http:\\foo.com\> against <http://example.org/foo/bar>
Pass Origin parsing: <http:\\a\b:c\d@foo.com\> against <http://example.org/foo/bar>
Pass Origin parsing: <http://a:b@c\> without base
Pass Origin parsing: <ws://a@b\c> without base
Pass Origin parsing: <foo:/> against <http://example.org/foo/bar>
Pass Origin parsing: <foo:/bar.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <foo://///////> against <http://example.org/foo/bar>
Pass Origin parsing: <foo://///////bar.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <foo:////://///> against <http://example.org/foo/bar>
Pass Origin parsing: <c:/foo> against <http://example.org/foo/bar>
Pass Origin parsing: <//foo/bar> against <http://example.org/foo/bar>
Pass Origin parsing: <http://foo/path;a??e#f#g> against <http://example.org/foo/bar>
Pass Origin parsing: <http://foo/abcd?efgh?ijkl> against <http://example.org/foo/bar>
Pass Origin parsing: <http://foo/abcd#foo?bar> against <http://example.org/foo/bar>
Pass Origin parsing: <[61:24:74]:98> against <http://example.org/foo/bar>
Pass Origin parsing: <http:[61:27]/:foo> against <http://example.org/foo/bar>
Pass Origin parsing: <http://[2001::1]> against <http://example.org/foo/bar>
Pass Origin parsing: <http://[::127.0.0.1]> against <http://example.org/foo/bar>
Pass Origin parsing: <http://[0:0:0:0:0:0:13.1.68.3]> against <http://example.org/foo/bar>
Pass Origin parsing: <http://[2001::1]:80> against <http://example.org/foo/bar>
Pass Origin parsing: <http:/example.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <ftp:/example.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <https:/example.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <madeupscheme:/example.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <ftps:/example.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <gopher:/example.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <ws:/example.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <wss:/example.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <data:/example.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <javascript:/example.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <mailto:/example.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <http:example.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <ftp:example.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <https:example.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <madeupscheme:example.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <ftps:example.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <gopher:example.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <ws:example.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <wss:example.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <data:example.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <javascript:example.com/> against <http://example.org/foo/bar>
Pass Origin parsing: <mailto:example.com/> against <http://example.org/foo/bar>
Pass Origin parsing: </a/b/c> against <http://example.org/foo/bar>
Pass Origin parsing: </a/ /c> against <http://example.org/foo/bar>
Pass Origin parsing: </a%2fc> against <http://example.org/foo/bar>
Pass Origin parsing: </a/%2f/c> against <http://example.org/foo/bar>
Pass Origin parsing: <#β> against <http://example.org/foo/bar>
Pass Origin parsing: <data:text/html,test#test> against <http://example.org/foo/bar>
Pass Origin parsing: <tel:1234567890> against <http://example.org/foo/bar>
Pass Origin parsing: <ssh://example.com/foo/bar.git> against <http://example.org/>
Pass Origin parsing: <http://example.com/././foo> without base
Pass Origin parsing: <http://example.com/./.foo> without base
Pass Origin parsing: <http://example.com/foo/.> without base
Pass Origin parsing: <http://example.com/foo/./> without base
Pass Origin parsing: <http://example.com/foo/bar/..> without base
Pass Origin parsing: <http://example.com/foo/bar/../> without base
Pass Origin parsing: <http://example.com/foo/..bar> without base
Pass Origin parsing: <http://example.com/foo/bar/../ton> without base
Pass Origin parsing: <http://example.com/foo/bar/../ton/../../a> without base
Pass Origin parsing: <http://example.com/foo/../../..> without base
Pass Origin parsing: <http://example.com/foo/../../../ton> without base
Pass Origin parsing: <http://example.com/foo/%2e> without base
Pass Origin parsing: <http://example.com/foo/%2e%2> without base
Pass Origin parsing: <http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar> without base
Pass Origin parsing: <http://example.com////../..> without base
Pass Origin parsing: <http://example.com/foo/bar//../..> without base
Pass Origin parsing: <http://example.com/foo/bar//..> without base
Pass Origin parsing: <http://example.com/foo> without base
Pass Origin parsing: <http://example.com/%20foo> without base
Pass Origin parsing: <http://example.com/foo%> without base
Pass Origin parsing: <http://example.com/foo%2> without base
Pass Origin parsing: <http://example.com/foo%2zbar> without base
Pass Origin parsing: <http://example.com/foo%2©zbar> without base
Pass Origin parsing: <http://example.com/foo%41%7a> without base
Pass Origin parsing: <http://example.com/foo ‘%91> without base
Pass Origin parsing: <http://example.com/foo%00%51> without base
Pass Origin parsing: <http://example.com/(%28:%3A%29)> without base
Pass Origin parsing: <http://example.com/%3A%3a%3C%3c> without base
Pass Origin parsing: <http://example.com/foo bar> without base
Pass Origin parsing: <http://example.com\\foo\\bar> without base
Pass Origin parsing: <http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd> without base
Pass Origin parsing: <http://example.com/@asdf%40> without base
Pass Origin parsing: <http://example.com/你好你好> without base
Pass Origin parsing: <http://example.com/‥/foo> without base
Pass Origin parsing: <http://example.com//foo> without base
Pass Origin parsing: <http://example.com//foo//bar> without base
Pass Origin parsing: <http://www.google.com/foo?bar=baz#> without base
Pass Origin parsing: <http://www.google.com/foo?bar=baz# »> without base
Pass Origin parsing: <data:test# »> without base
Pass Origin parsing: <http://www.google.com> without base
Pass Origin parsing: <http://192.0x00A80001> without base
Pass Origin parsing: <http://www/foo%2Ehtml> without base
Pass Origin parsing: <http://www/foo/%2E/html> without base
Pass Origin parsing: <http://%25DOMAIN:foobar@foodomain.com/> without base
Pass Origin parsing: <http:\\www.google.com\foo> without base
Pass Origin parsing: <http://foo:80/> without base
Pass Origin parsing: <http://foo:81/> without base
Pass Origin parsing: <httpa://foo:80/> without base
Pass Origin parsing: <https://foo:443/> without base
Pass Origin parsing: <https://foo:80/> without base
Pass Origin parsing: <ftp://foo:21/> without base
Pass Origin parsing: <ftp://foo:80/> without base
Pass Origin parsing: <gopher://foo:70/> without base
Pass Origin parsing: <gopher://foo:443/> without base
Pass Origin parsing: <ws://foo:80/> without base
Pass Origin parsing: <ws://foo:81/> without base
Pass Origin parsing: <ws://foo:443/> without base
Pass Origin parsing: <ws://foo:815/> without base
Pass Origin parsing: <wss://foo:80/> without base
Pass Origin parsing: <wss://foo:81/> without base
Pass Origin parsing: <wss://foo:443/> without base
Pass Origin parsing: <wss://foo:815/> without base
Pass Origin parsing: <http:/example.com/> without base
Pass Origin parsing: <ftp:/example.com/> without base
Pass Origin parsing: <https:/example.com/> without base
Pass Origin parsing: <madeupscheme:/example.com/> without base
Pass Origin parsing: <ftps:/example.com/> without base
Pass Origin parsing: <gopher:/example.com/> without base
Pass Origin parsing: <ws:/example.com/> without base
Pass Origin parsing: <wss:/example.com/> without base
Pass Origin parsing: <data:/example.com/> without base
Pass Origin parsing: <javascript:/example.com/> without base
Pass Origin parsing: <mailto:/example.com/> without base
Pass Origin parsing: <http:example.com/> without base
Pass Origin parsing: <ftp:example.com/> without base
Pass Origin parsing: <https:example.com/> without base
Pass Origin parsing: <madeupscheme:example.com/> without base
Pass Origin parsing: <ftps:example.com/> without base
Pass Origin parsing: <gopher:example.com/> without base
Pass Origin parsing: <ws:example.com/> without base
Pass Origin parsing: <wss:example.com/> without base
Pass Origin parsing: <data:example.com/> without base
Pass Origin parsing: <javascript:example.com/> without base
Pass Origin parsing: <mailto:example.com/> without base
Pass Origin parsing: <https://example.com/aaa/bbb/%2e%2e?query> without base
Pass Origin parsing: <http:@www.example.com> without base
Pass Origin parsing: <http:/@www.example.com> without base
Pass Origin parsing: <http://@www.example.com> without base
Pass Origin parsing: <http:a:b@www.example.com> without base
Pass Origin parsing: <http:/a:b@www.example.com> without base
Pass Origin parsing: <http://a:b@www.example.com> without base
Pass Origin parsing: <http://@pple.com> without base
Pass Origin parsing: <http::b@www.example.com> without base
Pass Origin parsing: <http:/:b@www.example.com> without base
Pass Origin parsing: <http://:b@www.example.com> without base
Pass Origin parsing: <http:a:@www.example.com> without base
Pass Origin parsing: <http:/a:@www.example.com> without base
Pass Origin parsing: <http://a:@www.example.com> without base
Pass Origin parsing: <http://www.@pple.com> without base
Pass Origin parsing: <http://:@www.example.com> without base
Pass Origin parsing: </> against <http://www.example.com/test>
Pass Origin parsing: </test.txt> against <http://www.example.com/test>
Pass Origin parsing: <.> against <http://www.example.com/test>
Pass Origin parsing: <..> against <http://www.example.com/test>
Pass Origin parsing: <test.txt> against <http://www.example.com/test>
Pass Origin parsing: <./test.txt> against <http://www.example.com/test>
Pass Origin parsing: <../test.txt> against <http://www.example.com/test>
Pass Origin parsing: <../aaa/test.txt> against <http://www.example.com/test>
Pass Origin parsing: <../../test.txt> against <http://www.example.com/test>
Pass Origin parsing: <中/test.txt> against <http://www.example.com/test>
Pass Origin parsing: <http://www.example2.com> against <http://www.example.com/test>
Pass Origin parsing: <//www.example2.com> against <http://www.example.com/test>
Pass Origin parsing: <http://ExAmPlE.CoM> against <http://other.com/>
Pass Origin parsing: <http://GOOgoo.com> against <http://other.com/>
Pass Origin parsing: < http://example.com/ > without base
Pass Origin parsing: <http://www.foo。bar.com> against <http://other.com/>
Pass Origin parsing: <https://x/<2F>?<3F>#<23>> without base
Pass Origin parsing: <http://.com> against <http://other.com/>
Pass Origin parsing: <http://你好你好> against <http://other.com/>
Pass Origin parsing: <https://faß.ExAmPlE/> without base
Pass Origin parsing: <sc://faß.ExAmPlE/> without base
Pass Origin parsing: <http://%30%78%63%30%2e%30%32%35%30.01> against <http://other.com/>
Pass Origin parsing: <http://%30%78%63%30%2e%30%32%35%30.01%2e> against <http://other.com/>
Pass Origin parsing: <http://> against <http://other.com/>
Pass Origin parsing: <http://./> without base
Pass Origin parsing: <http://../> without base
Pass Origin parsing: <h://.> without base
Pass Origin parsing: <http://foo:<3A><><EFBFBD>U+dca9@example.com/bar> against <http://other.com/>
Pass Origin parsing: <#> against <test:test>
Pass Origin parsing: <#x> against <mailto:x@x.com>
Pass Origin parsing: <#x> against <data:,>
Pass Origin parsing: <#x> against <about:blank>
Pass Origin parsing: <#x:y> against <about:blank>
Pass Origin parsing: <#> against <test:test?test>
Pass Origin parsing: <https://@test@test@example:800/> against <http://doesnotmatter/>
Pass Origin parsing: <https://@@@example> against <http://doesnotmatter/>
Pass Origin parsing: <http://`{}:`{}@h/`{}?`{}> against <http://doesnotmatter/>
Pass Origin parsing: <http://host/?'> without base
Pass Origin parsing: <notspecial://host/?'> without base
Pass Origin parsing: </some/path> against <http://user@example.org/smth>
Pass Origin parsing: <> against <http://user:pass@example.org:21/smth>
Pass Origin parsing: </some/path> against <http://user:pass@example.org:21/smth>
Pass Origin parsing: <i> against <sc:/pa/pa>
Pass Origin parsing: <i> against <sc://ho/pa>
Pass Origin parsing: <i> against <sc:///pa/pa>
Pass Origin parsing: <../i> against <sc:/pa/pa>
Pass Origin parsing: <../i> against <sc://ho/pa>
Pass Origin parsing: <../i> against <sc:///pa/pa>
Pass Origin parsing: </i> against <sc:/pa/pa>
Pass Origin parsing: </i> against <sc://ho/pa>
Pass Origin parsing: </i> against <sc:///pa/pa>
Pass Origin parsing: <?i> against <sc:/pa/pa>
Pass Origin parsing: <?i> against <sc://ho/pa>
Pass Origin parsing: <?i> against <sc:///pa/pa>
Pass Origin parsing: <#i> against <sc:sd>
Pass Origin parsing: <#i> against <sc:sd/sd>
Pass Origin parsing: <#i> against <sc:/pa/pa>
Pass Origin parsing: <#i> against <sc://ho/pa>
Pass Origin parsing: <#i> against <sc:///pa/pa>
Pass Origin parsing: <about:/../> without base
Pass Origin parsing: <data:/../> without base
Pass Origin parsing: <javascript:/../> without base
Pass Origin parsing: <mailto:/../> without base
Pass Origin parsing: <sc://ñ.test/> without base
Pass Origin parsing: <x> against <sc://ñ>
Pass Origin parsing: <sc:\../> without base
Pass Origin parsing: <sc::a@example.net> without base
Pass Origin parsing: <wow:%NBD> without base
Pass Origin parsing: <wow:%1G> without base
Pass Origin parsing: <wow:￿> without base
Pass Origin parsing: <http://!"$&'()*+,-.;=_`{}~/> without base
Pass Origin parsing: <sc:// !"$%&'()*+,-.;=_`{}~/> without base
Pass Origin parsing: <ftp://%e2%98%83> without base
Pass Origin parsing: <https://%e2%98%83> without base
Pass Origin parsing: <http://127.0.0.1:10100/relative_import.html> without base
Pass Origin parsing: <http://facebook.com/?foo=%7B%22abc%22> without base
Pass Origin parsing: <https://localhost:3000/jqueryui@1.2.3> without base
Pass Origin parsing: <h t
t p://h o
s t:9 0
0 0/p a
t h?q u
e ry#f r
a g> without base
Pass Origin parsing: <?a=b&c=d> against <http://example.org/foo/bar>
Pass Origin parsing: <??a=b&c=d> against <http://example.org/foo/bar>
Pass Origin parsing: <http:> against <http://example.org/foo/bar>
Pass Origin parsing: <sc:> against <https://example.org/foo/bar>
Pass Origin parsing: <http://foo.bar/baz?qux#foobar> without base
Pass Origin parsing: <http://foo.bar/baz?qux#foo"bar> without base
Pass Origin parsing: <http://foo.bar/baz?qux#foo<bar> without base
Pass Origin parsing: <http://foo.bar/baz?qux#foo>bar> without base
Pass Origin parsing: <http://foo.bar/baz?qux#foo`bar> without base
Pass Origin parsing: <http://1.2.3.4/> against <http://other.com/>
Pass Origin parsing: <http://1.2.3.4./> against <http://other.com/>
Pass Origin parsing: <http://192.168.257> against <http://other.com/>
Pass Origin parsing: <http://192.168.257.> against <http://other.com/>
Pass Origin parsing: <http://192.168.257.com> against <http://other.com/>
Pass Origin parsing: <http://256> against <http://other.com/>
Pass Origin parsing: <http://256.com> against <http://other.com/>
Pass Origin parsing: <http://999999999> against <http://other.com/>
Pass Origin parsing: <http://999999999.> against <http://other.com/>
Pass Origin parsing: <http://999999999.com> against <http://other.com/>
Pass Origin parsing: <http://10000000000.com> against <http://other.com/>
Pass Origin parsing: <http://4294967295> against <http://other.com/>
Pass Origin parsing: <http://0xffffffff> against <http://other.com/>
Pass Origin parsing: <https://0x.0x.0> without base
Pass Origin parsing: <asdf://%43%7C/> without base
Pass Origin parsing: <http://[1:0::]> against <http://example.net/>
Pass Origin parsing: <sc://ñ> without base
Pass Origin parsing: <sc://ñ?x> without base
Pass Origin parsing: <sc://ñ#x> without base
Pass Origin parsing: <#x> against <sc://ñ>
Pass Origin parsing: <?x> against <sc://ñ>
Pass Origin parsing: <tftp://foobar.com/someconfig;mode=netascii> without base
Pass Origin parsing: <telnet://user:pass@foobar.com:23/> without base
Pass Origin parsing: <ut2004://10.10.10.10:7777/Index.ut2> without base
Pass Origin parsing: <redis://foo:bar@somehost:6379/0?baz=bam&qux=baz> without base
Pass Origin parsing: <rsync://foo@host:911/sup> without base
Pass Origin parsing: <git://github.com/foo/bar.git> without base
Pass Origin parsing: <irc://myserver.com:6999/channel?passwd> without base
Pass Origin parsing: <dns://fw.example.org:9999/foo.bar.org?type=TXT> without base
Pass Origin parsing: <ldap://localhost:389/ou=People,o=JNDITutorial> without base
Pass Origin parsing: <git+https://github.com/foo/bar> without base
Pass Origin parsing: <urn:ietf:rfc:2648> without base
Pass Origin parsing: <tag:joe@example.org,2001:foo/bar> without base
Pass Origin parsing: <blob:https://example.com:443/> without base
Pass Origin parsing: <blob:http://example.org:88/> without base
Pass Origin parsing: <blob:d3958f5c-0777-0845-9dcf-2cb28783acaf> without base
Pass Origin parsing: <blob:> without base
Pass Origin parsing: <blob:blob:> without base
Pass Origin parsing: <blob:blob:https://example.org/> without base
Pass Origin parsing: <blob:about:blank> without base
Pass Origin parsing: <blob:ftp://host/path> without base
Pass Origin parsing: <blob:ws://example.org/> without base
Pass Origin parsing: <blob:wss://example.org/> without base
Pass Origin parsing: <blob:http%3a//example.org/> without base
Pass Origin parsing: <non-special:cannot-be-a-base-url-~€> without base
Pass Origin parsing: <non-special:cannot-be-a-base-url-!"$%&'()*+,-.;<=>@[\]^_`{|}~@/> without base
Pass Origin parsing: <https://www.example.com/path{path.html?query'=query#fragment<fragment> without base
Pass Origin parsing: <https://user:pass[@foo/bar> against <http://example.org>
Pass Origin parsing: <foo:// !"$%&'()*+,-.;<=>@[\]^_`{|}~@host/> without base
Pass Origin parsing: <wss:// !"$%&'()*+,-.;<=>@[]^_`{|}~@host/> without base
Pass Origin parsing: <foo://joe: !"$%&'()*+,-.:;<=>@[\]^_`{|}~@host/> without base
Pass Origin parsing: <wss://joe: !"$%&'()*+,-.:;<=>@[]^_`{|}~@host/> without base
Pass Origin parsing: <foo://!"$%&'()*+,-.;=_`{}~/> without base
Pass Origin parsing: <wss://!"$&'()*+,-.;=_`{}~/> without base
Pass Origin parsing: <foo://host/ !"$%&'()*+,-./:;<=>@[\]^_`{|}~> without base
Pass Origin parsing: <wss://host/ !"$%&'()*+,-./:;<=>@[\]^_`{|}~> without base
Pass Origin parsing: <foo://host/dir/? !"$%&'()*+,-./:;<=>?@[\]^_`{|}~> without base
Pass Origin parsing: <wss://host/dir/? !"$%&'()*+,-./:;<=>?@[\]^_`{|}~> without base
Pass Origin parsing: <foo://host/dir/# !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~> without base
Pass Origin parsing: <wss://host/dir/# !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~> without base
Pass Origin parsing: <https://example.com/"quoted"> without base
Pass Origin parsing: <https://a%C2%ADb/> without base
Pass Origin parsing: <data://example.com:8080/pathname?search#hash> without base
Pass Origin parsing: <data:///test> without base
Pass Origin parsing: <data://test/a/../b> without base
Pass Origin parsing: <javascript://example.com:8080/pathname?search#hash> without base
Pass Origin parsing: <javascript:///test> without base
Pass Origin parsing: <javascript://test/a/../b> without base
Pass Origin parsing: <mailto://example.com:8080/pathname?search#hash> without base
Pass Origin parsing: <mailto:///test> without base
Pass Origin parsing: <mailto://test/a/../b> without base
Pass Origin parsing: <intent://example.com:8080/pathname?search#hash> without base
Pass Origin parsing: <intent:///test> without base
Pass Origin parsing: <intent://test/a/../b> without base
Pass Origin parsing: <urn://example.com:8080/pathname?search#hash> without base
Pass Origin parsing: <urn:///test> without base
Pass Origin parsing: <urn://test/a/../b> without base
Pass Origin parsing: <turn://example.com:8080/pathname?search#hash> without base
Pass Origin parsing: <turn:///test> without base
Pass Origin parsing: <turn://test/a/../b> without base
Pass Origin parsing: <stun://example.com:8080/pathname?search#hash> without base
Pass Origin parsing: <stun:///test> without base
Pass Origin parsing: <stun://test/a/../b> without base
Pass Origin parsing: <w://x:0> without base
Pass Origin parsing: <west://x:0> without base
Pass Origin parsing: <android://x:0/a> without base
Pass Origin parsing: <drivefs://x:0/a> without base
Pass Origin parsing: <chromeos-steam://x:0/a> without base
Pass Origin parsing: <steam://x:0/a> without base
Pass Origin parsing: <materialized-view://x:0/a> without base
Pass Origin parsing: <android-app://x:0> without base
Pass Origin parsing: <chrome-distiller://x:0> without base
Pass Origin parsing: <chrome-extension://x:0> without base
Pass Origin parsing: <chrome-native://x:0> without base
Pass Origin parsing: <chrome-resource://x:0> without base
Pass Origin parsing: <chrome-search://x:0> without base
Pass Origin parsing: <fuchsia-dir://x:0> without base
Pass Origin parsing: <isolated-app://x:0> without base
Pass Origin parsing: <non-special:\\opaque> without base
Pass Origin parsing: <non-special:\\opaque/path> without base
Pass Origin parsing: <non-special:\\opaque\path> without base
Pass Origin parsing: <non-special:\/opaque> without base
Pass Origin parsing: <non-special:/\path> without base
Pass Origin parsing: <non-special://host/a\b> without base
Pass Origin parsing: <http://example.com//U+d800<30><30><EFBFBD>U+dffeU+dfff﷐﷏﷯ﷰ￾￿??U+d800<30><30><EFBFBD>U+dffeU+dfff﷐﷏﷯ﷰ￾￿> without base

View file

@ -0,0 +1,265 @@
Harness status: OK
Found 260 tests
260 Pass
Pass Setting protocol with leading U+0000 (https:)
Pass Setting protocol with U+0000 before inserted colon (https:)
Pass Setting username with leading U+0000 (https:)
Pass Setting username with middle U+0000 (https:)
Pass Setting username with trailing U+0000 (https:)
Pass Setting password with leading U+0000 (https:)
Pass Setting password with middle U+0000 (https:)
Pass Setting password with trailing U+0000 (https:)
Pass Setting host with leading U+0000 (https:)
Pass Setting hostname with leading U+0000 (https:)
Pass Setting host with middle U+0000 (https:)
Pass Setting hostname with middle U+0000 (https:)
Pass Setting host with trailing U+0000 (https:)
Pass Setting hostname with trailing U+0000 (https:)
Pass Setting port with leading U+0000 (https:)
Pass Setting port with middle U+0000 (https:)
Pass Setting port with trailing U+0000 (https:)
Pass Setting pathname with leading U+0000 (https:)
Pass Setting pathname with middle U+0000 (https:)
Pass Setting pathname with trailing U+0000 (https:)
Pass Setting search with leading U+0000 (https:)
Pass Setting search with middle U+0000 (https:)
Pass Setting search with trailing U+0000 (https:)
Pass Setting hash with leading U+0000 (https:)
Pass Setting hash with middle U+0000 (https:)
Pass Setting hash with trailing U+0000 (https:)
Pass Setting protocol with leading U+0009 (https:)
Pass Setting protocol with U+0009 before inserted colon (https:)
Pass Setting username with leading U+0009 (https:)
Pass Setting username with middle U+0009 (https:)
Pass Setting username with trailing U+0009 (https:)
Pass Setting password with leading U+0009 (https:)
Pass Setting password with middle U+0009 (https:)
Pass Setting password with trailing U+0009 (https:)
Pass Setting host with leading U+0009 (https:)
Pass Setting hostname with leading U+0009 (https:)
Pass Setting host with middle U+0009 (https:)
Pass Setting hostname with middle U+0009 (https:)
Pass Setting host with trailing U+0009 (https:)
Pass Setting hostname with trailing U+0009 (https:)
Pass Setting port with leading U+0009 (https:)
Pass Setting port with middle U+0009 (https:)
Pass Setting port with trailing U+0009 (https:)
Pass Setting pathname with leading U+0009 (https:)
Pass Setting pathname with middle U+0009 (https:)
Pass Setting pathname with trailing U+0009 (https:)
Pass Setting search with leading U+0009 (https:)
Pass Setting search with middle U+0009 (https:)
Pass Setting search with trailing U+0009 (https:)
Pass Setting hash with leading U+0009 (https:)
Pass Setting hash with middle U+0009 (https:)
Pass Setting hash with trailing U+0009 (https:)
Pass Setting protocol with leading U+000A (https:)
Pass Setting protocol with U+000A before inserted colon (https:)
Pass Setting username with leading U+000A (https:)
Pass Setting username with middle U+000A (https:)
Pass Setting username with trailing U+000A (https:)
Pass Setting password with leading U+000A (https:)
Pass Setting password with middle U+000A (https:)
Pass Setting password with trailing U+000A (https:)
Pass Setting host with leading U+000A (https:)
Pass Setting hostname with leading U+000A (https:)
Pass Setting host with middle U+000A (https:)
Pass Setting hostname with middle U+000A (https:)
Pass Setting host with trailing U+000A (https:)
Pass Setting hostname with trailing U+000A (https:)
Pass Setting port with leading U+000A (https:)
Pass Setting port with middle U+000A (https:)
Pass Setting port with trailing U+000A (https:)
Pass Setting pathname with leading U+000A (https:)
Pass Setting pathname with middle U+000A (https:)
Pass Setting pathname with trailing U+000A (https:)
Pass Setting search with leading U+000A (https:)
Pass Setting search with middle U+000A (https:)
Pass Setting search with trailing U+000A (https:)
Pass Setting hash with leading U+000A (https:)
Pass Setting hash with middle U+000A (https:)
Pass Setting hash with trailing U+000A (https:)
Pass Setting protocol with leading U+000D (https:)
Pass Setting protocol with U+000D before inserted colon (https:)
Pass Setting username with leading U+000D (https:)
Pass Setting username with middle U+000D (https:)
Pass Setting username with trailing U+000D (https:)
Pass Setting password with leading U+000D (https:)
Pass Setting password with middle U+000D (https:)
Pass Setting password with trailing U+000D (https:)
Pass Setting host with leading U+000D (https:)
Pass Setting hostname with leading U+000D (https:)
Pass Setting host with middle U+000D (https:)
Pass Setting hostname with middle U+000D (https:)
Pass Setting host with trailing U+000D (https:)
Pass Setting hostname with trailing U+000D (https:)
Pass Setting port with leading U+000D (https:)
Pass Setting port with middle U+000D (https:)
Pass Setting port with trailing U+000D (https:)
Pass Setting pathname with leading U+000D (https:)
Pass Setting pathname with middle U+000D (https:)
Pass Setting pathname with trailing U+000D (https:)
Pass Setting search with leading U+000D (https:)
Pass Setting search with middle U+000D (https:)
Pass Setting search with trailing U+000D (https:)
Pass Setting hash with leading U+000D (https:)
Pass Setting hash with middle U+000D (https:)
Pass Setting hash with trailing U+000D (https:)
Pass Setting protocol with leading U+001F (https:)
Pass Setting protocol with U+001F before inserted colon (https:)
Pass Setting username with leading U+001F (https:)
Pass Setting username with middle U+001F (https:)
Pass Setting username with trailing U+001F (https:)
Pass Setting password with leading U+001F (https:)
Pass Setting password with middle U+001F (https:)
Pass Setting password with trailing U+001F (https:)
Pass Setting host with leading U+001F (https:)
Pass Setting hostname with leading U+001F (https:)
Pass Setting host with middle U+001F (https:)
Pass Setting hostname with middle U+001F (https:)
Pass Setting host with trailing U+001F (https:)
Pass Setting hostname with trailing U+001F (https:)
Pass Setting port with leading U+001F (https:)
Pass Setting port with middle U+001F (https:)
Pass Setting port with trailing U+001F (https:)
Pass Setting pathname with leading U+001F (https:)
Pass Setting pathname with middle U+001F (https:)
Pass Setting pathname with trailing U+001F (https:)
Pass Setting search with leading U+001F (https:)
Pass Setting search with middle U+001F (https:)
Pass Setting search with trailing U+001F (https:)
Pass Setting hash with leading U+001F (https:)
Pass Setting hash with middle U+001F (https:)
Pass Setting hash with trailing U+001F (https:)
Pass Setting protocol with leading U+0000 (wpt++:)
Pass Setting protocol with U+0000 before inserted colon (wpt++:)
Pass Setting username with leading U+0000 (wpt++:)
Pass Setting username with middle U+0000 (wpt++:)
Pass Setting username with trailing U+0000 (wpt++:)
Pass Setting password with leading U+0000 (wpt++:)
Pass Setting password with middle U+0000 (wpt++:)
Pass Setting password with trailing U+0000 (wpt++:)
Pass Setting host with leading U+0000 (wpt++:)
Pass Setting hostname with leading U+0000 (wpt++:)
Pass Setting host with middle U+0000 (wpt++:)
Pass Setting hostname with middle U+0000 (wpt++:)
Pass Setting host with trailing U+0000 (wpt++:)
Pass Setting hostname with trailing U+0000 (wpt++:)
Pass Setting port with leading U+0000 (wpt++:)
Pass Setting port with middle U+0000 (wpt++:)
Pass Setting port with trailing U+0000 (wpt++:)
Pass Setting pathname with leading U+0000 (wpt++:)
Pass Setting pathname with middle U+0000 (wpt++:)
Pass Setting pathname with trailing U+0000 (wpt++:)
Pass Setting search with leading U+0000 (wpt++:)
Pass Setting search with middle U+0000 (wpt++:)
Pass Setting search with trailing U+0000 (wpt++:)
Pass Setting hash with leading U+0000 (wpt++:)
Pass Setting hash with middle U+0000 (wpt++:)
Pass Setting hash with trailing U+0000 (wpt++:)
Pass Setting protocol with leading U+0009 (wpt++:)
Pass Setting protocol with U+0009 before inserted colon (wpt++:)
Pass Setting username with leading U+0009 (wpt++:)
Pass Setting username with middle U+0009 (wpt++:)
Pass Setting username with trailing U+0009 (wpt++:)
Pass Setting password with leading U+0009 (wpt++:)
Pass Setting password with middle U+0009 (wpt++:)
Pass Setting password with trailing U+0009 (wpt++:)
Pass Setting host with leading U+0009 (wpt++:)
Pass Setting hostname with leading U+0009 (wpt++:)
Pass Setting host with middle U+0009 (wpt++:)
Pass Setting hostname with middle U+0009 (wpt++:)
Pass Setting host with trailing U+0009 (wpt++:)
Pass Setting hostname with trailing U+0009 (wpt++:)
Pass Setting port with leading U+0009 (wpt++:)
Pass Setting port with middle U+0009 (wpt++:)
Pass Setting port with trailing U+0009 (wpt++:)
Pass Setting pathname with leading U+0009 (wpt++:)
Pass Setting pathname with middle U+0009 (wpt++:)
Pass Setting pathname with trailing U+0009 (wpt++:)
Pass Setting search with leading U+0009 (wpt++:)
Pass Setting search with middle U+0009 (wpt++:)
Pass Setting search with trailing U+0009 (wpt++:)
Pass Setting hash with leading U+0009 (wpt++:)
Pass Setting hash with middle U+0009 (wpt++:)
Pass Setting hash with trailing U+0009 (wpt++:)
Pass Setting protocol with leading U+000A (wpt++:)
Pass Setting protocol with U+000A before inserted colon (wpt++:)
Pass Setting username with leading U+000A (wpt++:)
Pass Setting username with middle U+000A (wpt++:)
Pass Setting username with trailing U+000A (wpt++:)
Pass Setting password with leading U+000A (wpt++:)
Pass Setting password with middle U+000A (wpt++:)
Pass Setting password with trailing U+000A (wpt++:)
Pass Setting host with leading U+000A (wpt++:)
Pass Setting hostname with leading U+000A (wpt++:)
Pass Setting host with middle U+000A (wpt++:)
Pass Setting hostname with middle U+000A (wpt++:)
Pass Setting host with trailing U+000A (wpt++:)
Pass Setting hostname with trailing U+000A (wpt++:)
Pass Setting port with leading U+000A (wpt++:)
Pass Setting port with middle U+000A (wpt++:)
Pass Setting port with trailing U+000A (wpt++:)
Pass Setting pathname with leading U+000A (wpt++:)
Pass Setting pathname with middle U+000A (wpt++:)
Pass Setting pathname with trailing U+000A (wpt++:)
Pass Setting search with leading U+000A (wpt++:)
Pass Setting search with middle U+000A (wpt++:)
Pass Setting search with trailing U+000A (wpt++:)
Pass Setting hash with leading U+000A (wpt++:)
Pass Setting hash with middle U+000A (wpt++:)
Pass Setting hash with trailing U+000A (wpt++:)
Pass Setting protocol with leading U+000D (wpt++:)
Pass Setting protocol with U+000D before inserted colon (wpt++:)
Pass Setting username with leading U+000D (wpt++:)
Pass Setting username with middle U+000D (wpt++:)
Pass Setting username with trailing U+000D (wpt++:)
Pass Setting password with leading U+000D (wpt++:)
Pass Setting password with middle U+000D (wpt++:)
Pass Setting password with trailing U+000D (wpt++:)
Pass Setting host with leading U+000D (wpt++:)
Pass Setting hostname with leading U+000D (wpt++:)
Pass Setting host with middle U+000D (wpt++:)
Pass Setting hostname with middle U+000D (wpt++:)
Pass Setting host with trailing U+000D (wpt++:)
Pass Setting hostname with trailing U+000D (wpt++:)
Pass Setting port with leading U+000D (wpt++:)
Pass Setting port with middle U+000D (wpt++:)
Pass Setting port with trailing U+000D (wpt++:)
Pass Setting pathname with leading U+000D (wpt++:)
Pass Setting pathname with middle U+000D (wpt++:)
Pass Setting pathname with trailing U+000D (wpt++:)
Pass Setting search with leading U+000D (wpt++:)
Pass Setting search with middle U+000D (wpt++:)
Pass Setting search with trailing U+000D (wpt++:)
Pass Setting hash with leading U+000D (wpt++:)
Pass Setting hash with middle U+000D (wpt++:)
Pass Setting hash with trailing U+000D (wpt++:)
Pass Setting protocol with leading U+001F (wpt++:)
Pass Setting protocol with U+001F before inserted colon (wpt++:)
Pass Setting username with leading U+001F (wpt++:)
Pass Setting username with middle U+001F (wpt++:)
Pass Setting username with trailing U+001F (wpt++:)
Pass Setting password with leading U+001F (wpt++:)
Pass Setting password with middle U+001F (wpt++:)
Pass Setting password with trailing U+001F (wpt++:)
Pass Setting host with leading U+001F (wpt++:)
Pass Setting hostname with leading U+001F (wpt++:)
Pass Setting host with middle U+001F (wpt++:)
Pass Setting hostname with middle U+001F (wpt++:)
Pass Setting host with trailing U+001F (wpt++:)
Pass Setting hostname with trailing U+001F (wpt++:)
Pass Setting port with leading U+001F (wpt++:)
Pass Setting port with middle U+001F (wpt++:)
Pass Setting port with trailing U+001F (wpt++:)
Pass Setting pathname with leading U+001F (wpt++:)
Pass Setting pathname with middle U+001F (wpt++:)
Pass Setting pathname with trailing U+001F (wpt++:)
Pass Setting search with leading U+001F (wpt++:)
Pass Setting search with middle U+001F (wpt++:)
Pass Setting search with trailing U+001F (wpt++:)
Pass Setting hash with leading U+001F (wpt++:)
Pass Setting hash with middle U+001F (wpt++:)
Pass Setting hash with trailing U+001F (wpt++:)

View file

@ -0,0 +1,13 @@
Harness status: OK
Found 8 tests
8 Pass
Pass URL.parse(undefined, undefined)
Pass URL.parse(aaa:b, undefined)
Pass URL.parse(undefined, aaa:b)
Pass URL.parse(aaa:/b, undefined)
Pass URL.parse(undefined, aaa:/b)
Pass URL.parse(https://test:test, undefined)
Pass URL.parse(a, https://b/)
Pass URL.parse() should return a unique object

View file

@ -0,0 +1,6 @@
Harness status: OK
Found 1 tests
1 Pass
Pass url-tojson

View file

@ -0,0 +1,110 @@
Harness status: OK
Found 105 tests
105 Pass
Pass URLSearchParams constructed with: test
Pass request.formData() with input: test
Pass response.formData() with input: test
Pass URLSearchParams constructed with: test=
Pass request.formData() with input: test=
Pass response.formData() with input: test=
Pass URLSearchParams constructed with: %EF%BB%BFtest=%EF%BB%BF
Pass request.formData() with input: %EF%BB%BFtest=%EF%BB%BF
Pass response.formData() with input: %EF%BB%BFtest=%EF%BB%BF
Pass URLSearchParams constructed with: %EF%BF%BF=%EF%BF%BF
Pass request.formData() with input: %EF%BF%BF=%EF%BF%BF
Pass response.formData() with input: %EF%BF%BF=%EF%BF%BF
Pass URLSearchParams constructed with: %FE%FF
Pass request.formData() with input: %FE%FF
Pass response.formData() with input: %FE%FF
Pass URLSearchParams constructed with: %FF%FE
Pass request.formData() with input: %FF%FE
Pass response.formData() with input: %FF%FE
Pass URLSearchParams constructed with: †&†=x
Pass request.formData() with input: †&†=x
Pass response.formData() with input: †&†=x
Pass URLSearchParams constructed with: %C2
Pass request.formData() with input: %C2
Pass response.formData() with input: %C2
Pass URLSearchParams constructed with: %C2x
Pass request.formData() with input: %C2x
Pass response.formData() with input: %C2x
Pass URLSearchParams constructed with: _charset_=windows-1252&test=%C2x
Pass request.formData() with input: _charset_=windows-1252&test=%C2x
Pass response.formData() with input: _charset_=windows-1252&test=%C2x
Pass URLSearchParams constructed with:
Pass request.formData() with input:
Pass response.formData() with input:
Pass URLSearchParams constructed with: a
Pass request.formData() with input: a
Pass response.formData() with input: a
Pass URLSearchParams constructed with: a=b
Pass request.formData() with input: a=b
Pass response.formData() with input: a=b
Pass URLSearchParams constructed with: a=
Pass request.formData() with input: a=
Pass response.formData() with input: a=
Pass URLSearchParams constructed with: =b
Pass request.formData() with input: =b
Pass response.formData() with input: =b
Pass URLSearchParams constructed with: &
Pass request.formData() with input: &
Pass response.formData() with input: &
Pass URLSearchParams constructed with: &a
Pass request.formData() with input: &a
Pass response.formData() with input: &a
Pass URLSearchParams constructed with: a&
Pass request.formData() with input: a&
Pass response.formData() with input: a&
Pass URLSearchParams constructed with: a&a
Pass request.formData() with input: a&a
Pass response.formData() with input: a&a
Pass URLSearchParams constructed with: a&b&c
Pass request.formData() with input: a&b&c
Pass response.formData() with input: a&b&c
Pass URLSearchParams constructed with: a=b&c=d
Pass request.formData() with input: a=b&c=d
Pass response.formData() with input: a=b&c=d
Pass URLSearchParams constructed with: a=b&c=d&
Pass request.formData() with input: a=b&c=d&
Pass response.formData() with input: a=b&c=d&
Pass URLSearchParams constructed with: &&&a=b&&&&c=d&
Pass request.formData() with input: &&&a=b&&&&c=d&
Pass response.formData() with input: &&&a=b&&&&c=d&
Pass URLSearchParams constructed with: a=a&a=b&a=c
Pass request.formData() with input: a=a&a=b&a=c
Pass response.formData() with input: a=a&a=b&a=c
Pass URLSearchParams constructed with: a==a
Pass request.formData() with input: a==a
Pass response.formData() with input: a==a
Pass URLSearchParams constructed with: a=a+b+c+d
Pass request.formData() with input: a=a+b+c+d
Pass response.formData() with input: a=a+b+c+d
Pass URLSearchParams constructed with: %=a
Pass request.formData() with input: %=a
Pass response.formData() with input: %=a
Pass URLSearchParams constructed with: %a=a
Pass request.formData() with input: %a=a
Pass response.formData() with input: %a=a
Pass URLSearchParams constructed with: %a_=a
Pass request.formData() with input: %a_=a
Pass response.formData() with input: %a_=a
Pass URLSearchParams constructed with: %61=a
Pass request.formData() with input: %61=a
Pass response.formData() with input: %61=a
Pass URLSearchParams constructed with: %61+%4d%4D=
Pass request.formData() with input: %61+%4d%4D=
Pass response.formData() with input: %61+%4d%4D=
Pass URLSearchParams constructed with: id=0&value=%
Pass request.formData() with input: id=0&value=%
Pass response.formData() with input: id=0&value=%
Pass URLSearchParams constructed with: b=%2sf%2a
Pass request.formData() with input: b=%2sf%2a
Pass response.formData() with input: b=%2sf%2a
Pass URLSearchParams constructed with: b=%2%2af%2a
Pass request.formData() with input: b=%2%2af%2a
Pass response.formData() with input: b=%2%2af%2a
Pass URLSearchParams constructed with: b=%%2a
Pass request.formData() with input: b=%%2a
Pass response.formData() with input: b=%%2a

View file

@ -0,0 +1,13 @@
Harness status: OK
Found 8 tests
8 Pass
Pass Delete basics
Pass Deleting appended multiple
Pass Deleting all params removes ? from URL
Pass Removing non-existent param removes ? from URL
Pass Changing the query of a URL with an opaque path can impact the path
Pass Changing the query of a URL with an opaque path can impact the path if the URL has no fragment
Pass Two-argument delete()
Pass Two-argument delete() respects undefined as second arg

View file

@ -0,0 +1,11 @@
Harness status: OK
Found 6 tests
6 Pass
Pass ForEach Check
Pass For-of Check
Pass empty
Pass delete next param during iteration
Pass delete current param during iteration
Pass delete every param seen during iteration

View file

@ -0,0 +1,7 @@
Harness status: OK
Found 2 tests
2 Pass
Pass Get basics
Pass More get() basics

View file

@ -0,0 +1,7 @@
Harness status: OK
Found 2 tests
2 Pass
Pass getAll() basics
Pass getAll() multiples

View file

@ -0,0 +1,9 @@
Harness status: OK
Found 4 tests
4 Pass
Pass Has basics
Pass has() following delete()
Pass Two-argument has()
Pass Two-argument has() respects undefined as second arg

View file

@ -0,0 +1,7 @@
Harness status: OK
Found 2 tests
2 Pass
Pass Set basics
Pass URLSearchParams.set

View file

@ -0,0 +1,22 @@
Harness status: OK
Found 17 tests
17 Pass
Pass Parse and sort: z=b&a=b&z=a&a=a
Pass URL parse and sort: z=b&a=b&z=a&a=a
Pass Parse and sort: <20>=x&&<26>=a
Pass URL parse and sort: <20>=x&&<26>=a
Pass Parse and sort: ffi&<26><><EFBFBD>U+df08
Pass URL parse and sort: ffi&<26><><EFBFBD>U+df08
Pass Parse and sort: é&e<>&é
Pass URL parse and sort: é&e<>&é
Pass Parse and sort: z=z&a=a&z=y&a=b&z=x&a=c&z=w&a=d&z=v&a=e&z=u&a=f&z=t&a=g
Pass URL parse and sort: z=z&a=a&z=y&a=b&z=x&a=c&z=w&a=d&z=v&a=e&z=u&a=f&z=t&a=g
Pass Parse and sort: bbb&bb&aaa&aa=x&aa=y
Pass URL parse and sort: bbb&bb&aaa&aa=x&aa=y
Pass Parse and sort: z=z&=f&=t&=x
Pass URL parse and sort: z=z&=f&=t&=x
Pass Parse and sort: a<><61><EFBFBD>U+df08&a<><61><EFBFBD>U+dca9
Pass URL parse and sort: a<><61><EFBFBD>U+df08&a<><61><EFBFBD>U+dca9
Pass Sorting non-existent params removes ? from URL

View file

@ -0,0 +1,19 @@
Harness status: OK
Found 14 tests
14 Pass
Pass Serialize space
Pass Serialize empty value
Pass Serialize empty name
Pass Serialize empty name and value
Pass Serialize +
Pass Serialize =
Pass Serialize &
Pass Serialize *-._
Pass Serialize %
Pass Serialize \0
Pass Serialize <20><><EFBFBD>U+dca9
Pass URLSearchParams.toString
Pass URLSearchParams connected to URL
Pass URLSearchParams must not do newline normalization

View file

@ -0,0 +1,83 @@
(function() {
var subTestKeyPattern = null;
var match;
var collectKeys = false;
var collectCounts = false;
var keys = {};
var exclude = false;
if (location.search) {
match = /(?:^\?|&)(include|exclude)=([^&]+)?/.exec(location.search);
if (match) {
subTestKeyPattern = new RegExp(`^${match[2]}$`);
if (match[1] === 'exclude') {
exclude = true;
}
}
// Below is utility code to generate <meta> for copy/paste into tests.
// Sample usage:
// test.html?get-keys
match = /(?:^\?|&)get-keys(&get-counts)?(?:&|$)/.exec(location.search);
if (match) {
collectKeys = true;
if (match[1]) {
collectCounts = true;
}
add_completion_callback(() => {
var metas = [];
var template = '<meta name="variant" content="?include=%s">';
if (collectCounts) {
template += ' <!--%s-->';
}
for (var key in keys) {
var meta = template.replace("%s", key);
if (collectCounts) {
meta = meta.replace("%s", keys[key]);
}
metas.push(meta);
}
var pre = document.createElement('pre');
pre.textContent = metas.join('\n') + '\n';
document.body.insertBefore(pre, document.body.firstChild);
document.getSelection().selectAllChildren(pre);
});
}
}
/**
* Check if `key` is in the subset specified in the URL.
* @param {string} key
* @returns {boolean}
*/
function shouldRunSubTest(key) {
if (key && subTestKeyPattern) {
var found = subTestKeyPattern.test(key);
if (exclude) {
return !found;
}
return found;
}
return true;
}
/**
* Only test a subset of tests with `?include=Foo` or `?exclude=Foo` in the URL.
* Can be used together with `<meta name="variant" content="...">`
* Sample usage:
* for (const test of tests) {
* subsetTestByKey("Foo", async_test, test.fn, test.name);
* }
*/
function subsetTestByKey(key, testFunc, ...args) {
if (collectKeys) {
if (collectCounts && key in keys) {
keys[key]++;
} else {
keys[key] = 1;
}
}
if (shouldRunSubTest(key)) {
return testFunc(...args);
}
return null;
}
self.shouldRunSubTest = shouldRunSubTest;
self.subsetTestByKey = subsetTestByKey;
})();

View file

@ -0,0 +1,8 @@
<!doctype html>
<meta charset=utf-8>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<div id=log></div>
<script src="../url/IdnaTestV2.window.js"></script>

View file

@ -0,0 +1,24 @@
promise_test(() => fetch("resources/IdnaTestV2.json").then(res => res.json()).then(runTests), "Loading data…");
function runTests(idnaTests) {
for (const idnaTest of idnaTests) {
if (typeof idnaTest === "string") {
continue // skip comments
}
if (idnaTest.input === "") {
continue // cannot test empty string input through new URL()
}
test(() => {
if (idnaTest.output === null) {
assert_throws_js(TypeError, () => new URL(`https://${idnaTest.input}/x`));
} else {
const url = new URL(`https://${idnaTest.input}/x`);
assert_equals(url.host, idnaTest.output);
assert_equals(url.hostname, idnaTest.output);
assert_equals(url.pathname, "/x");
assert_equals(url.href, `https://${idnaTest.output}/x`);
}
}, `ToASCII("${idnaTest.input}")${idnaTest.comment ? " " + idnaTest.comment : ""}`);
}
}

View file

@ -0,0 +1,12 @@
<!doctype html>
<meta charset=utf-8>
<script src=../resources/testharness.js></script>
<script src=../resources/testharnessreport.js></script>
<base id=base>
<div id=log></div>
<script src=resources/a-element-origin.js></script>
<!--
Other dependencies:
* resources/urltestdata.json,
* resources/urltestdata-javascript-only.json,
-->

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,39 @@
promise_test(() => Promise.all([
fetch("resources/urltestdata.json").then(res => res.json()),
fetch("resources/urltestdata-javascript-only.json").then(res => res.json()),
]).then((tests) => tests.flat()).then(runURLTests), "Loading data…");
function setBase(base) {
document.getElementById("base").href = base
}
function bURL(url, base) {
setBase(base);
const a = document.createElement("a");
a.setAttribute("href", url);
return a;
}
function runURLTests(urlTests) {
for (const expected of urlTests) {
// Skip comments and tests without "origin" expectation
if (typeof expected === "string" || !("origin" in expected))
continue;
// Fragments are relative against "about:blank" (this might always be redundant due to requiring "origin" in expected)
if (expected.base === null && expected.input.startsWith("#"))
continue;
// HTML special cases data: and javascript: URLs in <base>
if (expected.base !== null && (expected.base.startsWith("data:") || expected.base.startsWith("javascript:")))
continue;
// We cannot use a null base for HTML tests
const base = expected.base === null ? "about:blank" : expected.base;
test(function() {
var url = bURL(expected.input, base)
assert_equals(url.origin, expected.origin, "origin")
}, "Parsing origin: <" + expected.input + "> against <" + base + ">")
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,18 @@
[
"See ../README.md for a description of the format.",
{
"input": "http://example.com/\uD800\uD801\uDFFE\uDFFF\uFDD0\uFDCF\uFDEF\uFDF0\uFFFE\uFFFF?\uD800\uD801\uDFFE\uDFFF\uFDD0\uFDCF\uFDEF\uFDF0\uFFFE\uFFFF",
"base": null,
"href": "http://example.com/%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF?%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF",
"origin": "http://example.com",
"protocol": "http:",
"username": "",
"password": "",
"host": "example.com",
"hostname": "example.com",
"port": "",
"pathname": "/%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF",
"search": "?%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF",
"hash": ""
}
]

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,15 @@
<!doctype html>
<meta charset=utf-8>
<meta name="timeout" content="long">
<script>
self.GLOBAL = {
isWindow: function() { return true; },
isWorker: function() { return false; },
isShadowRealm: function() { return false; },
};
</script>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="../common/subset-tests-by-key.js"></script>
<div id=log></div>
<script src="../url/url-constructor.any.js"></script>

View file

@ -0,0 +1,56 @@
// META: script=/common/subset-tests-by-key.js
// META: timeout=long
// META: variant=?include=file
// META: variant=?include=javascript
// META: variant=?include=mailto
// META: variant=?exclude=(file|javascript|mailto)
function runURLTests(urlTests) {
for (const expected of urlTests) {
// Skip comments
if (typeof expected === "string")
continue;
const base = expected.base !== null ? expected.base : undefined;
function getKey(expected) {
if (expected.protocol) {
return expected.protocol.replace(":", "");
}
if (expected.failure) {
return expected.input.split(":")[0];
}
return "other";
}
subsetTestByKey(getKey(expected), test, function() {
if (expected.failure) {
assert_throws_js(TypeError, function() {
new URL(expected.input, base);
});
return;
}
const url = new URL(expected.input, base);
assert_equals(url.href, expected.href, "href")
assert_equals(url.protocol, expected.protocol, "protocol")
assert_equals(url.username, expected.username, "username")
assert_equals(url.password, expected.password, "password")
assert_equals(url.host, expected.host, "host")
assert_equals(url.hostname, expected.hostname, "hostname")
assert_equals(url.port, expected.port, "port")
assert_equals(url.pathname, expected.pathname, "pathname")
assert_equals(url.search, expected.search, "search")
if ("searchParams" in expected) {
assert_true("searchParams" in url)
assert_equals(url.searchParams.toString(), expected.searchParams, "searchParams")
}
assert_equals(url.hash, expected.hash, "hash")
}, `Parsing: <${expected.input}> ${base ? "against <" + base + ">" : "without base"}`)
}
}
promise_test(() => Promise.all([
fetch("resources/urltestdata.json").then(res => res.json()),
fetch("resources/urltestdata-javascript-only.json").then(res => res.json()),
]).then((tests) => tests.flat()).then(runURLTests), "Loading data…");

View file

@ -0,0 +1,15 @@
<!doctype html>
<meta charset=utf-8>
<script>
self.GLOBAL = {
isWindow: function() { return true; },
isWorker: function() { return false; },
isShadowRealm: function() { return false; },
};
</script>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<div id=log></div>
<script src="../url/url-origin.any.js"></script>

View file

@ -0,0 +1,19 @@
promise_test(() => Promise.all([
fetch("resources/urltestdata.json").then(res => res.json()),
fetch("resources/urltestdata-javascript-only.json").then(res => res.json()),
]).then((tests) => tests.flat()).then(runURLTests), "Loading data…");
function runURLTests(urlTests) {
for (const expected of urlTests) {
// Skip comments and tests without "origin" expectation
if (typeof expected === "string" || !("origin" in expected))
continue;
const base = expected.base !== null ? expected.base : undefined;
test(() => {
const url = new URL(expected.input, base);
assert_equals(url.origin, expected.origin, "origin");
}, `Origin parsing: <${expected.input}> ${base ? "against <" + base + ">" : "without base"}`);
}
}

View file

@ -0,0 +1,8 @@
<!doctype html>
<meta charset=utf-8>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="../common/subset-tests-by-key.js"></script>
<div id=log></div>
<script src="../url/url-setters-a-area.window.js"></script>

View file

@ -0,0 +1,43 @@
// META: script=/common/subset-tests-by-key.js
// META: variant=?include=file
// META: variant=?include=javascript
// META: variant=?include=mailto
// META: variant=?exclude=(file|javascript|mailto)
// Keep this file in sync with url-setters.any.js.
promise_test(() => fetch("resources/setters_tests.json").then(res => res.json()).then(runURLSettersTests), "Loading data…");
function runURLSettersTests(all_test_cases) {
for (var attribute_to_be_set in all_test_cases) {
if (attribute_to_be_set == "comment") {
continue;
}
var test_cases = all_test_cases[attribute_to_be_set];
for(var i = 0, l = test_cases.length; i < l; i++) {
var test_case = test_cases[i];
var name = "Setting <" + test_case.href + ">." + attribute_to_be_set +
" = '" + test_case.new_value + "'";
if ("comment" in test_case) {
name += " " + test_case.comment;
}
const key = test_case.href.split(":")[0];
subsetTestByKey(key, test, function() {
var url = document.createElement("a");
url.href = test_case.href;
url[attribute_to_be_set] = test_case.new_value;
for (var attribute in test_case.expected) {
assert_equals(url[attribute], test_case.expected[attribute])
}
}, "<a>: " + name)
subsetTestByKey(key, test, function() {
var url = document.createElement("area");
url.href = test_case.href;
url[attribute_to_be_set] = test_case.new_value;
for (var attribute in test_case.expected) {
assert_equals(url[attribute], test_case.expected[attribute])
}
}, "<area>: " + name)
}
}
}

View file

@ -0,0 +1,15 @@
<!doctype html>
<meta charset=utf-8>
<script>
self.GLOBAL = {
isWindow: function() { return true; },
isWorker: function() { return false; },
isShadowRealm: function() { return false; },
};
</script>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<div id=log></div>
<script src="../url/url-setters-stripping.any.js"></script>

View file

@ -0,0 +1,125 @@
function urlString({ scheme = "https",
username = "username",
password = "password",
host = "host",
port = "8000",
pathname = "path",
search = "query",
hash = "fragment" }) {
return `${scheme}://${username}:${password}@${host}:${port}/${pathname}?${search}#${hash}`;
}
function urlRecord(scheme) {
return new URL(urlString({ scheme }));
}
for(const scheme of ["https", "wpt++"]) {
for(let i = 0; i < 0x20; i++) {
const stripped = i === 0x09 || i === 0x0A || i === 0x0D;
// It turns out that user agents are surprisingly similar for these ranges so generate fewer
// tests. If this is changed also change the logic for host below.
if (i !== 0 && i !== 0x1F && !stripped) {
continue;
}
const cpString = String.fromCodePoint(i);
const cpReference = "U+" + i.toString(16).toUpperCase().padStart(4, "0");
test(() => {
const expected = scheme === "https" ? (stripped ? "http" : "https") : (stripped ? "wpt--" : "wpt++");
const url = urlRecord(scheme);
url.protocol = String.fromCodePoint(i) + (scheme === "https" ? "http" : "wpt--");
assert_equals(url.protocol, expected + ":", "property");
assert_equals(url.href, urlString({ scheme: expected }), "href");
}, `Setting protocol with leading ${cpReference} (${scheme}:)`);
test(() => {
const expected = scheme === "https" ? (stripped ? "http" : "https") : (stripped ? "wpt--" : "wpt++");
const url = urlRecord(scheme);
url.protocol = (scheme === "https" ? "http" : "wpt--") + String.fromCodePoint(i);
assert_equals(url.protocol, expected + ":", "property");
assert_equals(url.href, urlString({ scheme: expected }), "href");
}, `Setting protocol with ${cpReference} before inserted colon (${scheme}:)`);
// Cannot test protocol with trailing as the algorithm inserts a colon before proceeding
// These do no stripping
for (const property of ["username", "password"]) {
for (const [type, expected, input] of [
["leading", encodeURIComponent(cpString) + "test", String.fromCodePoint(i) + "test"],
["middle", "te" + encodeURIComponent(cpString) + "st", "te" + String.fromCodePoint(i) + "st"],
["trailing", "test" + encodeURIComponent(cpString), "test" + String.fromCodePoint(i)]
]) {
test(() => {
const url = urlRecord(scheme);
url[property] = input;
assert_equals(url[property], expected, "property");
assert_equals(url.href, urlString({ scheme, [property]: expected }), "href");
}, `Setting ${property} with ${type} ${cpReference} (${scheme}:)`);
}
}
for (const [type, expectedPart, input] of [
["leading", (scheme === "https" ? cpString : encodeURIComponent(cpString)) + "test", String.fromCodePoint(i) + "test"],
["middle", "te" + (scheme === "https" ? cpString : encodeURIComponent(cpString)) + "st", "te" + String.fromCodePoint(i) + "st"],
["trailing", "test" + (scheme === "https" ? cpString : encodeURIComponent(cpString)), "test" + String.fromCodePoint(i)]
]) {
test(() => {
const expected = i === 0x00 || (scheme === "https" && i === 0x1F) ? "host" : stripped ? "test" : expectedPart;
const url = urlRecord(scheme);
url.host = input;
assert_equals(url.host, expected + ":8000", "property");
assert_equals(url.href, urlString({ scheme, host: expected }), "href");
}, `Setting host with ${type} ${cpReference} (${scheme}:)`);
test(() => {
const expected = i === 0x00 || (scheme === "https" && i === 0x1F) ? "host" : stripped ? "test" : expectedPart;
const url = urlRecord(scheme);
url.hostname = input;
assert_equals(url.hostname, expected, "property");
assert_equals(url.href, urlString({ scheme, host: expected }), "href");
}, `Setting hostname with ${type} ${cpReference} (${scheme}:)`);
}
test(() => {
const expected = stripped ? "9000" : "8000";
const url = urlRecord(scheme);
url.port = String.fromCodePoint(i) + "9000";
assert_equals(url.port, expected, "property");
assert_equals(url.href, urlString({ scheme, port: expected }), "href");
}, `Setting port with leading ${cpReference} (${scheme}:)`);
test(() => {
const expected = stripped ? "9000" : "90";
const url = urlRecord(scheme);
url.port = "90" + String.fromCodePoint(i) + "00";
assert_equals(url.port, expected, "property");
assert_equals(url.href, urlString({ scheme, port: expected }), "href");
}, `Setting port with middle ${cpReference} (${scheme}:)`);
test(() => {
const expected = "9000";
const url = urlRecord(scheme);
url.port = "9000" + String.fromCodePoint(i);
assert_equals(url.port, expected, "property");
assert_equals(url.href, urlString({ scheme, port: expected }), "href");
}, `Setting port with trailing ${cpReference} (${scheme}:)`);
for (const [property, separator] of [["pathname", "/"], ["search", "?"], ["hash", "#"]]) {
for (const [type, expectedPart, input] of [
["leading", encodeURIComponent(cpString) + "test", String.fromCodePoint(i) + "test"],
["middle", "te" + encodeURIComponent(cpString) + "st", "te" + String.fromCodePoint(i) + "st"],
["trailing", "test" + encodeURIComponent(cpString), "test" + String.fromCodePoint(i)]
]) {
test(() => {
const expected = stripped ? "test" : expectedPart;
const url = urlRecord(scheme);
url[property] = input;
assert_equals(url[property], separator + expected, "property");
assert_equals(url.href, urlString({ scheme, [property]: expected }), "href");
}, `Setting ${property} with ${type} ${cpReference} (${scheme}:)`);
}
}
}
}

View file

@ -0,0 +1,15 @@
<!doctype html>
<meta charset=utf-8>
<script>
self.GLOBAL = {
isWindow: function() { return true; },
isWorker: function() { return false; },
isShadowRealm: function() { return false; },
};
</script>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="../common/subset-tests-by-key.js"></script>
<div id=log></div>
<script src="../url/url-setters.any.js"></script>

View file

@ -0,0 +1,34 @@
// META: script=/common/subset-tests-by-key.js
// META: variant=?include=file
// META: variant=?include=javascript
// META: variant=?include=mailto
// META: variant=?exclude=(file|javascript|mailto)
// Keep this file in sync with url-setters-a-area.window.js.
promise_test(() => fetch("resources/setters_tests.json").then(res => res.json()).then(runURLSettersTests), "Loading data…");
function runURLSettersTests(all_test_cases) {
for (var attribute_to_be_set in all_test_cases) {
if (attribute_to_be_set == "comment") {
continue;
}
var test_cases = all_test_cases[attribute_to_be_set];
for(var i = 0, l = test_cases.length; i < l; i++) {
var test_case = test_cases[i];
var name = "Setting <" + test_case.href + ">." + attribute_to_be_set +
" = '" + test_case.new_value + "'";
if ("comment" in test_case) {
name += " " + test_case.comment;
}
const key = test_case.href.split(":")[0];
subsetTestByKey(key, test, function() {
var url = new URL(test_case.href);
url[attribute_to_be_set] = test_case.new_value;
for (var attribute in test_case.expected) {
assert_equals(url[attribute], test_case.expected[attribute])
}
}, "URL: " + name)
}
}
}

View file

@ -0,0 +1,15 @@
<!doctype html>
<meta charset=utf-8>
<script>
self.GLOBAL = {
isWindow: function() { return true; },
isWorker: function() { return false; },
isShadowRealm: function() { return false; },
};
</script>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<div id=log></div>
<script src="../url/url-statics-parse.any.js"></script>

View file

@ -0,0 +1,50 @@
// This intentionally does not use resources/urltestdata.json to preserve resources.
[
{
"url": undefined,
"base": undefined,
"expected": false
},
{
"url": "aaa:b",
"base": undefined,
"expected": true
},
{
"url": undefined,
"base": "aaa:b",
"expected": false
},
{
"url": "aaa:/b",
"base": undefined,
"expected": true
},
{
"url": undefined,
"base": "aaa:/b",
"expected": true
},
{
"url": "https://test:test",
"base": undefined,
"expected": false
},
{
"url": "a",
"base": "https://b/",
"expected": true
}
].forEach(({ url, base, expected }) => {
test(() => {
if (expected == false) {
assert_equals(URL.parse(url, base), null);
} else {
assert_equals(URL.parse(url, base).href, new URL(url, base).href);
}
}, `URL.parse(${url}, ${base})`);
});
test(() => {
assert_not_equals(URL.parse("https://example/"), URL.parse("https://example/"));
}, `URL.parse() should return a unique object`);

View file

@ -0,0 +1,15 @@
<!doctype html>
<meta charset=utf-8>
<script>
self.GLOBAL = {
isWindow: function() { return true; },
isWorker: function() { return false; },
isShadowRealm: function() { return false; },
};
</script>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<div id=log></div>
<script src="../url/url-tojson.any.js"></script>

View file

@ -0,0 +1,4 @@
test(() => {
const a = new URL("https://example.com/")
assert_equals(JSON.stringify(a), "\"https://example.com/\"")
})

View file

@ -0,0 +1,15 @@
<!doctype html>
<meta charset=utf-8>
<script>
self.GLOBAL = {
isWindow: function() { return true; },
isWorker: function() { return false; },
isShadowRealm: function() { return false; },
};
</script>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<div id=log></div>
<script src="../url/urlencoded-parser.any.js"></script>

View file

@ -0,0 +1,68 @@
[
{ "input": "test", "output": [["test", ""]] },
{ "input": "\uFEFFtest=\uFEFF", "output": [["\uFEFFtest", "\uFEFF"]] },
{ "input": "%EF%BB%BFtest=%EF%BB%BF", "output": [["\uFEFFtest", "\uFEFF"]] },
{ "input": "%EF%BF%BF=%EF%BF%BF", "output": [["\uFFFF", "\uFFFF"]] },
{ "input": "%FE%FF", "output": [["\uFFFD\uFFFD", ""]] },
{ "input": "%FF%FE", "output": [["\uFFFD\uFFFD", ""]] },
{ "input": "†&†=x", "output": [["†", ""], ["†", "x"]] },
{ "input": "%C2", "output": [["\uFFFD", ""]] },
{ "input": "%C2x", "output": [["\uFFFDx", ""]] },
{ "input": "_charset_=windows-1252&test=%C2x", "output": [["_charset_", "windows-1252"], ["test", "\uFFFDx"]] },
{ "input": '', "output": [] },
{ "input": 'a', "output": [['a', '']] },
{ "input": 'a=b', "output": [['a', 'b']] },
{ "input": 'a=', "output": [['a', '']] },
{ "input": '=b', "output": [['', 'b']] },
{ "input": '&', "output": [] },
{ "input": '&a', "output": [['a', '']] },
{ "input": 'a&', "output": [['a', '']] },
{ "input": 'a&a', "output": [['a', ''], ['a', '']] },
{ "input": 'a&b&c', "output": [['a', ''], ['b', ''], ['c', '']] },
{ "input": 'a=b&c=d', "output": [['a', 'b'], ['c', 'd']] },
{ "input": 'a=b&c=d&', "output": [['a', 'b'], ['c', 'd']] },
{ "input": '&&&a=b&&&&c=d&', "output": [['a', 'b'], ['c', 'd']] },
{ "input": 'a=a&a=b&a=c', "output": [['a', 'a'], ['a', 'b'], ['a', 'c']] },
{ "input": 'a==a', "output": [['a', '=a']] },
{ "input": 'a=a+b+c+d', "output": [['a', 'a b c d']] },
{ "input": '%=a', "output": [['%', 'a']] },
{ "input": '%a=a', "output": [['%a', 'a']] },
{ "input": '%a_=a', "output": [['%a_', 'a']] },
{ "input": '%61=a', "output": [['a', 'a']] },
{ "input": '%61+%4d%4D=', "output": [['a MM', '']] },
{ "input": "id=0&value=%", "output": [['id', '0'], ['value', '%']] },
{ "input": "b=%2sf%2a", "output": [['b', '%2sf*']]},
{ "input": "b=%2%2af%2a", "output": [['b', '%2*f*']]},
{ "input": "b=%%2a", "output": [['b', '%*']]}
].forEach((val) => {
test(() => {
let sp = new URLSearchParams(val.input),
i = 0
for (let item of sp) {
assert_array_equals(item, val.output[i])
i++
}
}, "URLSearchParams constructed with: " + val.input)
promise_test(() => {
let init = new Request("about:blank", { body: val.input, method: "LADIDA", headers: {"Content-Type": "application/x-www-form-urlencoded;charset=windows-1252"} }).formData()
return init.then((fd) => {
let i = 0
for (let item of fd) {
assert_array_equals(item, val.output[i])
i++
}
})
}, "request.formData() with input: " + val.input)
promise_test(() => {
let init = new Response(val.input, { headers: {"Content-Type": "application/x-www-form-urlencoded;charset=shift_jis"} }).formData()
return init.then((fd) => {
let i = 0
for (let item of fd) {
assert_array_equals(item, val.output[i])
i++
}
})
}, "response.formData() with input: " + val.input)
});

View file

@ -0,0 +1,15 @@
<!doctype html>
<meta charset=utf-8>
<script>
self.GLOBAL = {
isWindow: function() { return true; },
isWorker: function() { return false; },
isShadowRealm: function() { return false; },
};
</script>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<div id=log></div>
<script src="../url/urlsearchparams-delete.any.js"></script>

View file

@ -0,0 +1,83 @@
test(function() {
var params = new URLSearchParams('a=b&c=d');
params.delete('a');
assert_equals(params + '', 'c=d');
params = new URLSearchParams('a=a&b=b&a=a&c=c');
params.delete('a');
assert_equals(params + '', 'b=b&c=c');
params = new URLSearchParams('a=a&=&b=b&c=c');
params.delete('');
assert_equals(params + '', 'a=a&b=b&c=c');
params = new URLSearchParams('a=a&null=null&b=b');
params.delete(null);
assert_equals(params + '', 'a=a&b=b');
params = new URLSearchParams('a=a&undefined=undefined&b=b');
params.delete(undefined);
assert_equals(params + '', 'a=a&b=b');
}, 'Delete basics');
test(function() {
var params = new URLSearchParams();
params.append('first', 1);
assert_true(params.has('first'), 'Search params object has name "first"');
assert_equals(params.get('first'), '1', 'Search params object has name "first" with value "1"');
params.delete('first');
assert_false(params.has('first'), 'Search params object has no "first" name');
params.append('first', 1);
params.append('first', 10);
params.delete('first');
assert_false(params.has('first'), 'Search params object has no "first" name');
}, 'Deleting appended multiple');
test(function() {
var url = new URL('http://example.com/?param1&param2');
url.searchParams.delete('param1');
url.searchParams.delete('param2');
assert_equals(url.href, 'http://example.com/', 'url.href does not have ?');
assert_equals(url.search, '', 'url.search does not have ?');
}, 'Deleting all params removes ? from URL');
test(function() {
var url = new URL('http://example.com/?');
url.searchParams.delete('param1');
assert_equals(url.href, 'http://example.com/', 'url.href does not have ?');
assert_equals(url.search, '', 'url.search does not have ?');
}, 'Removing non-existent param removes ? from URL');
test(() => {
const url = new URL('data:space ?test');
assert_true(url.searchParams.has('test'));
url.searchParams.delete('test');
assert_false(url.searchParams.has('test'));
assert_equals(url.search, '');
assert_equals(url.pathname, 'space');
assert_equals(url.href, 'data:space');
}, 'Changing the query of a URL with an opaque path can impact the path');
test(() => {
const url = new URL('data:space ?test#test');
url.searchParams.delete('test');
assert_equals(url.search, '');
assert_equals(url.pathname, 'space ');
assert_equals(url.href, 'data:space #test');
}, 'Changing the query of a URL with an opaque path can impact the path if the URL has no fragment');
test(() => {
const params = new URLSearchParams();
params.append('a', 'b');
params.append('a', 'c');
params.append('a', 'd');
params.delete('a', 'c');
assert_equals(params.toString(), 'a=b&a=d');
}, "Two-argument delete()");
test(() => {
const params = new URLSearchParams();
params.append('a', 'b');
params.append('a', 'c');
params.append('b', 'c');
params.append('b', 'd');
params.delete('b', 'c');
params.delete('a', undefined);
assert_equals(params.toString(), 'b=d');
}, "Two-argument delete() respects undefined as second arg");

View file

@ -0,0 +1,15 @@
<!doctype html>
<meta charset=utf-8>
<script>
self.GLOBAL = {
isWindow: function() { return true; },
isWorker: function() { return false; },
isShadowRealm: function() { return false; },
};
</script>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<div id=log></div>
<script src="../url/urlsearchparams-foreach.any.js"></script>

View file

@ -0,0 +1,76 @@
test(function() {
var params = new URLSearchParams('a=1&b=2&c=3');
var keys = [];
var values = [];
params.forEach(function(value, key) {
keys.push(key);
values.push(value);
});
assert_array_equals(keys, ['a', 'b', 'c']);
assert_array_equals(values, ['1', '2', '3']);
}, "ForEach Check");
test(function() {
let a = new URL("http://a.b/c?a=1&b=2&c=3&d=4");
let b = a.searchParams;
var c = [];
for (const i of b) {
a.search = "x=1&y=2&z=3";
c.push(i);
}
assert_array_equals(c[0], ["a","1"]);
assert_array_equals(c[1], ["y","2"]);
assert_array_equals(c[2], ["z","3"]);
}, "For-of Check");
test(function() {
let a = new URL("http://a.b/c");
let b = a.searchParams;
for (const i of b) {
assert_unreached(i);
}
}, "empty");
test(function() {
const url = new URL("http://localhost/query?param0=0&param1=1&param2=2");
const searchParams = url.searchParams;
const seen = [];
for (const param of searchParams) {
if (param[0] === 'param0') {
searchParams.delete('param1');
}
seen.push(param);
}
assert_array_equals(seen[0], ["param0", "0"]);
assert_array_equals(seen[1], ["param2", "2"]);
}, "delete next param during iteration");
test(function() {
const url = new URL("http://localhost/query?param0=0&param1=1&param2=2");
const searchParams = url.searchParams;
const seen = [];
for (const param of searchParams) {
if (param[0] === 'param0') {
searchParams.delete('param0');
// 'param1=1' is now in the first slot, so the next iteration will see 'param2=2'.
} else {
seen.push(param);
}
}
assert_array_equals(seen[0], ["param2", "2"]);
}, "delete current param during iteration");
test(function() {
const url = new URL("http://localhost/query?param0=0&param1=1&param2=2");
const searchParams = url.searchParams;
const seen = [];
for (const param of searchParams) {
seen.push(param[0]);
searchParams.delete(param[0]);
}
assert_array_equals(seen, ["param0", "param2"], "param1 should not have been seen by the loop");
assert_equals(String(searchParams), "param1=1", "param1 should remain");
}, "delete every param seen during iteration");

View file

@ -0,0 +1,15 @@
<!doctype html>
<meta charset=utf-8>
<script>
self.GLOBAL = {
isWindow: function() { return true; },
isWorker: function() { return false; },
isShadowRealm: function() { return false; },
};
</script>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<div id=log></div>
<script src="../url/urlsearchparams-get.any.js"></script>

View file

@ -0,0 +1,21 @@
test(function() {
var params = new URLSearchParams('a=b&c=d');
assert_equals(params.get('a'), 'b');
assert_equals(params.get('c'), 'd');
assert_equals(params.get('e'), null);
params = new URLSearchParams('a=b&c=d&a=e');
assert_equals(params.get('a'), 'b');
params = new URLSearchParams('=b&c=d');
assert_equals(params.get(''), 'b');
params = new URLSearchParams('a=&c=d&a=e');
assert_equals(params.get('a'), '');
}, 'Get basics');
test(function() {
var params = new URLSearchParams('first=second&third&&');
assert_true(params != null, 'constructor returned non-null value.');
assert_true(params.has('first'), 'Search params object has name "first"');
assert_equals(params.get('first'), 'second', 'Search params object has name "first" with value "second"');
assert_equals(params.get('third'), '', 'Search params object has name "third" with the empty value.');
assert_equals(params.get('fourth'), null, 'Search params object has no "fourth" name and value.');
}, 'More get() basics');

View file

@ -0,0 +1,15 @@
<!doctype html>
<meta charset=utf-8>
<script>
self.GLOBAL = {
isWindow: function() { return true; },
isWorker: function() { return false; },
isShadowRealm: function() { return false; },
};
</script>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<div id=log></div>
<script src="../url/urlsearchparams-getall.any.js"></script>

View file

@ -0,0 +1,25 @@
test(function() {
var params = new URLSearchParams('a=b&c=d');
assert_array_equals(params.getAll('a'), ['b']);
assert_array_equals(params.getAll('c'), ['d']);
assert_array_equals(params.getAll('e'), []);
params = new URLSearchParams('a=b&c=d&a=e');
assert_array_equals(params.getAll('a'), ['b', 'e']);
params = new URLSearchParams('=b&c=d');
assert_array_equals(params.getAll(''), ['b']);
params = new URLSearchParams('a=&c=d&a=e');
assert_array_equals(params.getAll('a'), ['', 'e']);
}, 'getAll() basics');
test(function() {
var params = new URLSearchParams('a=1&a=2&a=3&a');
assert_true(params.has('a'), 'Search params object has name "a"');
var matches = params.getAll('a');
assert_true(matches && matches.length == 4, 'Search params object has values for name "a"');
assert_array_equals(matches, ['1', '2', '3', ''], 'Search params object has expected name "a" values');
params.set('a', 'one');
assert_equals(params.get('a'), 'one', 'Search params object has name "a" with value "one"');
var matches = params.getAll('a');
assert_true(matches && matches.length == 1, 'Search params object has values for name "a"');
assert_array_equals(matches, ['one'], 'Search params object has expected name "a" values');
}, 'getAll() multiples');

View file

@ -0,0 +1,15 @@
<!doctype html>
<meta charset=utf-8>
<script>
self.GLOBAL = {
isWindow: function() { return true; },
isWorker: function() { return false; },
isShadowRealm: function() { return false; },
};
</script>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<div id=log></div>
<script src="../url/urlsearchparams-has.any.js"></script>

View file

@ -0,0 +1,45 @@
test(function() {
var params = new URLSearchParams('a=b&c=d');
assert_true(params.has('a'));
assert_true(params.has('c'));
assert_false(params.has('e'));
params = new URLSearchParams('a=b&c=d&a=e');
assert_true(params.has('a'));
params = new URLSearchParams('=b&c=d');
assert_true(params.has(''));
params = new URLSearchParams('null=a');
assert_true(params.has(null));
}, 'Has basics');
test(function() {
var params = new URLSearchParams('a=b&c=d&&');
params.append('first', 1);
params.append('first', 2);
assert_true(params.has('a'), 'Search params object has name "a"');
assert_true(params.has('c'), 'Search params object has name "c"');
assert_true(params.has('first'), 'Search params object has name "first"');
assert_false(params.has('d'), 'Search params object has no name "d"');
params.delete('first');
assert_false(params.has('first'), 'Search params object has no name "first"');
}, 'has() following delete()');
test(() => {
const params = new URLSearchParams("a=b&a=d&c&e&");
assert_true(params.has('a', 'b'));
assert_false(params.has('a', 'c'));
assert_true(params.has('a', 'd'));
assert_true(params.has('e', ''));
params.append('first', null);
assert_false(params.has('first', ''));
assert_true(params.has('first', 'null'));
params.delete('a', 'b');
assert_true(params.has('a', 'd'));
}, "Two-argument has()");
test(() => {
const params = new URLSearchParams("a=b&a=d&c&e&");
assert_true(params.has('a', 'b'));
assert_false(params.has('a', 'c'));
assert_true(params.has('a', 'd'));
assert_true(params.has('a', undefined));
}, "Two-argument has() respects undefined as second arg");

View file

@ -0,0 +1,15 @@
<!doctype html>
<meta charset=utf-8>
<script>
self.GLOBAL = {
isWindow: function() { return true; },
isWorker: function() { return false; },
isShadowRealm: function() { return false; },
};
</script>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<div id=log></div>
<script src="../url/urlsearchparams-set.any.js"></script>

View file

@ -0,0 +1,22 @@
test(function() {
var params = new URLSearchParams('a=b&c=d');
params.set('a', 'B');
assert_equals(params + '', 'a=B&c=d');
params = new URLSearchParams('a=b&c=d&a=e');
params.set('a', 'B');
assert_equals(params + '', 'a=B&c=d')
params.set('e', 'f');
assert_equals(params + '', 'a=B&c=d&e=f')
}, 'Set basics');
test(function() {
var params = new URLSearchParams('a=1&a=2&a=3');
assert_true(params.has('a'), 'Search params object has name "a"');
assert_equals(params.get('a'), '1', 'Search params object has name "a" with value "1"');
params.set('first', 4);
assert_true(params.has('a'), 'Search params object has name "a"');
assert_equals(params.get('a'), '1', 'Search params object has name "a" with value "1"');
params.set('a', 4);
assert_true(params.has('a'), 'Search params object has name "a"');
assert_equals(params.get('a'), '4', 'Search params object has name "a" with value "4"');
}, 'URLSearchParams.set');

View file

@ -0,0 +1,15 @@
<!doctype html>
<meta charset=utf-8>
<script>
self.GLOBAL = {
isWindow: function() { return true; },
isWorker: function() { return false; },
isShadowRealm: function() { return false; },
};
</script>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<div id=log></div>
<script src="../url/urlsearchparams-sort.any.js"></script>

View file

@ -0,0 +1,62 @@
[
{
"input": "z=b&a=b&z=a&a=a",
"output": [["a", "b"], ["a", "a"], ["z", "b"], ["z", "a"]]
},
{
"input": "\uFFFD=x&\uFFFC&\uFFFD=a",
"output": [["\uFFFC", ""], ["\uFFFD", "x"], ["\uFFFD", "a"]]
},
{
"input": "ffi&🌈", // 🌈 > code point, but < code unit because two code units
"output": [["🌈", ""], ["ffi", ""]]
},
{
"input": "é&e\uFFFD&e\u0301",
"output": [["e\u0301", ""], ["e\uFFFD", ""], ["é", ""]]
},
{
"input": "z=z&a=a&z=y&a=b&z=x&a=c&z=w&a=d&z=v&a=e&z=u&a=f&z=t&a=g",
"output": [["a", "a"], ["a", "b"], ["a", "c"], ["a", "d"], ["a", "e"], ["a", "f"], ["a", "g"], ["z", "z"], ["z", "y"], ["z", "x"], ["z", "w"], ["z", "v"], ["z", "u"], ["z", "t"]]
},
{
"input": "bbb&bb&aaa&aa=x&aa=y",
"output": [["aa", "x"], ["aa", "y"], ["aaa", ""], ["bb", ""], ["bbb", ""]]
},
{
"input": "z=z&=f&=t&=x",
"output": [["", "f"], ["", "t"], ["", "x"], ["z", "z"]]
},
{
"input": "a🌈&a💩",
"output": [["a🌈", ""], ["a💩", ""]]
}
].forEach((val) => {
test(() => {
let params = new URLSearchParams(val.input),
i = 0
params.sort()
for(let param of params) {
assert_array_equals(param, val.output[i])
i++
}
}, "Parse and sort: " + val.input)
test(() => {
let url = new URL("?" + val.input, "https://example/")
url.searchParams.sort()
let params = new URLSearchParams(url.search),
i = 0
for(let param of params) {
assert_array_equals(param, val.output[i])
i++
}
}, "URL parse and sort: " + val.input)
})
test(function() {
const url = new URL("http://example.com/?")
url.searchParams.sort()
assert_equals(url.href, "http://example.com/")
assert_equals(url.search, "")
}, "Sorting non-existent params removes ? from URL")

View file

@ -0,0 +1,15 @@
<!doctype html>
<meta charset=utf-8>
<script>
self.GLOBAL = {
isWindow: function() { return true; },
isWorker: function() { return false; },
isShadowRealm: function() { return false; },
};
</script>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<div id=log></div>
<script src="../url/urlsearchparams-stringifier.any.js"></script>

View file

@ -0,0 +1,145 @@
test(function() {
var params = new URLSearchParams();
params.append('a', 'b c');
assert_equals(params + '', 'a=b+c');
params.delete('a');
params.append('a b', 'c');
assert_equals(params + '', 'a+b=c');
}, 'Serialize space');
test(function() {
var params = new URLSearchParams();
params.append('a', '');
assert_equals(params + '', 'a=');
params.append('a', '');
assert_equals(params + '', 'a=&a=');
params.append('', 'b');
assert_equals(params + '', 'a=&a=&=b');
params.append('', '');
assert_equals(params + '', 'a=&a=&=b&=');
params.append('', '');
assert_equals(params + '', 'a=&a=&=b&=&=');
}, 'Serialize empty value');
test(function() {
var params = new URLSearchParams();
params.append('', 'b');
assert_equals(params + '', '=b');
params.append('', 'b');
assert_equals(params + '', '=b&=b');
}, 'Serialize empty name');
test(function() {
var params = new URLSearchParams();
params.append('', '');
assert_equals(params + '', '=');
params.append('', '');
assert_equals(params + '', '=&=');
}, 'Serialize empty name and value');
test(function() {
var params = new URLSearchParams();
params.append('a', 'b+c');
assert_equals(params + '', 'a=b%2Bc');
params.delete('a');
params.append('a+b', 'c');
assert_equals(params + '', 'a%2Bb=c');
}, 'Serialize +');
test(function() {
var params = new URLSearchParams();
params.append('=', 'a');
assert_equals(params + '', '%3D=a');
params.append('b', '=');
assert_equals(params + '', '%3D=a&b=%3D');
}, 'Serialize =');
test(function() {
var params = new URLSearchParams();
params.append('&', 'a');
assert_equals(params + '', '%26=a');
params.append('b', '&');
assert_equals(params + '', '%26=a&b=%26');
}, 'Serialize &');
test(function() {
var params = new URLSearchParams();
params.append('a', '*-._');
assert_equals(params + '', 'a=*-._');
params.delete('a');
params.append('*-._', 'c');
assert_equals(params + '', '*-._=c');
}, 'Serialize *-._');
test(function() {
var params = new URLSearchParams();
params.append('a', 'b%c');
assert_equals(params + '', 'a=b%25c');
params.delete('a');
params.append('a%b', 'c');
assert_equals(params + '', 'a%25b=c');
params = new URLSearchParams('id=0&value=%')
assert_equals(params + '', 'id=0&value=%25')
}, 'Serialize %');
test(function() {
var params = new URLSearchParams();
params.append('a', 'b\0c');
assert_equals(params + '', 'a=b%00c');
params.delete('a');
params.append('a\0b', 'c');
assert_equals(params + '', 'a%00b=c');
}, 'Serialize \\0');
test(function() {
var params = new URLSearchParams();
params.append('a', 'b\uD83D\uDCA9c');
assert_equals(params + '', 'a=b%F0%9F%92%A9c');
params.delete('a');
params.append('a\uD83D\uDCA9b', 'c');
assert_equals(params + '', 'a%F0%9F%92%A9b=c');
}, 'Serialize \uD83D\uDCA9'); // Unicode Character 'PILE OF POO' (U+1F4A9)
test(function() {
var params;
params = new URLSearchParams('a=b&c=d&&e&&');
assert_equals(params.toString(), 'a=b&c=d&e=');
params = new URLSearchParams('a = b &a=b&c=d%20');
assert_equals(params.toString(), 'a+=+b+&a=b&c=d+');
// The lone '=' _does_ survive the roundtrip.
params = new URLSearchParams('a=&a=b');
assert_equals(params.toString(), 'a=&a=b');
params = new URLSearchParams('b=%2sf%2a');
assert_equals(params.toString(), 'b=%252sf*');
params = new URLSearchParams('b=%2%2af%2a');
assert_equals(params.toString(), 'b=%252*f*');
params = new URLSearchParams('b=%%2a');
assert_equals(params.toString(), 'b=%25*');
}, 'URLSearchParams.toString');
test(() => {
const url = new URL('http://www.example.com/?a=b,c');
const params = url.searchParams;
assert_equals(url.toString(), 'http://www.example.com/?a=b,c');
assert_equals(params.toString(), 'a=b%2Cc');
params.append('x', 'y');
assert_equals(url.toString(), 'http://www.example.com/?a=b%2Cc&x=y');
assert_equals(params.toString(), 'a=b%2Cc&x=y');
}, 'URLSearchParams connected to URL');
test(() => {
const url = new URL('http://www.example.com/');
const params = url.searchParams;
params.append('a\nb', 'c\rd');
params.append('e\n\rf', 'g\r\nh');
assert_equals(params.toString(), "a%0Ab=c%0Dd&e%0A%0Df=g%0D%0Ah");
}, 'URLSearchParams must not do newline normalization');