Add URL parsing tests from WHATWG (#3188)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Tom Christie · committed by GitHub · parent 92e9dfb · Browse files · 4 files·+9819 added−23 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Trailers
- Co-authored-by: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com>
Diff stats
4 files+9819 added−23 removed
- tests:+9802 added−10 removed
- other:+17 added−13 removed
Provenance
- Commit
db9072f- Tree
8731486- Author
Tom Christie <tom@tomchristie.com>- Committer
GitHub <noreply@github.com>- Parent
92e9dfb
4 files changed+9819 added−23 removed
modified:httpx/_urlparse.py+17 added-13 removed
251 unmodified lines252 has_authority = (253 parsed_userinfo != "" or parsed_host != "" or parsed_port is not None254 )255 validate_path(path, has_scheme=has_scheme, has_authority=has_authority)256- if has_authority:256+ if has_scheme or has_authority:257 path = normalize_path(path)258 259 # The GEN_DELIMS set is... : / ? # [ ] @260 # These do not need to be percent-quoted unless they serve as delimiters for the261 # specific component.262+ WHATWG_SAFE = '`{}%|^\\"'263 264 # For 'path' we need to drop ? and # from the GEN_DELIMS set.264- parsed_path: str = quote(path, safe=SUB_DELIMS + ":/[]@")265+ parsed_path: str = quote(path, safe=SUB_DELIMS + WHATWG_SAFE + ":/[]@")266 # For 'query' we need to drop '#' from the GEN_DELIMS set.267 parsed_query: str | None = (267- None if query is None else quote(query, safe=SUB_DELIMS + ":/?[]@")268+ None269+ if query is None270+ else quote(query, safe=SUB_DELIMS + WHATWG_SAFE + ":/?[]@")271 )272 # For 'fragment' we can include all of the GEN_DELIMS set.273 parsed_fragment: str | None = (271- None if fragment is None else quote(fragment, safe=SUB_DELIMS + ":/?#[]@")274+ None275+ if fragment is None276+ else quote(fragment, safe=SUB_DELIMS + WHATWG_SAFE + ":/?#[]@")277 )278 279 # The parsed ASCII bytestrings are our canonical form.280 # All properties of the URL are derived from these.44 unmodified lines325 #326 # From https://datatracker.ietf.org/doc/html/rfc3986/#section-3.2.2327 #328 # reg-name = *( unreserved / pct-encoded / sub-delims )329+ WHATWG_SAFE = '"`{}%|\\'324- return quote(host.lower(), safe=SUB_DELIMS)330+ return quote(host.lower(), safe=SUB_DELIMS + WHATWG_SAFE)331 332 # IDNA hostnames333 try:334 return idna.encode(host.lower()).decode("ascii")39 unmodified lines374 # If a URI contains an authority component, then the path component375 # must either be empty or begin with a slash ("/") character."376 if path and not path.startswith("/"):377 raise InvalidURL("For absolute URLs, path must be empty or begin with '/'")372- else:378+379+ if not has_scheme and not has_authority:380 # If a URI does not contain an authority component, then the path cannot begin381 # with two slash characters ("//").382 if path.startswith("//"):376- raise InvalidURL(377- "URLs with no authority component cannot have a path starting with '//'"378- )383+ raise InvalidURL("Relative URLs cannot have a path starting with '//'")384+385 # In addition, a URI reference (Section 4.1) may be a relative-path reference,386 # in which case the first path segment cannot contain a colon (":") character.381- if path.startswith(":") and not has_scheme:382- raise InvalidURL(383- "URLs with no scheme component cannot have a path starting with ':'"384- )387+ if path.startswith(":"):388+ raise InvalidURL("Relative URLs cannot have a path starting with ':'")389 390 391 def normalize_path(path: str) -> str:392 """102 unmodified linesmodified:tests/models/test_url.py+4 added-10 removed
228 unmodified lines229 assert url.host == "example.com"230 231 232 def test_url_percent_escape_host():233- url = httpx.URL("https://exam%le.com/")234- assert url.host == "exam%25le.com"233+ url = httpx.URL("https://exam le.com/")234+ assert url.host == "exam%20le.com"235 236 237 def test_url_ipv4_like_host():238 """rare host names used to quality as IPv4"""175 unmodified lines414 assert str(exc.value) == "For absolute URLs, path must be empty or begin with '/'"415 416 with pytest.raises(httpx.InvalidURL) as exc:417 httpx.URL(path="//abc")418- assert (419- str(exc.value)420- == "URLs with no authority component cannot have a path starting with '//'"421- )418+ assert str(exc.value) == "Relative URLs cannot have a path starting with '//'"419 420 with pytest.raises(httpx.InvalidURL) as exc:421 httpx.URL(path=":abc")425- assert (426- str(exc.value)427- == "URLs with no scheme component cannot have a path starting with ':'"428- )422+ assert str(exc.value) == "Relative URLs cannot have a path starting with ':'"423 424 425 def test_url_with_relative_path():426 # This path would be invalid for an absolute URL, but is valid as a relative URL.455 unmodified linesadded:tests/models/test_whatwg.py+52 added
1+# The WHATWG have various tests that can be used to validate the URL parsing.2+#3+# https://url.spec.whatwg.org/4+5+import json6+7+import pytest8+9+from httpx._urlparse import urlparse10+11+# URL test cases from...12+# https://github.com/web-platform-tests/wpt/blob/master/url/resources/urltestdata.json13+with open("tests/models/whatwg.json", "r") as input:14+ test_cases = json.load(input)15+ test_cases = [16+ item17+ for item in test_cases18+ if not isinstance(item, str) and not item.get("failure")19+ ]20+21+22+@pytest.mark.parametrize("test_case", test_cases)23+def test_urlparse(test_case):24+ if test_case["href"] in ("a: foo.com", "lolscheme:x x#x%20x"):25+ # Skip these two test cases.26+ # WHATWG cases where are not using percent-encoding for the space character.27+ # Anyone know what's going on here?28+ return29+30+ p = urlparse(test_case["href"])31+32+ # Test cases include the protocol with the trailing ":"33+ protocol = p.scheme + ":"34+ # Include the square brackets for IPv6 addresses.35+ hostname = f"[{p.host}]" if ":" in p.host else p.host36+ # The test cases use a string representation of the port.37+ port = "" if p.port is None else str(p.port)38+ # I have nothing to say about this one.39+ path = p.path40+ # The 'search' and 'hash' components in the whatwg tests are semantic, not literal.41+ # Our parsing differentiates between no query/hash and empty-string query/hash.42+ search = "" if p.query in (None, "") else "?" + str(p.query)43+ hash = "" if p.fragment in (None, "") else "#" + str(p.fragment)44+45+ # URL hostnames are case-insensitive.46+ # We normalize these, unlike the WHATWG test cases.47+ assert protocol == test_case["protocol"]48+ assert hostname.lower() == test_case["hostname"].lower()49+ assert port == test_case["port"]50+ assert path == test_case["pathname"]51+ assert search == test_case["search"]52+ assert hash == test_case["hash"]added:tests/models/whatwg.json+9746 added
1+[2+ "See ../README.md for a description of the format.",3+ {4+ "input": "http://example\t.\norg",5+ "base": "http://example.org/foo/bar",6+ "href": "http://example.org/",7+ "origin": "http://example.org",8+ "protocol": "http:",9+ "username": "",10+ "password": "",11+ "host": "example.org",12+ "hostname": "example.org",13+ "port": "",14+ "pathname": "/",15+ "search": "",16+ "hash": ""17+ },18+ {19+ "input": "http://user:pass@foo:21/bar;par?b#c",20+ "base": "http://example.org/foo/bar",21+ "href": "http://user:pass@foo:21/bar;par?b#c",22+ "origin": "http://foo:21",23+ "protocol": "http:",24+ "username": "user",25+ "password": "pass",26+ "host": "foo:21",27+ "hostname": "foo",28+ "port": "21",29+ "pathname": "/bar;par",30+ "search": "?b",31+ "hash": "#c"32+ },33+ {34+ "input": "https://test:@test",35+ "base": null,36+ "href": "https://test@test/",37+ "origin": "https://test",38+ "protocol": "https:",39+ "username": "test",40+ "password": "",41+ "host": "test",42+ "hostname": "test",43+ "port": "",44+ "pathname": "/",45+ "search": "",46+ "hash": ""47+ },48+ {49+ "input": "https://:@test",50+ "base": null,51+ "href": "https://test/",52+ "origin": "https://test",53+ "protocol": "https:",54+ "username": "",55+ "password": "",56+ "host": "test",57+ "hostname": "test",58+ "port": "",59+ "pathname": "/",60+ "search": "",61+ "hash": ""62+ },63+ {64+ "input": "non-special://test:@test/x",65+ "base": null,66+ "href": "non-special://test@test/x",67+ "origin": "null",68+ "protocol": "non-special:",69+ "username": "test",70+ "password": "",71+ "host": "test",72+ "hostname": "test",73+ "port": "",74+ "pathname": "/x",75+ "search": "",76+ "hash": ""77+ },78+ {79+ "input": "non-special://:@test/x",80+ "base": null,81+ "href": "non-special://test/x",82+ "origin": "null",83+ "protocol": "non-special:",84+ "username": "",85+ "password": "",86+ "host": "test",87+ "hostname": "test",88+ "port": "",89+ "pathname": "/x",90+ "search": "",91+ "hash": ""92+ },93+ {94+ "input": "http:foo.com",95+ "base": "http://example.org/foo/bar",96+ "href": "http://example.org/foo/foo.com",97+ "origin": "http://example.org",98+ "protocol": "http:",99+ "username": "",100+ "password": "",101+ "host": "example.org",102+ "hostname": "example.org",103+ "port": "",104+ "pathname": "/foo/foo.com",105+ "search": "",106+ "hash": ""107+ },108+ {109+ "input": "\t :foo.com \n",110+ "base": "http://example.org/foo/bar",111+ "href": "http://example.org/foo/:foo.com",112+ "origin": "http://example.org",113+ "protocol": "http:",114+ "username": "",115+ "password": "",116+ "host": "example.org",117+ "hostname": "example.org",118+ "port": "",119+ "pathname": "/foo/:foo.com",120+ "search": "",121+ "hash": ""122+ },123+ {124+ "input": " foo.com ",125+ "base": "http://example.org/foo/bar",126+ "href": "http://example.org/foo/foo.com",127+ "origin": "http://example.org",128+ "protocol": "http:",129+ "username": "",130+ "password": "",131+ "host": "example.org",132+ "hostname": "example.org",133+ "port": "",134+ "pathname": "/foo/foo.com",135+ "search": "",136+ "hash": ""137+ },138+ {139+ "input": "a:\t foo.com",140+ "base": "http://example.org/foo/bar",141+ "href": "a: foo.com",142+ "origin": "null",143+ "protocol": "a:",144+ "username": "",145+ "password": "",146+ "host": "",147+ "hostname": "",148+ "port": "",149+ "pathname": " foo.com",150+ "search": "",151+ "hash": ""152+ },153+ {154+ "input": "http://f:21/ b ? d # e ",155+ "base": "http://example.org/foo/bar",156+ "href": "http://f:21/%20b%20?%20d%20#%20e",157+ "origin": "http://f:21",158+ "protocol": "http:",159+ "username": "",160+ "password": "",161+ "host": "f:21",162+ "hostname": "f",163+ "port": "21",164+ "pathname": "/%20b%20",165+ "search": "?%20d%20",166+ "hash": "#%20e"167+ },168+ {169+ "input": "lolscheme:x x#x x",170+ "base": null,171+ "href": "lolscheme:x x#x%20x",172+ "protocol": "lolscheme:",173+ "username": "",174+ "password": "",175+ "host": "",176+ "hostname": "",177+ "port": "",178+ "pathname": "x x",179+ "search": "",180+ "hash": "#x%20x"181+ },182+ {183+ "input": "http://f:/c",184+ "base": "http://example.org/foo/bar",185+ "href": "http://f/c",186+ "origin": "http://f",187+ "protocol": "http:",188+ "username": "",189+ "password": "",190+ "host": "f",191+ "hostname": "f",192+ "port": "",193+ "pathname": "/c",194+ "search": "",195+ "hash": ""196+ },197+ {198+ "input": "http://f:0/c",199+ "base": "http://example.org/foo/bar",200+ "href": "http://f:0/c",201+ "origin": "http://f:0",202+ "protocol": "http:",203+ "username": "",204+ "password": "",205+ "host": "f:0",206+ "hostname": "f",207+ "port": "0",208+ "pathname": "/c",209+ "search": "",210+ "hash": ""211+ },212+ {213+ "input": "http://f:00000000000000/c",214+ "base": "http://example.org/foo/bar",215+ "href": "http://f:0/c",216+ "origin": "http://f:0",217+ "protocol": "http:",218+ "username": "",219+ "password": "",220+ "host": "f:0",221+ "hostname": "f",222+ "port": "0",223+ "pathname": "/c",224+ "search": "",225+ "hash": ""226+ },227+ {228+ "input": "http://f:00000000000000000000080/c",229+ "base": "http://example.org/foo/bar",230+ "href": "http://f/c",231+ "origin": "http://f",232+ "protocol": "http:",233+ "username": "",234+ "password": "",235+ "host": "f",236+ "hostname": "f",237+ "port": "",238+ "pathname": "/c",239+ "search": "",240+ "hash": ""241+ },242+ {243+ "input": "http://f:b/c",244+ "base": "http://example.org/foo/bar",245+ "failure": true246+ },247+ {248+ "input": "http://f: /c",249+ "base": "http://example.org/foo/bar",250+ "failure": true251+ },252+ {253+ "input": "http://f:\n/c",254+ "base": "http://example.org/foo/bar",255+ "href": "http://f/c",256+ "origin": "http://f",257+ "protocol": "http:",258+ "username": "",259+ "password": "",260+ "host": "f",261+ "hostname": "f",262+ "port": "",263+ "pathname": "/c",264+ "search": "",265+ "hash": ""266+ },267+ {268+ "input": "http://f:fifty-two/c",269+ "base": "http://example.org/foo/bar",270+ "failure": true271+ },272+ {273+ "input": "http://f:999999/c",274+ "base": "http://example.org/foo/bar",275+ "failure": true276+ },277+ {278+ "input": "non-special://f:999999/c",279+ "base": "http://example.org/foo/bar",280+ "failure": true281+ },282+ {283+ "input": "http://f: 21 / b ? d # e ",284+ "base": "http://example.org/foo/bar",285+ "failure": true286+ },287+ {288+ "input": "",289+ "base": "http://example.org/foo/bar",290+ "href": "http://example.org/foo/bar",291+ "origin": "http://example.org",292+ "protocol": "http:",293+ "username": "",294+ "password": "",295+ "host": "example.org",296+ "hostname": "example.org",297+ "port": "",298+ "pathname": "/foo/bar",299+ "search": "",300+ "hash": ""301+ },302+ {303+ "input": " \t",304+ "base": "http://example.org/foo/bar",305+ "href": "http://example.org/foo/bar",306+ "origin": "http://example.org",307+ "protocol": "http:",308+ "username": "",309+ "password": "",310+ "host": "example.org",311+ "hostname": "example.org",312+ "port": "",313+ "pathname": "/foo/bar",314+ "search": "",315+ "hash": ""316+ },317+ {318+ "input": ":foo.com/",319+ "base": "http://example.org/foo/bar",320+ "href": "http://example.org/foo/:foo.com/",321+ "origin": "http://example.org",322+ "protocol": "http:",323+ "username": "",324+ "password": "",325+ "host": "example.org",326+ "hostname": "example.org",327+ "port": "",328+ "pathname": "/foo/:foo.com/",329+ "search": "",330+ "hash": ""331+ },332+ {333+ "input": ":foo.com\\",334+ "base": "http://example.org/foo/bar",335+ "href": "http://example.org/foo/:foo.com/",336+ "origin": "http://example.org",337+ "protocol": "http:",338+ "username": "",339+ "password": "",340+ "host": "example.org",341+ "hostname": "example.org",342+ "port": "",343+ "pathname": "/foo/:foo.com/",344+ "search": "",345+ "hash": ""346+ },347+ {348+ "input": ":",349+ "base": "http://example.org/foo/bar",350+ "href": "http://example.org/foo/:",351+ "origin": "http://example.org",352+ "protocol": "http:",353+ "username": "",354+ "password": "",355+ "host": "example.org",356+ "hostname": "example.org",357+ "port": "",358+ "pathname": "/foo/:",359+ "search": "",360+ "hash": ""361+ },362+ {363+ "input": ":a",364+ "base": "http://example.org/foo/bar",365+ "href": "http://example.org/foo/:a",366+ "origin": "http://example.org",367+ "protocol": "http:",368+ "username": "",369+ "password": "",370+ "host": "example.org",371+ "hostname": "example.org",372+ "port": "",373+ "pathname": "/foo/:a",374+ "search": "",375+ "hash": ""376+ },377+ {378+ "input": ":/",379+ "base": "http://example.org/foo/bar",380+ "href": "http://example.org/foo/:/",381+ "origin": "http://example.org",382+ "protocol": "http:",383+ "username": "",384+ "password": "",385+ "host": "example.org",386+ "hostname": "example.org",387+ "port": "",388+ "pathname": "/foo/:/",389+ "search": "",390+ "hash": ""391+ },392+ {393+ "input": ":\\",394+ "base": "http://example.org/foo/bar",395+ "href": "http://example.org/foo/:/",396+ "origin": "http://example.org",397+ "protocol": "http:",398+ "username": "",399+ "password": "",400+ "host": "example.org",401+ "hostname": "example.org",402+ "port": "",403+ "pathname": "/foo/:/",404+ "search": "",405+ "hash": ""406+ },407+ {408+ "input": ":#",409+ "base": "http://example.org/foo/bar",410+ "href": "http://example.org/foo/:#",411+ "origin": "http://example.org",412+ "protocol": "http:",413+ "username": "",414+ "password": "",415+ "host": "example.org",416+ "hostname": "example.org",417+ "port": "",418+ "pathname": "/foo/:",419+ "search": "",420+ "hash": ""421+ },422+ {423+ "input": "#",424+ "base": "http://example.org/foo/bar",425+ "href": "http://example.org/foo/bar#",426+ "origin": "http://example.org",427+ "protocol": "http:",428+ "username": "",429+ "password": "",430+ "host": "example.org",431+ "hostname": "example.org",432+ "port": "",433+ "pathname": "/foo/bar",434+ "search": "",435+ "hash": ""436+ },437+ {438+ "input": "#/",439+ "base": "http://example.org/foo/bar",440+ "href": "http://example.org/foo/bar#/",441+ "origin": "http://example.org",442+ "protocol": "http:",443+ "username": "",444+ "password": "",445+ "host": "example.org",446+ "hostname": "example.org",447+ "port": "",448+ "pathname": "/foo/bar",449+ "search": "",450+ "hash": "#/"451+ },452+ {453+ "input": "#\\",454+ "base": "http://example.org/foo/bar",455+ "href": "http://example.org/foo/bar#\\",456+ "origin": "http://example.org",457+ "protocol": "http:",458+ "username": "",459+ "password": "",460+ "host": "example.org",461+ "hostname": "example.org",462+ "port": "",463+ "pathname": "/foo/bar",464+ "search": "",465+ "hash": "#\\"466+ },467+ {468+ "input": "#;?",469+ "base": "http://example.org/foo/bar",470+ "href": "http://example.org/foo/bar#;?",471+ "origin": "http://example.org",472+ "protocol": "http:",473+ "username": "",474+ "password": "",475+ "host": "example.org",476+ "hostname": "example.org",477+ "port": "",478+ "pathname": "/foo/bar",479+ "search": "",480+ "hash": "#;?"481+ },482+ {483+ "input": "?",484+ "base": "http://example.org/foo/bar",485+ "href": "http://example.org/foo/bar?",486+ "origin": "http://example.org",487+ "protocol": "http:",488+ "username": "",489+ "password": "",490+ "host": "example.org",491+ "hostname": "example.org",492+ "port": "",493+ "pathname": "/foo/bar",494+ "search": "",495+ "hash": ""496+ },497+ {498+ "input": "/",499+ "base": "http://example.org/foo/bar",500+ "href": "http://example.org/",501+ "origin": "http://example.org",502+ "protocol": "http:",503+ "username": "",504+ "password": "",505+ "host": "example.org",506+ "hostname": "example.org",507+ "port": "",508+ "pathname": "/",509+ "search": "",510+ "hash": ""511+ },512+ {513+ "input": ":23",514+ "base": "http://example.org/foo/bar",515+ "href": "http://example.org/foo/:23",516+ "origin": "http://example.org",517+ "protocol": "http:",518+ "username": "",519+ "password": "",520+ "host": "example.org",521+ "hostname": "example.org",522+ "port": "",523+ "pathname": "/foo/:23",524+ "search": "",525+ "hash": ""526+ },527+ {528+ "input": "/:23",529+ "base": "http://example.org/foo/bar",530+ "href": "http://example.org/:23",531+ "origin": "http://example.org",532+ "protocol": "http:",533+ "username": "",534+ "password": "",535+ "host": "example.org",536+ "hostname": "example.org",537+ "port": "",538+ "pathname": "/:23",539+ "search": "",540+ "hash": ""541+ },542+ {543+ "input": "\\x",544+ "base": "http://example.org/foo/bar",545+ "href": "http://example.org/x",546+ "origin": "http://example.org",547+ "protocol": "http:",548+ "username": "",549+ "password": "",550+ "host": "example.org",551+ "hostname": "example.org",552+ "port": "",553+ "pathname": "/x",554+ "search": "",555+ "hash": ""556+ },557+ {558+ "input": "\\\\x\\hello",559+ "base": "http://example.org/foo/bar",560+ "href": "http://x/hello",561+ "origin": "http://x",562+ "protocol": "http:",563+ "username": "",564+ "password": "",565+ "host": "x",566+ "hostname": "x",567+ "port": "",568+ "pathname": "/hello",569+ "search": "",570+ "hash": ""571+ },572+ {573+ "input": "::",574+ "base": "http://example.org/foo/bar",575+ "href": "http://example.org/foo/::",576+ "origin": "http://example.org",577+ "protocol": "http:",578+ "username": "",579+ "password": "",580+ "host": "example.org",581+ "hostname": "example.org",582+ "port": "",583+ "pathname": "/foo/::",584+ "search": "",585+ "hash": ""586+ },587+ {588+ "input": "::23",589+ "base": "http://example.org/foo/bar",590+ "href": "http://example.org/foo/::23",591+ "origin": "http://example.org",592+ "protocol": "http:",593+ "username": "",594+ "password": "",595+ "host": "example.org",596+ "hostname": "example.org",597+ "port": "",598+ "pathname": "/foo/::23",599+ "search": "",600+ "hash": ""601+ },602+ {603+ "input": "foo://",604+ "base": "http://example.org/foo/bar",605+ "href": "foo://",606+ "origin": "null",607+ "protocol": "foo:",608+ "username": "",609+ "password": "",610+ "host": "",611+ "hostname": "",612+ "port": "",613+ "pathname": "",614+ "search": "",615+ "hash": ""616+ },617+ {618+ "input": "http://a:b@c:29/d",619+ "base": "http://example.org/foo/bar",620+ "href": "http://a:b@c:29/d",621+ "origin": "http://c:29",622+ "protocol": "http:",623+ "username": "a",624+ "password": "b",625+ "host": "c:29",626+ "hostname": "c",627+ "port": "29",628+ "pathname": "/d",629+ "search": "",630+ "hash": ""631+ },632+ {633+ "input": "http::@c:29",634+ "base": "http://example.org/foo/bar",635+ "href": "http://example.org/foo/:@c:29",636+ "origin": "http://example.org",637+ "protocol": "http:",638+ "username": "",639+ "password": "",640+ "host": "example.org",641+ "hostname": "example.org",642+ "port": "",643+ "pathname": "/foo/:@c:29",644+ "search": "",645+ "hash": ""646+ },647+ {648+ "input": "http://&a:foo(b]c@d:2/",649+ "base": "http://example.org/foo/bar",650+ "href": "http://&a:foo(b%5Dc@d:2/",651+ "origin": "http://d:2",652+ "protocol": "http:",653+ "username": "&a",654+ "password": "foo(b%5Dc",655+ "host": "d:2",656+ "hostname": "d",657+ "port": "2",658+ "pathname": "/",659+ "search": "",660+ "hash": ""661+ },662+ {663+ "input": "http://::@c@d:2",664+ "base": "http://example.org/foo/bar",665+ "href": "http://:%3A%40c@d:2/",666+ "origin": "http://d:2",667+ "protocol": "http:",668+ "username": "",669+ "password": "%3A%40c",670+ "host": "d:2",671+ "hostname": "d",672+ "port": "2",673+ "pathname": "/",674+ "search": "",675+ "hash": ""676+ },677+ {678+ "input": "http://foo.com:b@d/",679+ "base": "http://example.org/foo/bar",680+ "href": "http://foo.com:b@d/",681+ "origin": "http://d",682+ "protocol": "http:",683+ "username": "foo.com",684+ "password": "b",685+ "host": "d",686+ "hostname": "d",687+ "port": "",688+ "pathname": "/",689+ "search": "",690+ "hash": ""691+ },692+ {693+ "input": "http://foo.com/\\@",694+ "base": "http://example.org/foo/bar",695+ "href": "http://foo.com//@",696+ "origin": "http://foo.com",697+ "protocol": "http:",698+ "username": "",699+ "password": "",700+ "host": "foo.com",701+ "hostname": "foo.com",702+ "port": "",703+ "pathname": "//@",704+ "search": "",705+ "hash": ""706+ },707+ {708+ "input": "http:\\\\foo.com\\",709+ "base": "http://example.org/foo/bar",710+ "href": "http://foo.com/",711+ "origin": "http://foo.com",712+ "protocol": "http:",713+ "username": "",714+ "password": "",715+ "host": "foo.com",716+ "hostname": "foo.com",717+ "port": "",718+ "pathname": "/",719+ "search": "",720+ "hash": ""721+ },722+ {723+ "input": "http:\\\\a\\b:c\\d@foo.com\\",724+ "base": "http://example.org/foo/bar",725+ "href": "http://a/b:c/d@foo.com/",726+ "origin": "http://a",727+ "protocol": "http:",728+ "username": "",729+ "password": "",730+ "host": "a",731+ "hostname": "a",732+ "port": "",733+ "pathname": "/b:c/d@foo.com/",734+ "search": "",735+ "hash": ""736+ },737+ {738+ "input": "http://a:b@c\\",739+ "base": null,740+ "href": "http://a:b@c/",741+ "origin": "http://c",742+ "protocol": "http:",743+ "username": "a",744+ "password": "b",745+ "host": "c",746+ "hostname": "c",747+ "port": "",748+ "pathname": "/",749+ "search": "",750+ "hash": ""751+ },752+ {753+ "input": "ws://a@b\\c",754+ "base": null,755+ "href": "ws://a@b/c",756+ "origin": "ws://b",757+ "protocol": "ws:",758+ "username": "a",759+ "password": "",760+ "host": "b",761+ "hostname": "b",762+ "port": "",763+ "pathname": "/c",764+ "search": "",765+ "hash": ""766+ },767+ {768+ "input": "foo:/",769+ "base": "http://example.org/foo/bar",770+ "href": "foo:/",771+ "origin": "null",772+ "protocol": "foo:",773+ "username": "",774+ "password": "",775+ "host": "",776+ "hostname": "",777+ "port": "",778+ "pathname": "/",779+ "search": "",780+ "hash": ""781+ },782+ {783+ "input": "foo:/bar.com/",784+ "base": "http://example.org/foo/bar",785+ "href": "foo:/bar.com/",786+ "origin": "null",787+ "protocol": "foo:",788+ "username": "",789+ "password": "",790+ "host": "",791+ "hostname": "",792+ "port": "",793+ "pathname": "/bar.com/",794+ "search": "",795+ "hash": ""796+ },797+ {798+ "input": "foo://///////",799+ "base": "http://example.org/foo/bar",800+ "href": "foo://///////",801+ "origin": "null",802+ "protocol": "foo:",803+ "username": "",804+ "password": "",805+ "host": "",806+ "hostname": "",807+ "port": "",808+ "pathname": "///////",809+ "search": "",810+ "hash": ""811+ },812+ {813+ "input": "foo://///////bar.com/",814+ "base": "http://example.org/foo/bar",815+ "href": "foo://///////bar.com/",816+ "origin": "null",817+ "protocol": "foo:",818+ "username": "",819+ "password": "",820+ "host": "",821+ "hostname": "",822+ "port": "",823+ "pathname": "///////bar.com/",824+ "search": "",825+ "hash": ""826+ },827+ {828+ "input": "foo:////://///",829+ "base": "http://example.org/foo/bar",830+ "href": "foo:////://///",831+ "origin": "null",832+ "protocol": "foo:",833+ "username": "",834+ "password": "",835+ "host": "",836+ "hostname": "",837+ "port": "",838+ "pathname": "//://///",839+ "search": "",840+ "hash": ""841+ },842+ {843+ "input": "c:/foo",844+ "base": "http://example.org/foo/bar",845+ "href": "c:/foo",846+ "origin": "null",847+ "protocol": "c:",848+ "username": "",849+ "password": "",850+ "host": "",851+ "hostname": "",852+ "port": "",853+ "pathname": "/foo",854+ "search": "",855+ "hash": ""856+ },857+ {858+ "input": "//foo/bar",859+ "base": "http://example.org/foo/bar",860+ "href": "http://foo/bar",861+ "origin": "http://foo",862+ "protocol": "http:",863+ "username": "",864+ "password": "",865+ "host": "foo",866+ "hostname": "foo",867+ "port": "",868+ "pathname": "/bar",869+ "search": "",870+ "hash": ""871+ },872+ {873+ "input": "http://foo/path;a??e#f#g",874+ "base": "http://example.org/foo/bar",875+ "href": "http://foo/path;a??e#f#g",876+ "origin": "http://foo",877+ "protocol": "http:",878+ "username": "",879+ "password": "",880+ "host": "foo",881+ "hostname": "foo",882+ "port": "",883+ "pathname": "/path;a",884+ "search": "??e",885+ "hash": "#f#g"886+ },887+ {888+ "input": "http://foo/abcd?efgh?ijkl",889+ "base": "http://example.org/foo/bar",890+ "href": "http://foo/abcd?efgh?ijkl",891+ "origin": "http://foo",892+ "protocol": "http:",893+ "username": "",894+ "password": "",895+ "host": "foo",896+ "hostname": "foo",897+ "port": "",898+ "pathname": "/abcd",899+ "search": "?efgh?ijkl",900+ "hash": ""901+ },902+ {903+ "input": "http://foo/abcd#foo?bar",904+ "base": "http://example.org/foo/bar",905+ "href": "http://foo/abcd#foo?bar",906+ "origin": "http://foo",907+ "protocol": "http:",908+ "username": "",909+ "password": "",910+ "host": "foo",911+ "hostname": "foo",912+ "port": "",913+ "pathname": "/abcd",914+ "search": "",915+ "hash": "#foo?bar"916+ },917+ {918+ "input": "[61:24:74]:98",919+ "base": "http://example.org/foo/bar",920+ "href": "http://example.org/foo/[61:24:74]:98",921+ "origin": "http://example.org",922+ "protocol": "http:",923+ "username": "",924+ "password": "",925+ "host": "example.org",926+ "hostname": "example.org",927+ "port": "",928+ "pathname": "/foo/[61:24:74]:98",929+ "search": "",930+ "hash": ""931+ },932+ {933+ "input": "http:[61:27]/:foo",934+ "base": "http://example.org/foo/bar",935+ "href": "http://example.org/foo/[61:27]/:foo",936+ "origin": "http://example.org",937+ "protocol": "http:",938+ "username": "",939+ "password": "",940+ "host": "example.org",941+ "hostname": "example.org",942+ "port": "",943+ "pathname": "/foo/[61:27]/:foo",944+ "search": "",945+ "hash": ""946+ },947+ {948+ "input": "http://[1::2]:3:4",949+ "base": "http://example.org/foo/bar",950+ "failure": true951+ },952+ {953+ "input": "http://2001::1",954+ "base": "http://example.org/foo/bar",955+ "failure": true956+ },957+ {958+ "input": "http://2001::1]",959+ "base": "http://example.org/foo/bar",960+ "failure": true961+ },962+ {963+ "input": "http://2001::1]:80",964+ "base": "http://example.org/foo/bar",965+ "failure": true966+ },967+ {968+ "input": "http://[2001::1]",969+ "base": "http://example.org/foo/bar",970+ "href": "http://[2001::1]/",971+ "origin": "http://[2001::1]",972+ "protocol": "http:",973+ "username": "",974+ "password": "",975+ "host": "[2001::1]",976+ "hostname": "[2001::1]",977+ "port": "",978+ "pathname": "/",979+ "search": "",980+ "hash": ""981+ },982+ {983+ "input": "http://[::127.0.0.1]",984+ "base": "http://example.org/foo/bar",985+ "href": "http://[::7f00:1]/",986+ "origin": "http://[::7f00:1]",987+ "protocol": "http:",988+ "username": "",989+ "password": "",990+ "host": "[::7f00:1]",991+ "hostname": "[::7f00:1]",992+ "port": "",993+ "pathname": "/",994+ "search": "",995+ "hash": ""996+ },997+ {998+ "input": "http://[::127.0.0.1.]",999+ "base": "http://example.org/foo/bar",1000+ "failure": true1001+ },1002+ {1003+ "input": "http://[0:0:0:0:0:0:13.1.68.3]",1004+ "base": "http://example.org/foo/bar",1005+ "href": "http://[::d01:4403]/",1006+ "origin": "http://[::d01:4403]",1007+ "protocol": "http:",1008+ "username": "",1009+ "password": "",1010+ "host": "[::d01:4403]",1011+ "hostname": "[::d01:4403]",1012+ "port": "",1013+ "pathname": "/",1014+ "search": "",1015+ "hash": ""1016+ },1017+ {1018+ "input": "http://[2001::1]:80",1019+ "base": "http://example.org/foo/bar",1020+ "href": "http://[2001::1]/",1021+ "origin": "http://[2001::1]",1022+ "protocol": "http:",1023+ "username": "",1024+ "password": "",1025+ "host": "[2001::1]",1026+ "hostname": "[2001::1]",1027+ "port": "",1028+ "pathname": "/",1029+ "search": "",1030+ "hash": ""1031+ },1032+ {1033+ "input": "http:/example.com/",1034+ "base": "http://example.org/foo/bar",1035+ "href": "http://example.org/example.com/",1036+ "origin": "http://example.org",1037+ "protocol": "http:",1038+ "username": "",1039+ "password": "",1040+ "host": "example.org",1041+ "hostname": "example.org",1042+ "port": "",1043+ "pathname": "/example.com/",1044+ "search": "",1045+ "hash": ""1046+ },1047+ {1048+ "input": "ftp:/example.com/",1049+ "base": "http://example.org/foo/bar",1050+ "href": "ftp://example.com/",1051+ "origin": "ftp://example.com",1052+ "protocol": "ftp:",1053+ "username": "",1054+ "password": "",1055+ "host": "example.com",1056+ "hostname": "example.com",1057+ "port": "",1058+ "pathname": "/",1059+ "search": "",1060+ "hash": ""1061+ },1062+ {1063+ "input": "https:/example.com/",1064+ "base": "http://example.org/foo/bar",1065+ "href": "https://example.com/",1066+ "origin": "https://example.com",1067+ "protocol": "https:",1068+ "username": "",1069+ "password": "",1070+ "host": "example.com",1071+ "hostname": "example.com",1072+ "port": "",1073+ "pathname": "/",1074+ "search": "",1075+ "hash": ""1076+ },1077+ {1078+ "input": "madeupscheme:/example.com/",1079+ "base": "http://example.org/foo/bar",1080+ "href": "madeupscheme:/example.com/",1081+ "origin": "null",1082+ "protocol": "madeupscheme:",1083+ "username": "",1084+ "password": "",1085+ "host": "",1086+ "hostname": "",1087+ "port": "",1088+ "pathname": "/example.com/",1089+ "search": "",1090+ "hash": ""1091+ },1092+ {1093+ "input": "file:/example.com/",1094+ "base": "http://example.org/foo/bar",1095+ "href": "file:///example.com/",1096+ "protocol": "file:",1097+ "username": "",1098+ "password": "",1099+ "host": "",1100+ "hostname": "",1101+ "port": "",1102+ "pathname": "/example.com/",1103+ "search": "",1104+ "hash": ""1105+ },1106+ {1107+ "input": "file://example:1/",1108+ "base": null,1109+ "failure": true1110+ },1111+ {1112+ "input": "file://example:test/",1113+ "base": null,1114+ "failure": true1115+ },1116+ {1117+ "input": "file://example%/",1118+ "base": null,1119+ "failure": true1120+ },1121+ {1122+ "input": "file://[example]/",1123+ "base": null,1124+ "failure": true1125+ },1126+ {1127+ "input": "ftps:/example.com/",1128+ "base": "http://example.org/foo/bar",1129+ "href": "ftps:/example.com/",1130+ "origin": "null",1131+ "protocol": "ftps:",1132+ "username": "",1133+ "password": "",1134+ "host": "",1135+ "hostname": "",1136+ "port": "",1137+ "pathname": "/example.com/",1138+ "search": "",1139+ "hash": ""1140+ },1141+ {1142+ "input": "gopher:/example.com/",1143+ "base": "http://example.org/foo/bar",1144+ "href": "gopher:/example.com/",1145+ "origin": "null",1146+ "protocol": "gopher:",1147+ "username": "",1148+ "password": "",1149+ "host": "",1150+ "hostname": "",1151+ "port": "",1152+ "pathname": "/example.com/",1153+ "search": "",1154+ "hash": ""1155+ },1156+ {1157+ "input": "ws:/example.com/",1158+ "base": "http://example.org/foo/bar",1159+ "href": "ws://example.com/",1160+ "origin": "ws://example.com",1161+ "protocol": "ws:",1162+ "username": "",1163+ "password": "",1164+ "host": "example.com",1165+ "hostname": "example.com",1166+ "port": "",1167+ "pathname": "/",1168+ "search": "",1169+ "hash": ""1170+ },1171+ {1172+ "input": "wss:/example.com/",1173+ "base": "http://example.org/foo/bar",1174+ "href": "wss://example.com/",1175+ "origin": "wss://example.com",1176+ "protocol": "wss:",1177+ "username": "",1178+ "password": "",1179+ "host": "example.com",1180+ "hostname": "example.com",1181+ "port": "",1182+ "pathname": "/",1183+ "search": "",1184+ "hash": ""1185+ },1186+ {1187+ "input": "data:/example.com/",1188+ "base": "http://example.org/foo/bar",1189+ "href": "data:/example.com/",1190+ "origin": "null",1191+ "protocol": "data:",1192+ "username": "",1193+ "password": "",1194+ "host": "",1195+ "hostname": "",1196+ "port": "",1197+ "pathname": "/example.com/",1198+ "search": "",1199+ "hash": ""1200+ },1201+ {1202+ "input": "javascript:/example.com/",1203+ "base": "http://example.org/foo/bar",1204+ "href": "javascript:/example.com/",1205+ "origin": "null",1206+ "protocol": "javascript:",1207+ "username": "",1208+ "password": "",1209+ "host": "",1210+ "hostname": "",1211+ "port": "",1212+ "pathname": "/example.com/",1213+ "search": "",1214+ "hash": ""1215+ },1216+ {1217+ "input": "mailto:/example.com/",1218+ "base": "http://example.org/foo/bar",1219+ "href": "mailto:/example.com/",1220+ "origin": "null",1221+ "protocol": "mailto:",1222+ "username": "",1223+ "password": "",1224+ "host": "",1225+ "hostname": "",1226+ "port": "",1227+ "pathname": "/example.com/",1228+ "search": "",1229+ "hash": ""1230+ },1231+ {1232+ "input": "http:example.com/",1233+ "base": "http://example.org/foo/bar",1234+ "href": "http://example.org/foo/example.com/",1235+ "origin": "http://example.org",1236+ "protocol": "http:",1237+ "username": "",1238+ "password": "",1239+ "host": "example.org",1240+ "hostname": "example.org",1241+ "port": "",1242+ "pathname": "/foo/example.com/",1243+ "search": "",1244+ "hash": ""1245+ },1246+ {1247+ "input": "ftp:example.com/",1248+ "base": "http://example.org/foo/bar",1249+ "href": "ftp://example.com/",1250+ "origin": "ftp://example.com",1251+ "protocol": "ftp:",1252+ "username": "",1253+ "password": "",1254+ "host": "example.com",1255+ "hostname": "example.com",1256+ "port": "",1257+ "pathname": "/",1258+ "search": "",1259+ "hash": ""1260+ },1261+ {1262+ "input": "https:example.com/",1263+ "base": "http://example.org/foo/bar",1264+ "href": "https://example.com/",1265+ "origin": "https://example.com",1266+ "protocol": "https:",1267+ "username": "",1268+ "password": "",1269+ "host": "example.com",1270+ "hostname": "example.com",1271+ "port": "",1272+ "pathname": "/",1273+ "search": "",1274+ "hash": ""1275+ },1276+ {1277+ "input": "madeupscheme:example.com/",1278+ "base": "http://example.org/foo/bar",1279+ "href": "madeupscheme:example.com/",1280+ "origin": "null",1281+ "protocol": "madeupscheme:",1282+ "username": "",1283+ "password": "",1284+ "host": "",1285+ "hostname": "",1286+ "port": "",1287+ "pathname": "example.com/",1288+ "search": "",1289+ "hash": ""1290+ },1291+ {1292+ "input": "ftps:example.com/",1293+ "base": "http://example.org/foo/bar",1294+ "href": "ftps:example.com/",1295+ "origin": "null",1296+ "protocol": "ftps:",1297+ "username": "",1298+ "password": "",1299+ "host": "",1300+ "hostname": "",1301+ "port": "",1302+ "pathname": "example.com/",1303+ "search": "",1304+ "hash": ""1305+ },1306+ {1307+ "input": "gopher:example.com/",1308+ "base": "http://example.org/foo/bar",1309+ "href": "gopher:example.com/",1310+ "origin": "null",1311+ "protocol": "gopher:",1312+ "username": "",1313+ "password": "",1314+ "host": "",1315+ "hostname": "",1316+ "port": "",1317+ "pathname": "example.com/",1318+ "search": "",1319+ "hash": ""1320+ },1321+ {1322+ "input": "ws:example.com/",1323+ "base": "http://example.org/foo/bar",1324+ "href": "ws://example.com/",1325+ "origin": "ws://example.com",1326+ "protocol": "ws:",1327+ "username": "",1328+ "password": "",1329+ "host": "example.com",1330+ "hostname": "example.com",1331+ "port": "",1332+ "pathname": "/",1333+ "search": "",1334+ "hash": ""1335+ },1336+ {1337+ "input": "wss:example.com/",1338+ "base": "http://example.org/foo/bar",1339+ "href": "wss://example.com/",1340+ "origin": "wss://example.com",1341+ "protocol": "wss:",1342+ "username": "",1343+ "password": "",1344+ "host": "example.com",1345+ "hostname": "example.com",1346+ "port": "",1347+ "pathname": "/",1348+ "search": "",1349+ "hash": ""1350+ },1351+ {1352+ "input": "data:example.com/",1353+ "base": "http://example.org/foo/bar",1354+ "href": "data:example.com/",1355+ "origin": "null",1356+ "protocol": "data:",1357+ "username": "",1358+ "password": "",1359+ "host": "",1360+ "hostname": "",1361+ "port": "",1362+ "pathname": "example.com/",1363+ "search": "",1364+ "hash": ""1365+ },1366+ {1367+ "input": "javascript:example.com/",1368+ "base": "http://example.org/foo/bar",1369+ "href": "javascript:example.com/",1370+ "origin": "null",1371+ "protocol": "javascript:",1372+ "username": "",1373+ "password": "",1374+ "host": "",1375+ "hostname": "",1376+ "port": "",1377+ "pathname": "example.com/",1378+ "search": "",1379+ "hash": ""1380+ },1381+ {1382+ "input": "mailto:example.com/",1383+ "base": "http://example.org/foo/bar",1384+ "href": "mailto:example.com/",1385+ "origin": "null",1386+ "protocol": "mailto:",1387+ "username": "",1388+ "password": "",1389+ "host": "",1390+ "hostname": "",1391+ "port": "",1392+ "pathname": "example.com/",1393+ "search": "",1394+ "hash": ""1395+ },1396+ {1397+ "input": "/a/b/c",1398+ "base": "http://example.org/foo/bar",1399+ "href": "http://example.org/a/b/c",1400+ "origin": "http://example.org",1401+ "protocol": "http:",1402+ "username": "",1403+ "password": "",1404+ "host": "example.org",1405+ "hostname": "example.org",1406+ "port": "",1407+ "pathname": "/a/b/c",1408+ "search": "",1409+ "hash": ""1410+ },1411+ {1412+ "input": "/a/ /c",1413+ "base": "http://example.org/foo/bar",1414+ "href": "http://example.org/a/%20/c",1415+ "origin": "http://example.org",1416+ "protocol": "http:",1417+ "username": "",1418+ "password": "",1419+ "host": "example.org",1420+ "hostname": "example.org",1421+ "port": "",1422+ "pathname": "/a/%20/c",1423+ "search": "",1424+ "hash": ""1425+ },1426+ {1427+ "input": "/a%2fc",1428+ "base": "http://example.org/foo/bar",1429+ "href": "http://example.org/a%2fc",1430+ "origin": "http://example.org",1431+ "protocol": "http:",1432+ "username": "",1433+ "password": "",1434+ "host": "example.org",1435+ "hostname": "example.org",1436+ "port": "",1437+ "pathname": "/a%2fc",1438+ "search": "",1439+ "hash": ""1440+ },1441+ {1442+ "input": "/a/%2f/c",1443+ "base": "http://example.org/foo/bar",1444+ "href": "http://example.org/a/%2f/c",1445+ "origin": "http://example.org",1446+ "protocol": "http:",1447+ "username": "",1448+ "password": "",1449+ "host": "example.org",1450+ "hostname": "example.org",1451+ "port": "",1452+ "pathname": "/a/%2f/c",1453+ "search": "",1454+ "hash": ""1455+ },1456+ {1457+ "input": "#β",1458+ "base": "http://example.org/foo/bar",1459+ "href": "http://example.org/foo/bar#%CE%B2",1460+ "origin": "http://example.org",1461+ "protocol": "http:",1462+ "username": "",1463+ "password": "",1464+ "host": "example.org",1465+ "hostname": "example.org",1466+ "port": "",1467+ "pathname": "/foo/bar",1468+ "search": "",1469+ "hash": "#%CE%B2"1470+ },1471+ {1472+ "input": "data:text/html,test#test",1473+ "base": "http://example.org/foo/bar",1474+ "href": "data:text/html,test#test",1475+ "origin": "null",1476+ "protocol": "data:",1477+ "username": "",1478+ "password": "",1479+ "host": "",1480+ "hostname": "",1481+ "port": "",1482+ "pathname": "text/html,test",1483+ "search": "",1484+ "hash": "#test"1485+ },1486+ {1487+ "input": "tel:1234567890",1488+ "base": "http://example.org/foo/bar",1489+ "href": "tel:1234567890",1490+ "origin": "null",1491+ "protocol": "tel:",1492+ "username": "",1493+ "password": "",1494+ "host": "",1495+ "hostname": "",1496+ "port": "",1497+ "pathname": "1234567890",1498+ "search": "",1499+ "hash": ""1500+ },1501+ "# Based on https://felixfbecker.github.io/whatwg-url-custom-host-repro/",1502+ {1503+ "input": "ssh://example.com/foo/bar.git",1504+ "base": "http://example.org/",1505+ "href": "ssh://example.com/foo/bar.git",1506+ "origin": "null",1507+ "protocol": "ssh:",1508+ "username": "",1509+ "password": "",1510+ "host": "example.com",1511+ "hostname": "example.com",1512+ "port": "",1513+ "pathname": "/foo/bar.git",1514+ "search": "",1515+ "hash": ""1516+ },1517+ "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/file.html",1518+ {1519+ "input": "file:c:\\foo\\bar.html",1520+ "base": "file:///tmp/mock/path",1521+ "href": "file:///c:/foo/bar.html",1522+ "protocol": "file:",1523+ "username": "",1524+ "password": "",1525+ "host": "",1526+ "hostname": "",1527+ "port": "",1528+ "pathname": "/c:/foo/bar.html",1529+ "search": "",1530+ "hash": ""1531+ },1532+ {1533+ "input": " File:c|////foo\\bar.html",1534+ "base": "file:///tmp/mock/path",1535+ "href": "file:///c:////foo/bar.html",1536+ "protocol": "file:",1537+ "username": "",1538+ "password": "",1539+ "host": "",1540+ "hostname": "",1541+ "port": "",1542+ "pathname": "/c:////foo/bar.html",1543+ "search": "",1544+ "hash": ""1545+ },1546+ {1547+ "input": "C|/foo/bar",1548+ "base": "file:///tmp/mock/path",1549+ "href": "file:///C:/foo/bar",1550+ "protocol": "file:",1551+ "username": "",1552+ "password": "",1553+ "host": "",1554+ "hostname": "",1555+ "port": "",1556+ "pathname": "/C:/foo/bar",1557+ "search": "",1558+ "hash": ""1559+ },1560+ {1561+ "input": "/C|\\foo\\bar",1562+ "base": "file:///tmp/mock/path",1563+ "href": "file:///C:/foo/bar",1564+ "protocol": "file:",1565+ "username": "",1566+ "password": "",1567+ "host": "",1568+ "hostname": "",1569+ "port": "",1570+ "pathname": "/C:/foo/bar",1571+ "search": "",1572+ "hash": ""1573+ },1574+ {1575+ "input": "//C|/foo/bar",1576+ "base": "file:///tmp/mock/path",1577+ "href": "file:///C:/foo/bar",1578+ "protocol": "file:",1579+ "username": "",1580+ "password": "",1581+ "host": "",1582+ "hostname": "",1583+ "port": "",1584+ "pathname": "/C:/foo/bar",1585+ "search": "",1586+ "hash": ""1587+ },1588+ {1589+ "input": "//server/file",1590+ "base": "file:///tmp/mock/path",1591+ "href": "file://server/file",1592+ "protocol": "file:",1593+ "username": "",1594+ "password": "",1595+ "host": "server",1596+ "hostname": "server",1597+ "port": "",1598+ "pathname": "/file",1599+ "search": "",1600+ "hash": ""1601+ },1602+ {1603+ "input": "\\\\server\\file",1604+ "base": "file:///tmp/mock/path",1605+ "href": "file://server/file",1606+ "protocol": "file:",1607+ "username": "",1608+ "password": "",1609+ "host": "server",1610+ "hostname": "server",1611+ "port": "",1612+ "pathname": "/file",1613+ "search": "",1614+ "hash": ""1615+ },1616+ {1617+ "input": "/\\server/file",1618+ "base": "file:///tmp/mock/path",1619+ "href": "file://server/file",1620+ "protocol": "file:",1621+ "username": "",1622+ "password": "",1623+ "host": "server",1624+ "hostname": "server",1625+ "port": "",1626+ "pathname": "/file",1627+ "search": "",1628+ "hash": ""1629+ },1630+ {1631+ "input": "file:///foo/bar.txt",1632+ "base": "file:///tmp/mock/path",1633+ "href": "file:///foo/bar.txt",1634+ "protocol": "file:",1635+ "username": "",1636+ "password": "",1637+ "host": "",1638+ "hostname": "",1639+ "port": "",1640+ "pathname": "/foo/bar.txt",1641+ "search": "",1642+ "hash": ""1643+ },1644+ {1645+ "input": "file:///home/me",1646+ "base": "file:///tmp/mock/path",1647+ "href": "file:///home/me",1648+ "protocol": "file:",1649+ "username": "",1650+ "password": "",1651+ "host": "",1652+ "hostname": "",1653+ "port": "",1654+ "pathname": "/home/me",1655+ "search": "",1656+ "hash": ""1657+ },1658+ {1659+ "input": "//",1660+ "base": "file:///tmp/mock/path",1661+ "href": "file:///",1662+ "protocol": "file:",1663+ "username": "",1664+ "password": "",1665+ "host": "",1666+ "hostname": "",1667+ "port": "",1668+ "pathname": "/",1669+ "search": "",1670+ "hash": ""1671+ },1672+ {1673+ "input": "///",1674+ "base": "file:///tmp/mock/path",1675+ "href": "file:///",1676+ "protocol": "file:",1677+ "username": "",1678+ "password": "",1679+ "host": "",1680+ "hostname": "",1681+ "port": "",1682+ "pathname": "/",1683+ "search": "",1684+ "hash": ""1685+ },1686+ {1687+ "input": "///test",1688+ "base": "file:///tmp/mock/path",1689+ "href": "file:///test",1690+ "protocol": "file:",1691+ "username": "",1692+ "password": "",1693+ "host": "",1694+ "hostname": "",1695+ "port": "",1696+ "pathname": "/test",1697+ "search": "",1698+ "hash": ""1699+ },1700+ {1701+ "input": "file://test",1702+ "base": "file:///tmp/mock/path",1703+ "href": "file://test/",1704+ "protocol": "file:",1705+ "username": "",1706+ "password": "",1707+ "host": "test",1708+ "hostname": "test",1709+ "port": "",1710+ "pathname": "/",1711+ "search": "",1712+ "hash": ""1713+ },1714+ {1715+ "input": "file://localhost",1716+ "base": "file:///tmp/mock/path",1717+ "href": "file:///",1718+ "protocol": "file:",1719+ "username": "",1720+ "password": "",1721+ "host": "",1722+ "hostname": "",1723+ "port": "",1724+ "pathname": "/",1725+ "search": "",1726+ "hash": ""1727+ },1728+ {1729+ "input": "file://localhost/",1730+ "base": "file:///tmp/mock/path",1731+ "href": "file:///",1732+ "protocol": "file:",1733+ "username": "",1734+ "password": "",1735+ "host": "",1736+ "hostname": "",1737+ "port": "",1738+ "pathname": "/",1739+ "search": "",1740+ "hash": ""1741+ },1742+ {1743+ "input": "file://localhost/test",1744+ "base": "file:///tmp/mock/path",1745+ "href": "file:///test",1746+ "protocol": "file:",1747+ "username": "",1748+ "password": "",1749+ "host": "",1750+ "hostname": "",1751+ "port": "",1752+ "pathname": "/test",1753+ "search": "",1754+ "hash": ""1755+ },1756+ {1757+ "input": "test",1758+ "base": "file:///tmp/mock/path",1759+ "href": "file:///tmp/mock/test",1760+ "protocol": "file:",1761+ "username": "",1762+ "password": "",1763+ "host": "",1764+ "hostname": "",1765+ "port": "",1766+ "pathname": "/tmp/mock/test",1767+ "search": "",1768+ "hash": ""1769+ },1770+ {1771+ "input": "file:test",1772+ "base": "file:///tmp/mock/path",1773+ "href": "file:///tmp/mock/test",1774+ "protocol": "file:",1775+ "username": "",1776+ "password": "",1777+ "host": "",1778+ "hostname": "",1779+ "port": "",1780+ "pathname": "/tmp/mock/test",1781+ "search": "",1782+ "hash": ""1783+ },1784+ "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/path.js",1785+ {1786+ "input": "http://example.com/././foo",1787+ "base": null,1788+ "href": "http://example.com/foo",1789+ "origin": "http://example.com",1790+ "protocol": "http:",1791+ "username": "",1792+ "password": "",1793+ "host": "example.com",1794+ "hostname": "example.com",1795+ "port": "",1796+ "pathname": "/foo",1797+ "search": "",1798+ "hash": ""1799+ },1800+ {1801+ "input": "http://example.com/./.foo",1802+ "base": null,1803+ "href": "http://example.com/.foo",1804+ "origin": "http://example.com",1805+ "protocol": "http:",1806+ "username": "",1807+ "password": "",1808+ "host": "example.com",1809+ "hostname": "example.com",1810+ "port": "",1811+ "pathname": "/.foo",1812+ "search": "",1813+ "hash": ""1814+ },1815+ {1816+ "input": "http://example.com/foo/.",1817+ "base": null,1818+ "href": "http://example.com/foo/",1819+ "origin": "http://example.com",1820+ "protocol": "http:",1821+ "username": "",1822+ "password": "",1823+ "host": "example.com",1824+ "hostname": "example.com",1825+ "port": "",1826+ "pathname": "/foo/",1827+ "search": "",1828+ "hash": ""1829+ },1830+ {1831+ "input": "http://example.com/foo/./",1832+ "base": null,1833+ "href": "http://example.com/foo/",1834+ "origin": "http://example.com",1835+ "protocol": "http:",1836+ "username": "",1837+ "password": "",1838+ "host": "example.com",1839+ "hostname": "example.com",1840+ "port": "",1841+ "pathname": "/foo/",1842+ "search": "",1843+ "hash": ""1844+ },1845+ {1846+ "input": "http://example.com/foo/bar/..",1847+ "base": null,1848+ "href": "http://example.com/foo/",1849+ "origin": "http://example.com",1850+ "protocol": "http:",1851+ "username": "",1852+ "password": "",1853+ "host": "example.com",1854+ "hostname": "example.com",1855+ "port": "",1856+ "pathname": "/foo/",1857+ "search": "",1858+ "hash": ""1859+ },1860+ {1861+ "input": "http://example.com/foo/bar/../",1862+ "base": null,1863+ "href": "http://example.com/foo/",1864+ "origin": "http://example.com",1865+ "protocol": "http:",1866+ "username": "",1867+ "password": "",1868+ "host": "example.com",1869+ "hostname": "example.com",1870+ "port": "",1871+ "pathname": "/foo/",1872+ "search": "",1873+ "hash": ""1874+ },1875+ {1876+ "input": "http://example.com/foo/..bar",1877+ "base": null,1878+ "href": "http://example.com/foo/..bar",1879+ "origin": "http://example.com",1880+ "protocol": "http:",1881+ "username": "",1882+ "password": "",1883+ "host": "example.com",1884+ "hostname": "example.com",1885+ "port": "",1886+ "pathname": "/foo/..bar",1887+ "search": "",1888+ "hash": ""1889+ },1890+ {1891+ "input": "http://example.com/foo/bar/../ton",1892+ "base": null,1893+ "href": "http://example.com/foo/ton",1894+ "origin": "http://example.com",1895+ "protocol": "http:",1896+ "username": "",1897+ "password": "",1898+ "host": "example.com",1899+ "hostname": "example.com",1900+ "port": "",1901+ "pathname": "/foo/ton",1902+ "search": "",1903+ "hash": ""1904+ },1905+ {1906+ "input": "http://example.com/foo/bar/../ton/../../a",1907+ "base": null,1908+ "href": "http://example.com/a",1909+ "origin": "http://example.com",1910+ "protocol": "http:",1911+ "username": "",1912+ "password": "",1913+ "host": "example.com",1914+ "hostname": "example.com",1915+ "port": "",1916+ "pathname": "/a",1917+ "search": "",1918+ "hash": ""1919+ },1920+ {1921+ "input": "http://example.com/foo/../../..",1922+ "base": null,1923+ "href": "http://example.com/",1924+ "origin": "http://example.com",1925+ "protocol": "http:",1926+ "username": "",1927+ "password": "",1928+ "host": "example.com",1929+ "hostname": "example.com",1930+ "port": "",1931+ "pathname": "/",1932+ "search": "",1933+ "hash": ""1934+ },1935+ {1936+ "input": "http://example.com/foo/../../../ton",1937+ "base": null,1938+ "href": "http://example.com/ton",1939+ "origin": "http://example.com",1940+ "protocol": "http:",1941+ "username": "",1942+ "password": "",1943+ "host": "example.com",1944+ "hostname": "example.com",1945+ "port": "",1946+ "pathname": "/ton",1947+ "search": "",1948+ "hash": ""1949+ },1950+ {1951+ "input": "http://example.com/foo/%2e",1952+ "base": null,1953+ "href": "http://example.com/foo/",1954+ "origin": "http://example.com",1955+ "protocol": "http:",1956+ "username": "",1957+ "password": "",1958+ "host": "example.com",1959+ "hostname": "example.com",1960+ "port": "",1961+ "pathname": "/foo/",1962+ "search": "",1963+ "hash": ""1964+ },1965+ {1966+ "input": "http://example.com/foo/%2e%2",1967+ "base": null,1968+ "href": "http://example.com/foo/%2e%2",1969+ "origin": "http://example.com",1970+ "protocol": "http:",1971+ "username": "",1972+ "password": "",1973+ "host": "example.com",1974+ "hostname": "example.com",1975+ "port": "",1976+ "pathname": "/foo/%2e%2",1977+ "search": "",1978+ "hash": ""1979+ },1980+ {1981+ "input": "http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar",1982+ "base": null,1983+ "href": "http://example.com/%2e.bar",1984+ "origin": "http://example.com",1985+ "protocol": "http:",1986+ "username": "",1987+ "password": "",1988+ "host": "example.com",1989+ "hostname": "example.com",1990+ "port": "",1991+ "pathname": "/%2e.bar",1992+ "search": "",1993+ "hash": ""1994+ },1995+ {1996+ "input": "http://example.com////../..",1997+ "base": null,1998+ "href": "http://example.com//",1999+ "origin": "http://example.com",2000+ "protocol": "http:",2001+ "username": "",2002+ "password": "",2003+ "host": "example.com",2004+ "hostname": "example.com",2005+ "port": "",2006+ "pathname": "//",2007+ "search": "",2008+ "hash": ""2009+ },2010+ {2011+ "input": "http://example.com/foo/bar//../..",2012+ "base": null,2013+ "href": "http://example.com/foo/",2014+ "origin": "http://example.com",2015+ "protocol": "http:",2016+ "username": "",2017+ "password": "",2018+ "host": "example.com",2019+ "hostname": "example.com",2020+ "port": "",2021+ "pathname": "/foo/",2022+ "search": "",2023+ "hash": ""2024+ },2025+ {2026+ "input": "http://example.com/foo/bar//..",2027+ "base": null,2028+ "href": "http://example.com/foo/bar/",2029+ "origin": "http://example.com",2030+ "protocol": "http:",2031+ "username": "",2032+ "password": "",2033+ "host": "example.com",2034+ "hostname": "example.com",2035+ "port": "",2036+ "pathname": "/foo/bar/",2037+ "search": "",2038+ "hash": ""2039+ },2040+ {2041+ "input": "http://example.com/foo",2042+ "base": null,2043+ "href": "http://example.com/foo",2044+ "origin": "http://example.com",2045+ "protocol": "http:",2046+ "username": "",2047+ "password": "",2048+ "host": "example.com",2049+ "hostname": "example.com",2050+ "port": "",2051+ "pathname": "/foo",2052+ "search": "",2053+ "hash": ""2054+ },2055+ {2056+ "input": "http://example.com/%20foo",2057+ "base": null,2058+ "href": "http://example.com/%20foo",2059+ "origin": "http://example.com",2060+ "protocol": "http:",2061+ "username": "",2062+ "password": "",2063+ "host": "example.com",2064+ "hostname": "example.com",2065+ "port": "",2066+ "pathname": "/%20foo",2067+ "search": "",2068+ "hash": ""2069+ },2070+ {2071+ "input": "http://example.com/foo%",2072+ "base": null,2073+ "href": "http://example.com/foo%",2074+ "origin": "http://example.com",2075+ "protocol": "http:",2076+ "username": "",2077+ "password": "",2078+ "host": "example.com",2079+ "hostname": "example.com",2080+ "port": "",2081+ "pathname": "/foo%",2082+ "search": "",2083+ "hash": ""2084+ },2085+ {2086+ "input": "http://example.com/foo%2",2087+ "base": null,2088+ "href": "http://example.com/foo%2",2089+ "origin": "http://example.com",2090+ "protocol": "http:",2091+ "username": "",2092+ "password": "",2093+ "host": "example.com",2094+ "hostname": "example.com",2095+ "port": "",2096+ "pathname": "/foo%2",2097+ "search": "",2098+ "hash": ""2099+ },2100+ {2101+ "input": "http://example.com/foo%2zbar",2102+ "base": null,2103+ "href": "http://example.com/foo%2zbar",2104+ "origin": "http://example.com",2105+ "protocol": "http:",2106+ "username": "",2107+ "password": "",2108+ "host": "example.com",2109+ "hostname": "example.com",2110+ "port": "",2111+ "pathname": "/foo%2zbar",2112+ "search": "",2113+ "hash": ""2114+ },2115+ {2116+ "input": "http://example.com/foo%2©zbar",2117+ "base": null,2118+ "href": "http://example.com/foo%2%C3%82%C2%A9zbar",2119+ "origin": "http://example.com",2120+ "protocol": "http:",2121+ "username": "",2122+ "password": "",2123+ "host": "example.com",2124+ "hostname": "example.com",2125+ "port": "",2126+ "pathname": "/foo%2%C3%82%C2%A9zbar",2127+ "search": "",2128+ "hash": ""2129+ },2130+ {2131+ "input": "http://example.com/foo%41%7a",2132+ "base": null,2133+ "href": "http://example.com/foo%41%7a",2134+ "origin": "http://example.com",2135+ "protocol": "http:",2136+ "username": "",2137+ "password": "",2138+ "host": "example.com",2139+ "hostname": "example.com",2140+ "port": "",2141+ "pathname": "/foo%41%7a",2142+ "search": "",2143+ "hash": ""2144+ },2145+ {2146+ "input": "http://example.com/foo\t\u0091%91",2147+ "base": null,2148+ "href": "http://example.com/foo%C2%91%91",2149+ "origin": "http://example.com",2150+ "protocol": "http:",2151+ "username": "",2152+ "password": "",2153+ "host": "example.com",2154+ "hostname": "example.com",2155+ "port": "",2156+ "pathname": "/foo%C2%91%91",2157+ "search": "",2158+ "hash": ""2159+ },2160+ {2161+ "input": "http://example.com/foo%00%51",2162+ "base": null,2163+ "href": "http://example.com/foo%00%51",2164+ "origin": "http://example.com",2165+ "protocol": "http:",2166+ "username": "",2167+ "password": "",2168+ "host": "example.com",2169+ "hostname": "example.com",2170+ "port": "",2171+ "pathname": "/foo%00%51",2172+ "search": "",2173+ "hash": ""2174+ },2175+ {2176+ "input": "http://example.com/(%28:%3A%29)",2177+ "base": null,2178+ "href": "http://example.com/(%28:%3A%29)",2179+ "origin": "http://example.com",2180+ "protocol": "http:",2181+ "username": "",2182+ "password": "",2183+ "host": "example.com",2184+ "hostname": "example.com",2185+ "port": "",2186+ "pathname": "/(%28:%3A%29)",2187+ "search": "",2188+ "hash": ""2189+ },2190+ {2191+ "input": "http://example.com/%3A%3a%3C%3c",2192+ "base": null,2193+ "href": "http://example.com/%3A%3a%3C%3c",2194+ "origin": "http://example.com",2195+ "protocol": "http:",2196+ "username": "",2197+ "password": "",2198+ "host": "example.com",2199+ "hostname": "example.com",2200+ "port": "",2201+ "pathname": "/%3A%3a%3C%3c",2202+ "search": "",2203+ "hash": ""2204+ },2205+ {2206+ "input": "http://example.com/foo\tbar",2207+ "base": null,2208+ "href": "http://example.com/foobar",2209+ "origin": "http://example.com",2210+ "protocol": "http:",2211+ "username": "",2212+ "password": "",2213+ "host": "example.com",2214+ "hostname": "example.com",2215+ "port": "",2216+ "pathname": "/foobar",2217+ "search": "",2218+ "hash": ""2219+ },2220+ {2221+ "input": "http://example.com\\\\foo\\\\bar",2222+ "base": null,2223+ "href": "http://example.com//foo//bar",2224+ "origin": "http://example.com",2225+ "protocol": "http:",2226+ "username": "",2227+ "password": "",2228+ "host": "example.com",2229+ "hostname": "example.com",2230+ "port": "",2231+ "pathname": "//foo//bar",2232+ "search": "",2233+ "hash": ""2234+ },2235+ {2236+ "input": "http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd",2237+ "base": null,2238+ "href": "http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd",2239+ "origin": "http://example.com",2240+ "protocol": "http:",2241+ "username": "",2242+ "password": "",2243+ "host": "example.com",2244+ "hostname": "example.com",2245+ "port": "",2246+ "pathname": "/%7Ffp3%3Eju%3Dduvgw%3Dd",2247+ "search": "",2248+ "hash": ""2249+ },2250+ {2251+ "input": "http://example.com/@asdf%40",2252+ "base": null,2253+ "href": "http://example.com/@asdf%40",2254+ "origin": "http://example.com",2255+ "protocol": "http:",2256+ "username": "",2257+ "password": "",2258+ "host": "example.com",2259+ "hostname": "example.com",2260+ "port": "",2261+ "pathname": "/@asdf%40",2262+ "search": "",2263+ "hash": ""2264+ },2265+ {2266+ "input": "http://example.com/你好你好",2267+ "base": null,2268+ "href": "http://example.com/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD",2269+ "origin": "http://example.com",2270+ "protocol": "http:",2271+ "username": "",2272+ "password": "",2273+ "host": "example.com",2274+ "hostname": "example.com",2275+ "port": "",2276+ "pathname": "/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD",2277+ "search": "",2278+ "hash": ""2279+ },2280+ {2281+ "input": "http://example.com/‥/foo",2282+ "base": null,2283+ "href": "http://example.com/%E2%80%A5/foo",2284+ "origin": "http://example.com",2285+ "protocol": "http:",2286+ "username": "",2287+ "password": "",2288+ "host": "example.com",2289+ "hostname": "example.com",2290+ "port": "",2291+ "pathname": "/%E2%80%A5/foo",2292+ "search": "",2293+ "hash": ""2294+ },2295+ {2296+ "input": "http://example.com//foo",2297+ "base": null,2298+ "href": "http://example.com/%EF%BB%BF/foo",2299+ "origin": "http://example.com",2300+ "protocol": "http:",2301+ "username": "",2302+ "password": "",2303+ "host": "example.com",2304+ "hostname": "example.com",2305+ "port": "",2306+ "pathname": "/%EF%BB%BF/foo",2307+ "search": "",2308+ "hash": ""2309+ },2310+ {2311+ "input": "http://example.com//foo//bar",2312+ "base": null,2313+ "href": "http://example.com/%E2%80%AE/foo/%E2%80%AD/bar",2314+ "origin": "http://example.com",2315+ "protocol": "http:",2316+ "username": "",2317+ "password": "",2318+ "host": "example.com",2319+ "hostname": "example.com",2320+ "port": "",2321+ "pathname": "/%E2%80%AE/foo/%E2%80%AD/bar",2322+ "search": "",2323+ "hash": ""2324+ },2325+ "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/relative.js",2326+ {2327+ "input": "http://www.google.com/foo?bar=baz#",2328+ "base": null,2329+ "href": "http://www.google.com/foo?bar=baz#",2330+ "origin": "http://www.google.com",2331+ "protocol": "http:",2332+ "username": "",2333+ "password": "",2334+ "host": "www.google.com",2335+ "hostname": "www.google.com",2336+ "port": "",2337+ "pathname": "/foo",2338+ "search": "?bar=baz",2339+ "hash": ""2340+ },2341+ {2342+ "input": "http://www.google.com/foo?bar=baz# »",2343+ "base": null,2344+ "href": "http://www.google.com/foo?bar=baz#%20%C2%BB",2345+ "origin": "http://www.google.com",2346+ "protocol": "http:",2347+ "username": "",2348+ "password": "",2349+ "host": "www.google.com",2350+ "hostname": "www.google.com",2351+ "port": "",2352+ "pathname": "/foo",2353+ "search": "?bar=baz",2354+ "hash": "#%20%C2%BB"2355+ },2356+ {2357+ "input": "data:test# »",2358+ "base": null,2359+ "href": "data:test#%20%C2%BB",2360+ "origin": "null",2361+ "protocol": "data:",2362+ "username": "",2363+ "password": "",2364+ "host": "",2365+ "hostname": "",2366+ "port": "",2367+ "pathname": "test",2368+ "search": "",2369+ "hash": "#%20%C2%BB"2370+ },2371+ {2372+ "input": "http://www.google.com",2373+ "base": null,2374+ "href": "http://www.google.com/",2375+ "origin": "http://www.google.com",2376+ "protocol": "http:",2377+ "username": "",2378+ "password": "",2379+ "host": "www.google.com",2380+ "hostname": "www.google.com",2381+ "port": "",2382+ "pathname": "/",2383+ "search": "",2384+ "hash": ""2385+ },2386+ {2387+ "input": "http://192.0x00A80001",2388+ "base": null,2389+ "href": "http://192.168.0.1/",2390+ "origin": "http://192.168.0.1",2391+ "protocol": "http:",2392+ "username": "",2393+ "password": "",2394+ "host": "192.168.0.1",2395+ "hostname": "192.168.0.1",2396+ "port": "",2397+ "pathname": "/",2398+ "search": "",2399+ "hash": ""2400+ },2401+ {2402+ "input": "http://www/foo%2Ehtml",2403+ "base": null,2404+ "href": "http://www/foo%2Ehtml",2405+ "origin": "http://www",2406+ "protocol": "http:",2407+ "username": "",2408+ "password": "",2409+ "host": "www",2410+ "hostname": "www",2411+ "port": "",2412+ "pathname": "/foo%2Ehtml",2413+ "search": "",2414+ "hash": ""2415+ },2416+ {2417+ "input": "http://www/foo/%2E/html",2418+ "base": null,2419+ "href": "http://www/foo/html",2420+ "origin": "http://www",2421+ "protocol": "http:",2422+ "username": "",2423+ "password": "",2424+ "host": "www",2425+ "hostname": "www",2426+ "port": "",2427+ "pathname": "/foo/html",2428+ "search": "",2429+ "hash": ""2430+ },2431+ {2432+ "input": "http://user:pass@/",2433+ "base": null,2434+ "failure": true2435+ },2436+ {2437+ "input": "http://%25DOMAIN:foobar@foodomain.com/",2438+ "base": null,2439+ "href": "http://%25DOMAIN:foobar@foodomain.com/",2440+ "origin": "http://foodomain.com",2441+ "protocol": "http:",2442+ "username": "%25DOMAIN",2443+ "password": "foobar",2444+ "host": "foodomain.com",2445+ "hostname": "foodomain.com",2446+ "port": "",2447+ "pathname": "/",2448+ "search": "",2449+ "hash": ""2450+ },2451+ {2452+ "input": "http:\\\\www.google.com\\foo",2453+ "base": null,2454+ "href": "http://www.google.com/foo",2455+ "origin": "http://www.google.com",2456+ "protocol": "http:",2457+ "username": "",2458+ "password": "",2459+ "host": "www.google.com",2460+ "hostname": "www.google.com",2461+ "port": "",2462+ "pathname": "/foo",2463+ "search": "",2464+ "hash": ""2465+ },2466+ {2467+ "input": "http://foo:80/",2468+ "base": null,2469+ "href": "http://foo/",2470+ "origin": "http://foo",2471+ "protocol": "http:",2472+ "username": "",2473+ "password": "",2474+ "host": "foo",2475+ "hostname": "foo",2476+ "port": "",2477+ "pathname": "/",2478+ "search": "",2479+ "hash": ""2480+ },2481+ {2482+ "input": "http://foo:81/",2483+ "base": null,2484+ "href": "http://foo:81/",2485+ "origin": "http://foo:81",2486+ "protocol": "http:",2487+ "username": "",2488+ "password": "",2489+ "host": "foo:81",2490+ "hostname": "foo",2491+ "port": "81",2492+ "pathname": "/",2493+ "search": "",2494+ "hash": ""2495+ },2496+ {2497+ "input": "httpa://foo:80/",2498+ "base": null,2499+ "href": "httpa://foo:80/",2500+ "origin": "null",2501+ "protocol": "httpa:",2502+ "username": "",2503+ "password": "",2504+ "host": "foo:80",2505+ "hostname": "foo",2506+ "port": "80",2507+ "pathname": "/",2508+ "search": "",2509+ "hash": ""2510+ },2511+ {2512+ "input": "http://foo:-80/",2513+ "base": null,2514+ "failure": true2515+ },2516+ {2517+ "input": "https://foo:443/",2518+ "base": null,2519+ "href": "https://foo/",2520+ "origin": "https://foo",2521+ "protocol": "https:",2522+ "username": "",2523+ "password": "",2524+ "host": "foo",2525+ "hostname": "foo",2526+ "port": "",2527+ "pathname": "/",2528+ "search": "",2529+ "hash": ""2530+ },2531+ {2532+ "input": "https://foo:80/",2533+ "base": null,2534+ "href": "https://foo:80/",2535+ "origin": "https://foo:80",2536+ "protocol": "https:",2537+ "username": "",2538+ "password": "",2539+ "host": "foo:80",2540+ "hostname": "foo",2541+ "port": "80",2542+ "pathname": "/",2543+ "search": "",2544+ "hash": ""2545+ },2546+ {2547+ "input": "ftp://foo:21/",2548+ "base": null,2549+ "href": "ftp://foo/",2550+ "origin": "ftp://foo",2551+ "protocol": "ftp:",2552+ "username": "",2553+ "password": "",2554+ "host": "foo",2555+ "hostname": "foo",2556+ "port": "",2557+ "pathname": "/",2558+ "search": "",2559+ "hash": ""2560+ },2561+ {2562+ "input": "ftp://foo:80/",2563+ "base": null,2564+ "href": "ftp://foo:80/",2565+ "origin": "ftp://foo:80",2566+ "protocol": "ftp:",2567+ "username": "",2568+ "password": "",2569+ "host": "foo:80",2570+ "hostname": "foo",2571+ "port": "80",2572+ "pathname": "/",2573+ "search": "",2574+ "hash": ""2575+ },2576+ {2577+ "input": "gopher://foo:70/",2578+ "base": null,2579+ "href": "gopher://foo:70/",2580+ "origin": "null",2581+ "protocol": "gopher:",2582+ "username": "",2583+ "password": "",2584+ "host": "foo:70",2585+ "hostname": "foo",2586+ "port": "70",2587+ "pathname": "/",2588+ "search": "",2589+ "hash": ""2590+ },2591+ {2592+ "input": "gopher://foo:443/",2593+ "base": null,2594+ "href": "gopher://foo:443/",2595+ "origin": "null",2596+ "protocol": "gopher:",2597+ "username": "",2598+ "password": "",2599+ "host": "foo:443",2600+ "hostname": "foo",2601+ "port": "443",2602+ "pathname": "/",2603+ "search": "",2604+ "hash": ""2605+ },2606+ {2607+ "input": "ws://foo:80/",2608+ "base": null,2609+ "href": "ws://foo/",2610+ "origin": "ws://foo",2611+ "protocol": "ws:",2612+ "username": "",2613+ "password": "",2614+ "host": "foo",2615+ "hostname": "foo",2616+ "port": "",2617+ "pathname": "/",2618+ "search": "",2619+ "hash": ""2620+ },2621+ {2622+ "input": "ws://foo:81/",2623+ "base": null,2624+ "href": "ws://foo:81/",2625+ "origin": "ws://foo:81",2626+ "protocol": "ws:",2627+ "username": "",2628+ "password": "",2629+ "host": "foo:81",2630+ "hostname": "foo",2631+ "port": "81",2632+ "pathname": "/",2633+ "search": "",2634+ "hash": ""2635+ },2636+ {2637+ "input": "ws://foo:443/",2638+ "base": null,2639+ "href": "ws://foo:443/",2640+ "origin": "ws://foo:443",2641+ "protocol": "ws:",2642+ "username": "",2643+ "password": "",2644+ "host": "foo:443",2645+ "hostname": "foo",2646+ "port": "443",2647+ "pathname": "/",2648+ "search": "",2649+ "hash": ""2650+ },2651+ {2652+ "input": "ws://foo:815/",2653+ "base": null,2654+ "href": "ws://foo:815/",2655+ "origin": "ws://foo:815",2656+ "protocol": "ws:",2657+ "username": "",2658+ "password": "",2659+ "host": "foo:815",2660+ "hostname": "foo",2661+ "port": "815",2662+ "pathname": "/",2663+ "search": "",2664+ "hash": ""2665+ },2666+ {2667+ "input": "wss://foo:80/",2668+ "base": null,2669+ "href": "wss://foo:80/",2670+ "origin": "wss://foo:80",2671+ "protocol": "wss:",2672+ "username": "",2673+ "password": "",2674+ "host": "foo:80",2675+ "hostname": "foo",2676+ "port": "80",2677+ "pathname": "/",2678+ "search": "",2679+ "hash": ""2680+ },2681+ {2682+ "input": "wss://foo:81/",2683+ "base": null,2684+ "href": "wss://foo:81/",2685+ "origin": "wss://foo:81",2686+ "protocol": "wss:",2687+ "username": "",2688+ "password": "",2689+ "host": "foo:81",2690+ "hostname": "foo",2691+ "port": "81",2692+ "pathname": "/",2693+ "search": "",2694+ "hash": ""2695+ },2696+ {2697+ "input": "wss://foo:443/",2698+ "base": null,2699+ "href": "wss://foo/",2700+ "origin": "wss://foo",2701+ "protocol": "wss:",2702+ "username": "",2703+ "password": "",2704+ "host": "foo",2705+ "hostname": "foo",2706+ "port": "",2707+ "pathname": "/",2708+ "search": "",2709+ "hash": ""2710+ },2711+ {2712+ "input": "wss://foo:815/",2713+ "base": null,2714+ "href": "wss://foo:815/",2715+ "origin": "wss://foo:815",2716+ "protocol": "wss:",2717+ "username": "",2718+ "password": "",2719+ "host": "foo:815",2720+ "hostname": "foo",2721+ "port": "815",2722+ "pathname": "/",2723+ "search": "",2724+ "hash": ""2725+ },2726+ {2727+ "input": "http:/example.com/",2728+ "base": null,2729+ "href": "http://example.com/",2730+ "origin": "http://example.com",2731+ "protocol": "http:",2732+ "username": "",2733+ "password": "",2734+ "host": "example.com",2735+ "hostname": "example.com",2736+ "port": "",2737+ "pathname": "/",2738+ "search": "",2739+ "hash": ""2740+ },2741+ {2742+ "input": "ftp:/example.com/",2743+ "base": null,2744+ "href": "ftp://example.com/",2745+ "origin": "ftp://example.com",2746+ "protocol": "ftp:",2747+ "username": "",2748+ "password": "",2749+ "host": "example.com",2750+ "hostname": "example.com",2751+ "port": "",2752+ "pathname": "/",2753+ "search": "",2754+ "hash": ""2755+ },2756+ {2757+ "input": "https:/example.com/",2758+ "base": null,2759+ "href": "https://example.com/",2760+ "origin": "https://example.com",2761+ "protocol": "https:",2762+ "username": "",2763+ "password": "",2764+ "host": "example.com",2765+ "hostname": "example.com",2766+ "port": "",2767+ "pathname": "/",2768+ "search": "",2769+ "hash": ""2770+ },2771+ {2772+ "input": "madeupscheme:/example.com/",2773+ "base": null,2774+ "href": "madeupscheme:/example.com/",2775+ "origin": "null",2776+ "protocol": "madeupscheme:",2777+ "username": "",2778+ "password": "",2779+ "host": "",2780+ "hostname": "",2781+ "port": "",2782+ "pathname": "/example.com/",2783+ "search": "",2784+ "hash": ""2785+ },2786+ {2787+ "input": "file:/example.com/",2788+ "base": null,2789+ "href": "file:///example.com/",2790+ "protocol": "file:",2791+ "username": "",2792+ "password": "",2793+ "host": "",2794+ "hostname": "",2795+ "port": "",2796+ "pathname": "/example.com/",2797+ "search": "",2798+ "hash": ""2799+ },2800+ {2801+ "input": "ftps:/example.com/",2802+ "base": null,2803+ "href": "ftps:/example.com/",2804+ "origin": "null",2805+ "protocol": "ftps:",2806+ "username": "",2807+ "password": "",2808+ "host": "",2809+ "hostname": "",2810+ "port": "",2811+ "pathname": "/example.com/",2812+ "search": "",2813+ "hash": ""2814+ },2815+ {2816+ "input": "gopher:/example.com/",2817+ "base": null,2818+ "href": "gopher:/example.com/",2819+ "origin": "null",2820+ "protocol": "gopher:",2821+ "username": "",2822+ "password": "",2823+ "host": "",2824+ "hostname": "",2825+ "port": "",2826+ "pathname": "/example.com/",2827+ "search": "",2828+ "hash": ""2829+ },2830+ {2831+ "input": "ws:/example.com/",2832+ "base": null,2833+ "href": "ws://example.com/",2834+ "origin": "ws://example.com",2835+ "protocol": "ws:",2836+ "username": "",2837+ "password": "",2838+ "host": "example.com",2839+ "hostname": "example.com",2840+ "port": "",2841+ "pathname": "/",2842+ "search": "",2843+ "hash": ""2844+ },2845+ {2846+ "input": "wss:/example.com/",2847+ "base": null,2848+ "href": "wss://example.com/",2849+ "origin": "wss://example.com",2850+ "protocol": "wss:",2851+ "username": "",2852+ "password": "",2853+ "host": "example.com",2854+ "hostname": "example.com",2855+ "port": "",2856+ "pathname": "/",2857+ "search": "",2858+ "hash": ""2859+ },2860+ {2861+ "input": "data:/example.com/",2862+ "base": null,2863+ "href": "data:/example.com/",2864+ "origin": "null",2865+ "protocol": "data:",2866+ "username": "",2867+ "password": "",2868+ "host": "",2869+ "hostname": "",2870+ "port": "",2871+ "pathname": "/example.com/",2872+ "search": "",2873+ "hash": ""2874+ },2875+ {2876+ "input": "javascript:/example.com/",2877+ "base": null,2878+ "href": "javascript:/example.com/",2879+ "origin": "null",2880+ "protocol": "javascript:",2881+ "username": "",2882+ "password": "",2883+ "host": "",2884+ "hostname": "",2885+ "port": "",2886+ "pathname": "/example.com/",2887+ "search": "",2888+ "hash": ""2889+ },2890+ {2891+ "input": "mailto:/example.com/",2892+ "base": null,2893+ "href": "mailto:/example.com/",2894+ "origin": "null",2895+ "protocol": "mailto:",2896+ "username": "",2897+ "password": "",2898+ "host": "",2899+ "hostname": "",2900+ "port": "",2901+ "pathname": "/example.com/",2902+ "search": "",2903+ "hash": ""2904+ },2905+ {2906+ "input": "http:example.com/",2907+ "base": null,2908+ "href": "http://example.com/",2909+ "origin": "http://example.com",2910+ "protocol": "http:",2911+ "username": "",2912+ "password": "",2913+ "host": "example.com",2914+ "hostname": "example.com",2915+ "port": "",2916+ "pathname": "/",2917+ "search": "",2918+ "hash": ""2919+ },2920+ {2921+ "input": "ftp:example.com/",2922+ "base": null,2923+ "href": "ftp://example.com/",2924+ "origin": "ftp://example.com",2925+ "protocol": "ftp:",2926+ "username": "",2927+ "password": "",2928+ "host": "example.com",2929+ "hostname": "example.com",2930+ "port": "",2931+ "pathname": "/",2932+ "search": "",2933+ "hash": ""2934+ },2935+ {2936+ "input": "https:example.com/",2937+ "base": null,2938+ "href": "https://example.com/",2939+ "origin": "https://example.com",2940+ "protocol": "https:",2941+ "username": "",2942+ "password": "",2943+ "host": "example.com",2944+ "hostname": "example.com",2945+ "port": "",2946+ "pathname": "/",2947+ "search": "",2948+ "hash": ""2949+ },2950+ {2951+ "input": "madeupscheme:example.com/",2952+ "base": null,2953+ "href": "madeupscheme:example.com/",2954+ "origin": "null",2955+ "protocol": "madeupscheme:",2956+ "username": "",2957+ "password": "",2958+ "host": "",2959+ "hostname": "",2960+ "port": "",2961+ "pathname": "example.com/",2962+ "search": "",2963+ "hash": ""2964+ },2965+ {2966+ "input": "ftps:example.com/",2967+ "base": null,2968+ "href": "ftps:example.com/",2969+ "origin": "null",2970+ "protocol": "ftps:",2971+ "username": "",2972+ "password": "",2973+ "host": "",2974+ "hostname": "",2975+ "port": "",2976+ "pathname": "example.com/",2977+ "search": "",2978+ "hash": ""2979+ },2980+ {2981+ "input": "gopher:example.com/",2982+ "base": null,2983+ "href": "gopher:example.com/",2984+ "origin": "null",2985+ "protocol": "gopher:",2986+ "username": "",2987+ "password": "",2988+ "host": "",2989+ "hostname": "",2990+ "port": "",2991+ "pathname": "example.com/",2992+ "search": "",2993+ "hash": ""2994+ },2995+ {2996+ "input": "ws:example.com/",2997+ "base": null,2998+ "href": "ws://example.com/",2999+ "origin": "ws://example.com",3000+ "protocol": "ws:",3001+ "username": "",3002+ "password": "",3003+ "host": "example.com",3004+ "hostname": "example.com",3005+ "port": "",3006+ "pathname": "/",3007+ "search": "",3008+ "hash": ""3009+ },3010+ {3011+ "input": "wss:example.com/",3012+ "base": null,3013+ "href": "wss://example.com/",3014+ "origin": "wss://example.com",3015+ "protocol": "wss:",3016+ "username": "",3017+ "password": "",3018+ "host": "example.com",3019+ "hostname": "example.com",3020+ "port": "",3021+ "pathname": "/",3022+ "search": "",3023+ "hash": ""3024+ },3025+ {3026+ "input": "data:example.com/",3027+ "base": null,3028+ "href": "data:example.com/",3029+ "origin": "null",3030+ "protocol": "data:",3031+ "username": "",3032+ "password": "",3033+ "host": "",3034+ "hostname": "",3035+ "port": "",3036+ "pathname": "example.com/",3037+ "search": "",3038+ "hash": ""3039+ },3040+ {3041+ "input": "javascript:example.com/",3042+ "base": null,3043+ "href": "javascript:example.com/",3044+ "origin": "null",3045+ "protocol": "javascript:",3046+ "username": "",3047+ "password": "",3048+ "host": "",3049+ "hostname": "",3050+ "port": "",3051+ "pathname": "example.com/",3052+ "search": "",3053+ "hash": ""3054+ },3055+ {3056+ "input": "mailto:example.com/",3057+ "base": null,3058+ "href": "mailto:example.com/",3059+ "origin": "null",3060+ "protocol": "mailto:",3061+ "username": "",3062+ "password": "",3063+ "host": "",3064+ "hostname": "",3065+ "port": "",3066+ "pathname": "example.com/",3067+ "search": "",3068+ "hash": ""3069+ },3070+ "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/segments-userinfo-vs-host.html",3071+ {3072+ "input": "http:@www.example.com",3073+ "base": null,3074+ "href": "http://www.example.com/",3075+ "origin": "http://www.example.com",3076+ "protocol": "http:",3077+ "username": "",3078+ "password": "",3079+ "host": "www.example.com",3080+ "hostname": "www.example.com",3081+ "port": "",3082+ "pathname": "/",3083+ "search": "",3084+ "hash": ""3085+ },3086+ {3087+ "input": "http:/@www.example.com",3088+ "base": null,3089+ "href": "http://www.example.com/",3090+ "origin": "http://www.example.com",3091+ "protocol": "http:",3092+ "username": "",3093+ "password": "",3094+ "host": "www.example.com",3095+ "hostname": "www.example.com",3096+ "port": "",3097+ "pathname": "/",3098+ "search": "",3099+ "hash": ""3100+ },3101+ {3102+ "input": "http://@www.example.com",3103+ "base": null,3104+ "href": "http://www.example.com/",3105+ "origin": "http://www.example.com",3106+ "protocol": "http:",3107+ "username": "",3108+ "password": "",3109+ "host": "www.example.com",3110+ "hostname": "www.example.com",3111+ "port": "",3112+ "pathname": "/",3113+ "search": "",3114+ "hash": ""3115+ },3116+ {3117+ "input": "http:a:b@www.example.com",3118+ "base": null,3119+ "href": "http://a:b@www.example.com/",3120+ "origin": "http://www.example.com",3121+ "protocol": "http:",3122+ "username": "a",3123+ "password": "b",3124+ "host": "www.example.com",3125+ "hostname": "www.example.com",3126+ "port": "",3127+ "pathname": "/",3128+ "search": "",3129+ "hash": ""3130+ },3131+ {3132+ "input": "http:/a:b@www.example.com",3133+ "base": null,3134+ "href": "http://a:b@www.example.com/",3135+ "origin": "http://www.example.com",3136+ "protocol": "http:",3137+ "username": "a",3138+ "password": "b",3139+ "host": "www.example.com",3140+ "hostname": "www.example.com",3141+ "port": "",3142+ "pathname": "/",3143+ "search": "",3144+ "hash": ""3145+ },3146+ {3147+ "input": "http://a:b@www.example.com",3148+ "base": null,3149+ "href": "http://a:b@www.example.com/",3150+ "origin": "http://www.example.com",3151+ "protocol": "http:",3152+ "username": "a",3153+ "password": "b",3154+ "host": "www.example.com",3155+ "hostname": "www.example.com",3156+ "port": "",3157+ "pathname": "/",3158+ "search": "",3159+ "hash": ""3160+ },3161+ {3162+ "input": "http://@pple.com",3163+ "base": null,3164+ "href": "http://pple.com/",3165+ "origin": "http://pple.com",3166+ "protocol": "http:",3167+ "username": "",3168+ "password": "",3169+ "host": "pple.com",3170+ "hostname": "pple.com",3171+ "port": "",3172+ "pathname": "/",3173+ "search": "",3174+ "hash": ""3175+ },3176+ {3177+ "input": "http::b@www.example.com",3178+ "base": null,3179+ "href": "http://:b@www.example.com/",3180+ "origin": "http://www.example.com",3181+ "protocol": "http:",3182+ "username": "",3183+ "password": "b",3184+ "host": "www.example.com",3185+ "hostname": "www.example.com",3186+ "port": "",3187+ "pathname": "/",3188+ "search": "",3189+ "hash": ""3190+ },3191+ {3192+ "input": "http:/:b@www.example.com",3193+ "base": null,3194+ "href": "http://:b@www.example.com/",3195+ "origin": "http://www.example.com",3196+ "protocol": "http:",3197+ "username": "",3198+ "password": "b",3199+ "host": "www.example.com",3200+ "hostname": "www.example.com",3201+ "port": "",3202+ "pathname": "/",3203+ "search": "",3204+ "hash": ""3205+ },3206+ {3207+ "input": "http://:b@www.example.com",3208+ "base": null,3209+ "href": "http://:b@www.example.com/",3210+ "origin": "http://www.example.com",3211+ "protocol": "http:",3212+ "username": "",3213+ "password": "b",3214+ "host": "www.example.com",3215+ "hostname": "www.example.com",3216+ "port": "",3217+ "pathname": "/",3218+ "search": "",3219+ "hash": ""3220+ },3221+ {3222+ "input": "http:/:@/www.example.com",3223+ "base": null,3224+ "failure": true,3225+ "relativeTo": "non-opaque-path-base"3226+ },3227+ {3228+ "input": "http://user@/www.example.com",3229+ "base": null,3230+ "failure": true3231+ },3232+ {3233+ "input": "http:@/www.example.com",3234+ "base": null,3235+ "failure": true,3236+ "relativeTo": "non-opaque-path-base"3237+ },3238+ {3239+ "input": "http:/@/www.example.com",3240+ "base": null,3241+ "failure": true,3242+ "relativeTo": "non-opaque-path-base"3243+ },3244+ {3245+ "input": "http://@/www.example.com",3246+ "base": null,3247+ "failure": true3248+ },3249+ {3250+ "input": "https:@/www.example.com",3251+ "base": null,3252+ "failure": true,3253+ "relativeTo": "non-opaque-path-base"3254+ },3255+ {3256+ "input": "http:a:b@/www.example.com",3257+ "base": null,3258+ "failure": true,3259+ "relativeTo": "non-opaque-path-base"3260+ },3261+ {3262+ "input": "http:/a:b@/www.example.com",3263+ "base": null,3264+ "failure": true,3265+ "relativeTo": "non-opaque-path-base"3266+ },3267+ {3268+ "input": "http://a:b@/www.example.com",3269+ "base": null,3270+ "failure": true3271+ },3272+ {3273+ "input": "http::@/www.example.com",3274+ "base": null,3275+ "failure": true,3276+ "relativeTo": "non-opaque-path-base"3277+ },3278+ {3279+ "input": "http:a:@www.example.com",3280+ "base": null,3281+ "href": "http://a@www.example.com/",3282+ "origin": "http://www.example.com",3283+ "protocol": "http:",3284+ "username": "a",3285+ "password": "",3286+ "host": "www.example.com",3287+ "hostname": "www.example.com",3288+ "port": "",3289+ "pathname": "/",3290+ "search": "",3291+ "hash": ""3292+ },3293+ {3294+ "input": "http:/a:@www.example.com",3295+ "base": null,3296+ "href": "http://a@www.example.com/",3297+ "origin": "http://www.example.com",3298+ "protocol": "http:",3299+ "username": "a",3300+ "password": "",3301+ "host": "www.example.com",3302+ "hostname": "www.example.com",3303+ "port": "",3304+ "pathname": "/",3305+ "search": "",3306+ "hash": ""3307+ },3308+ {3309+ "input": "http://a:@www.example.com",3310+ "base": null,3311+ "href": "http://a@www.example.com/",3312+ "origin": "http://www.example.com",3313+ "protocol": "http:",3314+ "username": "a",3315+ "password": "",3316+ "host": "www.example.com",3317+ "hostname": "www.example.com",3318+ "port": "",3319+ "pathname": "/",3320+ "search": "",3321+ "hash": ""3322+ },3323+ {3324+ "input": "http://www.@pple.com",3325+ "base": null,3326+ "href": "http://www.@pple.com/",3327+ "origin": "http://pple.com",3328+ "protocol": "http:",3329+ "username": "www.",3330+ "password": "",3331+ "host": "pple.com",3332+ "hostname": "pple.com",3333+ "port": "",3334+ "pathname": "/",3335+ "search": "",3336+ "hash": ""3337+ },3338+ {3339+ "input": "http:@:www.example.com",3340+ "base": null,3341+ "failure": true,3342+ "relativeTo": "non-opaque-path-base"3343+ },3344+ {3345+ "input": "http:/@:www.example.com",3346+ "base": null,3347+ "failure": true,3348+ "relativeTo": "non-opaque-path-base"3349+ },3350+ {3351+ "input": "http://@:www.example.com",3352+ "base": null,3353+ "failure": true3354+ },3355+ {3356+ "input": "http://:@www.example.com",3357+ "base": null,3358+ "href": "http://www.example.com/",3359+ "origin": "http://www.example.com",3360+ "protocol": "http:",3361+ "username": "",3362+ "password": "",3363+ "host": "www.example.com",3364+ "hostname": "www.example.com",3365+ "port": "",3366+ "pathname": "/",3367+ "search": "",3368+ "hash": ""3369+ },3370+ "# Others",3371+ {3372+ "input": "/",3373+ "base": "http://www.example.com/test",3374+ "href": "http://www.example.com/",3375+ "origin": "http://www.example.com",3376+ "protocol": "http:",3377+ "username": "",3378+ "password": "",3379+ "host": "www.example.com",3380+ "hostname": "www.example.com",3381+ "port": "",3382+ "pathname": "/",3383+ "search": "",3384+ "hash": ""3385+ },3386+ {3387+ "input": "/test.txt",3388+ "base": "http://www.example.com/test",3389+ "href": "http://www.example.com/test.txt",3390+ "origin": "http://www.example.com",3391+ "protocol": "http:",3392+ "username": "",3393+ "password": "",3394+ "host": "www.example.com",3395+ "hostname": "www.example.com",3396+ "port": "",3397+ "pathname": "/test.txt",3398+ "search": "",3399+ "hash": ""3400+ },3401+ {3402+ "input": ".",3403+ "base": "http://www.example.com/test",3404+ "href": "http://www.example.com/",3405+ "origin": "http://www.example.com",3406+ "protocol": "http:",3407+ "username": "",3408+ "password": "",3409+ "host": "www.example.com",3410+ "hostname": "www.example.com",3411+ "port": "",3412+ "pathname": "/",3413+ "search": "",3414+ "hash": ""3415+ },3416+ {3417+ "input": "..",3418+ "base": "http://www.example.com/test",3419+ "href": "http://www.example.com/",3420+ "origin": "http://www.example.com",3421+ "protocol": "http:",3422+ "username": "",3423+ "password": "",3424+ "host": "www.example.com",3425+ "hostname": "www.example.com",3426+ "port": "",3427+ "pathname": "/",3428+ "search": "",3429+ "hash": ""3430+ },3431+ {3432+ "input": "test.txt",3433+ "base": "http://www.example.com/test",3434+ "href": "http://www.example.com/test.txt",3435+ "origin": "http://www.example.com",3436+ "protocol": "http:",3437+ "username": "",3438+ "password": "",3439+ "host": "www.example.com",3440+ "hostname": "www.example.com",3441+ "port": "",3442+ "pathname": "/test.txt",3443+ "search": "",3444+ "hash": ""3445+ },3446+ {3447+ "input": "./test.txt",3448+ "base": "http://www.example.com/test",3449+ "href": "http://www.example.com/test.txt",3450+ "origin": "http://www.example.com",3451+ "protocol": "http:",3452+ "username": "",3453+ "password": "",3454+ "host": "www.example.com",3455+ "hostname": "www.example.com",3456+ "port": "",3457+ "pathname": "/test.txt",3458+ "search": "",3459+ "hash": ""3460+ },3461+ {3462+ "input": "../test.txt",3463+ "base": "http://www.example.com/test",3464+ "href": "http://www.example.com/test.txt",3465+ "origin": "http://www.example.com",3466+ "protocol": "http:",3467+ "username": "",3468+ "password": "",3469+ "host": "www.example.com",3470+ "hostname": "www.example.com",3471+ "port": "",3472+ "pathname": "/test.txt",3473+ "search": "",3474+ "hash": ""3475+ },3476+ {3477+ "input": "../aaa/test.txt",3478+ "base": "http://www.example.com/test",3479+ "href": "http://www.example.com/aaa/test.txt",3480+ "origin": "http://www.example.com",3481+ "protocol": "http:",3482+ "username": "",3483+ "password": "",3484+ "host": "www.example.com",3485+ "hostname": "www.example.com",3486+ "port": "",3487+ "pathname": "/aaa/test.txt",3488+ "search": "",3489+ "hash": ""3490+ },3491+ {3492+ "input": "../../test.txt",3493+ "base": "http://www.example.com/test",3494+ "href": "http://www.example.com/test.txt",3495+ "origin": "http://www.example.com",3496+ "protocol": "http:",3497+ "username": "",3498+ "password": "",3499+ "host": "www.example.com",3500+ "hostname": "www.example.com",3501+ "port": "",3502+ "pathname": "/test.txt",3503+ "search": "",3504+ "hash": ""3505+ },3506+ {3507+ "input": "中/test.txt",3508+ "base": "http://www.example.com/test",3509+ "href": "http://www.example.com/%E4%B8%AD/test.txt",3510+ "origin": "http://www.example.com",3511+ "protocol": "http:",3512+ "username": "",3513+ "password": "",3514+ "host": "www.example.com",3515+ "hostname": "www.example.com",3516+ "port": "",3517+ "pathname": "/%E4%B8%AD/test.txt",3518+ "search": "",3519+ "hash": ""3520+ },3521+ {3522+ "input": "http://www.example2.com",3523+ "base": "http://www.example.com/test",3524+ "href": "http://www.example2.com/",3525+ "origin": "http://www.example2.com",3526+ "protocol": "http:",3527+ "username": "",3528+ "password": "",3529+ "host": "www.example2.com",3530+ "hostname": "www.example2.com",3531+ "port": "",3532+ "pathname": "/",3533+ "search": "",3534+ "hash": ""3535+ },3536+ {3537+ "input": "//www.example2.com",3538+ "base": "http://www.example.com/test",3539+ "href": "http://www.example2.com/",3540+ "origin": "http://www.example2.com",3541+ "protocol": "http:",3542+ "username": "",3543+ "password": "",3544+ "host": "www.example2.com",3545+ "hostname": "www.example2.com",3546+ "port": "",3547+ "pathname": "/",3548+ "search": "",3549+ "hash": ""3550+ },3551+ {3552+ "input": "file:...",3553+ "base": "http://www.example.com/test",3554+ "href": "file:///...",3555+ "protocol": "file:",3556+ "username": "",3557+ "password": "",3558+ "host": "",3559+ "hostname": "",3560+ "port": "",3561+ "pathname": "/...",3562+ "search": "",3563+ "hash": ""3564+ },3565+ {3566+ "input": "file:..",3567+ "base": "http://www.example.com/test",3568+ "href": "file:///",3569+ "protocol": "file:",3570+ "username": "",3571+ "password": "",3572+ "host": "",3573+ "hostname": "",3574+ "port": "",3575+ "pathname": "/",3576+ "search": "",3577+ "hash": ""3578+ },3579+ {3580+ "input": "file:a",3581+ "base": "http://www.example.com/test",3582+ "href": "file:///a",3583+ "protocol": "file:",3584+ "username": "",3585+ "password": "",3586+ "host": "",3587+ "hostname": "",3588+ "port": "",3589+ "pathname": "/a",3590+ "search": "",3591+ "hash": ""3592+ },3593+ {3594+ "input": "file:.",3595+ "base": null,3596+ "href": "file:///",3597+ "protocol": "file:",3598+ "username": "",3599+ "password": "",3600+ "host": "",3601+ "hostname": "",3602+ "port": "",3603+ "pathname": "/",3604+ "search": "",3605+ "hash": ""3606+ },3607+ {3608+ "input": "file:.",3609+ "base": "http://www.example.com/test",3610+ "href": "file:///",3611+ "protocol": "file:",3612+ "username": "",3613+ "password": "",3614+ "host": "",3615+ "hostname": "",3616+ "port": "",3617+ "pathname": "/",3618+ "search": "",3619+ "hash": ""3620+ },3621+ "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/host.html",3622+ "Basic canonicalization, uppercase should be converted to lowercase",3623+ {3624+ "input": "http://ExAmPlE.CoM",3625+ "base": "http://other.com/",3626+ "href": "http://example.com/",3627+ "origin": "http://example.com",3628+ "protocol": "http:",3629+ "username": "",3630+ "password": "",3631+ "host": "example.com",3632+ "hostname": "example.com",3633+ "port": "",3634+ "pathname": "/",3635+ "search": "",3636+ "hash": ""3637+ },3638+ {3639+ "input": "http://example example.com",3640+ "base": "http://other.com/",3641+ "failure": true3642+ },3643+ {3644+ "input": "http://Goo%20 goo%7C|.com",3645+ "base": "http://other.com/",3646+ "failure": true3647+ },3648+ {3649+ "input": "http://[]",3650+ "base": "http://other.com/",3651+ "failure": true3652+ },3653+ {3654+ "input": "http://[:]",3655+ "base": "http://other.com/",3656+ "failure": true3657+ },3658+ "U+3000 is mapped to U+0020 (space) which is disallowed",3659+ {3660+ "input": "http://GOO\u00a0\u3000goo.com",3661+ "base": "http://other.com/",3662+ "failure": true3663+ },3664+ "Other types of space (no-break, zero-width, zero-width-no-break) are name-prepped away to nothing. U+200B, U+2060, and U+FEFF, are ignored",3665+ {3666+ "input": "http://GOO\u200b\u2060\ufeffgoo.com",3667+ "base": "http://other.com/",3668+ "href": "http://googoo.com/",3669+ "origin": "http://googoo.com",3670+ "protocol": "http:",3671+ "username": "",3672+ "password": "",3673+ "host": "googoo.com",3674+ "hostname": "googoo.com",3675+ "port": "",3676+ "pathname": "/",3677+ "search": "",3678+ "hash": ""3679+ },3680+ "Leading and trailing C0 control or space",3681+ {3682+ "input": "\u0000\u001b\u0004\u0012 http://example.com/\u001f \u000d ",3683+ "base": null,3684+ "href": "http://example.com/",3685+ "origin": "http://example.com",3686+ "protocol": "http:",3687+ "username": "",3688+ "password": "",3689+ "host": "example.com",3690+ "hostname": "example.com",3691+ "port": "",3692+ "pathname": "/",3693+ "search": "",3694+ "hash": ""3695+ },3696+ "Ideographic full stop (full-width period for Chinese, etc.) should be treated as a dot. U+3002 is mapped to U+002E (dot)",3697+ {3698+ "input": "http://www.foo。bar.com",3699+ "base": "http://other.com/",3700+ "href": "http://www.foo.bar.com/",3701+ "origin": "http://www.foo.bar.com",3702+ "protocol": "http:",3703+ "username": "",3704+ "password": "",3705+ "host": "www.foo.bar.com",3706+ "hostname": "www.foo.bar.com",3707+ "port": "",3708+ "pathname": "/",3709+ "search": "",3710+ "hash": ""3711+ },3712+ "Invalid unicode characters should fail... U+FDD0 is disallowed; %ef%b7%90 is U+FDD0",3713+ {3714+ "input": "http://\ufdd0zyx.com",3715+ "base": "http://other.com/",3716+ "failure": true3717+ },3718+ "This is the same as previous but escaped",3719+ {3720+ "input": "http://%ef%b7%90zyx.com",3721+ "base": "http://other.com/",3722+ "failure": true3723+ },3724+ "U+FFFD",3725+ {3726+ "input": "https://\ufffd",3727+ "base": null,3728+ "failure": true3729+ },3730+ {3731+ "input": "https://%EF%BF%BD",3732+ "base": null,3733+ "failure": true3734+ },3735+ {3736+ "input": "https://x/\ufffd?\ufffd#\ufffd",3737+ "base": null,3738+ "href": "https://x/%EF%BF%BD?%EF%BF%BD#%EF%BF%BD",3739+ "origin": "https://x",3740+ "protocol": "https:",3741+ "username": "",3742+ "password": "",3743+ "host": "x",3744+ "hostname": "x",3745+ "port": "",3746+ "pathname": "/%EF%BF%BD",3747+ "search": "?%EF%BF%BD",3748+ "hash": "#%EF%BF%BD"3749+ },3750+ "Domain is ASCII, but a label is invalid IDNA",3751+ {3752+ "input": "http://a.b.c.xn--pokxncvks",3753+ "base": null,3754+ "failure": true3755+ },3756+ {3757+ "input": "http://10.0.0.xn--pokxncvks",3758+ "base": null,3759+ "failure": true3760+ },3761+ "IDNA labels should be matched case-insensitively",3762+ {3763+ "input": "http://a.b.c.XN--pokxncvks",3764+ "base": null,3765+ "failure": true3766+ },3767+ {3768+ "input": "http://a.b.c.Xn--pokxncvks",3769+ "base": null,3770+ "failure": true3771+ },3772+ {3773+ "input": "http://10.0.0.XN--pokxncvks",3774+ "base": null,3775+ "failure": true3776+ },3777+ {3778+ "input": "http://10.0.0.xN--pokxncvks",3779+ "base": null,3780+ "failure": true3781+ },3782+ "Test name prepping, fullwidth input should be converted to ASCII and NOT IDN-ized. This is 'Go' in fullwidth UTF-8/UTF-16.",3783+ {3784+ "input": "http://Go.com",3785+ "base": "http://other.com/",3786+ "href": "http://go.com/",3787+ "origin": "http://go.com",3788+ "protocol": "http:",3789+ "username": "",3790+ "password": "",3791+ "host": "go.com",3792+ "hostname": "go.com",3793+ "port": "",3794+ "pathname": "/",3795+ "search": "",3796+ "hash": ""3797+ },3798+ "URL spec forbids the following. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24257",3799+ {3800+ "input": "http://%41.com",3801+ "base": "http://other.com/",3802+ "failure": true3803+ },3804+ {3805+ "input": "http://%ef%bc%85%ef%bc%94%ef%bc%91.com",3806+ "base": "http://other.com/",3807+ "failure": true3808+ },3809+ "...%00 in fullwidth should fail (also as escaped UTF-8 input)",3810+ {3811+ "input": "http://%00.com",3812+ "base": "http://other.com/",3813+ "failure": true3814+ },3815+ {3816+ "input": "http://%ef%bc%85%ef%bc%90%ef%bc%90.com",3817+ "base": "http://other.com/",3818+ "failure": true3819+ },3820+ "Basic IDN support, UTF-8 and UTF-16 input should be converted to IDN",3821+ {3822+ "input": "http://你好你好",3823+ "base": "http://other.com/",3824+ "href": "http://xn--6qqa088eba/",3825+ "origin": "http://xn--6qqa088eba",3826+ "protocol": "http:",3827+ "username": "",3828+ "password": "",3829+ "host": "xn--6qqa088eba",3830+ "hostname": "xn--6qqa088eba",3831+ "port": "",3832+ "pathname": "/",3833+ "search": "",3834+ "hash": ""3835+ },3836+ {3837+ "input": "https://faß.ExAmPlE/",3838+ "base": null,3839+ "href": "https://xn--fa-hia.example/",3840+ "origin": "https://xn--fa-hia.example",3841+ "protocol": "https:",3842+ "username": "",3843+ "password": "",3844+ "host": "xn--fa-hia.example",3845+ "hostname": "xn--fa-hia.example",3846+ "port": "",3847+ "pathname": "/",3848+ "search": "",3849+ "hash": ""3850+ },3851+ {3852+ "input": "sc://faß.ExAmPlE/",3853+ "base": null,3854+ "href": "sc://fa%C3%9F.ExAmPlE/",3855+ "origin": "null",3856+ "protocol": "sc:",3857+ "username": "",3858+ "password": "",3859+ "host": "fa%C3%9F.ExAmPlE",3860+ "hostname": "fa%C3%9F.ExAmPlE",3861+ "port": "",3862+ "pathname": "/",3863+ "search": "",3864+ "hash": ""3865+ },3866+ "Invalid escaped characters should fail and the percents should be escaped. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24191",3867+ {3868+ "input": "http://%zz%66%a.com",3869+ "base": "http://other.com/",3870+ "failure": true3871+ },3872+ "If we get an invalid character that has been escaped.",3873+ {3874+ "input": "http://%25",3875+ "base": "http://other.com/",3876+ "failure": true3877+ },3878+ {3879+ "input": "http://hello%00",3880+ "base": "http://other.com/",3881+ "failure": true3882+ },3883+ "Escaped numbers should be treated like IP addresses if they are.",3884+ {3885+ "input": "http://%30%78%63%30%2e%30%32%35%30.01",3886+ "base": "http://other.com/",3887+ "href": "http://192.168.0.1/",3888+ "origin": "http://192.168.0.1",3889+ "protocol": "http:",3890+ "username": "",3891+ "password": "",3892+ "host": "192.168.0.1",3893+ "hostname": "192.168.0.1",3894+ "port": "",3895+ "pathname": "/",3896+ "search": "",3897+ "hash": ""3898+ },3899+ {3900+ "input": "http://%30%78%63%30%2e%30%32%35%30.01%2e",3901+ "base": "http://other.com/",3902+ "href": "http://192.168.0.1/",3903+ "origin": "http://192.168.0.1",3904+ "protocol": "http:",3905+ "username": "",3906+ "password": "",3907+ "host": "192.168.0.1",3908+ "hostname": "192.168.0.1",3909+ "port": "",3910+ "pathname": "/",3911+ "search": "",3912+ "hash": ""3913+ },3914+ {3915+ "input": "http://192.168.0.257",3916+ "base": "http://other.com/",3917+ "failure": true3918+ },3919+ "Invalid escaping in hosts causes failure",3920+ {3921+ "input": "http://%3g%78%63%30%2e%30%32%35%30%2E.01",3922+ "base": "http://other.com/",3923+ "failure": true3924+ },3925+ "A space in a host causes failure",3926+ {3927+ "input": "http://192.168.0.1 hello",3928+ "base": "http://other.com/",3929+ "failure": true3930+ },3931+ {3932+ "input": "https://x x:12",3933+ "base": null,3934+ "failure": true3935+ },3936+ "Fullwidth and escaped UTF-8 fullwidth should still be treated as IP",3937+ {3938+ "input": "http://0Xc0.0250.01",3939+ "base": "http://other.com/",3940+ "href": "http://192.168.0.1/",3941+ "origin": "http://192.168.0.1",3942+ "protocol": "http:",3943+ "username": "",3944+ "password": "",3945+ "host": "192.168.0.1",3946+ "hostname": "192.168.0.1",3947+ "port": "",3948+ "pathname": "/",3949+ "search": "",3950+ "hash": ""3951+ },3952+ "Domains with empty labels",3953+ {3954+ "input": "http://./",3955+ "base": null,3956+ "href": "http://./",3957+ "origin": "http://.",3958+ "protocol": "http:",3959+ "username": "",3960+ "password": "",3961+ "host": ".",3962+ "hostname": ".",3963+ "port": "",3964+ "pathname": "/",3965+ "search": "",3966+ "hash": ""3967+ },3968+ {3969+ "input": "http://../",3970+ "base": null,3971+ "href": "http://../",3972+ "origin": "http://..",3973+ "protocol": "http:",3974+ "username": "",3975+ "password": "",3976+ "host": "..",3977+ "hostname": "..",3978+ "port": "",3979+ "pathname": "/",3980+ "search": "",3981+ "hash": ""3982+ },3983+ "Non-special domains with empty labels",3984+ {3985+ "input": "h://.",3986+ "base": null,3987+ "href": "h://.",3988+ "origin": "null",3989+ "protocol": "h:",3990+ "username": "",3991+ "password": "",3992+ "host": ".",3993+ "hostname": ".",3994+ "port": "",3995+ "pathname": "",3996+ "search": "",3997+ "hash": ""3998+ },3999+ "Broken IPv6",4000+ {4001+ "input": "http://[www.google.com]/",4002+ "base": null,4003+ "failure": true4004+ },4005+ {4006+ "input": "http://[google.com]",4007+ "base": "http://other.com/",4008+ "failure": true4009+ },4010+ {4011+ "input": "http://[::1.2.3.4x]",4012+ "base": "http://other.com/",4013+ "failure": true4014+ },4015+ {4016+ "input": "http://[::1.2.3.]",4017+ "base": "http://other.com/",4018+ "failure": true4019+ },4020+ {4021+ "input": "http://[::1.2.]",4022+ "base": "http://other.com/",4023+ "failure": true4024+ },4025+ {4026+ "input": "http://[::.1.2]",4027+ "base": "http://other.com/",4028+ "failure": true4029+ },4030+ {4031+ "input": "http://[::1.]",4032+ "base": "http://other.com/",4033+ "failure": true4034+ },4035+ {4036+ "input": "http://[::.1]",4037+ "base": "http://other.com/",4038+ "failure": true4039+ },4040+ {4041+ "input": "http://[::%31]",4042+ "base": "http://other.com/",4043+ "failure": true4044+ },4045+ {4046+ "input": "http://%5B::1]",4047+ "base": "http://other.com/",4048+ "failure": true4049+ },4050+ "Misc Unicode",4051+ {4052+ "input": "http://foo:💩@example.com/bar",4053+ "base": "http://other.com/",4054+ "href": "http://foo:%F0%9F%92%A9@example.com/bar",4055+ "origin": "http://example.com",4056+ "protocol": "http:",4057+ "username": "foo",4058+ "password": "%F0%9F%92%A9",4059+ "host": "example.com",4060+ "hostname": "example.com",4061+ "port": "",4062+ "pathname": "/bar",4063+ "search": "",4064+ "hash": ""4065+ },4066+ "# resolving a fragment against any scheme succeeds",4067+ {4068+ "input": "#",4069+ "base": "test:test",4070+ "href": "test:test#",4071+ "origin": "null",4072+ "protocol": "test:",4073+ "username": "",4074+ "password": "",4075+ "host": "",4076+ "hostname": "",4077+ "port": "",4078+ "pathname": "test",4079+ "search": "",4080+ "hash": ""4081+ },4082+ {4083+ "input": "#x",4084+ "base": "mailto:x@x.com",4085+ "href": "mailto:x@x.com#x",4086+ "origin": "null",4087+ "protocol": "mailto:",4088+ "username": "",4089+ "password": "",4090+ "host": "",4091+ "hostname": "",4092+ "port": "",4093+ "pathname": "x@x.com",4094+ "search": "",4095+ "hash": "#x"4096+ },4097+ {4098+ "input": "#x",4099+ "base": "data:,",4100+ "href": "data:,#x",4101+ "origin": "null",4102+ "protocol": "data:",4103+ "username": "",4104+ "password": "",4105+ "host": "",4106+ "hostname": "",4107+ "port": "",4108+ "pathname": ",",4109+ "search": "",4110+ "hash": "#x"4111+ },4112+ {4113+ "input": "#x",4114+ "base": "about:blank",4115+ "href": "about:blank#x",4116+ "origin": "null",4117+ "protocol": "about:",4118+ "username": "",4119+ "password": "",4120+ "host": "",4121+ "hostname": "",4122+ "port": "",4123+ "pathname": "blank",4124+ "search": "",4125+ "hash": "#x"4126+ },4127+ {4128+ "input": "#x:y",4129+ "base": "about:blank",4130+ "href": "about:blank#x:y",4131+ "origin": "null",4132+ "protocol": "about:",4133+ "username": "",4134+ "password": "",4135+ "host": "",4136+ "hostname": "",4137+ "port": "",4138+ "pathname": "blank",4139+ "search": "",4140+ "hash": "#x:y"4141+ },4142+ {4143+ "input": "#",4144+ "base": "test:test?test",4145+ "href": "test:test?test#",4146+ "origin": "null",4147+ "protocol": "test:",4148+ "username": "",4149+ "password": "",4150+ "host": "",4151+ "hostname": "",4152+ "port": "",4153+ "pathname": "test",4154+ "search": "?test",4155+ "hash": ""4156+ },4157+ "# multiple @ in authority state",4158+ {4159+ "input": "https://@test@test@example:800/",4160+ "base": "http://doesnotmatter/",4161+ "href": "https://%40test%40test@example:800/",4162+ "origin": "https://example:800",4163+ "protocol": "https:",4164+ "username": "%40test%40test",4165+ "password": "",4166+ "host": "example:800",4167+ "hostname": "example",4168+ "port": "800",4169+ "pathname": "/",4170+ "search": "",4171+ "hash": ""4172+ },4173+ {4174+ "input": "https://@@@example",4175+ "base": "http://doesnotmatter/",4176+ "href": "https://%40%40@example/",4177+ "origin": "https://example",4178+ "protocol": "https:",4179+ "username": "%40%40",4180+ "password": "",4181+ "host": "example",4182+ "hostname": "example",4183+ "port": "",4184+ "pathname": "/",4185+ "search": "",4186+ "hash": ""4187+ },4188+ "non-az-09 characters",4189+ {4190+ "input": "http://`{}:`{}@h/`{}?`{}",4191+ "base": "http://doesnotmatter/",4192+ "href": "http://%60%7B%7D:%60%7B%7D@h/%60%7B%7D?`{}",4193+ "origin": "http://h",4194+ "protocol": "http:",4195+ "username": "%60%7B%7D",4196+ "password": "%60%7B%7D",4197+ "host": "h",4198+ "hostname": "h",4199+ "port": "",4200+ "pathname": "/%60%7B%7D",4201+ "search": "?`{}",4202+ "hash": ""4203+ },4204+ "byte is ' and url is special",4205+ {4206+ "input": "http://host/?'",4207+ "base": null,4208+ "href": "http://host/?%27",4209+ "origin": "http://host",4210+ "protocol": "http:",4211+ "username": "",4212+ "password": "",4213+ "host": "host",4214+ "hostname": "host",4215+ "port": "",4216+ "pathname": "/",4217+ "search": "?%27",4218+ "hash": ""4219+ },4220+ {4221+ "input": "notspecial://host/?'",4222+ "base": null,4223+ "href": "notspecial://host/?'",4224+ "origin": "null",4225+ "protocol": "notspecial:",4226+ "username": "",4227+ "password": "",4228+ "host": "host",4229+ "hostname": "host",4230+ "port": "",4231+ "pathname": "/",4232+ "search": "?'",4233+ "hash": ""4234+ },4235+ "# Credentials in base",4236+ {4237+ "input": "/some/path",4238+ "base": "http://user@example.org/smth",4239+ "href": "http://user@example.org/some/path",4240+ "origin": "http://example.org",4241+ "protocol": "http:",4242+ "username": "user",4243+ "password": "",4244+ "host": "example.org",4245+ "hostname": "example.org",4246+ "port": "",4247+ "pathname": "/some/path",4248+ "search": "",4249+ "hash": ""4250+ },4251+ {4252+ "input": "",4253+ "base": "http://user:pass@example.org:21/smth",4254+ "href": "http://user:pass@example.org:21/smth",4255+ "origin": "http://example.org:21",4256+ "protocol": "http:",4257+ "username": "user",4258+ "password": "pass",4259+ "host": "example.org:21",4260+ "hostname": "example.org",4261+ "port": "21",4262+ "pathname": "/smth",4263+ "search": "",4264+ "hash": ""4265+ },4266+ {4267+ "input": "/some/path",4268+ "base": "http://user:pass@example.org:21/smth",4269+ "href": "http://user:pass@example.org:21/some/path",4270+ "origin": "http://example.org:21",4271+ "protocol": "http:",4272+ "username": "user",4273+ "password": "pass",4274+ "host": "example.org:21",4275+ "hostname": "example.org",4276+ "port": "21",4277+ "pathname": "/some/path",4278+ "search": "",4279+ "hash": ""4280+ },4281+ "# a set of tests designed by zcorpan for relative URLs with unknown schemes",4282+ {4283+ "input": "i",4284+ "base": "sc:sd",4285+ "failure": true4286+ },4287+ {4288+ "input": "i",4289+ "base": "sc:sd/sd",4290+ "failure": true4291+ },4292+ {4293+ "input": "i",4294+ "base": "sc:/pa/pa",4295+ "href": "sc:/pa/i",4296+ "origin": "null",4297+ "protocol": "sc:",4298+ "username": "",4299+ "password": "",4300+ "host": "",4301+ "hostname": "",4302+ "port": "",4303+ "pathname": "/pa/i",4304+ "search": "",4305+ "hash": ""4306+ },4307+ {4308+ "input": "i",4309+ "base": "sc://ho/pa",4310+ "href": "sc://ho/i",4311+ "origin": "null",4312+ "protocol": "sc:",4313+ "username": "",4314+ "password": "",4315+ "host": "ho",4316+ "hostname": "ho",4317+ "port": "",4318+ "pathname": "/i",4319+ "search": "",4320+ "hash": ""4321+ },4322+ {4323+ "input": "i",4324+ "base": "sc:///pa/pa",4325+ "href": "sc:///pa/i",4326+ "origin": "null",4327+ "protocol": "sc:",4328+ "username": "",4329+ "password": "",4330+ "host": "",4331+ "hostname": "",4332+ "port": "",4333+ "pathname": "/pa/i",4334+ "search": "",4335+ "hash": ""4336+ },4337+ {4338+ "input": "../i",4339+ "base": "sc:sd",4340+ "failure": true4341+ },4342+ {4343+ "input": "../i",4344+ "base": "sc:sd/sd",4345+ "failure": true4346+ },4347+ {4348+ "input": "../i",4349+ "base": "sc:/pa/pa",4350+ "href": "sc:/i",4351+ "origin": "null",4352+ "protocol": "sc:",4353+ "username": "",4354+ "password": "",4355+ "host": "",4356+ "hostname": "",4357+ "port": "",4358+ "pathname": "/i",4359+ "search": "",4360+ "hash": ""4361+ },4362+ {4363+ "input": "../i",4364+ "base": "sc://ho/pa",4365+ "href": "sc://ho/i",4366+ "origin": "null",4367+ "protocol": "sc:",4368+ "username": "",4369+ "password": "",4370+ "host": "ho",4371+ "hostname": "ho",4372+ "port": "",4373+ "pathname": "/i",4374+ "search": "",4375+ "hash": ""4376+ },4377+ {4378+ "input": "../i",4379+ "base": "sc:///pa/pa",4380+ "href": "sc:///i",4381+ "origin": "null",4382+ "protocol": "sc:",4383+ "username": "",4384+ "password": "",4385+ "host": "",4386+ "hostname": "",4387+ "port": "",4388+ "pathname": "/i",4389+ "search": "",4390+ "hash": ""4391+ },4392+ {4393+ "input": "/i",4394+ "base": "sc:sd",4395+ "failure": true4396+ },4397+ {4398+ "input": "/i",4399+ "base": "sc:sd/sd",4400+ "failure": true4401+ },4402+ {4403+ "input": "/i",4404+ "base": "sc:/pa/pa",4405+ "href": "sc:/i",4406+ "origin": "null",4407+ "protocol": "sc:",4408+ "username": "",4409+ "password": "",4410+ "host": "",4411+ "hostname": "",4412+ "port": "",4413+ "pathname": "/i",4414+ "search": "",4415+ "hash": ""4416+ },4417+ {4418+ "input": "/i",4419+ "base": "sc://ho/pa",4420+ "href": "sc://ho/i",4421+ "origin": "null",4422+ "protocol": "sc:",4423+ "username": "",4424+ "password": "",4425+ "host": "ho",4426+ "hostname": "ho",4427+ "port": "",4428+ "pathname": "/i",4429+ "search": "",4430+ "hash": ""4431+ },4432+ {4433+ "input": "/i",4434+ "base": "sc:///pa/pa",4435+ "href": "sc:///i",4436+ "origin": "null",4437+ "protocol": "sc:",4438+ "username": "",4439+ "password": "",4440+ "host": "",4441+ "hostname": "",4442+ "port": "",4443+ "pathname": "/i",4444+ "search": "",4445+ "hash": ""4446+ },4447+ {4448+ "input": "?i",4449+ "base": "sc:sd",4450+ "failure": true4451+ },4452+ {4453+ "input": "?i",4454+ "base": "sc:sd/sd",4455+ "failure": true4456+ },4457+ {4458+ "input": "?i",4459+ "base": "sc:/pa/pa",4460+ "href": "sc:/pa/pa?i",4461+ "origin": "null",4462+ "protocol": "sc:",4463+ "username": "",4464+ "password": "",4465+ "host": "",4466+ "hostname": "",4467+ "port": "",4468+ "pathname": "/pa/pa",4469+ "search": "?i",4470+ "hash": ""4471+ },4472+ {4473+ "input": "?i",4474+ "base": "sc://ho/pa",4475+ "href": "sc://ho/pa?i",4476+ "origin": "null",4477+ "protocol": "sc:",4478+ "username": "",4479+ "password": "",4480+ "host": "ho",4481+ "hostname": "ho",4482+ "port": "",4483+ "pathname": "/pa",4484+ "search": "?i",4485+ "hash": ""4486+ },4487+ {4488+ "input": "?i",4489+ "base": "sc:///pa/pa",4490+ "href": "sc:///pa/pa?i",4491+ "origin": "null",4492+ "protocol": "sc:",4493+ "username": "",4494+ "password": "",4495+ "host": "",4496+ "hostname": "",4497+ "port": "",4498+ "pathname": "/pa/pa",4499+ "search": "?i",4500+ "hash": ""4501+ },4502+ {4503+ "input": "#i",4504+ "base": "sc:sd",4505+ "href": "sc:sd#i",4506+ "origin": "null",4507+ "protocol": "sc:",4508+ "username": "",4509+ "password": "",4510+ "host": "",4511+ "hostname": "",4512+ "port": "",4513+ "pathname": "sd",4514+ "search": "",4515+ "hash": "#i"4516+ },4517+ {4518+ "input": "#i",4519+ "base": "sc:sd/sd",4520+ "href": "sc:sd/sd#i",4521+ "origin": "null",4522+ "protocol": "sc:",4523+ "username": "",4524+ "password": "",4525+ "host": "",4526+ "hostname": "",4527+ "port": "",4528+ "pathname": "sd/sd",4529+ "search": "",4530+ "hash": "#i"4531+ },4532+ {4533+ "input": "#i",4534+ "base": "sc:/pa/pa",4535+ "href": "sc:/pa/pa#i",4536+ "origin": "null",4537+ "protocol": "sc:",4538+ "username": "",4539+ "password": "",4540+ "host": "",4541+ "hostname": "",4542+ "port": "",4543+ "pathname": "/pa/pa",4544+ "search": "",4545+ "hash": "#i"4546+ },4547+ {4548+ "input": "#i",4549+ "base": "sc://ho/pa",4550+ "href": "sc://ho/pa#i",4551+ "origin": "null",4552+ "protocol": "sc:",4553+ "username": "",4554+ "password": "",4555+ "host": "ho",4556+ "hostname": "ho",4557+ "port": "",4558+ "pathname": "/pa",4559+ "search": "",4560+ "hash": "#i"4561+ },4562+ {4563+ "input": "#i",4564+ "base": "sc:///pa/pa",4565+ "href": "sc:///pa/pa#i",4566+ "origin": "null",4567+ "protocol": "sc:",4568+ "username": "",4569+ "password": "",4570+ "host": "",4571+ "hostname": "",4572+ "port": "",4573+ "pathname": "/pa/pa",4574+ "search": "",4575+ "hash": "#i"4576+ },4577+ "# make sure that relative URL logic works on known typically non-relative schemes too",4578+ {4579+ "input": "about:/../",4580+ "base": null,4581+ "href": "about:/",4582+ "origin": "null",4583+ "protocol": "about:",4584+ "username": "",4585+ "password": "",4586+ "host": "",4587+ "hostname": "",4588+ "port": "",4589+ "pathname": "/",4590+ "search": "",4591+ "hash": ""4592+ },4593+ {4594+ "input": "data:/../",4595+ "base": null,4596+ "href": "data:/",4597+ "origin": "null",4598+ "protocol": "data:",4599+ "username": "",4600+ "password": "",4601+ "host": "",4602+ "hostname": "",4603+ "port": "",4604+ "pathname": "/",4605+ "search": "",4606+ "hash": ""4607+ },4608+ {4609+ "input": "javascript:/../",4610+ "base": null,4611+ "href": "javascript:/",4612+ "origin": "null",4613+ "protocol": "javascript:",4614+ "username": "",4615+ "password": "",4616+ "host": "",4617+ "hostname": "",4618+ "port": "",4619+ "pathname": "/",4620+ "search": "",4621+ "hash": ""4622+ },4623+ {4624+ "input": "mailto:/../",4625+ "base": null,4626+ "href": "mailto:/",4627+ "origin": "null",4628+ "protocol": "mailto:",4629+ "username": "",4630+ "password": "",4631+ "host": "",4632+ "hostname": "",4633+ "port": "",4634+ "pathname": "/",4635+ "search": "",4636+ "hash": ""4637+ },4638+ "# unknown schemes and their hosts",4639+ {4640+ "input": "sc://ñ.test/",4641+ "base": null,4642+ "href": "sc://%C3%B1.test/",4643+ "origin": "null",4644+ "protocol": "sc:",4645+ "username": "",4646+ "password": "",4647+ "host": "%C3%B1.test",4648+ "hostname": "%C3%B1.test",4649+ "port": "",4650+ "pathname": "/",4651+ "search": "",4652+ "hash": ""4653+ },4654+ {4655+ "input": "sc://%/",4656+ "base": null,4657+ "href": "sc://%/",4658+ "protocol": "sc:",4659+ "username": "",4660+ "password": "",4661+ "host": "%",4662+ "hostname": "%",4663+ "port": "",4664+ "pathname": "/",4665+ "search": "",4666+ "hash": ""4667+ },4668+ {4669+ "input": "sc://@/",4670+ "base": null,4671+ "failure": true4672+ },4673+ {4674+ "input": "sc://te@s:t@/",4675+ "base": null,4676+ "failure": true4677+ },4678+ {4679+ "input": "sc://:/",4680+ "base": null,4681+ "failure": true4682+ },4683+ {4684+ "input": "sc://:12/",4685+ "base": null,4686+ "failure": true4687+ },4688+ {4689+ "input": "x",4690+ "base": "sc://ñ",4691+ "href": "sc://%C3%B1/x",4692+ "origin": "null",4693+ "protocol": "sc:",4694+ "username": "",4695+ "password": "",4696+ "host": "%C3%B1",4697+ "hostname": "%C3%B1",4698+ "port": "",4699+ "pathname": "/x",4700+ "search": "",4701+ "hash": ""4702+ },4703+ "# unknown schemes and backslashes",4704+ {4705+ "input": "sc:\\../",4706+ "base": null,4707+ "href": "sc:\\../",4708+ "origin": "null",4709+ "protocol": "sc:",4710+ "username": "",4711+ "password": "",4712+ "host": "",4713+ "hostname": "",4714+ "port": "",4715+ "pathname": "\\../",4716+ "search": "",4717+ "hash": ""4718+ },4719+ "# unknown scheme with path looking like a password",4720+ {4721+ "input": "sc::a@example.net",4722+ "base": null,4723+ "href": "sc::a@example.net",4724+ "origin": "null",4725+ "protocol": "sc:",4726+ "username": "",4727+ "password": "",4728+ "host": "",4729+ "hostname": "",4730+ "port": "",4731+ "pathname": ":a@example.net",4732+ "search": "",4733+ "hash": ""4734+ },4735+ "# unknown scheme with bogus percent-encoding",4736+ {4737+ "input": "wow:%NBD",4738+ "base": null,4739+ "href": "wow:%NBD",4740+ "origin": "null",4741+ "protocol": "wow:",4742+ "username": "",4743+ "password": "",4744+ "host": "",4745+ "hostname": "",4746+ "port": "",4747+ "pathname": "%NBD",4748+ "search": "",4749+ "hash": ""4750+ },4751+ {4752+ "input": "wow:%1G",4753+ "base": null,4754+ "href": "wow:%1G",4755+ "origin": "null",4756+ "protocol": "wow:",4757+ "username": "",4758+ "password": "",4759+ "host": "",4760+ "hostname": "",4761+ "port": "",4762+ "pathname": "%1G",4763+ "search": "",4764+ "hash": ""4765+ },4766+ "# unknown scheme with non-URL characters",4767+ {4768+ "input": "wow:\uFFFF",4769+ "base": null,4770+ "href": "wow:%EF%BF%BF",4771+ "origin": "null",4772+ "protocol": "wow:",4773+ "username": "",4774+ "password": "",4775+ "host": "",4776+ "hostname": "",4777+ "port": "",4778+ "pathname": "%EF%BF%BF",4779+ "search": "",4780+ "hash": ""4781+ },4782+ {4783+ "input": "http://example.com/\uD800\uD801\uDFFE\uDFFF\uFDD0\uFDCF\uFDEF\uFDF0\uFFFE\uFFFF?\uD800\uD801\uDFFE\uDFFF\uFDD0\uFDCF\uFDEF\uFDF0\uFFFE\uFFFF",4784+ "base": null,4785+ "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",4786+ "origin": "http://example.com",4787+ "protocol": "http:",4788+ "username": "",4789+ "password": "",4790+ "host": "example.com",4791+ "hostname": "example.com",4792+ "port": "",4793+ "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",4794+ "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",4795+ "hash": ""4796+ },4797+ "Forbidden host code points",4798+ {4799+ "input": "sc://a\u0000b/",4800+ "base": null,4801+ "failure": true4802+ },4803+ {4804+ "input": "sc://a b/",4805+ "base": null,4806+ "failure": true4807+ },4808+ {4809+ "input": "sc://a<b",4810+ "base": null,4811+ "failure": true4812+ },4813+ {4814+ "input": "sc://a>b",4815+ "base": null,4816+ "failure": true4817+ },4818+ {4819+ "input": "sc://a[b/",4820+ "base": null,4821+ "failure": true4822+ },4823+ {4824+ "input": "sc://a\\b/",4825+ "base": null,4826+ "failure": true4827+ },4828+ {4829+ "input": "sc://a]b/",4830+ "base": null,4831+ "failure": true4832+ },4833+ {4834+ "input": "sc://a^b",4835+ "base": null,4836+ "failure": true4837+ },4838+ {4839+ "input": "sc://a|b/",4840+ "base": null,4841+ "failure": true4842+ },4843+ "Forbidden host codepoints: tabs and newlines are removed during preprocessing",4844+ {4845+ "input": "foo://ho\u0009st/",4846+ "base": null,4847+ "hash": "",4848+ "host": "host",4849+ "hostname": "host",4850+ "href":"foo://host/",4851+ "password": "",4852+ "pathname": "/",4853+ "port":"",4854+ "protocol": "foo:",4855+ "search": "",4856+ "username": ""4857+ },4858+ {4859+ "input": "foo://ho\u000Ast/",4860+ "base": null,4861+ "hash": "",4862+ "host": "host",4863+ "hostname": "host",4864+ "href":"foo://host/",4865+ "password": "",4866+ "pathname": "/",4867+ "port":"",4868+ "protocol": "foo:",4869+ "search": "",4870+ "username": ""4871+ },4872+ {4873+ "input": "foo://ho\u000Dst/",4874+ "base": null,4875+ "hash": "",4876+ "host": "host",4877+ "hostname": "host",4878+ "href":"foo://host/",4879+ "password": "",4880+ "pathname": "/",4881+ "port":"",4882+ "protocol": "foo:",4883+ "search": "",4884+ "username": ""4885+ },4886+ "Forbidden domain code-points",4887+ {4888+ "input": "http://a\u0000b/",4889+ "base": null,4890+ "failure": true4891+ },4892+ {4893+ "input": "http://a\u0001b/",4894+ "base": null,4895+ "failure": true4896+ },4897+ {4898+ "input": "http://a\u0002b/",4899+ "base": null,4900+ "failure": true4901+ },4902+ {4903+ "input": "http://a\u0003b/",4904+ "base": null,4905+ "failure": true4906+ },4907+ {4908+ "input": "http://a\u0004b/",4909+ "base": null,4910+ "failure": true4911+ },4912+ {4913+ "input": "http://a\u0005b/",4914+ "base": null,4915+ "failure": true4916+ },4917+ {4918+ "input": "http://a\u0006b/",4919+ "base": null,4920+ "failure": true4921+ },4922+ {4923+ "input": "http://a\u0007b/",4924+ "base": null,4925+ "failure": true4926+ },4927+ {4928+ "input": "http://a\u0008b/",4929+ "base": null,4930+ "failure": true4931+ },4932+ {4933+ "input": "http://a\u000Bb/",4934+ "base": null,4935+ "failure": true4936+ },4937+ {4938+ "input": "http://a\u000Cb/",4939+ "base": null,4940+ "failure": true4941+ },4942+ {4943+ "input": "http://a\u000Eb/",4944+ "base": null,4945+ "failure": true4946+ },4947+ {4948+ "input": "http://a\u000Fb/",4949+ "base": null,4950+ "failure": true4951+ },4952+ {4953+ "input": "http://a\u0010b/",4954+ "base": null,4955+ "failure": true4956+ },4957+ {4958+ "input": "http://a\u0011b/",4959+ "base": null,4960+ "failure": true4961+ },4962+ {4963+ "input": "http://a\u0012b/",4964+ "base": null,4965+ "failure": true4966+ },4967+ {4968+ "input": "http://a\u0013b/",4969+ "base": null,4970+ "failure": true4971+ },4972+ {4973+ "input": "http://a\u0014b/",4974+ "base": null,4975+ "failure": true4976+ },4977+ {4978+ "input": "http://a\u0015b/",4979+ "base": null,4980+ "failure": true4981+ },4982+ {4983+ "input": "http://a\u0016b/",4984+ "base": null,4985+ "failure": true4986+ },4987+ {4988+ "input": "http://a\u0017b/",4989+ "base": null,4990+ "failure": true4991+ },4992+ {4993+ "input": "http://a\u0018b/",4994+ "base": null,4995+ "failure": true4996+ },4997+ {4998+ "input": "http://a\u0019b/",4999+ "base": null,5000+ "failure": true5001+ },5002+ {5003+ "input": "http://a\u001Ab/",5004+ "base": null,5005+ "failure": true5006+ },5007+ {5008+ "input": "http://a\u001Bb/",5009+ "base": null,5010+ "failure": true5011+ },5012+ {5013+ "input": "http://a\u001Cb/",5014+ "base": null,5015+ "failure": true5016+ },5017+ {5018+ "input": "http://a\u001Db/",5019+ "base": null,5020+ "failure": true5021+ },5022+ {5023+ "input": "http://a\u001Eb/",5024+ "base": null,5025+ "failure": true5026+ },5027+ {5028+ "input": "http://a\u001Fb/",5029+ "base": null,5030+ "failure": true5031+ },5032+ {5033+ "input": "http://a b/",5034+ "base": null,5035+ "failure": true5036+ },5037+ {5038+ "input": "http://a%b/",5039+ "base": null,5040+ "failure": true5041+ },5042+ {5043+ "input": "http://a<b",5044+ "base": null,5045+ "failure": true5046+ },5047+ {5048+ "input": "http://a>b",5049+ "base": null,5050+ "failure": true5051+ },5052+ {5053+ "input": "http://a[b/",5054+ "base": null,5055+ "failure": true5056+ },5057+ {5058+ "input": "http://a]b/",5059+ "base": null,5060+ "failure": true5061+ },5062+ {5063+ "input": "http://a^b",5064+ "base": null,5065+ "failure": true5066+ },5067+ {5068+ "input": "http://a|b/",5069+ "base": null,5070+ "failure": true5071+ },5072+ {5073+ "input": "http://a\u007Fb/",5074+ "base": null,5075+ "failure": true5076+ },5077+ "Forbidden domain codepoints: tabs and newlines are removed during preprocessing",5078+ {5079+ "input": "http://ho\u0009st/",5080+ "base": null,5081+ "hash": "",5082+ "host": "host",5083+ "hostname": "host",5084+ "href":"http://host/",5085+ "password": "",5086+ "pathname": "/",5087+ "port":"",5088+ "protocol": "http:",5089+ "search": "",5090+ "username": ""5091+ },5092+ {5093+ "input": "http://ho\u000Ast/",5094+ "base": null,5095+ "hash": "",5096+ "host": "host",5097+ "hostname": "host",5098+ "href":"http://host/",5099+ "password": "",5100+ "pathname": "/",5101+ "port":"",5102+ "protocol": "http:",5103+ "search": "",5104+ "username": ""5105+ },5106+ {5107+ "input": "http://ho\u000Dst/",5108+ "base": null,5109+ "hash": "",5110+ "host": "host",5111+ "hostname": "host",5112+ "href":"http://host/",5113+ "password": "",5114+ "pathname": "/",5115+ "port":"",5116+ "protocol": "http:",5117+ "search": "",5118+ "username": ""5119+ },5120+ "Encoded forbidden domain codepoints in special URLs",5121+ {5122+ "input": "http://ho%00st/",5123+ "base": null,5124+ "failure": true5125+ },5126+ {5127+ "input": "http://ho%01st/",5128+ "base": null,5129+ "failure": true5130+ },5131+ {5132+ "input": "http://ho%02st/",5133+ "base": null,5134+ "failure": true5135+ },5136+ {5137+ "input": "http://ho%03st/",5138+ "base": null,5139+ "failure": true5140+ },5141+ {5142+ "input": "http://ho%04st/",5143+ "base": null,5144+ "failure": true5145+ },5146+ {5147+ "input": "http://ho%05st/",5148+ "base": null,5149+ "failure": true5150+ },5151+ {5152+ "input": "http://ho%06st/",5153+ "base": null,5154+ "failure": true5155+ },5156+ {5157+ "input": "http://ho%07st/",5158+ "base": null,5159+ "failure": true5160+ },5161+ {5162+ "input": "http://ho%08st/",5163+ "base": null,5164+ "failure": true5165+ },5166+ {5167+ "input": "http://ho%09st/",5168+ "base": null,5169+ "failure": true5170+ },5171+ {5172+ "input": "http://ho%0Ast/",5173+ "base": null,5174+ "failure": true5175+ },5176+ {5177+ "input": "http://ho%0Bst/",5178+ "base": null,5179+ "failure": true5180+ },5181+ {5182+ "input": "http://ho%0Cst/",5183+ "base": null,5184+ "failure": true5185+ },5186+ {5187+ "input": "http://ho%0Dst/",5188+ "base": null,5189+ "failure": true5190+ },5191+ {5192+ "input": "http://ho%0Est/",5193+ "base": null,5194+ "failure": true5195+ },5196+ {5197+ "input": "http://ho%0Fst/",5198+ "base": null,5199+ "failure": true5200+ },5201+ {5202+ "input": "http://ho%10st/",5203+ "base": null,5204+ "failure": true5205+ },5206+ {5207+ "input": "http://ho%11st/",5208+ "base": null,5209+ "failure": true5210+ },5211+ {5212+ "input": "http://ho%12st/",5213+ "base": null,5214+ "failure": true5215+ },5216+ {5217+ "input": "http://ho%13st/",5218+ "base": null,5219+ "failure": true5220+ },5221+ {5222+ "input": "http://ho%14st/",5223+ "base": null,5224+ "failure": true5225+ },5226+ {5227+ "input": "http://ho%15st/",5228+ "base": null,5229+ "failure": true5230+ },5231+ {5232+ "input": "http://ho%16st/",5233+ "base": null,5234+ "failure": true5235+ },5236+ {5237+ "input": "http://ho%17st/",5238+ "base": null,5239+ "failure": true5240+ },5241+ {5242+ "input": "http://ho%18st/",5243+ "base": null,5244+ "failure": true5245+ },5246+ {5247+ "input": "http://ho%19st/",5248+ "base": null,5249+ "failure": true5250+ },5251+ {5252+ "input": "http://ho%1Ast/",5253+ "base": null,5254+ "failure": true5255+ },5256+ {5257+ "input": "http://ho%1Bst/",5258+ "base": null,5259+ "failure": true5260+ },5261+ {5262+ "input": "http://ho%1Cst/",5263+ "base": null,5264+ "failure": true5265+ },5266+ {5267+ "input": "http://ho%1Dst/",5268+ "base": null,5269+ "failure": true5270+ },5271+ {5272+ "input": "http://ho%1Est/",5273+ "base": null,5274+ "failure": true5275+ },5276+ {5277+ "input": "http://ho%1Fst/",5278+ "base": null,5279+ "failure": true5280+ },5281+ {5282+ "input": "http://ho%20st/",5283+ "base": null,5284+ "failure": true5285+ },5286+ {5287+ "input": "http://ho%23st/",5288+ "base": null,5289+ "failure": true5290+ },5291+ {5292+ "input": "http://ho%25st/",5293+ "base": null,5294+ "failure": true5295+ },5296+ {5297+ "input": "http://ho%2Fst/",5298+ "base": null,5299+ "failure": true5300+ },5301+ {5302+ "input": "http://ho%3Ast/",5303+ "base": null,5304+ "failure": true5305+ },5306+ {5307+ "input": "http://ho%3Cst/",5308+ "base": null,5309+ "failure": true5310+ },5311+ {5312+ "input": "http://ho%3Est/",5313+ "base": null,5314+ "failure": true5315+ },5316+ {5317+ "input": "http://ho%3Fst/",5318+ "base": null,5319+ "failure": true5320+ },5321+ {5322+ "input": "http://ho%40st/",5323+ "base": null,5324+ "failure": true5325+ },5326+ {5327+ "input": "http://ho%5Bst/",5328+ "base": null,5329+ "failure": true5330+ },5331+ {5332+ "input": "http://ho%5Cst/",5333+ "base": null,5334+ "failure": true5335+ },5336+ {5337+ "input": "http://ho%5Dst/",5338+ "base": null,5339+ "failure": true5340+ },5341+ {5342+ "input": "http://ho%7Cst/",5343+ "base": null,5344+ "failure": true5345+ },5346+ {5347+ "input": "http://ho%7Fst/",5348+ "base": null,5349+ "failure": true5350+ },5351+ "Allowed host/domain code points",5352+ {5353+ "input": "http://!\"$&'()*+,-.;=_`{}~/",5354+ "base": null,5355+ "href": "http://!\"$&'()*+,-.;=_`{}~/",5356+ "origin": "http://!\"$&'()*+,-.;=_`{}~",5357+ "protocol": "http:",5358+ "username": "",5359+ "password": "",5360+ "host": "!\"$&'()*+,-.;=_`{}~",5361+ "hostname": "!\"$&'()*+,-.;=_`{}~",5362+ "port": "",5363+ "pathname": "/",5364+ "search": "",5365+ "hash": ""5366+ },5367+ {5368+ "input": "sc://\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u000B\u000C\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F\u007F!\"$%&'()*+,-.;=_`{}~/",5369+ "base": null,5370+ "href": "sc://%01%02%03%04%05%06%07%08%0B%0C%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%7F!\"$%&'()*+,-.;=_`{}~/",5371+ "origin": "null",5372+ "protocol": "sc:",5373+ "username": "",5374+ "password": "",5375+ "host": "%01%02%03%04%05%06%07%08%0B%0C%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%7F!\"$%&'()*+,-.;=_`{}~",5376+ "hostname": "%01%02%03%04%05%06%07%08%0B%0C%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%7F!\"$%&'()*+,-.;=_`{}~",5377+ "port": "",5378+ "pathname": "/",5379+ "search": "",5380+ "hash": ""5381+ },5382+ "# Hosts and percent-encoding",5383+ {5384+ "input": "ftp://example.com%80/",5385+ "base": null,5386+ "failure": true5387+ },5388+ {5389+ "input": "ftp://example.com%A0/",5390+ "base": null,5391+ "failure": true5392+ },5393+ {5394+ "input": "https://example.com%80/",5395+ "base": null,5396+ "failure": true5397+ },5398+ {5399+ "input": "https://example.com%A0/",5400+ "base": null,5401+ "failure": true5402+ },5403+ {5404+ "input": "ftp://%e2%98%83",5405+ "base": null,5406+ "href": "ftp://xn--n3h/",5407+ "origin": "ftp://xn--n3h",5408+ "protocol": "ftp:",5409+ "username": "",5410+ "password": "",5411+ "host": "xn--n3h",5412+ "hostname": "xn--n3h",5413+ "port": "",5414+ "pathname": "/",5415+ "search": "",5416+ "hash": ""5417+ },5418+ {5419+ "input": "https://%e2%98%83",5420+ "base": null,5421+ "href": "https://xn--n3h/",5422+ "origin": "https://xn--n3h",5423+ "protocol": "https:",5424+ "username": "",5425+ "password": "",5426+ "host": "xn--n3h",5427+ "hostname": "xn--n3h",5428+ "port": "",5429+ "pathname": "/",5430+ "search": "",5431+ "hash": ""5432+ },5433+ "# tests from jsdom/whatwg-url designed for code coverage",5434+ {5435+ "input": "http://127.0.0.1:10100/relative_import.html",5436+ "base": null,5437+ "href": "http://127.0.0.1:10100/relative_import.html",5438+ "origin": "http://127.0.0.1:10100",5439+ "protocol": "http:",5440+ "username": "",5441+ "password": "",5442+ "host": "127.0.0.1:10100",5443+ "hostname": "127.0.0.1",5444+ "port": "10100",5445+ "pathname": "/relative_import.html",5446+ "search": "",5447+ "hash": ""5448+ },5449+ {5450+ "input": "http://facebook.com/?foo=%7B%22abc%22",5451+ "base": null,5452+ "href": "http://facebook.com/?foo=%7B%22abc%22",5453+ "origin": "http://facebook.com",5454+ "protocol": "http:",5455+ "username": "",5456+ "password": "",5457+ "host": "facebook.com",5458+ "hostname": "facebook.com",5459+ "port": "",5460+ "pathname": "/",5461+ "search": "?foo=%7B%22abc%22",5462+ "hash": ""5463+ },5464+ {5465+ "input": "https://localhost:3000/jqueryui@1.2.3",5466+ "base": null,5467+ "href": "https://localhost:3000/jqueryui@1.2.3",5468+ "origin": "https://localhost:3000",5469+ "protocol": "https:",5470+ "username": "",5471+ "password": "",5472+ "host": "localhost:3000",5473+ "hostname": "localhost",5474+ "port": "3000",5475+ "pathname": "/jqueryui@1.2.3",5476+ "search": "",5477+ "hash": ""5478+ },5479+ "# tab/LF/CR",5480+ {5481+ "input": "h\tt\nt\rp://h\to\ns\rt:9\t0\n0\r0/p\ta\nt\rh?q\tu\ne\rry#f\tr\na\rg",5482+ "base": null,5483+ "href": "http://host:9000/path?query#frag",5484+ "origin": "http://host:9000",5485+ "protocol": "http:",5486+ "username": "",5487+ "password": "",5488+ "host": "host:9000",5489+ "hostname": "host",5490+ "port": "9000",5491+ "pathname": "/path",5492+ "search": "?query",5493+ "hash": "#frag"5494+ },5495+ "# Stringification of URL.searchParams",5496+ {5497+ "input": "?a=b&c=d",5498+ "base": "http://example.org/foo/bar",5499+ "href": "http://example.org/foo/bar?a=b&c=d",5500+ "origin": "http://example.org",5501+ "protocol": "http:",5502+ "username": "",5503+ "password": "",5504+ "host": "example.org",5505+ "hostname": "example.org",5506+ "port": "",5507+ "pathname": "/foo/bar",5508+ "search": "?a=b&c=d",5509+ "searchParams": "a=b&c=d",5510+ "hash": ""5511+ },5512+ {5513+ "input": "??a=b&c=d",5514+ "base": "http://example.org/foo/bar",5515+ "href": "http://example.org/foo/bar??a=b&c=d",5516+ "origin": "http://example.org",5517+ "protocol": "http:",5518+ "username": "",5519+ "password": "",5520+ "host": "example.org",5521+ "hostname": "example.org",5522+ "port": "",5523+ "pathname": "/foo/bar",5524+ "search": "??a=b&c=d",5525+ "searchParams": "%3Fa=b&c=d",5526+ "hash": ""5527+ },5528+ "# Scheme only",5529+ {5530+ "input": "http:",5531+ "base": "http://example.org/foo/bar",5532+ "href": "http://example.org/foo/bar",5533+ "origin": "http://example.org",5534+ "protocol": "http:",5535+ "username": "",5536+ "password": "",5537+ "host": "example.org",5538+ "hostname": "example.org",5539+ "port": "",5540+ "pathname": "/foo/bar",5541+ "search": "",5542+ "searchParams": "",5543+ "hash": ""5544+ },5545+ {5546+ "input": "http:",5547+ "base": "https://example.org/foo/bar",5548+ "failure": true5549+ },5550+ {5551+ "input": "sc:",5552+ "base": "https://example.org/foo/bar",5553+ "href": "sc:",5554+ "origin": "null",5555+ "protocol": "sc:",5556+ "username": "",5557+ "password": "",5558+ "host": "",5559+ "hostname": "",5560+ "port": "",5561+ "pathname": "",5562+ "search": "",5563+ "searchParams": "",5564+ "hash": ""5565+ },5566+ "# Percent encoding of fragments",5567+ {5568+ "input": "http://foo.bar/baz?qux#foo\bbar",5569+ "base": null,5570+ "href": "http://foo.bar/baz?qux#foo%08bar",5571+ "origin": "http://foo.bar",5572+ "protocol": "http:",5573+ "username": "",5574+ "password": "",5575+ "host": "foo.bar",5576+ "hostname": "foo.bar",5577+ "port": "",5578+ "pathname": "/baz",5579+ "search": "?qux",5580+ "searchParams": "qux=",5581+ "hash": "#foo%08bar"5582+ },5583+ {5584+ "input": "http://foo.bar/baz?qux#foo\"bar",5585+ "base": null,5586+ "href": "http://foo.bar/baz?qux#foo%22bar",5587+ "origin": "http://foo.bar",5588+ "protocol": "http:",5589+ "username": "",5590+ "password": "",5591+ "host": "foo.bar",5592+ "hostname": "foo.bar",5593+ "port": "",5594+ "pathname": "/baz",5595+ "search": "?qux",5596+ "searchParams": "qux=",5597+ "hash": "#foo%22bar"5598+ },5599+ {5600+ "input": "http://foo.bar/baz?qux#foo<bar",5601+ "base": null,5602+ "href": "http://foo.bar/baz?qux#foo%3Cbar",5603+ "origin": "http://foo.bar",5604+ "protocol": "http:",5605+ "username": "",5606+ "password": "",5607+ "host": "foo.bar",5608+ "hostname": "foo.bar",5609+ "port": "",5610+ "pathname": "/baz",5611+ "search": "?qux",5612+ "searchParams": "qux=",5613+ "hash": "#foo%3Cbar"5614+ },5615+ {5616+ "input": "http://foo.bar/baz?qux#foo>bar",5617+ "base": null,5618+ "href": "http://foo.bar/baz?qux#foo%3Ebar",5619+ "origin": "http://foo.bar",5620+ "protocol": "http:",5621+ "username": "",5622+ "password": "",5623+ "host": "foo.bar",5624+ "hostname": "foo.bar",5625+ "port": "",5626+ "pathname": "/baz",5627+ "search": "?qux",5628+ "searchParams": "qux=",5629+ "hash": "#foo%3Ebar"5630+ },5631+ {5632+ "input": "http://foo.bar/baz?qux#foo`bar",5633+ "base": null,5634+ "href": "http://foo.bar/baz?qux#foo%60bar",5635+ "origin": "http://foo.bar",5636+ "protocol": "http:",5637+ "username": "",5638+ "password": "",5639+ "host": "foo.bar",5640+ "hostname": "foo.bar",5641+ "port": "",5642+ "pathname": "/baz",5643+ "search": "?qux",5644+ "searchParams": "qux=",5645+ "hash": "#foo%60bar"5646+ },5647+ "# IPv4 parsing (via https://github.com/nodejs/node/pull/10317)",5648+ {5649+ "input": "http://1.2.3.4/",5650+ "base": "http://other.com/",5651+ "href": "http://1.2.3.4/",5652+ "origin": "http://1.2.3.4",5653+ "protocol": "http:",5654+ "username": "",5655+ "password": "",5656+ "host": "1.2.3.4",5657+ "hostname": "1.2.3.4",5658+ "port": "",5659+ "pathname": "/",5660+ "search": "",5661+ "hash": ""5662+ },5663+ {5664+ "input": "http://1.2.3.4./",5665+ "base": "http://other.com/",5666+ "href": "http://1.2.3.4/",5667+ "origin": "http://1.2.3.4",5668+ "protocol": "http:",5669+ "username": "",5670+ "password": "",5671+ "host": "1.2.3.4",5672+ "hostname": "1.2.3.4",5673+ "port": "",5674+ "pathname": "/",5675+ "search": "",5676+ "hash": ""5677+ },5678+ {5679+ "input": "http://192.168.257",5680+ "base": "http://other.com/",5681+ "href": "http://192.168.1.1/",5682+ "origin": "http://192.168.1.1",5683+ "protocol": "http:",5684+ "username": "",5685+ "password": "",5686+ "host": "192.168.1.1",5687+ "hostname": "192.168.1.1",5688+ "port": "",5689+ "pathname": "/",5690+ "search": "",5691+ "hash": ""5692+ },5693+ {5694+ "input": "http://192.168.257.",5695+ "base": "http://other.com/",5696+ "href": "http://192.168.1.1/",5697+ "origin": "http://192.168.1.1",5698+ "protocol": "http:",5699+ "username": "",5700+ "password": "",5701+ "host": "192.168.1.1",5702+ "hostname": "192.168.1.1",5703+ "port": "",5704+ "pathname": "/",5705+ "search": "",5706+ "hash": ""5707+ },5708+ {5709+ "input": "http://192.168.257.com",5710+ "base": "http://other.com/",5711+ "href": "http://192.168.257.com/",5712+ "origin": "http://192.168.257.com",5713+ "protocol": "http:",5714+ "username": "",5715+ "password": "",5716+ "host": "192.168.257.com",5717+ "hostname": "192.168.257.com",5718+ "port": "",5719+ "pathname": "/",5720+ "search": "",5721+ "hash": ""5722+ },5723+ {5724+ "input": "http://256",5725+ "base": "http://other.com/",5726+ "href": "http://0.0.1.0/",5727+ "origin": "http://0.0.1.0",5728+ "protocol": "http:",5729+ "username": "",5730+ "password": "",5731+ "host": "0.0.1.0",5732+ "hostname": "0.0.1.0",5733+ "port": "",5734+ "pathname": "/",5735+ "search": "",5736+ "hash": ""5737+ },5738+ {5739+ "input": "http://256.com",5740+ "base": "http://other.com/",5741+ "href": "http://256.com/",5742+ "origin": "http://256.com",5743+ "protocol": "http:",5744+ "username": "",5745+ "password": "",5746+ "host": "256.com",5747+ "hostname": "256.com",5748+ "port": "",5749+ "pathname": "/",5750+ "search": "",5751+ "hash": ""5752+ },5753+ {5754+ "input": "http://999999999",5755+ "base": "http://other.com/",5756+ "href": "http://59.154.201.255/",5757+ "origin": "http://59.154.201.255",5758+ "protocol": "http:",5759+ "username": "",5760+ "password": "",5761+ "host": "59.154.201.255",5762+ "hostname": "59.154.201.255",5763+ "port": "",5764+ "pathname": "/",5765+ "search": "",5766+ "hash": ""5767+ },5768+ {5769+ "input": "http://999999999.",5770+ "base": "http://other.com/",5771+ "href": "http://59.154.201.255/",5772+ "origin": "http://59.154.201.255",5773+ "protocol": "http:",5774+ "username": "",5775+ "password": "",5776+ "host": "59.154.201.255",5777+ "hostname": "59.154.201.255",5778+ "port": "",5779+ "pathname": "/",5780+ "search": "",5781+ "hash": ""5782+ },5783+ {5784+ "input": "http://999999999.com",5785+ "base": "http://other.com/",5786+ "href": "http://999999999.com/",5787+ "origin": "http://999999999.com",5788+ "protocol": "http:",5789+ "username": "",5790+ "password": "",5791+ "host": "999999999.com",5792+ "hostname": "999999999.com",5793+ "port": "",5794+ "pathname": "/",5795+ "search": "",5796+ "hash": ""5797+ },5798+ {5799+ "input": "http://10000000000",5800+ "base": "http://other.com/",5801+ "failure": true5802+ },5803+ {5804+ "input": "http://10000000000.com",5805+ "base": "http://other.com/",5806+ "href": "http://10000000000.com/",5807+ "origin": "http://10000000000.com",5808+ "protocol": "http:",5809+ "username": "",5810+ "password": "",5811+ "host": "10000000000.com",5812+ "hostname": "10000000000.com",5813+ "port": "",5814+ "pathname": "/",5815+ "search": "",5816+ "hash": ""5817+ },5818+ {5819+ "input": "http://4294967295",5820+ "base": "http://other.com/",5821+ "href": "http://255.255.255.255/",5822+ "origin": "http://255.255.255.255",5823+ "protocol": "http:",5824+ "username": "",5825+ "password": "",5826+ "host": "255.255.255.255",5827+ "hostname": "255.255.255.255",5828+ "port": "",5829+ "pathname": "/",5830+ "search": "",5831+ "hash": ""5832+ },5833+ {5834+ "input": "http://4294967296",5835+ "base": "http://other.com/",5836+ "failure": true5837+ },5838+ {5839+ "input": "http://0xffffffff",5840+ "base": "http://other.com/",5841+ "href": "http://255.255.255.255/",5842+ "origin": "http://255.255.255.255",5843+ "protocol": "http:",5844+ "username": "",5845+ "password": "",5846+ "host": "255.255.255.255",5847+ "hostname": "255.255.255.255",5848+ "port": "",5849+ "pathname": "/",5850+ "search": "",5851+ "hash": ""5852+ },5853+ {5854+ "input": "http://0xffffffff1",5855+ "base": "http://other.com/",5856+ "failure": true5857+ },5858+ {5859+ "input": "http://256.256.256.256",5860+ "base": "http://other.com/",5861+ "failure": true5862+ },5863+ {5864+ "input": "https://0x.0x.0",5865+ "base": null,5866+ "href": "https://0.0.0.0/",5867+ "origin": "https://0.0.0.0",5868+ "protocol": "https:",5869+ "username": "",5870+ "password": "",5871+ "host": "0.0.0.0",5872+ "hostname": "0.0.0.0",5873+ "port": "",5874+ "pathname": "/",5875+ "search": "",5876+ "hash": ""5877+ },5878+ "More IPv4 parsing (via https://github.com/jsdom/whatwg-url/issues/92)",5879+ {5880+ "input": "https://0x100000000/test",5881+ "base": null,5882+ "failure": true5883+ },5884+ {5885+ "input": "https://256.0.0.1/test",5886+ "base": null,5887+ "failure": true5888+ },5889+ "# file URLs containing percent-encoded Windows drive letters (shouldn't work)",5890+ {5891+ "input": "file:///C%3A/",5892+ "base": null,5893+ "href": "file:///C%3A/",5894+ "protocol": "file:",5895+ "username": "",5896+ "password": "",5897+ "host": "",5898+ "hostname": "",5899+ "port": "",5900+ "pathname": "/C%3A/",5901+ "search": "",5902+ "hash": ""5903+ },5904+ {5905+ "input": "file:///C%7C/",5906+ "base": null,5907+ "href": "file:///C%7C/",5908+ "protocol": "file:",5909+ "username": "",5910+ "password": "",5911+ "host": "",5912+ "hostname": "",5913+ "port": "",5914+ "pathname": "/C%7C/",5915+ "search": "",5916+ "hash": ""5917+ },5918+ {5919+ "input": "file://%43%3A",5920+ "base": null,5921+ "failure": true5922+ },5923+ {5924+ "input": "file://%43%7C",5925+ "base": null,5926+ "failure": true5927+ },5928+ {5929+ "input": "file://%43|",5930+ "base": null,5931+ "failure": true5932+ },5933+ {5934+ "input": "file://C%7C",5935+ "base": null,5936+ "failure": true5937+ },5938+ {5939+ "input": "file://%43%7C/",5940+ "base": null,5941+ "failure": true5942+ },5943+ {5944+ "input": "https://%43%7C/",5945+ "base": null,5946+ "failure": true5947+ },5948+ {5949+ "input": "asdf://%43|/",5950+ "base": null,5951+ "failure": true5952+ },5953+ {5954+ "input": "asdf://%43%7C/",5955+ "base": null,5956+ "href": "asdf://%43%7C/",5957+ "origin": "null",5958+ "protocol": "asdf:",5959+ "username": "",5960+ "password": "",5961+ "host": "%43%7C",5962+ "hostname": "%43%7C",5963+ "port": "",5964+ "pathname": "/",5965+ "search": "",5966+ "hash": ""5967+ },5968+ "# file URLs relative to other file URLs (via https://github.com/jsdom/whatwg-url/pull/60)",5969+ {5970+ "input": "pix/submit.gif",5971+ "base": "file:///C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/anchor.html",5972+ "href": "file:///C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/pix/submit.gif",5973+ "protocol": "file:",5974+ "username": "",5975+ "password": "",5976+ "host": "",5977+ "hostname": "",5978+ "port": "",5979+ "pathname": "/C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/pix/submit.gif",5980+ "search": "",5981+ "hash": ""5982+ },5983+ {5984+ "input": "..",5985+ "base": "file:///C:/",5986+ "href": "file:///C:/",5987+ "protocol": "file:",5988+ "username": "",5989+ "password": "",5990+ "host": "",5991+ "hostname": "",5992+ "port": "",5993+ "pathname": "/C:/",5994+ "search": "",5995+ "hash": ""5996+ },5997+ {5998+ "input": "..",5999+ "base": "file:///",6000+ "href": "file:///",6001+ "protocol": "file:",6002+ "username": "",6003+ "password": "",6004+ "host": "",6005+ "hostname": "",6006+ "port": "",6007+ "pathname": "/",6008+ "search": "",6009+ "hash": ""6010+ },6011+ "# More file URL tests by zcorpan and annevk",6012+ {6013+ "input": "/",6014+ "base": "file:///C:/a/b",6015+ "href": "file:///C:/",6016+ "protocol": "file:",6017+ "username": "",6018+ "password": "",6019+ "host": "",6020+ "hostname": "",6021+ "port": "",6022+ "pathname": "/C:/",6023+ "search": "",6024+ "hash": ""6025+ },6026+ {6027+ "input": "/",6028+ "base": "file://h/C:/a/b",6029+ "href": "file://h/C:/",6030+ "protocol": "file:",6031+ "username": "",6032+ "password": "",6033+ "host": "h",6034+ "hostname": "h",6035+ "port": "",6036+ "pathname": "/C:/",6037+ "search": "",6038+ "hash": ""6039+ },6040+ {6041+ "input": "/",6042+ "base": "file://h/a/b",6043+ "href": "file://h/",6044+ "protocol": "file:",6045+ "username": "",6046+ "password": "",6047+ "host": "h",6048+ "hostname": "h",6049+ "port": "",6050+ "pathname": "/",6051+ "search": "",6052+ "hash": ""6053+ },6054+ {6055+ "input": "//d:",6056+ "base": "file:///C:/a/b",6057+ "href": "file:///d:",6058+ "protocol": "file:",6059+ "username": "",6060+ "password": "",6061+ "host": "",6062+ "hostname": "",6063+ "port": "",6064+ "pathname": "/d:",6065+ "search": "",6066+ "hash": ""6067+ },6068+ {6069+ "input": "//d:/..",6070+ "base": "file:///C:/a/b",6071+ "href": "file:///d:/",6072+ "protocol": "file:",6073+ "username": "",6074+ "password": "",6075+ "host": "",6076+ "hostname": "",6077+ "port": "",6078+ "pathname": "/d:/",6079+ "search": "",6080+ "hash": ""6081+ },6082+ {6083+ "input": "..",6084+ "base": "file:///ab:/",6085+ "href": "file:///",6086+ "protocol": "file:",6087+ "username": "",6088+ "password": "",6089+ "host": "",6090+ "hostname": "",6091+ "port": "",6092+ "pathname": "/",6093+ "search": "",6094+ "hash": ""6095+ },6096+ {6097+ "input": "..",6098+ "base": "file:///1:/",6099+ "href": "file:///",6100+ "protocol": "file:",6101+ "username": "",6102+ "password": "",6103+ "host": "",6104+ "hostname": "",6105+ "port": "",6106+ "pathname": "/",6107+ "search": "",6108+ "hash": ""6109+ },6110+ {6111+ "input": "",6112+ "base": "file:///test?test#test",6113+ "href": "file:///test?test",6114+ "protocol": "file:",6115+ "username": "",6116+ "password": "",6117+ "host": "",6118+ "hostname": "",6119+ "port": "",6120+ "pathname": "/test",6121+ "search": "?test",6122+ "hash": ""6123+ },6124+ {6125+ "input": "file:",6126+ "base": "file:///test?test#test",6127+ "href": "file:///test?test",6128+ "protocol": "file:",6129+ "username": "",6130+ "password": "",6131+ "host": "",6132+ "hostname": "",6133+ "port": "",6134+ "pathname": "/test",6135+ "search": "?test",6136+ "hash": ""6137+ },6138+ {6139+ "input": "?x",6140+ "base": "file:///test?test#test",6141+ "href": "file:///test?x",6142+ "protocol": "file:",6143+ "username": "",6144+ "password": "",6145+ "host": "",6146+ "hostname": "",6147+ "port": "",6148+ "pathname": "/test",6149+ "search": "?x",6150+ "hash": ""6151+ },6152+ {6153+ "input": "file:?x",6154+ "base": "file:///test?test#test",6155+ "href": "file:///test?x",6156+ "protocol": "file:",6157+ "username": "",6158+ "password": "",6159+ "host": "",6160+ "hostname": "",6161+ "port": "",6162+ "pathname": "/test",6163+ "search": "?x",6164+ "hash": ""6165+ },6166+ {6167+ "input": "#x",6168+ "base": "file:///test?test#test",6169+ "href": "file:///test?test#x",6170+ "protocol": "file:",6171+ "username": "",6172+ "password": "",6173+ "host": "",6174+ "hostname": "",6175+ "port": "",6176+ "pathname": "/test",6177+ "search": "?test",6178+ "hash": "#x"6179+ },6180+ {6181+ "input": "file:#x",6182+ "base": "file:///test?test#test",6183+ "href": "file:///test?test#x",6184+ "protocol": "file:",6185+ "username": "",6186+ "password": "",6187+ "host": "",6188+ "hostname": "",6189+ "port": "",6190+ "pathname": "/test",6191+ "search": "?test",6192+ "hash": "#x"6193+ },6194+ "# File URLs and many (back)slashes",6195+ {6196+ "input": "file:\\\\//",6197+ "base": null,6198+ "href": "file:////",6199+ "protocol": "file:",6200+ "username": "",6201+ "password": "",6202+ "host": "",6203+ "hostname": "",6204+ "port": "",6205+ "pathname": "//",6206+ "search": "",6207+ "hash": ""6208+ },6209+ {6210+ "input": "file:\\\\\\\\",6211+ "base": null,6212+ "href": "file:////",6213+ "protocol": "file:",6214+ "username": "",6215+ "password": "",6216+ "host": "",6217+ "hostname": "",6218+ "port": "",6219+ "pathname": "//",6220+ "search": "",6221+ "hash": ""6222+ },6223+ {6224+ "input": "file:\\\\\\\\?fox",6225+ "base": null,6226+ "href": "file:////?fox",6227+ "protocol": "file:",6228+ "username": "",6229+ "password": "",6230+ "host": "",6231+ "hostname": "",6232+ "port": "",6233+ "pathname": "//",6234+ "search": "?fox",6235+ "hash": ""6236+ },6237+ {6238+ "input": "file:\\\\\\\\#guppy",6239+ "base": null,6240+ "href": "file:////#guppy",6241+ "protocol": "file:",6242+ "username": "",6243+ "password": "",6244+ "host": "",6245+ "hostname": "",6246+ "port": "",6247+ "pathname": "//",6248+ "search": "",6249+ "hash": "#guppy"6250+ },6251+ {6252+ "input": "file://spider///",6253+ "base": null,6254+ "href": "file://spider///",6255+ "protocol": "file:",6256+ "username": "",6257+ "password": "",6258+ "host": "spider",6259+ "hostname": "spider",6260+ "port": "",6261+ "pathname": "///",6262+ "search": "",6263+ "hash": ""6264+ },6265+ {6266+ "input": "file:\\\\localhost//",6267+ "base": null,6268+ "href": "file:////",6269+ "protocol": "file:",6270+ "username": "",6271+ "password": "",6272+ "host": "",6273+ "hostname": "",6274+ "port": "",6275+ "pathname": "//",6276+ "search": "",6277+ "hash": ""6278+ },6279+ {6280+ "input": "file:///localhost//cat",6281+ "base": null,6282+ "href": "file:///localhost//cat",6283+ "protocol": "file:",6284+ "username": "",6285+ "password": "",6286+ "host": "",6287+ "hostname": "",6288+ "port": "",6289+ "pathname": "/localhost//cat",6290+ "search": "",6291+ "hash": ""6292+ },6293+ {6294+ "input": "file://\\/localhost//cat",6295+ "base": null,6296+ "href": "file:////localhost//cat",6297+ "protocol": "file:",6298+ "username": "",6299+ "password": "",6300+ "host": "",6301+ "hostname": "",6302+ "port": "",6303+ "pathname": "//localhost//cat",6304+ "search": "",6305+ "hash": ""6306+ },6307+ {6308+ "input": "file://localhost//a//../..//",6309+ "base": null,6310+ "href": "file://///",6311+ "protocol": "file:",6312+ "username": "",6313+ "password": "",6314+ "host": "",6315+ "hostname": "",6316+ "port": "",6317+ "pathname": "///",6318+ "search": "",6319+ "hash": ""6320+ },6321+ {6322+ "input": "/////mouse",6323+ "base": "file:///elephant",6324+ "href": "file://///mouse",6325+ "protocol": "file:",6326+ "username": "",6327+ "password": "",6328+ "host": "",6329+ "hostname": "",6330+ "port": "",6331+ "pathname": "///mouse",6332+ "search": "",6333+ "hash": ""6334+ },6335+ {6336+ "input": "\\//pig",6337+ "base": "file://lion/",6338+ "href": "file:///pig",6339+ "protocol": "file:",6340+ "username": "",6341+ "password": "",6342+ "host": "",6343+ "hostname": "",6344+ "port": "",6345+ "pathname": "/pig",6346+ "search": "",6347+ "hash": ""6348+ },6349+ {6350+ "input": "\\/localhost//pig",6351+ "base": "file://lion/",6352+ "href": "file:////pig",6353+ "protocol": "file:",6354+ "username": "",6355+ "password": "",6356+ "host": "",6357+ "hostname": "",6358+ "port": "",6359+ "pathname": "//pig",6360+ "search": "",6361+ "hash": ""6362+ },6363+ {6364+ "input": "//localhost//pig",6365+ "base": "file://lion/",6366+ "href": "file:////pig",6367+ "protocol": "file:",6368+ "username": "",6369+ "password": "",6370+ "host": "",6371+ "hostname": "",6372+ "port": "",6373+ "pathname": "//pig",6374+ "search": "",6375+ "hash": ""6376+ },6377+ {6378+ "input": "/..//localhost//pig",6379+ "base": "file://lion/",6380+ "href": "file://lion//localhost//pig",6381+ "protocol": "file:",6382+ "username": "",6383+ "password": "",6384+ "host": "lion",6385+ "hostname": "lion",6386+ "port": "",6387+ "pathname": "//localhost//pig",6388+ "search": "",6389+ "hash": ""6390+ },6391+ {6392+ "input": "file://",6393+ "base": "file://ape/",6394+ "href": "file:///",6395+ "protocol": "file:",6396+ "username": "",6397+ "password": "",6398+ "host": "",6399+ "hostname": "",6400+ "port": "",6401+ "pathname": "/",6402+ "search": "",6403+ "hash": ""6404+ },6405+ "# File URLs with non-empty hosts",6406+ {6407+ "input": "/rooibos",6408+ "base": "file://tea/",6409+ "href": "file://tea/rooibos",6410+ "protocol": "file:",6411+ "username": "",6412+ "password": "",6413+ "host": "tea",6414+ "hostname": "tea",6415+ "port": "",6416+ "pathname": "/rooibos",6417+ "search": "",6418+ "hash": ""6419+ },6420+ {6421+ "input": "/?chai",6422+ "base": "file://tea/",6423+ "href": "file://tea/?chai",6424+ "protocol": "file:",6425+ "username": "",6426+ "password": "",6427+ "host": "tea",6428+ "hostname": "tea",6429+ "port": "",6430+ "pathname": "/",6431+ "search": "?chai",6432+ "hash": ""6433+ },6434+ "# Windows drive letter handling with the 'file:' base URL",6435+ {6436+ "input": "C|",6437+ "base": "file://host/dir/file",6438+ "href": "file://host/C:",6439+ "protocol": "file:",6440+ "username": "",6441+ "password": "",6442+ "host": "host",6443+ "hostname": "host",6444+ "port": "",6445+ "pathname": "/C:",6446+ "search": "",6447+ "hash": ""6448+ },6449+ {6450+ "input": "C|",6451+ "base": "file://host/D:/dir1/dir2/file",6452+ "href": "file://host/C:",6453+ "protocol": "file:",6454+ "username": "",6455+ "password": "",6456+ "host": "host",6457+ "hostname": "host",6458+ "port": "",6459+ "pathname": "/C:",6460+ "search": "",6461+ "hash": ""6462+ },6463+ {6464+ "input": "C|#",6465+ "base": "file://host/dir/file",6466+ "href": "file://host/C:#",6467+ "protocol": "file:",6468+ "username": "",6469+ "password": "",6470+ "host": "host",6471+ "hostname": "host",6472+ "port": "",6473+ "pathname": "/C:",6474+ "search": "",6475+ "hash": ""6476+ },6477+ {6478+ "input": "C|?",6479+ "base": "file://host/dir/file",6480+ "href": "file://host/C:?",6481+ "protocol": "file:",6482+ "username": "",6483+ "password": "",6484+ "host": "host",6485+ "hostname": "host",6486+ "port": "",6487+ "pathname": "/C:",6488+ "search": "",6489+ "hash": ""6490+ },6491+ {6492+ "input": "C|/",6493+ "base": "file://host/dir/file",6494+ "href": "file://host/C:/",6495+ "protocol": "file:",6496+ "username": "",6497+ "password": "",6498+ "host": "host",6499+ "hostname": "host",6500+ "port": "",6501+ "pathname": "/C:/",6502+ "search": "",6503+ "hash": ""6504+ },6505+ {6506+ "input": "C|\n/",6507+ "base": "file://host/dir/file",6508+ "href": "file://host/C:/",6509+ "protocol": "file:",6510+ "username": "",6511+ "password": "",6512+ "host": "host",6513+ "hostname": "host",6514+ "port": "",6515+ "pathname": "/C:/",6516+ "search": "",6517+ "hash": ""6518+ },6519+ {6520+ "input": "C|\\",6521+ "base": "file://host/dir/file",6522+ "href": "file://host/C:/",6523+ "protocol": "file:",6524+ "username": "",6525+ "password": "",6526+ "host": "host",6527+ "hostname": "host",6528+ "port": "",6529+ "pathname": "/C:/",6530+ "search": "",6531+ "hash": ""6532+ },6533+ {6534+ "input": "C",6535+ "base": "file://host/dir/file",6536+ "href": "file://host/dir/C",6537+ "protocol": "file:",6538+ "username": "",6539+ "password": "",6540+ "host": "host",6541+ "hostname": "host",6542+ "port": "",6543+ "pathname": "/dir/C",6544+ "search": "",6545+ "hash": ""6546+ },6547+ {6548+ "input": "C|a",6549+ "base": "file://host/dir/file",6550+ "href": "file://host/dir/C|a",6551+ "protocol": "file:",6552+ "username": "",6553+ "password": "",6554+ "host": "host",6555+ "hostname": "host",6556+ "port": "",6557+ "pathname": "/dir/C|a",6558+ "search": "",6559+ "hash": ""6560+ },6561+ "# Windows drive letter quirk in the file slash state",6562+ {6563+ "input": "/c:/foo/bar",6564+ "base": "file:///c:/baz/qux",6565+ "href": "file:///c:/foo/bar",6566+ "protocol": "file:",6567+ "username": "",6568+ "password": "",6569+ "host": "",6570+ "hostname": "",6571+ "port": "",6572+ "pathname": "/c:/foo/bar",6573+ "search": "",6574+ "hash": ""6575+ },6576+ {6577+ "input": "/c|/foo/bar",6578+ "base": "file:///c:/baz/qux",6579+ "href": "file:///c:/foo/bar",6580+ "protocol": "file:",6581+ "username": "",6582+ "password": "",6583+ "host": "",6584+ "hostname": "",6585+ "port": "",6586+ "pathname": "/c:/foo/bar",6587+ "search": "",6588+ "hash": ""6589+ },6590+ {6591+ "input": "file:\\c:\\foo\\bar",6592+ "base": "file:///c:/baz/qux",6593+ "href": "file:///c:/foo/bar",6594+ "protocol": "file:",6595+ "username": "",6596+ "password": "",6597+ "host": "",6598+ "hostname": "",6599+ "port": "",6600+ "pathname": "/c:/foo/bar",6601+ "search": "",6602+ "hash": ""6603+ },6604+ {6605+ "input": "/c:/foo/bar",6606+ "base": "file://host/path",6607+ "href": "file://host/c:/foo/bar",6608+ "protocol": "file:",6609+ "username": "",6610+ "password": "",6611+ "host": "host",6612+ "hostname": "host",6613+ "port": "",6614+ "pathname": "/c:/foo/bar",6615+ "search": "",6616+ "hash": ""6617+ },6618+ "# Do not drop the host in the presence of a drive letter",6619+ {6620+ "input": "file://example.net/C:/",6621+ "base": null,6622+ "href": "file://example.net/C:/",6623+ "protocol": "file:",6624+ "username": "",6625+ "password": "",6626+ "host": "example.net",6627+ "hostname": "example.net",6628+ "port": "",6629+ "pathname": "/C:/",6630+ "search": "",6631+ "hash": ""6632+ },6633+ {6634+ "input": "file://1.2.3.4/C:/",6635+ "base": null,6636+ "href": "file://1.2.3.4/C:/",6637+ "protocol": "file:",6638+ "username": "",6639+ "password": "",6640+ "host": "1.2.3.4",6641+ "hostname": "1.2.3.4",6642+ "port": "",6643+ "pathname": "/C:/",6644+ "search": "",6645+ "hash": ""6646+ },6647+ {6648+ "input": "file://[1::8]/C:/",6649+ "base": null,6650+ "href": "file://[1::8]/C:/",6651+ "protocol": "file:",6652+ "username": "",6653+ "password": "",6654+ "host": "[1::8]",6655+ "hostname": "[1::8]",6656+ "port": "",6657+ "pathname": "/C:/",6658+ "search": "",6659+ "hash": ""6660+ },6661+ "# Copy the host from the base URL in the following cases",6662+ {6663+ "input": "C|/",6664+ "base": "file://host/",6665+ "href": "file://host/C:/",6666+ "protocol": "file:",6667+ "username": "",6668+ "password": "",6669+ "host": "host",6670+ "hostname": "host",6671+ "port": "",6672+ "pathname": "/C:/",6673+ "search": "",6674+ "hash": ""6675+ },6676+ {6677+ "input": "/C:/",6678+ "base": "file://host/",6679+ "href": "file://host/C:/",6680+ "protocol": "file:",6681+ "username": "",6682+ "password": "",6683+ "host": "host",6684+ "hostname": "host",6685+ "port": "",6686+ "pathname": "/C:/",6687+ "search": "",6688+ "hash": ""6689+ },6690+ {6691+ "input": "file:C:/",6692+ "base": "file://host/",6693+ "href": "file://host/C:/",6694+ "protocol": "file:",6695+ "username": "",6696+ "password": "",6697+ "host": "host",6698+ "hostname": "host",6699+ "port": "",6700+ "pathname": "/C:/",6701+ "search": "",6702+ "hash": ""6703+ },6704+ {6705+ "input": "file:/C:/",6706+ "base": "file://host/",6707+ "href": "file://host/C:/",6708+ "protocol": "file:",6709+ "username": "",6710+ "password": "",6711+ "host": "host",6712+ "hostname": "host",6713+ "port": "",6714+ "pathname": "/C:/",6715+ "search": "",6716+ "hash": ""6717+ },6718+ "# Copy the empty host from the input in the following cases",6719+ {6720+ "input": "//C:/",6721+ "base": "file://host/",6722+ "href": "file:///C:/",6723+ "protocol": "file:",6724+ "username": "",6725+ "password": "",6726+ "host": "",6727+ "hostname": "",6728+ "port": "",6729+ "pathname": "/C:/",6730+ "search": "",6731+ "hash": ""6732+ },6733+ {6734+ "input": "file://C:/",6735+ "base": "file://host/",6736+ "href": "file:///C:/",6737+ "protocol": "file:",6738+ "username": "",6739+ "password": "",6740+ "host": "",6741+ "hostname": "",6742+ "port": "",6743+ "pathname": "/C:/",6744+ "search": "",6745+ "hash": ""6746+ },6747+ {6748+ "input": "///C:/",6749+ "base": "file://host/",6750+ "href": "file:///C:/",6751+ "protocol": "file:",6752+ "username": "",6753+ "password": "",6754+ "host": "",6755+ "hostname": "",6756+ "port": "",6757+ "pathname": "/C:/",6758+ "search": "",6759+ "hash": ""6760+ },6761+ {6762+ "input": "file:///C:/",6763+ "base": "file://host/",6764+ "href": "file:///C:/",6765+ "protocol": "file:",6766+ "username": "",6767+ "password": "",6768+ "host": "",6769+ "hostname": "",6770+ "port": "",6771+ "pathname": "/C:/",6772+ "search": "",6773+ "hash": ""6774+ },6775+ "# Windows drive letter quirk (no host)",6776+ {6777+ "input": "file:/C|/",6778+ "base": null,6779+ "href": "file:///C:/",6780+ "protocol": "file:",6781+ "username": "",6782+ "password": "",6783+ "host": "",6784+ "hostname": "",6785+ "port": "",6786+ "pathname": "/C:/",6787+ "search": "",6788+ "hash": ""6789+ },6790+ {6791+ "input": "file://C|/",6792+ "base": null,6793+ "href": "file:///C:/",6794+ "protocol": "file:",6795+ "username": "",6796+ "password": "",6797+ "host": "",6798+ "hostname": "",6799+ "port": "",6800+ "pathname": "/C:/",6801+ "search": "",6802+ "hash": ""6803+ },6804+ "# file URLs without base URL by Rimas Misevičius",6805+ {6806+ "input": "file:",6807+ "base": null,6808+ "href": "file:///",6809+ "protocol": "file:",6810+ "username": "",6811+ "password": "",6812+ "host": "",6813+ "hostname": "",6814+ "port": "",6815+ "pathname": "/",6816+ "search": "",6817+ "hash": ""6818+ },6819+ {6820+ "input": "file:?q=v",6821+ "base": null,6822+ "href": "file:///?q=v",6823+ "protocol": "file:",6824+ "username": "",6825+ "password": "",6826+ "host": "",6827+ "hostname": "",6828+ "port": "",6829+ "pathname": "/",6830+ "search": "?q=v",6831+ "hash": ""6832+ },6833+ {6834+ "input": "file:#frag",6835+ "base": null,6836+ "href": "file:///#frag",6837+ "protocol": "file:",6838+ "username": "",6839+ "password": "",6840+ "host": "",6841+ "hostname": "",6842+ "port": "",6843+ "pathname": "/",6844+ "search": "",6845+ "hash": "#frag"6846+ },6847+ "# file: drive letter cases from https://crbug.com/1078698",6848+ {6849+ "input": "file:///Y:",6850+ "base": null,6851+ "href": "file:///Y:",6852+ "protocol": "file:",6853+ "username": "",6854+ "password": "",6855+ "host": "",6856+ "hostname": "",6857+ "port": "",6858+ "pathname": "/Y:",6859+ "search": "",6860+ "hash": ""6861+ },6862+ {6863+ "input": "file:///Y:/",6864+ "base": null,6865+ "href": "file:///Y:/",6866+ "protocol": "file:",6867+ "username": "",6868+ "password": "",6869+ "host": "",6870+ "hostname": "",6871+ "port": "",6872+ "pathname": "/Y:/",6873+ "search": "",6874+ "hash": ""6875+ },6876+ {6877+ "input": "file:///./Y",6878+ "base": null,6879+ "href": "file:///Y",6880+ "protocol": "file:",6881+ "username": "",6882+ "password": "",6883+ "host": "",6884+ "hostname": "",6885+ "port": "",6886+ "pathname": "/Y",6887+ "search": "",6888+ "hash": ""6889+ },6890+ {6891+ "input": "file:///./Y:",6892+ "base": null,6893+ "href": "file:///Y:",6894+ "protocol": "file:",6895+ "username": "",6896+ "password": "",6897+ "host": "",6898+ "hostname": "",6899+ "port": "",6900+ "pathname": "/Y:",6901+ "search": "",6902+ "hash": ""6903+ },6904+ {6905+ "input": "\\\\\\.\\Y:",6906+ "base": null,6907+ "failure": true,6908+ "relativeTo": "non-opaque-path-base"6909+ },6910+ "# file: drive letter cases from https://crbug.com/1078698 but lowercased",6911+ {6912+ "input": "file:///y:",6913+ "base": null,6914+ "href": "file:///y:",6915+ "protocol": "file:",6916+ "username": "",6917+ "password": "",6918+ "host": "",6919+ "hostname": "",6920+ "port": "",6921+ "pathname": "/y:",6922+ "search": "",6923+ "hash": ""6924+ },6925+ {6926+ "input": "file:///y:/",6927+ "base": null,6928+ "href": "file:///y:/",6929+ "protocol": "file:",6930+ "username": "",6931+ "password": "",6932+ "host": "",6933+ "hostname": "",6934+ "port": "",6935+ "pathname": "/y:/",6936+ "search": "",6937+ "hash": ""6938+ },6939+ {6940+ "input": "file:///./y",6941+ "base": null,6942+ "href": "file:///y",6943+ "protocol": "file:",6944+ "username": "",6945+ "password": "",6946+ "host": "",6947+ "hostname": "",6948+ "port": "",6949+ "pathname": "/y",6950+ "search": "",6951+ "hash": ""6952+ },6953+ {6954+ "input": "file:///./y:",6955+ "base": null,6956+ "href": "file:///y:",6957+ "protocol": "file:",6958+ "username": "",6959+ "password": "",6960+ "host": "",6961+ "hostname": "",6962+ "port": "",6963+ "pathname": "/y:",6964+ "search": "",6965+ "hash": ""6966+ },6967+ {6968+ "input": "\\\\\\.\\y:",6969+ "base": null,6970+ "failure": true,6971+ "relativeTo": "non-opaque-path-base"6972+ },6973+ "# Additional file URL tests for (https://github.com/whatwg/url/issues/405)",6974+ {6975+ "input": "file://localhost//a//../..//foo",6976+ "base": null,6977+ "href": "file://///foo",6978+ "protocol": "file:",6979+ "username": "",6980+ "password": "",6981+ "host": "",6982+ "hostname": "",6983+ "port": "",6984+ "pathname": "///foo",6985+ "search": "",6986+ "hash": ""6987+ },6988+ {6989+ "input": "file://localhost////foo",6990+ "base": null,6991+ "href": "file://////foo",6992+ "protocol": "file:",6993+ "username": "",6994+ "password": "",6995+ "host": "",6996+ "hostname": "",6997+ "port": "",6998+ "pathname": "////foo",6999+ "search": "",7000+ "hash": ""7001+ },7002+ {7003+ "input": "file:////foo",7004+ "base": null,7005+ "href": "file:////foo",7006+ "protocol": "file:",7007+ "username": "",7008+ "password": "",7009+ "host": "",7010+ "hostname": "",7011+ "port": "",7012+ "pathname": "//foo",7013+ "search": "",7014+ "hash": ""7015+ },7016+ {7017+ "input": "file:///one/two",7018+ "base": "file:///",7019+ "href": "file:///one/two",7020+ "protocol": "file:",7021+ "username": "",7022+ "password": "",7023+ "host": "",7024+ "hostname": "",7025+ "port": "",7026+ "pathname": "/one/two",7027+ "search": "",7028+ "hash": ""7029+ },7030+ {7031+ "input": "file:////one/two",7032+ "base": "file:///",7033+ "href": "file:////one/two",7034+ "protocol": "file:",7035+ "username": "",7036+ "password": "",7037+ "host": "",7038+ "hostname": "",7039+ "port": "",7040+ "pathname": "//one/two",7041+ "search": "",7042+ "hash": ""7043+ },7044+ {7045+ "input": "//one/two",7046+ "base": "file:///",7047+ "href": "file://one/two",7048+ "protocol": "file:",7049+ "username": "",7050+ "password": "",7051+ "host": "one",7052+ "hostname": "one",7053+ "port": "",7054+ "pathname": "/two",7055+ "search": "",7056+ "hash": ""7057+ },7058+ {7059+ "input": "///one/two",7060+ "base": "file:///",7061+ "href": "file:///one/two",7062+ "protocol": "file:",7063+ "username": "",7064+ "password": "",7065+ "host": "",7066+ "hostname": "",7067+ "port": "",7068+ "pathname": "/one/two",7069+ "search": "",7070+ "hash": ""7071+ },7072+ {7073+ "input": "////one/two",7074+ "base": "file:///",7075+ "href": "file:////one/two",7076+ "protocol": "file:",7077+ "username": "",7078+ "password": "",7079+ "host": "",7080+ "hostname": "",7081+ "port": "",7082+ "pathname": "//one/two",7083+ "search": "",7084+ "hash": ""7085+ },7086+ {7087+ "input": "file:///.//",7088+ "base": "file:////",7089+ "href": "file:////",7090+ "protocol": "file:",7091+ "username": "",7092+ "password": "",7093+ "host": "",7094+ "hostname": "",7095+ "port": "",7096+ "pathname": "//",7097+ "search": "",7098+ "hash": ""7099+ },7100+ "File URL tests for https://github.com/whatwg/url/issues/549",7101+ {7102+ "input": "file:.//p",7103+ "base": null,7104+ "href": "file:////p",7105+ "protocol": "file:",7106+ "username": "",7107+ "password": "",7108+ "host": "",7109+ "hostname": "",7110+ "port": "",7111+ "pathname": "//p",7112+ "search": "",7113+ "hash": ""7114+ },7115+ {7116+ "input": "file:/.//p",7117+ "base": null,7118+ "href": "file:////p",7119+ "protocol": "file:",7120+ "username": "",7121+ "password": "",7122+ "host": "",7123+ "hostname": "",7124+ "port": "",7125+ "pathname": "//p",7126+ "search": "",7127+ "hash": ""7128+ },7129+ "# IPv6 tests",7130+ {7131+ "input": "http://[1:0::]",7132+ "base": "http://example.net/",7133+ "href": "http://[1::]/",7134+ "origin": "http://[1::]",7135+ "protocol": "http:",7136+ "username": "",7137+ "password": "",7138+ "host": "[1::]",7139+ "hostname": "[1::]",7140+ "port": "",7141+ "pathname": "/",7142+ "search": "",7143+ "hash": ""7144+ },7145+ {7146+ "input": "http://[0:1:2:3:4:5:6:7:8]",7147+ "base": "http://example.net/",7148+ "failure": true7149+ },7150+ {7151+ "input": "https://[0::0::0]",7152+ "base": null,7153+ "failure": true7154+ },7155+ {7156+ "input": "https://[0:.0]",7157+ "base": null,7158+ "failure": true7159+ },7160+ {7161+ "input": "https://[0:0:]",7162+ "base": null,7163+ "failure": true7164+ },7165+ {7166+ "input": "https://[0:1:2:3:4:5:6:7.0.0.0.1]",7167+ "base": null,7168+ "failure": true7169+ },7170+ {7171+ "input": "https://[0:1.00.0.0.0]",7172+ "base": null,7173+ "failure": true7174+ },7175+ {7176+ "input": "https://[0:1.290.0.0.0]",7177+ "base": null,7178+ "failure": true7179+ },7180+ {7181+ "input": "https://[0:1.23.23]",7182+ "base": null,7183+ "failure": true7184+ },7185+ "# Empty host",7186+ {7187+ "input": "http://?",7188+ "base": null,7189+ "failure": true7190+ },7191+ {7192+ "input": "http://#",7193+ "base": null,7194+ "failure": true7195+ },7196+ "Port overflow (2^32 + 81)",7197+ {7198+ "input": "http://f:4294967377/c",7199+ "base": "http://example.org/",7200+ "failure": true7201+ },7202+ "Port overflow (2^64 + 81)",7203+ {7204+ "input": "http://f:18446744073709551697/c",7205+ "base": "http://example.org/",7206+ "failure": true7207+ },7208+ "Port overflow (2^128 + 81)",7209+ {7210+ "input": "http://f:340282366920938463463374607431768211537/c",7211+ "base": "http://example.org/",7212+ "failure": true7213+ },7214+ "# Non-special-URL path tests",7215+ {7216+ "input": "sc://ñ",7217+ "base": null,7218+ "href": "sc://%C3%B1",7219+ "origin": "null",7220+ "protocol": "sc:",7221+ "username": "",7222+ "password": "",7223+ "host": "%C3%B1",7224+ "hostname": "%C3%B1",7225+ "port": "",7226+ "pathname": "",7227+ "search": "",7228+ "hash": ""7229+ },7230+ {7231+ "input": "sc://ñ?x",7232+ "base": null,7233+ "href": "sc://%C3%B1?x",7234+ "origin": "null",7235+ "protocol": "sc:",7236+ "username": "",7237+ "password": "",7238+ "host": "%C3%B1",7239+ "hostname": "%C3%B1",7240+ "port": "",7241+ "pathname": "",7242+ "search": "?x",7243+ "hash": ""7244+ },7245+ {7246+ "input": "sc://ñ#x",7247+ "base": null,7248+ "href": "sc://%C3%B1#x",7249+ "origin": "null",7250+ "protocol": "sc:",7251+ "username": "",7252+ "password": "",7253+ "host": "%C3%B1",7254+ "hostname": "%C3%B1",7255+ "port": "",7256+ "pathname": "",7257+ "search": "",7258+ "hash": "#x"7259+ },7260+ {7261+ "input": "#x",7262+ "base": "sc://ñ",7263+ "href": "sc://%C3%B1#x",7264+ "origin": "null",7265+ "protocol": "sc:",7266+ "username": "",7267+ "password": "",7268+ "host": "%C3%B1",7269+ "hostname": "%C3%B1",7270+ "port": "",7271+ "pathname": "",7272+ "search": "",7273+ "hash": "#x"7274+ },7275+ {7276+ "input": "?x",7277+ "base": "sc://ñ",7278+ "href": "sc://%C3%B1?x",7279+ "origin": "null",7280+ "protocol": "sc:",7281+ "username": "",7282+ "password": "",7283+ "host": "%C3%B1",7284+ "hostname": "%C3%B1",7285+ "port": "",7286+ "pathname": "",7287+ "search": "?x",7288+ "hash": ""7289+ },7290+ {7291+ "input": "sc://?",7292+ "base": null,7293+ "href": "sc://?",7294+ "protocol": "sc:",7295+ "username": "",7296+ "password": "",7297+ "host": "",7298+ "hostname": "",7299+ "port": "",7300+ "pathname": "",7301+ "search": "",7302+ "hash": ""7303+ },7304+ {7305+ "input": "sc://#",7306+ "base": null,7307+ "href": "sc://#",7308+ "protocol": "sc:",7309+ "username": "",7310+ "password": "",7311+ "host": "",7312+ "hostname": "",7313+ "port": "",7314+ "pathname": "",7315+ "search": "",7316+ "hash": ""7317+ },7318+ {7319+ "input": "///",7320+ "base": "sc://x/",7321+ "href": "sc:///",7322+ "protocol": "sc:",7323+ "username": "",7324+ "password": "",7325+ "host": "",7326+ "hostname": "",7327+ "port": "",7328+ "pathname": "/",7329+ "search": "",7330+ "hash": ""7331+ },7332+ {7333+ "input": "////",7334+ "base": "sc://x/",7335+ "href": "sc:////",7336+ "protocol": "sc:",7337+ "username": "",7338+ "password": "",7339+ "host": "",7340+ "hostname": "",7341+ "port": "",7342+ "pathname": "//",7343+ "search": "",7344+ "hash": ""7345+ },7346+ {7347+ "input": "////x/",7348+ "base": "sc://x/",7349+ "href": "sc:////x/",7350+ "protocol": "sc:",7351+ "username": "",7352+ "password": "",7353+ "host": "",7354+ "hostname": "",7355+ "port": "",7356+ "pathname": "//x/",7357+ "search": "",7358+ "hash": ""7359+ },7360+ {7361+ "input": "tftp://foobar.com/someconfig;mode=netascii",7362+ "base": null,7363+ "href": "tftp://foobar.com/someconfig;mode=netascii",7364+ "origin": "null",7365+ "protocol": "tftp:",7366+ "username": "",7367+ "password": "",7368+ "host": "foobar.com",7369+ "hostname": "foobar.com",7370+ "port": "",7371+ "pathname": "/someconfig;mode=netascii",7372+ "search": "",7373+ "hash": ""7374+ },7375+ {7376+ "input": "telnet://user:pass@foobar.com:23/",7377+ "base": null,7378+ "href": "telnet://user:pass@foobar.com:23/",7379+ "origin": "null",7380+ "protocol": "telnet:",7381+ "username": "user",7382+ "password": "pass",7383+ "host": "foobar.com:23",7384+ "hostname": "foobar.com",7385+ "port": "23",7386+ "pathname": "/",7387+ "search": "",7388+ "hash": ""7389+ },7390+ {7391+ "input": "ut2004://10.10.10.10:7777/Index.ut2",7392+ "base": null,7393+ "href": "ut2004://10.10.10.10:7777/Index.ut2",7394+ "origin": "null",7395+ "protocol": "ut2004:",7396+ "username": "",7397+ "password": "",7398+ "host": "10.10.10.10:7777",7399+ "hostname": "10.10.10.10",7400+ "port": "7777",7401+ "pathname": "/Index.ut2",7402+ "search": "",7403+ "hash": ""7404+ },7405+ {7406+ "input": "redis://foo:bar@somehost:6379/0?baz=bam&qux=baz",7407+ "base": null,7408+ "href": "redis://foo:bar@somehost:6379/0?baz=bam&qux=baz",7409+ "origin": "null",7410+ "protocol": "redis:",7411+ "username": "foo",7412+ "password": "bar",7413+ "host": "somehost:6379",7414+ "hostname": "somehost",7415+ "port": "6379",7416+ "pathname": "/0",7417+ "search": "?baz=bam&qux=baz",7418+ "hash": ""7419+ },7420+ {7421+ "input": "rsync://foo@host:911/sup",7422+ "base": null,7423+ "href": "rsync://foo@host:911/sup",7424+ "origin": "null",7425+ "protocol": "rsync:",7426+ "username": "foo",7427+ "password": "",7428+ "host": "host:911",7429+ "hostname": "host",7430+ "port": "911",7431+ "pathname": "/sup",7432+ "search": "",7433+ "hash": ""7434+ },7435+ {7436+ "input": "git://github.com/foo/bar.git",7437+ "base": null,7438+ "href": "git://github.com/foo/bar.git",7439+ "origin": "null",7440+ "protocol": "git:",7441+ "username": "",7442+ "password": "",7443+ "host": "github.com",7444+ "hostname": "github.com",7445+ "port": "",7446+ "pathname": "/foo/bar.git",7447+ "search": "",7448+ "hash": ""7449+ },7450+ {7451+ "input": "irc://myserver.com:6999/channel?passwd",7452+ "base": null,7453+ "href": "irc://myserver.com:6999/channel?passwd",7454+ "origin": "null",7455+ "protocol": "irc:",7456+ "username": "",7457+ "password": "",7458+ "host": "myserver.com:6999",7459+ "hostname": "myserver.com",7460+ "port": "6999",7461+ "pathname": "/channel",7462+ "search": "?passwd",7463+ "hash": ""7464+ },7465+ {7466+ "input": "dns://fw.example.org:9999/foo.bar.org?type=TXT",7467+ "base": null,7468+ "href": "dns://fw.example.org:9999/foo.bar.org?type=TXT",7469+ "origin": "null",7470+ "protocol": "dns:",7471+ "username": "",7472+ "password": "",7473+ "host": "fw.example.org:9999",7474+ "hostname": "fw.example.org",7475+ "port": "9999",7476+ "pathname": "/foo.bar.org",7477+ "search": "?type=TXT",7478+ "hash": ""7479+ },7480+ {7481+ "input": "ldap://localhost:389/ou=People,o=JNDITutorial",7482+ "base": null,7483+ "href": "ldap://localhost:389/ou=People,o=JNDITutorial",7484+ "origin": "null",7485+ "protocol": "ldap:",7486+ "username": "",7487+ "password": "",7488+ "host": "localhost:389",7489+ "hostname": "localhost",7490+ "port": "389",7491+ "pathname": "/ou=People,o=JNDITutorial",7492+ "search": "",7493+ "hash": ""7494+ },7495+ {7496+ "input": "git+https://github.com/foo/bar",7497+ "base": null,7498+ "href": "git+https://github.com/foo/bar",7499+ "origin": "null",7500+ "protocol": "git+https:",7501+ "username": "",7502+ "password": "",7503+ "host": "github.com",7504+ "hostname": "github.com",7505+ "port": "",7506+ "pathname": "/foo/bar",7507+ "search": "",7508+ "hash": ""7509+ },7510+ {7511+ "input": "urn:ietf:rfc:2648",7512+ "base": null,7513+ "href": "urn:ietf:rfc:2648",7514+ "origin": "null",7515+ "protocol": "urn:",7516+ "username": "",7517+ "password": "",7518+ "host": "",7519+ "hostname": "",7520+ "port": "",7521+ "pathname": "ietf:rfc:2648",7522+ "search": "",7523+ "hash": ""7524+ },7525+ {7526+ "input": "tag:joe@example.org,2001:foo/bar",7527+ "base": null,7528+ "href": "tag:joe@example.org,2001:foo/bar",7529+ "origin": "null",7530+ "protocol": "tag:",7531+ "username": "",7532+ "password": "",7533+ "host": "",7534+ "hostname": "",7535+ "port": "",7536+ "pathname": "joe@example.org,2001:foo/bar",7537+ "search": "",7538+ "hash": ""7539+ },7540+ "Serialize /. in path",7541+ {7542+ "input": "non-spec:/.//",7543+ "base": null,7544+ "href": "non-spec:/.//",7545+ "protocol": "non-spec:",7546+ "username": "",7547+ "password": "",7548+ "host": "",7549+ "hostname": "",7550+ "port": "",7551+ "pathname": "//",7552+ "search": "",7553+ "hash": ""7554+ },7555+ {7556+ "input": "non-spec:/..//",7557+ "base": null,7558+ "href": "non-spec:/.//",7559+ "protocol": "non-spec:",7560+ "username": "",7561+ "password": "",7562+ "host": "",7563+ "hostname": "",7564+ "port": "",7565+ "pathname": "//",7566+ "search": "",7567+ "hash": ""7568+ },7569+ {7570+ "input": "non-spec:/a/..//",7571+ "base": null,7572+ "href": "non-spec:/.//",7573+ "protocol": "non-spec:",7574+ "username": "",7575+ "password": "",7576+ "host": "",7577+ "hostname": "",7578+ "port": "",7579+ "pathname": "//",7580+ "search": "",7581+ "hash": ""7582+ },7583+ {7584+ "input": "non-spec:/.//path",7585+ "base": null,7586+ "href": "non-spec:/.//path",7587+ "protocol": "non-spec:",7588+ "username": "",7589+ "password": "",7590+ "host": "",7591+ "hostname": "",7592+ "port": "",7593+ "pathname": "//path",7594+ "search": "",7595+ "hash": ""7596+ },7597+ {7598+ "input": "non-spec:/..//path",7599+ "base": null,7600+ "href": "non-spec:/.//path",7601+ "protocol": "non-spec:",7602+ "username": "",7603+ "password": "",7604+ "host": "",7605+ "hostname": "",7606+ "port": "",7607+ "pathname": "//path",7608+ "search": "",7609+ "hash": ""7610+ },7611+ {7612+ "input": "non-spec:/a/..//path",7613+ "base": null,7614+ "href": "non-spec:/.//path",7615+ "protocol": "non-spec:",7616+ "username": "",7617+ "password": "",7618+ "host": "",7619+ "hostname": "",7620+ "port": "",7621+ "pathname": "//path",7622+ "search": "",7623+ "hash": ""7624+ },7625+ {7626+ "input": "/.//path",7627+ "base": "non-spec:/p",7628+ "href": "non-spec:/.//path",7629+ "protocol": "non-spec:",7630+ "username": "",7631+ "password": "",7632+ "host": "",7633+ "hostname": "",7634+ "port": "",7635+ "pathname": "//path",7636+ "search": "",7637+ "hash": ""7638+ },7639+ {7640+ "input": "/..//path",7641+ "base": "non-spec:/p",7642+ "href": "non-spec:/.//path",7643+ "protocol": "non-spec:",7644+ "username": "",7645+ "password": "",7646+ "host": "",7647+ "hostname": "",7648+ "port": "",7649+ "pathname": "//path",7650+ "search": "",7651+ "hash": ""7652+ },7653+ {7654+ "input": "..//path",7655+ "base": "non-spec:/p",7656+ "href": "non-spec:/.//path",7657+ "protocol": "non-spec:",7658+ "username": "",7659+ "password": "",7660+ "host": "",7661+ "hostname": "",7662+ "port": "",7663+ "pathname": "//path",7664+ "search": "",7665+ "hash": ""7666+ },7667+ {7668+ "input": "a/..//path",7669+ "base": "non-spec:/p",7670+ "href": "non-spec:/.//path",7671+ "protocol": "non-spec:",7672+ "username": "",7673+ "password": "",7674+ "host": "",7675+ "hostname": "",7676+ "port": "",7677+ "pathname": "//path",7678+ "search": "",7679+ "hash": ""7680+ },7681+ {7682+ "input": "",7683+ "base": "non-spec:/..//p",7684+ "href": "non-spec:/.//p",7685+ "protocol": "non-spec:",7686+ "username": "",7687+ "password": "",7688+ "host": "",7689+ "hostname": "",7690+ "port": "",7691+ "pathname": "//p",7692+ "search": "",7693+ "hash": ""7694+ },7695+ {7696+ "input": "path",7697+ "base": "non-spec:/..//p",7698+ "href": "non-spec:/.//path",7699+ "protocol": "non-spec:",7700+ "username": "",7701+ "password": "",7702+ "host": "",7703+ "hostname": "",7704+ "port": "",7705+ "pathname": "//path",7706+ "search": "",7707+ "hash": ""7708+ },7709+ "Do not serialize /. in path",7710+ {7711+ "input": "../path",7712+ "base": "non-spec:/.//p",7713+ "href": "non-spec:/path",7714+ "protocol": "non-spec:",7715+ "username": "",7716+ "password": "",7717+ "host": "",7718+ "hostname": "",7719+ "port": "",7720+ "pathname": "/path",7721+ "search": "",7722+ "hash": ""7723+ },7724+ "# percent encoded hosts in non-special-URLs",7725+ {7726+ "input": "non-special://%E2%80%A0/",7727+ "base": null,7728+ "href": "non-special://%E2%80%A0/",7729+ "protocol": "non-special:",7730+ "username": "",7731+ "password": "",7732+ "host": "%E2%80%A0",7733+ "hostname": "%E2%80%A0",7734+ "port": "",7735+ "pathname": "/",7736+ "search": "",7737+ "hash": ""7738+ },7739+ {7740+ "input": "non-special://H%4fSt/path",7741+ "base": null,7742+ "href": "non-special://H%4fSt/path",7743+ "protocol": "non-special:",7744+ "username": "",7745+ "password": "",7746+ "host": "H%4fSt",7747+ "hostname": "H%4fSt",7748+ "port": "",7749+ "pathname": "/path",7750+ "search": "",7751+ "hash": ""7752+ },7753+ "# IPv6 in non-special-URLs",7754+ {7755+ "input": "non-special://[1:2:0:0:5:0:0:0]/",7756+ "base": null,7757+ "href": "non-special://[1:2:0:0:5::]/",7758+ "protocol": "non-special:",7759+ "username": "",7760+ "password": "",7761+ "host": "[1:2:0:0:5::]",7762+ "hostname": "[1:2:0:0:5::]",7763+ "port": "",7764+ "pathname": "/",7765+ "search": "",7766+ "hash": ""7767+ },7768+ {7769+ "input": "non-special://[1:2:0:0:0:0:0:3]/",7770+ "base": null,7771+ "href": "non-special://[1:2::3]/",7772+ "protocol": "non-special:",7773+ "username": "",7774+ "password": "",7775+ "host": "[1:2::3]",7776+ "hostname": "[1:2::3]",7777+ "port": "",7778+ "pathname": "/",7779+ "search": "",7780+ "hash": ""7781+ },7782+ {7783+ "input": "non-special://[1:2::3]:80/",7784+ "base": null,7785+ "href": "non-special://[1:2::3]:80/",7786+ "protocol": "non-special:",7787+ "username": "",7788+ "password": "",7789+ "host": "[1:2::3]:80",7790+ "hostname": "[1:2::3]",7791+ "port": "80",7792+ "pathname": "/",7793+ "search": "",7794+ "hash": ""7795+ },7796+ {7797+ "input": "non-special://[:80/",7798+ "base": null,7799+ "failure": true7800+ },7801+ {7802+ "input": "blob:https://example.com:443/",7803+ "base": null,7804+ "href": "blob:https://example.com:443/",7805+ "origin": "https://example.com",7806+ "protocol": "blob:",7807+ "username": "",7808+ "password": "",7809+ "host": "",7810+ "hostname": "",7811+ "port": "",7812+ "pathname": "https://example.com:443/",7813+ "search": "",7814+ "hash": ""7815+ },7816+ {7817+ "input": "blob:http://example.org:88/",7818+ "base": null,7819+ "href": "blob:http://example.org:88/",7820+ "origin": "http://example.org:88",7821+ "protocol": "blob:",7822+ "username": "",7823+ "password": "",7824+ "host": "",7825+ "hostname": "",7826+ "port": "",7827+ "pathname": "http://example.org:88/",7828+ "search": "",7829+ "hash": ""7830+ },7831+ {7832+ "input": "blob:d3958f5c-0777-0845-9dcf-2cb28783acaf",7833+ "base": null,7834+ "href": "blob:d3958f5c-0777-0845-9dcf-2cb28783acaf",7835+ "origin": "null",7836+ "protocol": "blob:",7837+ "username": "",7838+ "password": "",7839+ "host": "",7840+ "hostname": "",7841+ "port": "",7842+ "pathname": "d3958f5c-0777-0845-9dcf-2cb28783acaf",7843+ "search": "",7844+ "hash": ""7845+ },7846+ {7847+ "input": "blob:",7848+ "base": null,7849+ "href": "blob:",7850+ "origin": "null",7851+ "protocol": "blob:",7852+ "username": "",7853+ "password": "",7854+ "host": "",7855+ "hostname": "",7856+ "port": "",7857+ "pathname": "",7858+ "search": "",7859+ "hash": ""7860+ },7861+ "blob: in blob:",7862+ {7863+ "input": "blob:blob:",7864+ "base": null,7865+ "href": "blob:blob:",7866+ "origin": "null",7867+ "protocol": "blob:",7868+ "username": "",7869+ "password": "",7870+ "host": "",7871+ "hostname": "",7872+ "port": "",7873+ "pathname": "blob:",7874+ "search": "",7875+ "hash": ""7876+ },7877+ {7878+ "input": "blob:blob:https://example.org/",7879+ "base": null,7880+ "href": "blob:blob:https://example.org/",7881+ "origin": "null",7882+ "protocol": "blob:",7883+ "username": "",7884+ "password": "",7885+ "host": "",7886+ "hostname": "",7887+ "port": "",7888+ "pathname": "blob:https://example.org/",7889+ "search": "",7890+ "hash": ""7891+ },7892+ "Non-http(s): in blob:",7893+ {7894+ "input": "blob:about:blank",7895+ "base": null,7896+ "href": "blob:about:blank",7897+ "origin": "null",7898+ "protocol": "blob:",7899+ "username": "",7900+ "password": "",7901+ "host": "",7902+ "hostname": "",7903+ "port": "",7904+ "pathname": "about:blank",7905+ "search": "",7906+ "hash": ""7907+ },7908+ {7909+ "input": "blob:file://host/path",7910+ "base": null,7911+ "href": "blob:file://host/path",7912+ "protocol": "blob:",7913+ "username": "",7914+ "password": "",7915+ "host": "",7916+ "hostname": "",7917+ "port": "",7918+ "pathname": "file://host/path",7919+ "search": "",7920+ "hash": ""7921+ },7922+ {7923+ "input": "blob:ftp://host/path",7924+ "base": null,7925+ "href": "blob:ftp://host/path",7926+ "origin": "null",7927+ "protocol": "blob:",7928+ "username": "",7929+ "password": "",7930+ "host": "",7931+ "hostname": "",7932+ "port": "",7933+ "pathname": "ftp://host/path",7934+ "search": "",7935+ "hash": ""7936+ },7937+ {7938+ "input": "blob:ws://example.org/",7939+ "base": null,7940+ "href": "blob:ws://example.org/",7941+ "origin": "null",7942+ "protocol": "blob:",7943+ "username": "",7944+ "password": "",7945+ "host": "",7946+ "hostname": "",7947+ "port": "",7948+ "pathname": "ws://example.org/",7949+ "search": "",7950+ "hash": ""7951+ },7952+ {7953+ "input": "blob:wss://example.org/",7954+ "base": null,7955+ "href": "blob:wss://example.org/",7956+ "origin": "null",7957+ "protocol": "blob:",7958+ "username": "",7959+ "password": "",7960+ "host": "",7961+ "hostname": "",7962+ "port": "",7963+ "pathname": "wss://example.org/",7964+ "search": "",7965+ "hash": ""7966+ },7967+ "Percent-encoded http: in blob:",7968+ {7969+ "input": "blob:http%3a//example.org/",7970+ "base": null,7971+ "href": "blob:http%3a//example.org/",7972+ "origin": "null",7973+ "protocol": "blob:",7974+ "username": "",7975+ "password": "",7976+ "host": "",7977+ "hostname": "",7978+ "port": "",7979+ "pathname": "http%3a//example.org/",7980+ "search": "",7981+ "hash": ""7982+ },7983+ "Invalid IPv4 radix digits",7984+ {7985+ "input": "http://0x7f.0.0.0x7g",7986+ "base": null,7987+ "href": "http://0x7f.0.0.0x7g/",7988+ "protocol": "http:",7989+ "username": "",7990+ "password": "",7991+ "host": "0x7f.0.0.0x7g",7992+ "hostname": "0x7f.0.0.0x7g",7993+ "port": "",7994+ "pathname": "/",7995+ "search": "",7996+ "hash": ""7997+ },7998+ {7999+ "input": "http://0X7F.0.0.0X7G",8000+ "base": null,8001+ "href": "http://0x7f.0.0.0x7g/",8002+ "protocol": "http:",8003+ "username": "",8004+ "password": "",8005+ "host": "0x7f.0.0.0x7g",8006+ "hostname": "0x7f.0.0.0x7g",8007+ "port": "",8008+ "pathname": "/",8009+ "search": "",8010+ "hash": ""8011+ },8012+ "Invalid IPv4 portion of IPv6 address",8013+ {8014+ "input": "http://[::127.0.0.0.1]",8015+ "base": null,8016+ "failure": true8017+ },8018+ "Uncompressed IPv6 addresses with 0",8019+ {8020+ "input": "http://[0:1:0:1:0:1:0:1]",8021+ "base": null,8022+ "href": "http://[0:1:0:1:0:1:0:1]/",8023+ "protocol": "http:",8024+ "username": "",8025+ "password": "",8026+ "host": "[0:1:0:1:0:1:0:1]",8027+ "hostname": "[0:1:0:1:0:1:0:1]",8028+ "port": "",8029+ "pathname": "/",8030+ "search": "",8031+ "hash": ""8032+ },8033+ {8034+ "input": "http://[1:0:1:0:1:0:1:0]",8035+ "base": null,8036+ "href": "http://[1:0:1:0:1:0:1:0]/",8037+ "protocol": "http:",8038+ "username": "",8039+ "password": "",8040+ "host": "[1:0:1:0:1:0:1:0]",8041+ "hostname": "[1:0:1:0:1:0:1:0]",8042+ "port": "",8043+ "pathname": "/",8044+ "search": "",8045+ "hash": ""8046+ },8047+ "Percent-encoded query and fragment",8048+ {8049+ "input": "http://example.org/test?\u0022",8050+ "base": null,8051+ "href": "http://example.org/test?%22",8052+ "protocol": "http:",8053+ "username": "",8054+ "password": "",8055+ "host": "example.org",8056+ "hostname": "example.org",8057+ "port": "",8058+ "pathname": "/test",8059+ "search": "?%22",8060+ "hash": ""8061+ },8062+ {8063+ "input": "http://example.org/test?\u0023",8064+ "base": null,8065+ "href": "http://example.org/test?#",8066+ "protocol": "http:",8067+ "username": "",8068+ "password": "",8069+ "host": "example.org",8070+ "hostname": "example.org",8071+ "port": "",8072+ "pathname": "/test",8073+ "search": "",8074+ "hash": ""8075+ },8076+ {8077+ "input": "http://example.org/test?\u003C",8078+ "base": null,8079+ "href": "http://example.org/test?%3C",8080+ "protocol": "http:",8081+ "username": "",8082+ "password": "",8083+ "host": "example.org",8084+ "hostname": "example.org",8085+ "port": "",8086+ "pathname": "/test",8087+ "search": "?%3C",8088+ "hash": ""8089+ },8090+ {8091+ "input": "http://example.org/test?\u003E",8092+ "base": null,8093+ "href": "http://example.org/test?%3E",8094+ "protocol": "http:",8095+ "username": "",8096+ "password": "",8097+ "host": "example.org",8098+ "hostname": "example.org",8099+ "port": "",8100+ "pathname": "/test",8101+ "search": "?%3E",8102+ "hash": ""8103+ },8104+ {8105+ "input": "http://example.org/test?\u2323",8106+ "base": null,8107+ "href": "http://example.org/test?%E2%8C%A3",8108+ "protocol": "http:",8109+ "username": "",8110+ "password": "",8111+ "host": "example.org",8112+ "hostname": "example.org",8113+ "port": "",8114+ "pathname": "/test",8115+ "search": "?%E2%8C%A3",8116+ "hash": ""8117+ },8118+ {8119+ "input": "http://example.org/test?%23%23",8120+ "base": null,8121+ "href": "http://example.org/test?%23%23",8122+ "protocol": "http:",8123+ "username": "",8124+ "password": "",8125+ "host": "example.org",8126+ "hostname": "example.org",8127+ "port": "",8128+ "pathname": "/test",8129+ "search": "?%23%23",8130+ "hash": ""8131+ },8132+ {8133+ "input": "http://example.org/test?%GH",8134+ "base": null,8135+ "href": "http://example.org/test?%GH",8136+ "protocol": "http:",8137+ "username": "",8138+ "password": "",8139+ "host": "example.org",8140+ "hostname": "example.org",8141+ "port": "",8142+ "pathname": "/test",8143+ "search": "?%GH",8144+ "hash": ""8145+ },8146+ {8147+ "input": "http://example.org/test?a#%EF",8148+ "base": null,8149+ "href": "http://example.org/test?a#%EF",8150+ "protocol": "http:",8151+ "username": "",8152+ "password": "",8153+ "host": "example.org",8154+ "hostname": "example.org",8155+ "port": "",8156+ "pathname": "/test",8157+ "search": "?a",8158+ "hash": "#%EF"8159+ },8160+ {8161+ "input": "http://example.org/test?a#%GH",8162+ "base": null,8163+ "href": "http://example.org/test?a#%GH",8164+ "protocol": "http:",8165+ "username": "",8166+ "password": "",8167+ "host": "example.org",8168+ "hostname": "example.org",8169+ "port": "",8170+ "pathname": "/test",8171+ "search": "?a",8172+ "hash": "#%GH"8173+ },8174+ "URLs that require a non-about:blank base. (Also serve as invalid base tests.)",8175+ {8176+ "input": "a",8177+ "base": null,8178+ "failure": true,8179+ "relativeTo": "non-opaque-path-base"8180+ },8181+ {8182+ "input": "a/",8183+ "base": null,8184+ "failure": true,8185+ "relativeTo": "non-opaque-path-base"8186+ },8187+ {8188+ "input": "a//",8189+ "base": null,8190+ "failure": true,8191+ "relativeTo": "non-opaque-path-base"8192+ },8193+ "Bases that don't fail to parse but fail to be bases",8194+ {8195+ "input": "test-a-colon.html",8196+ "base": "a:",8197+ "failure": true8198+ },8199+ {8200+ "input": "test-a-colon-b.html",8201+ "base": "a:b",8202+ "failure": true8203+ },8204+ "Other base URL tests, that must succeed",8205+ {8206+ "input": "test-a-colon-slash.html",8207+ "base": "a:/",8208+ "href": "a:/test-a-colon-slash.html",8209+ "protocol": "a:",8210+ "username": "",8211+ "password": "",8212+ "host": "",8213+ "hostname": "",8214+ "port": "",8215+ "pathname": "/test-a-colon-slash.html",8216+ "search": "",8217+ "hash": ""8218+ },8219+ {8220+ "input": "test-a-colon-slash-slash.html",8221+ "base": "a://",8222+ "href": "a:///test-a-colon-slash-slash.html",8223+ "protocol": "a:",8224+ "username": "",8225+ "password": "",8226+ "host": "",8227+ "hostname": "",8228+ "port": "",8229+ "pathname": "/test-a-colon-slash-slash.html",8230+ "search": "",8231+ "hash": ""8232+ },8233+ {8234+ "input": "test-a-colon-slash-b.html",8235+ "base": "a:/b",8236+ "href": "a:/test-a-colon-slash-b.html",8237+ "protocol": "a:",8238+ "username": "",8239+ "password": "",8240+ "host": "",8241+ "hostname": "",8242+ "port": "",8243+ "pathname": "/test-a-colon-slash-b.html",8244+ "search": "",8245+ "hash": ""8246+ },8247+ {8248+ "input": "test-a-colon-slash-slash-b.html",8249+ "base": "a://b",8250+ "href": "a://b/test-a-colon-slash-slash-b.html",8251+ "protocol": "a:",8252+ "username": "",8253+ "password": "",8254+ "host": "b",8255+ "hostname": "b",8256+ "port": "",8257+ "pathname": "/test-a-colon-slash-slash-b.html",8258+ "search": "",8259+ "hash": ""8260+ },8261+ "Null code point in fragment",8262+ {8263+ "input": "http://example.org/test?a#b\u0000c",8264+ "base": null,8265+ "href": "http://example.org/test?a#b%00c",8266+ "protocol": "http:",8267+ "username": "",8268+ "password": "",8269+ "host": "example.org",8270+ "hostname": "example.org",8271+ "port": "",8272+ "pathname": "/test",8273+ "search": "?a",8274+ "hash": "#b%00c"8275+ },8276+ {8277+ "input": "non-spec://example.org/test?a#b\u0000c",8278+ "base": null,8279+ "href": "non-spec://example.org/test?a#b%00c",8280+ "protocol": "non-spec:",8281+ "username": "",8282+ "password": "",8283+ "host": "example.org",8284+ "hostname": "example.org",8285+ "port": "",8286+ "pathname": "/test",8287+ "search": "?a",8288+ "hash": "#b%00c"8289+ },8290+ {8291+ "input": "non-spec:/test?a#b\u0000c",8292+ "base": null,8293+ "href": "non-spec:/test?a#b%00c",8294+ "protocol": "non-spec:",8295+ "username": "",8296+ "password": "",8297+ "host": "",8298+ "hostname": "",8299+ "port": "",8300+ "pathname": "/test",8301+ "search": "?a",8302+ "hash": "#b%00c"8303+ },8304+ "First scheme char - not allowed: https://github.com/whatwg/url/issues/464",8305+ {8306+ "input": "10.0.0.7:8080/foo.html",8307+ "base": "file:///some/dir/bar.html",8308+ "href": "file:///some/dir/10.0.0.7:8080/foo.html",8309+ "protocol": "file:",8310+ "username": "",8311+ "password": "",8312+ "host": "",8313+ "hostname": "",8314+ "port": "",8315+ "pathname": "/some/dir/10.0.0.7:8080/foo.html",8316+ "search": "",8317+ "hash": ""8318+ },8319+ "Subsequent scheme chars - not allowed",8320+ {8321+ "input": "a!@$*=/foo.html",8322+ "base": "file:///some/dir/bar.html",8323+ "href": "file:///some/dir/a!@$*=/foo.html",8324+ "protocol": "file:",8325+ "username": "",8326+ "password": "",8327+ "host": "",8328+ "hostname": "",8329+ "port": "",8330+ "pathname": "/some/dir/a!@$*=/foo.html",8331+ "search": "",8332+ "hash": ""8333+ },8334+ "First and subsequent scheme chars - allowed",8335+ {8336+ "input": "a1234567890-+.:foo/bar",8337+ "base": "http://example.com/dir/file",8338+ "href": "a1234567890-+.:foo/bar",8339+ "protocol": "a1234567890-+.:",8340+ "username": "",8341+ "password": "",8342+ "host": "",8343+ "hostname": "",8344+ "port": "",8345+ "pathname": "foo/bar",8346+ "search": "",8347+ "hash": ""8348+ },8349+ "IDNA ignored code points in file URLs hosts",8350+ {8351+ "input": "file://a\u00ADb/p",8352+ "base": null,8353+ "href": "file://ab/p",8354+ "protocol": "file:",8355+ "username": "",8356+ "password": "",8357+ "host": "ab",8358+ "hostname": "ab",8359+ "port": "",8360+ "pathname": "/p",8361+ "search": "",8362+ "hash": ""8363+ },8364+ {8365+ "input": "file://a%C2%ADb/p",8366+ "base": null,8367+ "href": "file://ab/p",8368+ "protocol": "file:",8369+ "username": "",8370+ "password": "",8371+ "host": "ab",8372+ "hostname": "ab",8373+ "port": "",8374+ "pathname": "/p",8375+ "search": "",8376+ "hash": ""8377+ },8378+ "IDNA hostnames which get mapped to 'localhost'",8379+ {8380+ "input": "file://loC𝐀𝐋𝐇𝐨𝐬𝐭/usr/bin",8381+ "base": null,8382+ "href": "file:///usr/bin",8383+ "protocol": "file:",8384+ "username": "",8385+ "password": "",8386+ "host": "",8387+ "hostname": "",8388+ "port": "",8389+ "pathname": "/usr/bin",8390+ "search": "",8391+ "hash": ""8392+ },8393+ "Empty host after the domain to ASCII",8394+ {8395+ "input": "file://\u00ad/p",8396+ "base": null,8397+ "failure": true8398+ },8399+ {8400+ "input": "file://%C2%AD/p",8401+ "base": null,8402+ "failure": true8403+ },8404+ {8405+ "input": "file://xn--/p",8406+ "base": null,8407+ "failure": true8408+ },8409+ "https://bugzilla.mozilla.org/show_bug.cgi?id=1647058",8410+ {8411+ "input": "#link",8412+ "base": "https://example.org/##link",8413+ "href": "https://example.org/#link",8414+ "protocol": "https:",8415+ "username": "",8416+ "password": "",8417+ "host": "example.org",8418+ "hostname": "example.org",8419+ "port": "",8420+ "pathname": "/",8421+ "search": "",8422+ "hash": "#link"8423+ },8424+ "UTF-8 percent-encode of C0 control percent-encode set and supersets",8425+ {8426+ "input": "non-special:cannot-be-a-base-url-\u0000\u0001\u001F\u001E\u007E\u007F\u0080",8427+ "base": null,8428+ "hash": "",8429+ "host": "",8430+ "hostname": "",8431+ "href": "non-special:cannot-be-a-base-url-%00%01%1F%1E~%7F%C2%80",8432+ "origin": "null",8433+ "password": "",8434+ "pathname": "cannot-be-a-base-url-%00%01%1F%1E~%7F%C2%80",8435+ "port": "",8436+ "protocol": "non-special:",8437+ "search": "",8438+ "username": ""8439+ },8440+ {8441+ "input": "https://www.example.com/path{\u007Fpath.html?query'\u007F=query#fragment<\u007Ffragment",8442+ "base": null,8443+ "hash": "#fragment%3C%7Ffragment",8444+ "host": "www.example.com",8445+ "hostname": "www.example.com",8446+ "href": "https://www.example.com/path%7B%7Fpath.html?query%27%7F=query#fragment%3C%7Ffragment",8447+ "origin": "https://www.example.com",8448+ "password": "",8449+ "pathname": "/path%7B%7Fpath.html",8450+ "port": "",8451+ "protocol": "https:",8452+ "search": "?query%27%7F=query",8453+ "username": ""8454+ },8455+ {8456+ "input": "https://user:pass[\u007F@foo/bar",8457+ "base": "http://example.org",8458+ "hash": "",8459+ "host": "foo",8460+ "hostname": "foo",8461+ "href": "https://user:pass%5B%7F@foo/bar",8462+ "origin": "https://foo",8463+ "password": "pass%5B%7F",8464+ "pathname": "/bar",8465+ "port": "",8466+ "protocol": "https:",8467+ "search": "",8468+ "username": "user"8469+ },8470+ "Tests for the distinct percent-encode sets",8471+ {8472+ "input": "foo:// !\"$%&'()*+,-.;<=>@[\\]^_`{|}~@host/",8473+ "base": null,8474+ "hash": "",8475+ "host": "host",8476+ "hostname": "host",8477+ "href": "foo://%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~@host/",8478+ "origin": "null",8479+ "password": "",8480+ "pathname": "/",8481+ "port":"",8482+ "protocol": "foo:",8483+ "search": "",8484+ "username": "%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~"8485+ },8486+ {8487+ "input": "wss:// !\"$%&'()*+,-.;<=>@[]^_`{|}~@host/",8488+ "base": null,8489+ "hash": "",8490+ "host": "host",8491+ "hostname": "host",8492+ "href": "wss://%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~@host/",8493+ "origin": "wss://host",8494+ "password": "",8495+ "pathname": "/",8496+ "port":"",8497+ "protocol": "wss:",8498+ "search": "",8499+ "username": "%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~"8500+ },8501+ {8502+ "input": "foo://joe: !\"$%&'()*+,-.:;<=>@[\\]^_`{|}~@host/",8503+ "base": null,8504+ "hash": "",8505+ "host": "host",8506+ "hostname": "host",8507+ "href": "foo://joe:%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~@host/",8508+ "origin": "null",8509+ "password": "%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~",8510+ "pathname": "/",8511+ "port":"",8512+ "protocol": "foo:",8513+ "search": "",8514+ "username": "joe"8515+ },8516+ {8517+ "input": "wss://joe: !\"$%&'()*+,-.:;<=>@[]^_`{|}~@host/",8518+ "base": null,8519+ "hash": "",8520+ "host": "host",8521+ "hostname": "host",8522+ "href": "wss://joe:%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~@host/",8523+ "origin": "wss://host",8524+ "password": "%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~",8525+ "pathname": "/",8526+ "port":"",8527+ "protocol": "wss:",8528+ "search": "",8529+ "username": "joe"8530+ },8531+ {8532+ "input": "foo://!\"$%&'()*+,-.;=_`{}~/",8533+ "base": null,8534+ "hash": "",8535+ "host": "!\"$%&'()*+,-.;=_`{}~",8536+ "hostname": "!\"$%&'()*+,-.;=_`{}~",8537+ "href":"foo://!\"$%&'()*+,-.;=_`{}~/",8538+ "origin": "null",8539+ "password": "",8540+ "pathname": "/",8541+ "port":"",8542+ "protocol": "foo:",8543+ "search": "",8544+ "username": ""8545+ },8546+ {8547+ "input": "wss://!\"$&'()*+,-.;=_`{}~/",8548+ "base": null,8549+ "hash": "",8550+ "host": "!\"$&'()*+,-.;=_`{}~",8551+ "hostname": "!\"$&'()*+,-.;=_`{}~",8552+ "href":"wss://!\"$&'()*+,-.;=_`{}~/",8553+ "origin": "wss://!\"$&'()*+,-.;=_`{}~",8554+ "password": "",8555+ "pathname": "/",8556+ "port":"",8557+ "protocol": "wss:",8558+ "search": "",8559+ "username": ""8560+ },8561+ {8562+ "input": "foo://host/ !\"$%&'()*+,-./:;<=>@[\\]^_`{|}~",8563+ "base": null,8564+ "hash": "",8565+ "host": "host",8566+ "hostname": "host",8567+ "href": "foo://host/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]^_%60%7B|%7D~",8568+ "origin": "null",8569+ "password": "",8570+ "pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]^_%60%7B|%7D~",8571+ "port":"",8572+ "protocol": "foo:",8573+ "search": "",8574+ "username": ""8575+ },8576+ {8577+ "input": "wss://host/ !\"$%&'()*+,-./:;<=>@[\\]^_`{|}~",8578+ "base": null,8579+ "hash": "",8580+ "host": "host",8581+ "hostname": "host",8582+ "href": "wss://host/%20!%22$%&'()*+,-./:;%3C=%3E@[/]^_%60%7B|%7D~",8583+ "origin": "wss://host",8584+ "password": "",8585+ "pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[/]^_%60%7B|%7D~",8586+ "port":"",8587+ "protocol": "wss:",8588+ "search": "",8589+ "username": ""8590+ },8591+ {8592+ "input": "foo://host/dir/? !\"$%&'()*+,-./:;<=>?@[\\]^_`{|}~",8593+ "base": null,8594+ "hash": "",8595+ "host": "host",8596+ "hostname": "host",8597+ "href": "foo://host/dir/?%20!%22$%&'()*+,-./:;%3C=%3E?@[\\]^_`{|}~",8598+ "origin": "null",8599+ "password": "",8600+ "pathname": "/dir/",8601+ "port":"",8602+ "protocol": "foo:",8603+ "search": "?%20!%22$%&'()*+,-./:;%3C=%3E?@[\\]^_`{|}~",8604+ "username": ""8605+ },8606+ {8607+ "input": "wss://host/dir/? !\"$%&'()*+,-./:;<=>?@[\\]^_`{|}~",8608+ "base": null,8609+ "hash": "",8610+ "host": "host",8611+ "hostname": "host",8612+ "href": "wss://host/dir/?%20!%22$%&%27()*+,-./:;%3C=%3E?@[\\]^_`{|}~",8613+ "origin": "wss://host",8614+ "password": "",8615+ "pathname": "/dir/",8616+ "port":"",8617+ "protocol": "wss:",8618+ "search": "?%20!%22$%&%27()*+,-./:;%3C=%3E?@[\\]^_`{|}~",8619+ "username": ""8620+ },8621+ {8622+ "input": "foo://host/dir/# !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",8623+ "base": null,8624+ "hash": "#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~",8625+ "host": "host",8626+ "hostname": "host",8627+ "href": "foo://host/dir/#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~",8628+ "origin": "null",8629+ "password": "",8630+ "pathname": "/dir/",8631+ "port":"",8632+ "protocol": "foo:",8633+ "search": "",8634+ "username": ""8635+ },8636+ {8637+ "input": "wss://host/dir/# !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",8638+ "base": null,8639+ "hash": "#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~",8640+ "host": "host",8641+ "hostname": "host",8642+ "href": "wss://host/dir/#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~",8643+ "origin": "wss://host",8644+ "password": "",8645+ "pathname": "/dir/",8646+ "port":"",8647+ "protocol": "wss:",8648+ "search": "",8649+ "username": ""8650+ },8651+ "Ensure that input schemes are not ignored when resolving non-special URLs",8652+ {8653+ "input": "abc:rootless",8654+ "base": "abc://host/path",8655+ "hash": "",8656+ "host": "",8657+ "hostname": "",8658+ "href":"abc:rootless",8659+ "password": "",8660+ "pathname": "rootless",8661+ "port":"",8662+ "protocol": "abc:",8663+ "search": "",8664+ "username": ""8665+ },8666+ {8667+ "input": "abc:rootless",8668+ "base": "abc:/path",8669+ "hash": "",8670+ "host": "",8671+ "hostname": "",8672+ "href":"abc:rootless",8673+ "password": "",8674+ "pathname": "rootless",8675+ "port":"",8676+ "protocol": "abc:",8677+ "search": "",8678+ "username": ""8679+ },8680+ {8681+ "input": "abc:rootless",8682+ "base": "abc:path",8683+ "hash": "",8684+ "host": "",8685+ "hostname": "",8686+ "href":"abc:rootless",8687+ "password": "",8688+ "pathname": "rootless",8689+ "port":"",8690+ "protocol": "abc:",8691+ "search": "",8692+ "username": ""8693+ },8694+ {8695+ "input": "abc:/rooted",8696+ "base": "abc://host/path",8697+ "hash": "",8698+ "host": "",8699+ "hostname": "",8700+ "href":"abc:/rooted",8701+ "password": "",8702+ "pathname": "/rooted",8703+ "port":"",8704+ "protocol": "abc:",8705+ "search": "",8706+ "username": ""8707+ },8708+ "Empty query and fragment with blank should throw an error",8709+ {8710+ "input": "#",8711+ "base": null,8712+ "failure": true,8713+ "relativeTo": "any-base"8714+ },8715+ {8716+ "input": "?",8717+ "base": null,8718+ "failure": true,8719+ "relativeTo": "non-opaque-path-base"8720+ },8721+ "Last component looks like a number, but not valid IPv4",8722+ {8723+ "input": "http://1.2.3.4.5",8724+ "base": "http://other.com/",8725+ "failure": true8726+ },8727+ {8728+ "input": "http://1.2.3.4.5.",8729+ "base": "http://other.com/",8730+ "failure": true8731+ },8732+ {8733+ "input": "http://0..0x300/",8734+ "base": null,8735+ "failure": true8736+ },8737+ {8738+ "input": "http://0..0x300./",8739+ "base": null,8740+ "failure": true8741+ },8742+ {8743+ "input": "http://256.256.256.256.256",8744+ "base": "http://other.com/",8745+ "failure": true8746+ },8747+ {8748+ "input": "http://256.256.256.256.256.",8749+ "base": "http://other.com/",8750+ "failure": true8751+ },8752+ {8753+ "input": "http://1.2.3.08",8754+ "base": null,8755+ "failure": true8756+ },8757+ {8758+ "input": "http://1.2.3.08.",8759+ "base": null,8760+ "failure": true8761+ },8762+ {8763+ "input": "http://1.2.3.09",8764+ "base": null,8765+ "failure": true8766+ },8767+ {8768+ "input": "http://09.2.3.4",8769+ "base": null,8770+ "failure": true8771+ },8772+ {8773+ "input": "http://09.2.3.4.",8774+ "base": null,8775+ "failure": true8776+ },8777+ {8778+ "input": "http://01.2.3.4.5",8779+ "base": null,8780+ "failure": true8781+ },8782+ {8783+ "input": "http://01.2.3.4.5.",8784+ "base": null,8785+ "failure": true8786+ },8787+ {8788+ "input": "http://0x100.2.3.4",8789+ "base": null,8790+ "failure": true8791+ },8792+ {8793+ "input": "http://0x100.2.3.4.",8794+ "base": null,8795+ "failure": true8796+ },8797+ {8798+ "input": "http://0x1.2.3.4.5",8799+ "base": null,8800+ "failure": true8801+ },8802+ {8803+ "input": "http://0x1.2.3.4.5.",8804+ "base": null,8805+ "failure": true8806+ },8807+ {8808+ "input": "http://foo.1.2.3.4",8809+ "base": null,8810+ "failure": true8811+ },8812+ {8813+ "input": "http://foo.1.2.3.4.",8814+ "base": null,8815+ "failure": true8816+ },8817+ {8818+ "input": "http://foo.2.3.4",8819+ "base": null,8820+ "failure": true8821+ },8822+ {8823+ "input": "http://foo.2.3.4.",8824+ "base": null,8825+ "failure": true8826+ },8827+ {8828+ "input": "http://foo.09",8829+ "base": null,8830+ "failure": true8831+ },8832+ {8833+ "input": "http://foo.09.",8834+ "base": null,8835+ "failure": true8836+ },8837+ {8838+ "input": "http://foo.0x4",8839+ "base": null,8840+ "failure": true8841+ },8842+ {8843+ "input": "http://foo.0x4.",8844+ "base": null,8845+ "failure": true8846+ },8847+ {8848+ "input": "http://foo.09..",8849+ "base": null,8850+ "hash": "",8851+ "host": "foo.09..",8852+ "hostname": "foo.09..",8853+ "href":"http://foo.09../",8854+ "password": "",8855+ "pathname": "/",8856+ "port":"",8857+ "protocol": "http:",8858+ "search": "",8859+ "username": ""8860+ },8861+ {8862+ "input": "http://0999999999999999999/",8863+ "base": null,8864+ "failure": true8865+ },8866+ {8867+ "input": "http://foo.0x",8868+ "base": null,8869+ "failure": true8870+ },8871+ {8872+ "input": "http://foo.0XFfFfFfFfFfFfFfFfFfAcE123",8873+ "base": null,8874+ "failure": true8875+ },8876+ {8877+ "input": "http://💩.123/",8878+ "base": null,8879+ "failure": true8880+ },8881+ "U+0000 and U+FFFF in various places",8882+ {8883+ "input": "https://\u0000y",8884+ "base": null,8885+ "failure": true8886+ },8887+ {8888+ "input": "https://x/\u0000y",8889+ "base": null,8890+ "hash": "",8891+ "host": "x",8892+ "hostname": "x",8893+ "href": "https://x/%00y",8894+ "password": "",8895+ "pathname": "/%00y",8896+ "port": "",8897+ "protocol": "https:",8898+ "search": "",8899+ "username": ""8900+ },8901+ {8902+ "input": "https://x/?\u0000y",8903+ "base": null,8904+ "hash": "",8905+ "host": "x",8906+ "hostname": "x",8907+ "href": "https://x/?%00y",8908+ "password": "",8909+ "pathname": "/",8910+ "port": "",8911+ "protocol": "https:",8912+ "search": "?%00y",8913+ "username": ""8914+ },8915+ {8916+ "input": "https://x/?#\u0000y",8917+ "base": null,8918+ "hash": "#%00y",8919+ "host": "x",8920+ "hostname": "x",8921+ "href": "https://x/?#%00y",8922+ "password": "",8923+ "pathname": "/",8924+ "port": "",8925+ "protocol": "https:",8926+ "search": "",8927+ "username": ""8928+ },8929+ {8930+ "input": "https://\uFFFFy",8931+ "base": null,8932+ "failure": true8933+ },8934+ {8935+ "input": "https://x/\uFFFFy",8936+ "base": null,8937+ "hash": "",8938+ "host": "x",8939+ "hostname": "x",8940+ "href": "https://x/%EF%BF%BFy",8941+ "password": "",8942+ "pathname": "/%EF%BF%BFy",8943+ "port": "",8944+ "protocol": "https:",8945+ "search": "",8946+ "username": ""8947+ },8948+ {8949+ "input": "https://x/?\uFFFFy",8950+ "base": null,8951+ "hash": "",8952+ "host": "x",8953+ "hostname": "x",8954+ "href": "https://x/?%EF%BF%BFy",8955+ "password": "",8956+ "pathname": "/",8957+ "port": "",8958+ "protocol": "https:",8959+ "search": "?%EF%BF%BFy",8960+ "username": ""8961+ },8962+ {8963+ "input": "https://x/?#\uFFFFy",8964+ "base": null,8965+ "hash": "#%EF%BF%BFy",8966+ "host": "x",8967+ "hostname": "x",8968+ "href": "https://x/?#%EF%BF%BFy",8969+ "password": "",8970+ "pathname": "/",8971+ "port": "",8972+ "protocol": "https:",8973+ "search": "",8974+ "username": ""8975+ },8976+ {8977+ "input": "non-special:\u0000y",8978+ "base": null,8979+ "hash": "",8980+ "host": "",8981+ "hostname": "",8982+ "href": "non-special:%00y",8983+ "password": "",8984+ "pathname": "%00y",8985+ "port": "",8986+ "protocol": "non-special:",8987+ "search": "",8988+ "username": ""8989+ },8990+ {8991+ "input": "non-special:x/\u0000y",8992+ "base": null,8993+ "hash": "",8994+ "host": "",8995+ "hostname": "",8996+ "href": "non-special:x/%00y",8997+ "password": "",8998+ "pathname": "x/%00y",8999+ "port": "",9000+ "protocol": "non-special:",9001+ "search": "",9002+ "username": ""9003+ },9004+ {9005+ "input": "non-special:x/?\u0000y",9006+ "base": null,9007+ "hash": "",9008+ "host": "",9009+ "hostname": "",9010+ "href": "non-special:x/?%00y",9011+ "password": "",9012+ "pathname": "x/",9013+ "port": "",9014+ "protocol": "non-special:",9015+ "search": "?%00y",9016+ "username": ""9017+ },9018+ {9019+ "input": "non-special:x/?#\u0000y",9020+ "base": null,9021+ "hash": "#%00y",9022+ "host": "",9023+ "hostname": "",9024+ "href": "non-special:x/?#%00y",9025+ "password": "",9026+ "pathname": "x/",9027+ "port": "",9028+ "protocol": "non-special:",9029+ "search": "",9030+ "username": ""9031+ },9032+ {9033+ "input": "non-special:\uFFFFy",9034+ "base": null,9035+ "hash": "",9036+ "host": "",9037+ "hostname": "",9038+ "href": "non-special:%EF%BF%BFy",9039+ "password": "",9040+ "pathname": "%EF%BF%BFy",9041+ "port": "",9042+ "protocol": "non-special:",9043+ "search": "",9044+ "username": ""9045+ },9046+ {9047+ "input": "non-special:x/\uFFFFy",9048+ "base": null,9049+ "hash": "",9050+ "host": "",9051+ "hostname": "",9052+ "href": "non-special:x/%EF%BF%BFy",9053+ "password": "",9054+ "pathname": "x/%EF%BF%BFy",9055+ "port": "",9056+ "protocol": "non-special:",9057+ "search": "",9058+ "username": ""9059+ },9060+ {9061+ "input": "non-special:x/?\uFFFFy",9062+ "base": null,9063+ "hash": "",9064+ "host": "",9065+ "hostname": "",9066+ "href": "non-special:x/?%EF%BF%BFy",9067+ "password": "",9068+ "pathname": "x/",9069+ "port": "",9070+ "protocol": "non-special:",9071+ "search": "?%EF%BF%BFy",9072+ "username": ""9073+ },9074+ {9075+ "input": "non-special:x/?#\uFFFFy",9076+ "base": null,9077+ "hash": "#%EF%BF%BFy",9078+ "host": "",9079+ "hostname": "",9080+ "href": "non-special:x/?#%EF%BF%BFy",9081+ "password": "",9082+ "pathname": "x/",9083+ "port": "",9084+ "protocol": "non-special:",9085+ "search": "",9086+ "username": ""9087+ },9088+ {9089+ "input": "",9090+ "base": null,9091+ "failure": true,9092+ "relativeTo": "non-opaque-path-base"9093+ },9094+ {9095+ "input": "https://example.com/\"quoted\"",9096+ "base": null,9097+ "hash": "",9098+ "host": "example.com",9099+ "hostname": "example.com",9100+ "href": "https://example.com/%22quoted%22",9101+ "origin": "https://example.com",9102+ "password": "",9103+ "pathname": "/%22quoted%22",9104+ "port": "",9105+ "protocol": "https:",9106+ "search": "",9107+ "username": ""9108+ },9109+ {9110+ "input": "https://a%C2%ADb/",9111+ "base": null,9112+ "hash": "",9113+ "host": "ab",9114+ "hostname": "ab",9115+ "href": "https://ab/",9116+ "origin": "https://ab",9117+ "password": "",9118+ "pathname": "/",9119+ "port": "",9120+ "protocol": "https:",9121+ "search": "",9122+ "username": ""9123+ },9124+ {9125+ "comment": "Empty host after domain to ASCII",9126+ "input": "https://\u00AD/",9127+ "base": null,9128+ "failure": true9129+ },9130+ {9131+ "input": "https://%C2%AD/",9132+ "base": null,9133+ "failure": true9134+ },9135+ {9136+ "input": "https://xn--/",9137+ "base": null,9138+ "failure": true9139+ },9140+ "Non-special schemes that some implementations might incorrectly treat as special",9141+ {9142+ "input": "data://example.com:8080/pathname?search#hash",9143+ "base": null,9144+ "href": "data://example.com:8080/pathname?search#hash",9145+ "origin": "null",9146+ "protocol": "data:",9147+ "username": "",9148+ "password": "",9149+ "host": "example.com:8080",9150+ "hostname": "example.com",9151+ "port": "8080",9152+ "pathname": "/pathname",9153+ "search": "?search",9154+ "hash": "#hash"9155+ },9156+ {9157+ "input": "data:///test",9158+ "base": null,9159+ "href": "data:///test",9160+ "origin": "null",9161+ "protocol": "data:",9162+ "username": "",9163+ "password": "",9164+ "host": "",9165+ "hostname": "",9166+ "port": "",9167+ "pathname": "/test",9168+ "search": "",9169+ "hash": ""9170+ },9171+ {9172+ "input": "data://test/a/../b",9173+ "base": null,9174+ "href": "data://test/b",9175+ "origin": "null",9176+ "protocol": "data:",9177+ "username": "",9178+ "password": "",9179+ "host": "test",9180+ "hostname": "test",9181+ "port": "",9182+ "pathname": "/b",9183+ "search": "",9184+ "hash": ""9185+ },9186+ {9187+ "input": "data://:443",9188+ "base": null,9189+ "failure": true9190+ },9191+ {9192+ "input": "data://test:test",9193+ "base": null,9194+ "failure": true9195+ },9196+ {9197+ "input": "data://[:1]",9198+ "base": null,9199+ "failure": true9200+ },9201+ {9202+ "input": "javascript://example.com:8080/pathname?search#hash",9203+ "base": null,9204+ "href": "javascript://example.com:8080/pathname?search#hash",9205+ "origin": "null",9206+ "protocol": "javascript:",9207+ "username": "",9208+ "password": "",9209+ "host": "example.com:8080",9210+ "hostname": "example.com",9211+ "port": "8080",9212+ "pathname": "/pathname",9213+ "search": "?search",9214+ "hash": "#hash"9215+ },9216+ {9217+ "input": "javascript:///test",9218+ "base": null,9219+ "href": "javascript:///test",9220+ "origin": "null",9221+ "protocol": "javascript:",9222+ "username": "",9223+ "password": "",9224+ "host": "",9225+ "hostname": "",9226+ "port": "",9227+ "pathname": "/test",9228+ "search": "",9229+ "hash": ""9230+ },9231+ {9232+ "input": "javascript://test/a/../b",9233+ "base": null,9234+ "href": "javascript://test/b",9235+ "origin": "null",9236+ "protocol": "javascript:",9237+ "username": "",9238+ "password": "",9239+ "host": "test",9240+ "hostname": "test",9241+ "port": "",9242+ "pathname": "/b",9243+ "search": "",9244+ "hash": ""9245+ },9246+ {9247+ "input": "javascript://:443",9248+ "base": null,9249+ "failure": true9250+ },9251+ {9252+ "input": "javascript://test:test",9253+ "base": null,9254+ "failure": true9255+ },9256+ {9257+ "input": "javascript://[:1]",9258+ "base": null,9259+ "failure": true9260+ },9261+ {9262+ "input": "mailto://example.com:8080/pathname?search#hash",9263+ "base": null,9264+ "href": "mailto://example.com:8080/pathname?search#hash",9265+ "origin": "null",9266+ "protocol": "mailto:",9267+ "username": "",9268+ "password": "",9269+ "host": "example.com:8080",9270+ "hostname": "example.com",9271+ "port": "8080",9272+ "pathname": "/pathname",9273+ "search": "?search",9274+ "hash": "#hash"9275+ },9276+ {9277+ "input": "mailto:///test",9278+ "base": null,9279+ "href": "mailto:///test",9280+ "origin": "null",9281+ "protocol": "mailto:",9282+ "username": "",9283+ "password": "",9284+ "host": "",9285+ "hostname": "",9286+ "port": "",9287+ "pathname": "/test",9288+ "search": "",9289+ "hash": ""9290+ },9291+ {9292+ "input": "mailto://test/a/../b",9293+ "base": null,9294+ "href": "mailto://test/b",9295+ "origin": "null",9296+ "protocol": "mailto:",9297+ "username": "",9298+ "password": "",9299+ "host": "test",9300+ "hostname": "test",9301+ "port": "",9302+ "pathname": "/b",9303+ "search": "",9304+ "hash": ""9305+ },9306+ {9307+ "input": "mailto://:443",9308+ "base": null,9309+ "failure": true9310+ },9311+ {9312+ "input": "mailto://test:test",9313+ "base": null,9314+ "failure": true9315+ },9316+ {9317+ "input": "mailto://[:1]",9318+ "base": null,9319+ "failure": true9320+ },9321+ {9322+ "input": "intent://example.com:8080/pathname?search#hash",9323+ "base": null,9324+ "href": "intent://example.com:8080/pathname?search#hash",9325+ "origin": "null",9326+ "protocol": "intent:",9327+ "username": "",9328+ "password": "",9329+ "host": "example.com:8080",9330+ "hostname": "example.com",9331+ "port": "8080",9332+ "pathname": "/pathname",9333+ "search": "?search",9334+ "hash": "#hash"9335+ },9336+ {9337+ "input": "intent:///test",9338+ "base": null,9339+ "href": "intent:///test",9340+ "origin": "null",9341+ "protocol": "intent:",9342+ "username": "",9343+ "password": "",9344+ "host": "",9345+ "hostname": "",9346+ "port": "",9347+ "pathname": "/test",9348+ "search": "",9349+ "hash": ""9350+ },9351+ {9352+ "input": "intent://test/a/../b",9353+ "base": null,9354+ "href": "intent://test/b",9355+ "origin": "null",9356+ "protocol": "intent:",9357+ "username": "",9358+ "password": "",9359+ "host": "test",9360+ "hostname": "test",9361+ "port": "",9362+ "pathname": "/b",9363+ "search": "",9364+ "hash": ""9365+ },9366+ {9367+ "input": "intent://:443",9368+ "base": null,9369+ "failure": true9370+ },9371+ {9372+ "input": "intent://test:test",9373+ "base": null,9374+ "failure": true9375+ },9376+ {9377+ "input": "intent://[:1]",9378+ "base": null,9379+ "failure": true9380+ },9381+ {9382+ "input": "urn://example.com:8080/pathname?search#hash",9383+ "base": null,9384+ "href": "urn://example.com:8080/pathname?search#hash",9385+ "origin": "null",9386+ "protocol": "urn:",9387+ "username": "",9388+ "password": "",9389+ "host": "example.com:8080",9390+ "hostname": "example.com",9391+ "port": "8080",9392+ "pathname": "/pathname",9393+ "search": "?search",9394+ "hash": "#hash"9395+ },9396+ {9397+ "input": "urn:///test",9398+ "base": null,9399+ "href": "urn:///test",9400+ "origin": "null",9401+ "protocol": "urn:",9402+ "username": "",9403+ "password": "",9404+ "host": "",9405+ "hostname": "",9406+ "port": "",9407+ "pathname": "/test",9408+ "search": "",9409+ "hash": ""9410+ },9411+ {9412+ "input": "urn://test/a/../b",9413+ "base": null,9414+ "href": "urn://test/b",9415+ "origin": "null",9416+ "protocol": "urn:",9417+ "username": "",9418+ "password": "",9419+ "host": "test",9420+ "hostname": "test",9421+ "port": "",9422+ "pathname": "/b",9423+ "search": "",9424+ "hash": ""9425+ },9426+ {9427+ "input": "urn://:443",9428+ "base": null,9429+ "failure": true9430+ },9431+ {9432+ "input": "urn://test:test",9433+ "base": null,9434+ "failure": true9435+ },9436+ {9437+ "input": "urn://[:1]",9438+ "base": null,9439+ "failure": true9440+ },9441+ {9442+ "input": "turn://example.com:8080/pathname?search#hash",9443+ "base": null,9444+ "href": "turn://example.com:8080/pathname?search#hash",9445+ "origin": "null",9446+ "protocol": "turn:",9447+ "username": "",9448+ "password": "",9449+ "host": "example.com:8080",9450+ "hostname": "example.com",9451+ "port": "8080",9452+ "pathname": "/pathname",9453+ "search": "?search",9454+ "hash": "#hash"9455+ },9456+ {9457+ "input": "turn:///test",9458+ "base": null,9459+ "href": "turn:///test",9460+ "origin": "null",9461+ "protocol": "turn:",9462+ "username": "",9463+ "password": "",9464+ "host": "",9465+ "hostname": "",9466+ "port": "",9467+ "pathname": "/test",9468+ "search": "",9469+ "hash": ""9470+ },9471+ {9472+ "input": "turn://test/a/../b",9473+ "base": null,9474+ "href": "turn://test/b",9475+ "origin": "null",9476+ "protocol": "turn:",9477+ "username": "",9478+ "password": "",9479+ "host": "test",9480+ "hostname": "test",9481+ "port": "",9482+ "pathname": "/b",9483+ "search": "",9484+ "hash": ""9485+ },9486+ {9487+ "input": "turn://:443",9488+ "base": null,9489+ "failure": true9490+ },9491+ {9492+ "input": "turn://test:test",9493+ "base": null,9494+ "failure": true9495+ },9496+ {9497+ "input": "turn://[:1]",9498+ "base": null,9499+ "failure": true9500+ },9501+ {9502+ "input": "stun://example.com:8080/pathname?search#hash",9503+ "base": null,9504+ "href": "stun://example.com:8080/pathname?search#hash",9505+ "origin": "null",9506+ "protocol": "stun:",9507+ "username": "",9508+ "password": "",9509+ "host": "example.com:8080",9510+ "hostname": "example.com",9511+ "port": "8080",9512+ "pathname": "/pathname",9513+ "search": "?search",9514+ "hash": "#hash"9515+ },9516+ {9517+ "input": "stun:///test",9518+ "base": null,9519+ "href": "stun:///test",9520+ "origin": "null",9521+ "protocol": "stun:",9522+ "username": "",9523+ "password": "",9524+ "host": "",9525+ "hostname": "",9526+ "port": "",9527+ "pathname": "/test",9528+ "search": "",9529+ "hash": ""9530+ },9531+ {9532+ "input": "stun://test/a/../b",9533+ "base": null,9534+ "href": "stun://test/b",9535+ "origin": "null",9536+ "protocol": "stun:",9537+ "username": "",9538+ "password": "",9539+ "host": "test",9540+ "hostname": "test",9541+ "port": "",9542+ "pathname": "/b",9543+ "search": "",9544+ "hash": ""9545+ },9546+ {9547+ "input": "stun://:443",9548+ "base": null,9549+ "failure": true9550+ },9551+ {9552+ "input": "stun://test:test",9553+ "base": null,9554+ "failure": true9555+ },9556+ {9557+ "input": "stun://[:1]",9558+ "base": null,9559+ "failure": true9560+ },9561+ {9562+ "input": "w://x:0",9563+ "base": null,9564+ "href": "w://x:0",9565+ "origin": "null",9566+ "protocol": "w:",9567+ "username": "",9568+ "password": "",9569+ "host": "x:0",9570+ "hostname": "x",9571+ "port": "0",9572+ "pathname": "",9573+ "search": "",9574+ "hash": ""9575+ },9576+ {9577+ "input": "west://x:0",9578+ "base": null,9579+ "href": "west://x:0",9580+ "origin": "null",9581+ "protocol": "west:",9582+ "username": "",9583+ "password": "",9584+ "host": "x:0",9585+ "hostname": "x",9586+ "port": "0",9587+ "pathname": "",9588+ "search": "",9589+ "hash": ""9590+ },9591+ "Scheme relative path starting with multiple slashes",9592+ {9593+ "input": "///test",9594+ "base": "http://example.org/",9595+ "href": "http://test/",9596+ "protocol": "http:",9597+ "username": "",9598+ "password": "",9599+ "host": "test",9600+ "hostname": "test",9601+ "port": "",9602+ "pathname": "/",9603+ "search": "",9604+ "hash": ""9605+ },9606+ {9607+ "input": "///\\//\\//test",9608+ "base": "http://example.org/",9609+ "href": "http://test/",9610+ "protocol": "http:",9611+ "username": "",9612+ "password": "",9613+ "host": "test",9614+ "hostname": "test",9615+ "port": "",9616+ "pathname": "/",9617+ "search": "",9618+ "hash": ""9619+ },9620+ {9621+ "input": "///example.org/path",9622+ "base": "http://example.org/",9623+ "href": "http://example.org/path",9624+ "protocol": "http:",9625+ "username": "",9626+ "password": "",9627+ "host": "example.org",9628+ "hostname": "example.org",9629+ "port": "",9630+ "pathname": "/path",9631+ "search": "",9632+ "hash": ""9633+ },9634+ {9635+ "input": "///example.org/../path",9636+ "base": "http://example.org/",9637+ "href": "http://example.org/path",9638+ "protocol": "http:",9639+ "username": "",9640+ "password": "",9641+ "host": "example.org",9642+ "hostname": "example.org",9643+ "port": "",9644+ "pathname": "/path",9645+ "search": "",9646+ "hash": ""9647+ },9648+ {9649+ "input": "///example.org/../../",9650+ "base": "http://example.org/",9651+ "href": "http://example.org/",9652+ "protocol": "http:",9653+ "username": "",9654+ "password": "",9655+ "host": "example.org",9656+ "hostname": "example.org",9657+ "port": "",9658+ "pathname": "/",9659+ "search": "",9660+ "hash": ""9661+ },9662+ {9663+ "input": "///example.org/../path/../../",9664+ "base": "http://example.org/",9665+ "href": "http://example.org/",9666+ "protocol": "http:",9667+ "username": "",9668+ "password": "",9669+ "host": "example.org",9670+ "hostname": "example.org",9671+ "port": "",9672+ "pathname": "/",9673+ "search": "",9674+ "hash": ""9675+ },9676+ {9677+ "input": "///example.org/../path/../../path",9678+ "base": "http://example.org/",9679+ "href": "http://example.org/path",9680+ "protocol": "http:",9681+ "username": "",9682+ "password": "",9683+ "host": "example.org",9684+ "hostname": "example.org",9685+ "port": "",9686+ "pathname": "/path",9687+ "search": "",9688+ "hash": ""9689+ },9690+ {9691+ "input": "/\\/\\//example.org/../path",9692+ "base": "http://example.org/",9693+ "href": "http://example.org/path",9694+ "protocol": "http:",9695+ "username": "",9696+ "password": "",9697+ "host": "example.org",9698+ "hostname": "example.org",9699+ "port": "",9700+ "pathname": "/path",9701+ "search": "",9702+ "hash": ""9703+ },9704+ {9705+ "input": "///abcdef/../",9706+ "base": "file:///",9707+ "href": "file:///",9708+ "protocol": "file:",9709+ "username": "",9710+ "password": "",9711+ "host": "",9712+ "hostname": "",9713+ "port": "",9714+ "pathname": "/",9715+ "search": "",9716+ "hash": ""9717+ },9718+ {9719+ "input": "/\\//\\/a/../",9720+ "base": "file:///",9721+ "href": "file://////",9722+ "protocol": "file:",9723+ "username": "",9724+ "password": "",9725+ "host": "",9726+ "hostname": "",9727+ "port": "",9728+ "pathname": "////",9729+ "search": "",9730+ "hash": ""9731+ },9732+ {9733+ "input": "//a/../",9734+ "base": "file:///",9735+ "href": "file://a/",9736+ "protocol": "file:",9737+ "username": "",9738+ "password": "",9739+ "host": "a",9740+ "hostname": "a",9741+ "port": "",9742+ "pathname": "/",9743+ "search": "",9744+ "hash": ""9745+ }9746+]