<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[204948] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/204948">204948</a></dd>
<dt>Author</dt> <dd>achristensen@apple.com</dd>
<dt>Date</dt> <dd>2016-08-24 18:22:33 -0700 (Wed, 24 Aug 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Import w3c URL tests
https://bugs.webkit.org/show_bug.cgi?id=161177

Reviewed by Tim Horton.

LayoutTests/imported/w3c:

* web-platform-tests/url: Added.
* web-platform-tests/url/OWNERS: Added.
* web-platform-tests/url/README.md: Added.
* web-platform-tests/url/a-element-expected.txt: Added.
* web-platform-tests/url/a-element-xhtml-expected.txt: Added.
* web-platform-tests/url/a-element-xhtml.xhtml: Added.
* web-platform-tests/url/a-element.html: Added.
* web-platform-tests/url/a-element.js: Added.
(setup.async_test.string_appeared_here.setup.step):
(setBase):
(bURL):
(runURLTests):
* web-platform-tests/url/historical-expected.txt: Added.
* web-platform-tests/url/historical.html: Added.
* web-platform-tests/url/historical.worker.js: Added.
(test):
* web-platform-tests/url/interfaces-expected.txt: Added.
* web-platform-tests/url/interfaces.html: Added.
* web-platform-tests/url/setters_tests.json: Added.
* web-platform-tests/url/url-constructor-expected.txt: Added.
* web-platform-tests/url/url-constructor.html: Added.
* web-platform-tests/url/url-domainToUnicode-expected.txt: Added.
* web-platform-tests/url/url-domainToUnicode.html: Added.
* web-platform-tests/url/url-setters-expected.txt: Added.
* web-platform-tests/url/url-setters.html: Added.
* web-platform-tests/url/urlsearchparams-append-expected.txt: Added.
* web-platform-tests/url/urlsearchparams-append.html: Added.
* web-platform-tests/url/urlsearchparams-constructor-expected.txt: Added.
* web-platform-tests/url/urlsearchparams-constructor.html: Added.
* web-platform-tests/url/urlsearchparams-delete-expected.txt: Added.
* web-platform-tests/url/urlsearchparams-delete.html: Added.
* web-platform-tests/url/urlsearchparams-get-expected.txt: Added.
* web-platform-tests/url/urlsearchparams-get.html: Added.
* web-platform-tests/url/urlsearchparams-getall-expected.txt: Added.
* web-platform-tests/url/urlsearchparams-getall.html: Added.
* web-platform-tests/url/urlsearchparams-has-expected.txt: Added.
* web-platform-tests/url/urlsearchparams-has.html: Added.
* web-platform-tests/url/urlsearchparams-set-expected.txt: Added.
* web-platform-tests/url/urlsearchparams-set.html: Added.
* web-platform-tests/url/urlsearchparams-stringifier-expected.txt: Added.
* web-platform-tests/url/urlsearchparams-stringifier.html: Added.
* web-platform-tests/url/urltestdata.json: Added.

Source/WebCore:

Tests: imported/w3c/web-platform-tests/url/a-element-xhtml.xhtml
       imported/w3c/web-platform-tests/url/a-element.html
       imported/w3c/web-platform-tests/url/historical.html
       imported/w3c/web-platform-tests/url/interfaces.html
       imported/w3c/web-platform-tests/url/url-constructor.html
       imported/w3c/web-platform-tests/url/url-domainToUnicode.html
       imported/w3c/web-platform-tests/url/url-setters.html
       imported/w3c/web-platform-tests/url/urlsearchparams-append.html
       imported/w3c/web-platform-tests/url/urlsearchparams-constructor.html
       imported/w3c/web-platform-tests/url/urlsearchparams-delete.html
       imported/w3c/web-platform-tests/url/urlsearchparams-get.html
       imported/w3c/web-platform-tests/url/urlsearchparams-getall.html
       imported/w3c/web-platform-tests/url/urlsearchparams-has.html
       imported/w3c/web-platform-tests/url/urlsearchparams-set.html
       imported/w3c/web-platform-tests/url/urlsearchparams-stringifier.html

* platform/URL.cpp:
(WebCore::URL::setQuery):

LayoutTests:

* TestExpectations:
Skip asserting test.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsTestExpectations">trunk/LayoutTests/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformURLcpp">trunk/Source/WebCore/platform/URL.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/imported/w3c/web-platform-tests/url/</li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlOWNERS">trunk/LayoutTests/imported/w3c/web-platform-tests/url/OWNERS</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlREADMEmd">trunk/LayoutTests/imported/w3c/web-platform-tests/url/README.md</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlaelementexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlaelementxhtmlexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlaelementxhtmlxhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml.xhtml</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlaelementhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlaelementjs">trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlhistoricalexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/url/historical-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlhistoricalhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/url/historical.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlhistoricalworkerjs">trunk/LayoutTests/imported/w3c/web-platform-tests/url/historical.worker.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlinterfacesexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/url/interfaces-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlinterfaceshtml">trunk/LayoutTests/imported/w3c/web-platform-tests/url/interfaces.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlsetters_testsjson">trunk/LayoutTests/imported/w3c/web-platform-tests/url/setters_tests.json</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurlconstructorexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurlconstructorhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurldomainToUnicodeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-domainToUnicode-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurldomainToUnicodehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-domainToUnicode.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurlsettersexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-setters-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurlsettershtml">trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-setters.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsappendexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-append-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsappendhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-append.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsconstructorexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-constructor-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsconstructorhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-constructor.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsdeleteexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-delete-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsdeletehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-delete.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsgetexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-get-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsgethtml">trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-get.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsgetallexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-getall-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsgetallhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-getall.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamshasexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-has-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamshashtml">trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-has.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamssetexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-set-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamssethtml">trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-set.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsstringifierexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-stringifier-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsstringifierhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-stringifier.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurltestdatajson">trunk/LayoutTests/imported/w3c/web-platform-tests/url/urltestdata.json</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (204947 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-08-25 01:21:43 UTC (rev 204947)
+++ trunk/LayoutTests/ChangeLog        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-08-24  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        Import w3c URL tests
+        https://bugs.webkit.org/show_bug.cgi?id=161177
+
+        Reviewed by Tim Horton.
+
+        * TestExpectations:
+        Skip asserting test.
+
</ins><span class="cx"> 2016-08-24  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS DRT] Hook up uiController.zoomToScale() for DRT
</span></span></pre></div>
<a id="trunkLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/TestExpectations (204947 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/TestExpectations        2016-08-25 01:21:43 UTC (rev 204947)
+++ trunk/LayoutTests/TestExpectations        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -500,6 +500,8 @@
</span><span class="cx"> 
</span><span class="cx"> imported/w3c/web-platform-tests/fetch/api/request/request-cache.html [ Skip ]
</span><span class="cx"> 
</span><ins>+webkit.org/b/161176 [ Debug ] imported/w3c/web-platform-tests/url/url-setters.html [ Skip ]
+
</ins><span class="cx"> [ Debug ] imported/w3c/web-platform-tests/fetch/api/cors/cors-basic-worker.html [ Skip ]
</span><span class="cx"> [ Debug ] imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies-worker.html [ Skip ]
</span><span class="cx"> [ Debug ] imported/w3c/web-platform-tests/fetch/api/cors/cors-filtering-worker.html [ Skip ]
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (204947 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-08-25 01:21:43 UTC (rev 204947)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -1,3 +1,53 @@
</span><ins>+2016-08-24  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        Import w3c URL tests
+        https://bugs.webkit.org/show_bug.cgi?id=161177
+
+        Reviewed by Tim Horton.
+
+        * web-platform-tests/url: Added.
+        * web-platform-tests/url/OWNERS: Added.
+        * web-platform-tests/url/README.md: Added.
+        * web-platform-tests/url/a-element-expected.txt: Added.
+        * web-platform-tests/url/a-element-xhtml-expected.txt: Added.
+        * web-platform-tests/url/a-element-xhtml.xhtml: Added.
+        * web-platform-tests/url/a-element.html: Added.
+        * web-platform-tests/url/a-element.js: Added.
+        (setup.async_test.string_appeared_here.setup.step):
+        (setBase):
+        (bURL):
+        (runURLTests):
+        * web-platform-tests/url/historical-expected.txt: Added.
+        * web-platform-tests/url/historical.html: Added.
+        * web-platform-tests/url/historical.worker.js: Added.
+        (test):
+        * web-platform-tests/url/interfaces-expected.txt: Added.
+        * web-platform-tests/url/interfaces.html: Added.
+        * web-platform-tests/url/setters_tests.json: Added.
+        * web-platform-tests/url/url-constructor-expected.txt: Added.
+        * web-platform-tests/url/url-constructor.html: Added.
+        * web-platform-tests/url/url-domainToUnicode-expected.txt: Added.
+        * web-platform-tests/url/url-domainToUnicode.html: Added.
+        * web-platform-tests/url/url-setters-expected.txt: Added.
+        * web-platform-tests/url/url-setters.html: Added.
+        * web-platform-tests/url/urlsearchparams-append-expected.txt: Added.
+        * web-platform-tests/url/urlsearchparams-append.html: Added.
+        * web-platform-tests/url/urlsearchparams-constructor-expected.txt: Added.
+        * web-platform-tests/url/urlsearchparams-constructor.html: Added.
+        * web-platform-tests/url/urlsearchparams-delete-expected.txt: Added.
+        * web-platform-tests/url/urlsearchparams-delete.html: Added.
+        * web-platform-tests/url/urlsearchparams-get-expected.txt: Added.
+        * web-platform-tests/url/urlsearchparams-get.html: Added.
+        * web-platform-tests/url/urlsearchparams-getall-expected.txt: Added.
+        * web-platform-tests/url/urlsearchparams-getall.html: Added.
+        * web-platform-tests/url/urlsearchparams-has-expected.txt: Added.
+        * web-platform-tests/url/urlsearchparams-has.html: Added.
+        * web-platform-tests/url/urlsearchparams-set-expected.txt: Added.
+        * web-platform-tests/url/urlsearchparams-set.html: Added.
+        * web-platform-tests/url/urlsearchparams-stringifier-expected.txt: Added.
+        * web-platform-tests/url/urlsearchparams-stringifier.html: Added.
+        * web-platform-tests/url/urltestdata.json: Added.
+
</ins><span class="cx"> 2016-08-23  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add support for CanvasRenderingContext2D.resetTransform()
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlOWNERS"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/OWNERS (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/OWNERS                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/OWNERS        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+@mikewest
+@frewsxcv
+@tomalec
+@rubys
+@sideshowbarker
+@zcorpan
+@xiaojunwu
+@smola
+@domenic
+@Sebmaster
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlREADMEmd"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/README.md (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/README.md                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/README.md        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+These tests are for browsers, but the data for
+`a-element.html`, `url-constructor.html`, and `a-element-xhtml.xhtml`
+is in `urltestdata.json` and can be re-used by non-browser implementations.
+This file contains a JSON array of comments as strings and test cases as objects.
+The keys for each test case are:
+
+* `base`: an absolute URL as a string whose [parsing] without a base of its own should succeed.
+  This key is always present,
+  and may have a value like `&quot;about:blank&quot;` when `input` is an absolute URL.
+* `input`: an URL as a string to be [parsed][parsing] with `base` as its base URL.
+* Either:
+  * `failure` with the value `true`, indicating that parsing `input` should return failure,
+  * or `href`, `origin`, `protocol`, `username`, `password`, `host`, `hostname`, `port`,
+    `pathname`, `search`, and `hash` with string values;
+    indicating that parsing `input` should return an URL record
+    and that the getters of each corresponding attribute in that URL’s [API]
+    should return the corresponding value.
+
+    The `origin` key may be missing.
+    In that case, the API’s `origin` attribute is not tested.
+
+[parsing]: https://url.spec.whatwg.org/#concept-basic-url-parser
+[API]: https://url.spec.whatwg.org/#api
+
+[`annevk/url`](https://github.com/annevk/url) hosts some other files that might be of
+interest if you want to create additional tests.
+
+Similar to `a-element.html` it would be trivial to add more tests for other objects that
+expose links (e.g. URL and `&lt;area&gt;`). There's also room for enhancement and bits that
+require independent tests:
+
+* The encoding part of the URL parser
+* The state override part of the URL parser (setting individual properties of a URL)
+* Origin serialization
+* `application/x-www-form-urlencoded`
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlaelementexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,340 @@
</span><ins>+
+PASS Loading data… 
+PASS Parsing: &lt;http://example        .
+org&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://user:pass@foo:21/bar;par?b#c&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http:foo.com&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;           :foo.com   
+&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt; foo.com  &gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;a:         foo.com&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;a://&quot;
+PASS Parsing: &lt;http://f:21/ b ? d # e &gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://f:/c&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;http://f:0/c&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;http://f:0&quot; but got &quot;http://f&quot;
+FAIL Parsing: &lt;http://f:00000000000000/c&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: href expected &quot;http://f:0/c&quot; but got &quot;http://f:00000000000000/c&quot;
+FAIL Parsing: &lt;http://f:00000000000000000000080/c&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: href expected &quot;http://f/c&quot; but got &quot;http://f:00000000000000000000080/c&quot;
+PASS Parsing: &lt;http://f:b/c&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://f: /c&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://f:
+/c&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://f:fifty-two/c&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;http://f:999999/c&gt; against &lt;http://example.org/foo/bar&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+FAIL Parsing: &lt;http://f: 21 / b ? d # e &gt; against &lt;http://example.org/foo/bar&gt; assert_equals: failure should set href to input expected &quot;http://f: 21 / b ? d # e &quot; but got &quot;http://f: 21 / b ? d # e&quot;
+PASS Parsing: &lt;&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;          &gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:foo.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:foo.com\&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:a&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:\&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:#&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;#&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;#/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;#\&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;#;?&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;?&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:23&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;/:23&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;::&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;::23&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;foo://&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: href expected &quot;foo:///&quot; but got &quot;foo://&quot;
+PASS Parsing: &lt;http://a:b@c:29/d&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http::@c:29&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;http://&amp;a:foo(b]c@d:2/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: href expected &quot;http://&amp;a:foo(b%5Dc@d:2/&quot; but got &quot;http://&amp;a:foo(b]c@d:2/&quot;
+FAIL Parsing: &lt;http://::@c@d:2&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: href expected &quot;http://:%3A%40c@d:2/&quot; but got &quot;http://::@c@d:2&quot;
+PASS Parsing: &lt;http://foo.com:b@d/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://foo.com/\@&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http:\\foo.com\&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http:\\a\b:c\d@foo.com\&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;foo:/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;foo://&quot;
+FAIL Parsing: &lt;foo:/bar.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;foo://&quot;
+FAIL Parsing: &lt;foo://///////&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;foo://&quot;
+FAIL Parsing: &lt;foo://///////bar.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;foo://&quot;
+FAIL Parsing: &lt;foo:////://///&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;foo://&quot;
+FAIL Parsing: &lt;c:/foo&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;c://&quot;
+PASS Parsing: &lt;//foo/bar&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://foo/path;a??e#f#g&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://foo/abcd?efgh?ijkl&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://foo/abcd#foo?bar&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;[61:24:74]:98&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http:[61:27]/:foo&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://[1::2]:3:4&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://2001::1&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://2001::1]&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://2001::1]:80&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://[2001::1]&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://[2001::1]:80&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;http:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: href expected &quot;http://example.org/example.com/&quot; but got &quot;http://example.com/&quot;
+PASS Parsing: &lt;ftp:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;https:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;madeupscheme:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;madeupscheme://&quot;
+PASS Parsing: &lt;file:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;ftps:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;ftps://&quot;
+PASS Parsing: &lt;gopher:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;ws:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;wss:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;data:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;javascript:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;mailto:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;mailto://&quot;
+PASS Parsing: &lt;http:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;ftp:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;https:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;madeupscheme:example.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;madeupscheme://&quot;
+FAIL Parsing: &lt;ftps:example.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;ftps://&quot;
+PASS Parsing: &lt;gopher:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;ws:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;wss:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;data:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;javascript:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;mailto:example.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;mailto://&quot;
+PASS Parsing: &lt;/a/b/c&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;/a/ /c&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;/a%2fc&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;/a/%2f/c&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;#β&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: href expected &quot;http://example.org/foo/bar#β&quot; but got &quot;http://example.org/foo/bar#%CE%B2&quot;
+PASS Parsing: &lt;data:text/html,test#test&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;tel:1234567890&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;tel://&quot;
+FAIL Parsing: &lt;file:c:\foo\bar.html&gt; against &lt;file:///tmp/mock/path&gt; assert_equals: href expected &quot;file:///c:/foo/bar.html&quot; but got &quot;file:///tmp/mock/c:/foo/bar.html&quot;
+FAIL Parsing: &lt;  File:c|////foo\bar.html&gt; against &lt;file:///tmp/mock/path&gt; assert_equals: href expected &quot;file:///c:////foo/bar.html&quot; but got &quot;file:///tmp/mock/c|////foo/bar.html&quot;
+FAIL Parsing: &lt;C|/foo/bar&gt; against &lt;file:///tmp/mock/path&gt; assert_equals: href expected &quot;file:///C:/foo/bar&quot; but got &quot;file:///tmp/mock/C|/foo/bar&quot;
+FAIL Parsing: &lt;/C|\foo\bar&gt; against &lt;file:///tmp/mock/path&gt; assert_equals: href expected &quot;file:///C:/foo/bar&quot; but got &quot;file:///C|/foo/bar&quot;
+FAIL Parsing: &lt;//C|/foo/bar&gt; against &lt;file:///tmp/mock/path&gt; assert_equals: href expected &quot;file:///C:/foo/bar&quot; but got &quot;//C|/foo/bar&quot;
+PASS Parsing: &lt;//server/file&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;\\server\file&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;/\server/file&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;file:///foo/bar.txt&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;file:///home/me&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;//&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;///&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;///test&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;file://test&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;file://localhost&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;file://localhost/&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;file://localhost/test&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;test&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;file:test&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;http://example.com/././foo&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/./.foo&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/.&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/./&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/bar/..&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/bar/../&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/..bar&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/bar/../ton&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/bar/../ton/../../a&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/../../..&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/../../../ton&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;http://example.com/foo/%2e&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://example.com/foo/&quot; but got &quot;http://example.com/foo/%2e&quot;
+FAIL Parsing: &lt;http://example.com/foo/%2e%2&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://example.com/foo/.%2&quot; but got &quot;http://example.com/foo/%2e%2&quot;
+FAIL Parsing: &lt;http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://example.com/..bar&quot; but got &quot;http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar&quot;
+PASS Parsing: &lt;http://example.com////../..&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/bar//../..&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/bar//..&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/%20foo&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo%&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo%2&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo%2zbar&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo%2©zbar&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo%41%7a&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo        ‘%91&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo%00%51&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/(%28:%3A%29)&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/%3A%3a%3C%3c&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo        bar&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com\\foo\\bar&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/@asdf%40&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/你好你好&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/‥/foo&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com//foo&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/‮/foo/‭/bar&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://www.google.com/foo?bar=baz#&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;http://www.google.com/foo?bar=baz# »&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://www.google.com/foo?bar=baz# »&quot; but got &quot;http://www.google.com/foo?bar=baz# %C2%BB&quot;
+FAIL Parsing: &lt;data:test# »&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;data:test# »&quot; but got &quot;data:test# %C2%BB&quot;
+PASS Parsing: &lt;http://[www.google.com]/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://www.google.com&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;http://192.0x00A80001&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://192.168.0.1/&quot; but got &quot;http://192.0x00a80001/&quot;
+FAIL Parsing: &lt;http://www/foo%2Ehtml&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://www/foo.html&quot; but got &quot;http://www/foo%2Ehtml&quot;
+FAIL Parsing: &lt;http://www/foo/%2E/html&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://www/foo/html&quot; but got &quot;http://www/foo/%2E/html&quot;
+PASS Parsing: &lt;http://user:pass@/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://%25DOMAIN:foobar@foodomain.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:\\www.google.com\foo&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://foo:80/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://foo:81/&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;httpa://foo:80/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;httpa://foo:80&quot;
+PASS Parsing: &lt;http://foo:-80/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;https://foo:443/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;https://foo:80/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ftp://foo:21/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ftp://foo:80/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;gopher://foo:70/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;gopher://foo:443/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ws://foo:80/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ws://foo:81/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ws://foo:443/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ws://foo:815/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;wss://foo:80/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;wss://foo:81/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;wss://foo:443/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;wss://foo:815/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ftp:/example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;https:/example.com/&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;madeupscheme:/example.com/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;madeupscheme://&quot;
+PASS Parsing: &lt;file:/example.com/&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;ftps:/example.com/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;ftps://&quot;
+PASS Parsing: &lt;gopher:/example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ws:/example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;wss:/example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;data:/example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;javascript:/example.com/&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;mailto:/example.com/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;mailto://&quot;
+PASS Parsing: &lt;http:example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ftp:example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;https:example.com/&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;madeupscheme:example.com/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;madeupscheme://&quot;
+FAIL Parsing: &lt;ftps:example.com/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;ftps://&quot;
+PASS Parsing: &lt;gopher:example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ws:example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;wss:example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;data:example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;javascript:example.com/&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;mailto:example.com/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;mailto://&quot;
+PASS Parsing: &lt;http:@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:a:b@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/a:b@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://a:b@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://@pple.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http::b@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/:b@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://:b@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/:@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://user@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;https:@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:a:b@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/a:b@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://a:b@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http::@/www.example.com&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;http:a:@www.example.com&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://a:@www.example.com/&quot; but got &quot;http://a@www.example.com/&quot;
+FAIL Parsing: &lt;http:/a:@www.example.com&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://a:@www.example.com/&quot; but got &quot;http://a@www.example.com/&quot;
+FAIL Parsing: &lt;http://a:@www.example.com&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://a:@www.example.com/&quot; but got &quot;http://a@www.example.com/&quot;
+PASS Parsing: &lt;http://www.@pple.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:@:www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/@:www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://@:www.example.com&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;http://:@www.example.com&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://:@www.example.com/&quot; but got &quot;http://www.example.com/&quot;
+PASS Parsing: &lt;/&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;/test.txt&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;.&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;..&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;test.txt&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;./test.txt&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;../test.txt&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;../aaa/test.txt&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;../../test.txt&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;中/test.txt&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;http://www.example2.com&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;//www.example2.com&gt; against &lt;http://www.example.com/test&gt; 
+FAIL Parsing: &lt;file:...&gt; against &lt;http://www.example.com/test&gt; assert_equals: href expected &quot;file:///...&quot; but got &quot;file://...&quot;
+FAIL Parsing: &lt;file:..&gt; against &lt;http://www.example.com/test&gt; assert_equals: href expected &quot;file:///&quot; but got &quot;file://..&quot;
+FAIL Parsing: &lt;file:a&gt; against &lt;http://www.example.com/test&gt; assert_equals: href expected &quot;file:///a&quot; but got &quot;file://a&quot;
+PASS Parsing: &lt;http://ExAmPlE.CoM&gt; against &lt;http://other.com/&gt; 
+PASS Parsing: &lt;http://example example.com&gt; against &lt;http://other.com/&gt; 
+PASS Parsing: &lt;http://Goo%20 goo%7C|.com&gt; against &lt;http://other.com/&gt; 
+FAIL Parsing: &lt;http://[]&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+FAIL Parsing: &lt;http://[:]&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+PASS Parsing: &lt;http://GOO  goo.com&gt; against &lt;http://other.com/&gt; 
+PASS Parsing: &lt;http://GOO​⁠goo.com&gt; against &lt;http://other.com/&gt; 
+PASS Parsing: &lt;http://www.foo。bar.com&gt; against &lt;http://other.com/&gt; 
+FAIL Parsing: &lt;http://﷐zyx.com&gt; against &lt;http://other.com/&gt; assert_equals: failure should set href to input expected &quot;http://﷐zyx.com&quot; but got &quot;about:blank&quot;
+FAIL Parsing: &lt;http://%ef%b7%90zyx.com&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+PASS Parsing: &lt;http://Go.com&gt; against &lt;http://other.com/&gt; 
+FAIL Parsing: &lt;http://%41.com&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+FAIL Parsing: &lt;http://%ef%bc%85%ef%bc%94%ef%bc%91.com&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+FAIL Parsing: &lt;http://%00.com&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+FAIL Parsing: &lt;http://%ef%bc%85%ef%bc%90%ef%bc%90.com&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+FAIL Parsing: &lt;http://你好你好&gt; against &lt;http://other.com/&gt; assert_equals: origin expected &quot;http://你好你好&quot; but got &quot;http://xn--6qqa088eba&quot;
+FAIL Parsing: &lt;http://%zz%66%a.com&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+FAIL Parsing: &lt;http://%25&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+FAIL Parsing: &lt;http://hello%00&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+FAIL Parsing: &lt;http://%30%78%63%30%2e%30%32%35%30.01&gt; against &lt;http://other.com/&gt; assert_equals: href expected &quot;http://192.168.0.1/&quot; but got &quot;http://%30%78%63%30%2e%30%32%35%30.01/&quot;
+FAIL Parsing: &lt;http://%30%78%63%30%2e%30%32%35%30.01%2e&gt; against &lt;http://other.com/&gt; assert_equals: href expected &quot;http://192.168.0.1/&quot; but got &quot;http://%30%78%63%30%2e%30%32%35%30.01%2e/&quot;
+FAIL Parsing: &lt;http://192.168.0.257&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+FAIL Parsing: &lt;http://%3g%78%63%30%2e%30%32%35%30%2E.01&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+PASS Parsing: &lt;http://192.168.0.1 hello&gt; against &lt;http://other.com/&gt; 
+FAIL Parsing: &lt;http://0Xc0.0250.01&gt; against &lt;http://other.com/&gt; assert_equals: href expected &quot;http://192.168.0.1/&quot; but got &quot;http://0xc0.0250.01/&quot;
+PASS Parsing: &lt;http://[google.com]&gt; against &lt;http://other.com/&gt; 
+FAIL Parsing: &lt;http://foo:💩@example.com/bar&gt; against &lt;http://other.com/&gt; assert_equals: href expected &quot;http://foo:%F0%9F%92%A9@example.com/bar&quot; but got &quot;http://foo:💩@example.com/bar&quot;
+FAIL Parsing: &lt;#&gt; against &lt;test:test&gt; assert_equals: origin expected &quot;null&quot; but got &quot;test://&quot;
+FAIL Parsing: &lt;#x&gt; against &lt;mailto:x@x.com&gt; assert_equals: origin expected &quot;null&quot; but got &quot;mailto://&quot;
+PASS Parsing: &lt;#x&gt; against &lt;data:,&gt; 
+PASS Parsing: &lt;#x&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;#&gt; against &lt;test:test?test&gt; assert_equals: origin expected &quot;null&quot; but got &quot;test://&quot;
+FAIL Parsing: &lt;https://@test@test@example:800/&gt; against &lt;http://doesnotmatter/&gt; assert_equals: href expected &quot;https://%40test%40test@example:800/&quot; but got &quot;https://@test@test@example:800/&quot;
+FAIL Parsing: &lt;https://@@@example&gt; against &lt;http://doesnotmatter/&gt; assert_equals: href expected &quot;https://%40%40@example/&quot; but got &quot;https://@@@example&quot;
+FAIL Parsing: &lt;http://`{}:`{}@h/`{}?`{}&gt; against &lt;http://doesnotmatter/&gt; assert_equals: href expected &quot;http://%60%7B%7D:%60%7B%7D@h/%60%7B%7D?`{}&quot; but got &quot;http://`{}:`{}@h/`{}?`{}&quot;
+PASS Parsing: &lt;/some/path&gt; against &lt;http://user@example.org/smth&gt; 
+PASS Parsing: &lt;&gt; against &lt;http://user:pass@example.org:21/smth&gt; 
+PASS Parsing: &lt;/some/path&gt; against &lt;http://user:pass@example.org:21/smth&gt; 
+PASS Parsing: &lt;i&gt; against &lt;sc:sd&gt; 
+PASS Parsing: &lt;i&gt; against &lt;sc:sd/sd&gt; 
+FAIL Parsing: &lt;i&gt; against &lt;sc:/pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;i&gt; against &lt;sc://ho/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://ho&quot;
+FAIL Parsing: &lt;i&gt; against &lt;sc:///pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+PASS Parsing: &lt;../i&gt; against &lt;sc:sd&gt; 
+PASS Parsing: &lt;../i&gt; against &lt;sc:sd/sd&gt; 
+FAIL Parsing: &lt;../i&gt; against &lt;sc:/pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;../i&gt; against &lt;sc://ho/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://ho&quot;
+FAIL Parsing: &lt;../i&gt; against &lt;sc:///pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+PASS Parsing: &lt;/i&gt; against &lt;sc:sd&gt; 
+PASS Parsing: &lt;/i&gt; against &lt;sc:sd/sd&gt; 
+FAIL Parsing: &lt;/i&gt; against &lt;sc:/pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;/i&gt; against &lt;sc://ho/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://ho&quot;
+FAIL Parsing: &lt;/i&gt; against &lt;sc:///pa/pa&gt; assert_equals: href expected &quot;sc:///i&quot; but got &quot;sc:/i&quot;
+PASS Parsing: &lt;?i&gt; against &lt;sc:sd&gt; 
+PASS Parsing: &lt;?i&gt; against &lt;sc:sd/sd&gt; 
+FAIL Parsing: &lt;?i&gt; against &lt;sc:/pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;?i&gt; against &lt;sc://ho/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://ho&quot;
+FAIL Parsing: &lt;?i&gt; against &lt;sc:///pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;#i&gt; against &lt;sc:sd&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;#i&gt; against &lt;sc:sd/sd&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;#i&gt; against &lt;sc:/pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;#i&gt; against &lt;sc://ho/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://ho&quot;
+FAIL Parsing: &lt;#i&gt; against &lt;sc:///pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+PASS Parsing: &lt;about:/../&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;data:/../&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;javascript:/../&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;mailto:/../&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;mailto://&quot;
+FAIL Parsing: &lt;sc://ñ.test/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://xn--ida.test&quot;
+FAIL Parsing: &lt;sc:\../&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;sc:\\../&quot; but got &quot;sc:/&quot;
+FAIL Parsing: &lt;sc::a@example.net&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+PASS Parsing: &lt;http://127.0.0.1:10100/relative_import.html&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://facebook.com/?foo=%7B%22abc%22&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;https://localhost:3000/jqueryui@1.2.3&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;h        t
+t
+p://h        o
+s
+t:9        0
+0
+0/p        a
+t
+h?q        u
+e
+ry#f        r
+a
+g&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;?a=b&amp;c=d&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;??a=b&amp;c=d&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http:&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;http:&gt; against &lt;https://example.org/foo/bar&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+FAIL Parsing: &lt;sc:&gt; against &lt;https://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlaelementxhtmlexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,340 @@
</span><ins>+
+PASS Loading data… 
+PASS Parsing: &lt;http://example        .
+org&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://user:pass@foo:21/bar;par?b#c&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http:foo.com&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;           :foo.com   
+&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt; foo.com  &gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;a:         foo.com&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;a://&quot;
+PASS Parsing: &lt;http://f:21/ b ? d # e &gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://f:/c&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;http://f:0/c&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;http://f:0&quot; but got &quot;http://f&quot;
+FAIL Parsing: &lt;http://f:00000000000000/c&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: href expected &quot;http://f:0/c&quot; but got &quot;http://f:00000000000000/c&quot;
+FAIL Parsing: &lt;http://f:00000000000000000000080/c&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: href expected &quot;http://f/c&quot; but got &quot;http://f:00000000000000000000080/c&quot;
+PASS Parsing: &lt;http://f:b/c&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://f: /c&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://f:
+/c&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://f:fifty-two/c&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;http://f:999999/c&gt; against &lt;http://example.org/foo/bar&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+FAIL Parsing: &lt;http://f: 21 / b ? d # e &gt; against &lt;http://example.org/foo/bar&gt; assert_equals: failure should set href to input expected &quot;http://f: 21 / b ? d # e &quot; but got &quot;http://f: 21 / b ? d # e&quot;
+PASS Parsing: &lt;&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;          &gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:foo.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:foo.com\&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:a&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:\&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:#&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;#&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;#/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;#\&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;#;?&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;?&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:23&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;/:23&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;::&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;::23&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;foo://&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: href expected &quot;foo:///&quot; but got &quot;foo://&quot;
+PASS Parsing: &lt;http://a:b@c:29/d&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http::@c:29&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;http://&amp;a:foo(b]c@d:2/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: href expected &quot;http://&amp;a:foo(b%5Dc@d:2/&quot; but got &quot;http://&amp;a:foo(b]c@d:2/&quot;
+FAIL Parsing: &lt;http://::@c@d:2&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: href expected &quot;http://:%3A%40c@d:2/&quot; but got &quot;http://::@c@d:2&quot;
+PASS Parsing: &lt;http://foo.com:b@d/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://foo.com/\@&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http:\\foo.com\&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http:\\a\b:c\d@foo.com\&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;foo:/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;foo://&quot;
+FAIL Parsing: &lt;foo:/bar.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;foo://&quot;
+FAIL Parsing: &lt;foo://///////&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;foo://&quot;
+FAIL Parsing: &lt;foo://///////bar.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;foo://&quot;
+FAIL Parsing: &lt;foo:////://///&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;foo://&quot;
+FAIL Parsing: &lt;c:/foo&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;c://&quot;
+PASS Parsing: &lt;//foo/bar&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://foo/path;a??e#f#g&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://foo/abcd?efgh?ijkl&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://foo/abcd#foo?bar&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;[61:24:74]:98&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http:[61:27]/:foo&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://[1::2]:3:4&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://2001::1&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://2001::1]&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://2001::1]:80&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://[2001::1]&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://[2001::1]:80&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;http:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: href expected &quot;http://example.org/example.com/&quot; but got &quot;http://example.com/&quot;
+PASS Parsing: &lt;ftp:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;https:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;madeupscheme:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;madeupscheme://&quot;
+PASS Parsing: &lt;file:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;ftps:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;ftps://&quot;
+PASS Parsing: &lt;gopher:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;ws:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;wss:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;data:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;javascript:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;mailto:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;mailto://&quot;
+PASS Parsing: &lt;http:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;ftp:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;https:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;madeupscheme:example.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;madeupscheme://&quot;
+FAIL Parsing: &lt;ftps:example.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;ftps://&quot;
+PASS Parsing: &lt;gopher:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;ws:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;wss:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;data:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;javascript:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;mailto:example.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;mailto://&quot;
+PASS Parsing: &lt;/a/b/c&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;/a/ /c&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;/a%2fc&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;/a/%2f/c&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;#β&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: href expected &quot;http://example.org/foo/bar#β&quot; but got &quot;http://example.org/foo/bar#%CE%B2&quot;
+PASS Parsing: &lt;data:text/html,test#test&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;tel:1234567890&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;tel://&quot;
+FAIL Parsing: &lt;file:c:\foo\bar.html&gt; against &lt;file:///tmp/mock/path&gt; assert_equals: href expected &quot;file:///c:/foo/bar.html&quot; but got &quot;file:///tmp/mock/c:/foo/bar.html&quot;
+FAIL Parsing: &lt;  File:c|////foo\bar.html&gt; against &lt;file:///tmp/mock/path&gt; assert_equals: href expected &quot;file:///c:////foo/bar.html&quot; but got &quot;file:///tmp/mock/c|////foo/bar.html&quot;
+FAIL Parsing: &lt;C|/foo/bar&gt; against &lt;file:///tmp/mock/path&gt; assert_equals: href expected &quot;file:///C:/foo/bar&quot; but got &quot;file:///tmp/mock/C|/foo/bar&quot;
+FAIL Parsing: &lt;/C|\foo\bar&gt; against &lt;file:///tmp/mock/path&gt; assert_equals: href expected &quot;file:///C:/foo/bar&quot; but got &quot;file:///C|/foo/bar&quot;
+FAIL Parsing: &lt;//C|/foo/bar&gt; against &lt;file:///tmp/mock/path&gt; assert_equals: href expected &quot;file:///C:/foo/bar&quot; but got &quot;//C|/foo/bar&quot;
+PASS Parsing: &lt;//server/file&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;\\server\file&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;/\server/file&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;file:///foo/bar.txt&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;file:///home/me&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;//&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;///&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;///test&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;file://test&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;file://localhost&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;file://localhost/&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;file://localhost/test&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;test&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;file:test&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;http://example.com/././foo&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/./.foo&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/.&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/./&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/bar/..&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/bar/../&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/..bar&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/bar/../ton&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/bar/../ton/../../a&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/../../..&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/../../../ton&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;http://example.com/foo/%2e&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://example.com/foo/&quot; but got &quot;http://example.com/foo/%2e&quot;
+FAIL Parsing: &lt;http://example.com/foo/%2e%2&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://example.com/foo/.%2&quot; but got &quot;http://example.com/foo/%2e%2&quot;
+FAIL Parsing: &lt;http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://example.com/..bar&quot; but got &quot;http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar&quot;
+PASS Parsing: &lt;http://example.com////../..&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/bar//../..&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/bar//..&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/%20foo&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo%&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo%2&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo%2zbar&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo%2©zbar&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo%41%7a&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo        ‘%91&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo%00%51&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/(%28:%3A%29)&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/%3A%3a%3C%3c&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo        bar&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com\\foo\\bar&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/@asdf%40&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/你好你好&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/‥/foo&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com//foo&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/‮/foo/‭/bar&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://www.google.com/foo?bar=baz#&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;http://www.google.com/foo?bar=baz# »&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://www.google.com/foo?bar=baz# »&quot; but got &quot;http://www.google.com/foo?bar=baz# %C2%BB&quot;
+FAIL Parsing: &lt;data:test# »&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;data:test# »&quot; but got &quot;data:test# %C2%BB&quot;
+PASS Parsing: &lt;http://[www.google.com]/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://www.google.com&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;http://192.0x00A80001&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://192.168.0.1/&quot; but got &quot;http://192.0x00a80001/&quot;
+FAIL Parsing: &lt;http://www/foo%2Ehtml&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://www/foo.html&quot; but got &quot;http://www/foo%2Ehtml&quot;
+FAIL Parsing: &lt;http://www/foo/%2E/html&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://www/foo/html&quot; but got &quot;http://www/foo/%2E/html&quot;
+PASS Parsing: &lt;http://user:pass@/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://%25DOMAIN:foobar@foodomain.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:\\www.google.com\foo&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://foo:80/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://foo:81/&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;httpa://foo:80/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;httpa://foo:80&quot;
+PASS Parsing: &lt;http://foo:-80/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;https://foo:443/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;https://foo:80/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ftp://foo:21/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ftp://foo:80/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;gopher://foo:70/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;gopher://foo:443/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ws://foo:80/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ws://foo:81/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ws://foo:443/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ws://foo:815/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;wss://foo:80/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;wss://foo:81/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;wss://foo:443/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;wss://foo:815/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ftp:/example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;https:/example.com/&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;madeupscheme:/example.com/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;madeupscheme://&quot;
+PASS Parsing: &lt;file:/example.com/&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;ftps:/example.com/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;ftps://&quot;
+PASS Parsing: &lt;gopher:/example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ws:/example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;wss:/example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;data:/example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;javascript:/example.com/&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;mailto:/example.com/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;mailto://&quot;
+PASS Parsing: &lt;http:example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ftp:example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;https:example.com/&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;madeupscheme:example.com/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;madeupscheme://&quot;
+FAIL Parsing: &lt;ftps:example.com/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;ftps://&quot;
+PASS Parsing: &lt;gopher:example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ws:example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;wss:example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;data:example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;javascript:example.com/&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;mailto:example.com/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;mailto://&quot;
+PASS Parsing: &lt;http:@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:a:b@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/a:b@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://a:b@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://@pple.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http::b@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/:b@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://:b@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/:@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://user@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;https:@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:a:b@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/a:b@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://a:b@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http::@/www.example.com&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;http:a:@www.example.com&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://a:@www.example.com/&quot; but got &quot;http://a@www.example.com/&quot;
+FAIL Parsing: &lt;http:/a:@www.example.com&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://a:@www.example.com/&quot; but got &quot;http://a@www.example.com/&quot;
+FAIL Parsing: &lt;http://a:@www.example.com&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://a:@www.example.com/&quot; but got &quot;http://a@www.example.com/&quot;
+PASS Parsing: &lt;http://www.@pple.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:@:www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/@:www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://@:www.example.com&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;http://:@www.example.com&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://:@www.example.com/&quot; but got &quot;http://www.example.com/&quot;
+PASS Parsing: &lt;/&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;/test.txt&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;.&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;..&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;test.txt&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;./test.txt&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;../test.txt&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;../aaa/test.txt&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;../../test.txt&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;中/test.txt&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;http://www.example2.com&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;//www.example2.com&gt; against &lt;http://www.example.com/test&gt; 
+FAIL Parsing: &lt;file:...&gt; against &lt;http://www.example.com/test&gt; assert_equals: href expected &quot;file:///...&quot; but got &quot;file://...&quot;
+FAIL Parsing: &lt;file:..&gt; against &lt;http://www.example.com/test&gt; assert_equals: href expected &quot;file:///&quot; but got &quot;file://..&quot;
+FAIL Parsing: &lt;file:a&gt; against &lt;http://www.example.com/test&gt; assert_equals: href expected &quot;file:///a&quot; but got &quot;file://a&quot;
+PASS Parsing: &lt;http://ExAmPlE.CoM&gt; against &lt;http://other.com/&gt; 
+PASS Parsing: &lt;http://example example.com&gt; against &lt;http://other.com/&gt; 
+PASS Parsing: &lt;http://Goo%20 goo%7C|.com&gt; against &lt;http://other.com/&gt; 
+FAIL Parsing: &lt;http://[]&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+FAIL Parsing: &lt;http://[:]&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+PASS Parsing: &lt;http://GOO  goo.com&gt; against &lt;http://other.com/&gt; 
+PASS Parsing: &lt;http://GOO​⁠goo.com&gt; against &lt;http://other.com/&gt; 
+PASS Parsing: &lt;http://www.foo。bar.com&gt; against &lt;http://other.com/&gt; 
+FAIL Parsing: &lt;http://﷐zyx.com&gt; against &lt;http://other.com/&gt; assert_equals: failure should set href to input expected &quot;http://﷐zyx.com&quot; but got &quot;about:blank&quot;
+FAIL Parsing: &lt;http://%ef%b7%90zyx.com&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+PASS Parsing: &lt;http://Go.com&gt; against &lt;http://other.com/&gt; 
+FAIL Parsing: &lt;http://%41.com&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+FAIL Parsing: &lt;http://%ef%bc%85%ef%bc%94%ef%bc%91.com&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+FAIL Parsing: &lt;http://%00.com&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+FAIL Parsing: &lt;http://%ef%bc%85%ef%bc%90%ef%bc%90.com&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+FAIL Parsing: &lt;http://你好你好&gt; against &lt;http://other.com/&gt; assert_equals: origin expected &quot;http://你好你好&quot; but got &quot;http://xn--6qqa088eba&quot;
+FAIL Parsing: &lt;http://%zz%66%a.com&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+FAIL Parsing: &lt;http://%25&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+FAIL Parsing: &lt;http://hello%00&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+FAIL Parsing: &lt;http://%30%78%63%30%2e%30%32%35%30.01&gt; against &lt;http://other.com/&gt; assert_equals: href expected &quot;http://192.168.0.1/&quot; but got &quot;http://%30%78%63%30%2e%30%32%35%30.01/&quot;
+FAIL Parsing: &lt;http://%30%78%63%30%2e%30%32%35%30.01%2e&gt; against &lt;http://other.com/&gt; assert_equals: href expected &quot;http://192.168.0.1/&quot; but got &quot;http://%30%78%63%30%2e%30%32%35%30.01%2e/&quot;
+FAIL Parsing: &lt;http://192.168.0.257&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+FAIL Parsing: &lt;http://%3g%78%63%30%2e%30%32%35%30%2E.01&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+PASS Parsing: &lt;http://192.168.0.1 hello&gt; against &lt;http://other.com/&gt; 
+FAIL Parsing: &lt;http://0Xc0.0250.01&gt; against &lt;http://other.com/&gt; assert_equals: href expected &quot;http://192.168.0.1/&quot; but got &quot;http://0xc0.0250.01/&quot;
+PASS Parsing: &lt;http://[google.com]&gt; against &lt;http://other.com/&gt; 
+FAIL Parsing: &lt;http://foo:💩@example.com/bar&gt; against &lt;http://other.com/&gt; assert_equals: href expected &quot;http://foo:%F0%9F%92%A9@example.com/bar&quot; but got &quot;http://foo:💩@example.com/bar&quot;
+FAIL Parsing: &lt;#&gt; against &lt;test:test&gt; assert_equals: origin expected &quot;null&quot; but got &quot;test://&quot;
+FAIL Parsing: &lt;#x&gt; against &lt;mailto:x@x.com&gt; assert_equals: origin expected &quot;null&quot; but got &quot;mailto://&quot;
+PASS Parsing: &lt;#x&gt; against &lt;data:,&gt; 
+PASS Parsing: &lt;#x&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;#&gt; against &lt;test:test?test&gt; assert_equals: origin expected &quot;null&quot; but got &quot;test://&quot;
+FAIL Parsing: &lt;https://@test@test@example:800/&gt; against &lt;http://doesnotmatter/&gt; assert_equals: href expected &quot;https://%40test%40test@example:800/&quot; but got &quot;https://@test@test@example:800/&quot;
+FAIL Parsing: &lt;https://@@@example&gt; against &lt;http://doesnotmatter/&gt; assert_equals: href expected &quot;https://%40%40@example/&quot; but got &quot;https://@@@example&quot;
+FAIL Parsing: &lt;http://`{}:`{}@h/`{}?`{}&gt; against &lt;http://doesnotmatter/&gt; assert_equals: href expected &quot;http://%60%7B%7D:%60%7B%7D@h/%60%7B%7D?`{}&quot; but got &quot;http://`{}:`{}@h/`{}?`{}&quot;
+PASS Parsing: &lt;/some/path&gt; against &lt;http://user@example.org/smth&gt; 
+PASS Parsing: &lt;&gt; against &lt;http://user:pass@example.org:21/smth&gt; 
+PASS Parsing: &lt;/some/path&gt; against &lt;http://user:pass@example.org:21/smth&gt; 
+PASS Parsing: &lt;i&gt; against &lt;sc:sd&gt; 
+PASS Parsing: &lt;i&gt; against &lt;sc:sd/sd&gt; 
+FAIL Parsing: &lt;i&gt; against &lt;sc:/pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;i&gt; against &lt;sc://ho/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://ho&quot;
+FAIL Parsing: &lt;i&gt; against &lt;sc:///pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+PASS Parsing: &lt;../i&gt; against &lt;sc:sd&gt; 
+PASS Parsing: &lt;../i&gt; against &lt;sc:sd/sd&gt; 
+FAIL Parsing: &lt;../i&gt; against &lt;sc:/pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;../i&gt; against &lt;sc://ho/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://ho&quot;
+FAIL Parsing: &lt;../i&gt; against &lt;sc:///pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+PASS Parsing: &lt;/i&gt; against &lt;sc:sd&gt; 
+PASS Parsing: &lt;/i&gt; against &lt;sc:sd/sd&gt; 
+FAIL Parsing: &lt;/i&gt; against &lt;sc:/pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;/i&gt; against &lt;sc://ho/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://ho&quot;
+FAIL Parsing: &lt;/i&gt; against &lt;sc:///pa/pa&gt; assert_equals: href expected &quot;sc:///i&quot; but got &quot;sc:/i&quot;
+PASS Parsing: &lt;?i&gt; against &lt;sc:sd&gt; 
+PASS Parsing: &lt;?i&gt; against &lt;sc:sd/sd&gt; 
+FAIL Parsing: &lt;?i&gt; against &lt;sc:/pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;?i&gt; against &lt;sc://ho/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://ho&quot;
+FAIL Parsing: &lt;?i&gt; against &lt;sc:///pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;#i&gt; against &lt;sc:sd&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;#i&gt; against &lt;sc:sd/sd&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;#i&gt; against &lt;sc:/pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;#i&gt; against &lt;sc://ho/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://ho&quot;
+FAIL Parsing: &lt;#i&gt; against &lt;sc:///pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+PASS Parsing: &lt;about:/../&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;data:/../&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;javascript:/../&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;mailto:/../&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;mailto://&quot;
+FAIL Parsing: &lt;sc://ñ.test/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://xn--ida.test&quot;
+FAIL Parsing: &lt;sc:\../&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;sc:\\../&quot; but got &quot;sc:/&quot;
+FAIL Parsing: &lt;sc::a@example.net&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+PASS Parsing: &lt;http://127.0.0.1:10100/relative_import.html&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://facebook.com/?foo=%7B%22abc%22&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;https://localhost:3000/jqueryui@1.2.3&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;h        t
+t
+p://h        o
+s
+t:9        0
+0
+0/p        a
+t
+h?q        u
+e
+ry#f        r
+a
+g&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;?a=b&amp;c=d&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;??a=b&amp;c=d&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http:&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;http:&gt; against &lt;https://example.org/foo/bar&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
+FAIL Parsing: &lt;sc:&gt; against &lt;https://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlaelementxhtmlxhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml.xhtml (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml.xhtml                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml.xhtml        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;!DOCTYPE html&gt;
+&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
+  &lt;head&gt;
+    &lt;title&gt;URL Test&lt;/title&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+    &lt;base id=&quot;base&quot;/&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+    &lt;script src=&quot;a-element.js&quot;&gt;&lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlaelementhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element.html (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element.html        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;meta charset=utf-8&gt;
+&lt;script src=/resources/testharness.js&gt;&lt;/script&gt;
+&lt;script src=/resources/testharnessreport.js&gt;&lt;/script&gt;
+&lt;base id=base&gt;
+&lt;div id=log&gt;&lt;/div&gt;
+&lt;script src=a-element.js&gt;&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlaelementjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element.js (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element.js                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element.js        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+var setup = async_test(&quot;Loading data…&quot;)
+setup.step(function() {
+  var request = new XMLHttpRequest()
+  request.open(&quot;GET&quot;, &quot;urltestdata.json&quot;)
+  request.send()
+  request.responseType = &quot;json&quot;
+  request.onload = setup.step_func(function() {
+    runURLTests(request.response)
+    setup.done()
+  })
+})
+
+function setBase(base) {
+  document.getElementById(&quot;base&quot;).href = base
+}
+
+function bURL(url, base) {
+  base = base || &quot;about:blank&quot;
+  setBase(base)
+  var a = document.createElement(&quot;a&quot;)
+  a.setAttribute(&quot;href&quot;, url)
+  return a
+}
+
+function runURLTests(urltests) {
+  for(var i = 0, l = urltests.length; i &lt; l; i++) {
+    var expected = urltests[i]
+    if (typeof expected === &quot;string&quot;) continue // skip comments
+
+    test(function() {
+      var url = bURL(expected.input, expected.base)
+      if(expected.failure) {
+        if(url.protocol !== ':') {
+          assert_unreached(&quot;Expected URL to fail parsing&quot;)
+        }
+        assert_equals(url.href, expected.input, &quot;failure should set href to input&quot;)
+        return
+      }
+
+      assert_equals(url.href, expected.href, &quot;href&quot;)
+      if (&quot;origin&quot; in expected) {
+        assert_equals(url.origin, expected.origin, &quot;origin&quot;)
+      }
+      assert_equals(url.protocol, expected.protocol, &quot;protocol&quot;)
+      assert_equals(url.username, expected.username, &quot;username&quot;)
+      assert_equals(url.password, expected.password, &quot;password&quot;)
+      assert_equals(url.host, expected.host, &quot;host&quot;)
+      assert_equals(url.hostname, expected.hostname, &quot;hostname&quot;)
+      assert_equals(url.port, expected.port, &quot;port&quot;)
+      assert_equals(url.pathname, expected.pathname, &quot;pathname&quot;)
+      assert_equals(url.search, expected.search, &quot;search&quot;)
+      assert_equals(url.hash, expected.hash, &quot;hash&quot;)
+    }, &quot;Parsing: &lt;&quot; + expected.input + &quot;&gt; against &lt;&quot; + expected.base + &quot;&gt;&quot;)
+  }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlhistoricalexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/historical-expected.txt (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/historical-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/historical-expected.txt        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+
+PASS searchParams on location object 
+PASS searchParams on a element 
+PASS searchParams on area element 
+FAIL Setting URL's href attribute and base URLs assert_throws: function &quot;function () {
+    url.href = &quot;./bar&quot;;
+  }&quot; did not throw
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlhistoricalhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/historical.html (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/historical.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/historical.html        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;meta charset=utf-8&gt;
+&lt;title&gt;URL historical tests&lt;/title&gt;
+&lt;script src=/resources/testharness.js&gt;&lt;/script&gt;
+&lt;script src=/resources/testharnessreport.js&gt;&lt;/script&gt;
+&lt;div id=log&gt;&lt;/div&gt;
+&lt;script&gt;
+var objects = [
+  [function() { return window.location }, &quot;location object&quot;],
+  [function() { return document.createElement(&quot;a&quot;) }, &quot;a element&quot;],
+  [function() { return document.createElement(&quot;area&quot;) }, &quot;area element&quot;],
+];
+
+objects.forEach(function(o) {
+  test(function() {
+    var object = o[0]();
+    assert_false(&quot;searchParams&quot; in object,
+                 o[1] + &quot; should not have a searchParams attribute&quot;);
+  }, &quot;searchParams on &quot; + o[1]);
+});
+
+test(function() {
+  var url = new URL(&quot;./foo&quot;, &quot;http://www.example.org&quot;);
+  assert_equals(url.href, &quot;http://www.example.org/foo&quot;);
+  assert_throws(new TypeError(), function() {
+    url.href = &quot;./bar&quot;;
+  });
+}, &quot;Setting URL's href attribute and base URLs&quot;);
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlhistoricalworkerjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/historical.worker.js (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/historical.worker.js                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/historical.worker.js        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+importScripts(&quot;/resources/testharness.js&quot;);
+
+test(function() {
+  assert_false(&quot;searchParams&quot; in self.location,
+               &quot;location object should not have a searchParams attribute&quot;);
+}, &quot;searchParams on location object&quot;);
+
+test(function() {
+  var url = new URL(&quot;./foo&quot;, &quot;http://www.example.org&quot;);
+  assert_equals(url.href, &quot;http://www.example.org/foo&quot;);
+  assert_throws(new TypeError(), function() {
+    url.href = &quot;./bar&quot;;
+  });
+}, &quot;Setting URL's href attribute and base URLs&quot;);
+
+done();
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlinterfacesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/interfaces-expected.txt (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/interfaces-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/interfaces-expected.txt        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+URL IDL tests
+
+
+PASS URL interface: existence and properties of interface object 
+PASS URL interface object length 
+PASS URL interface object name 
+PASS URL interface: existence and properties of interface prototype object 
+PASS URL interface: existence and properties of interface prototype object's &quot;constructor&quot; property 
+FAIL URL interface: operation domainToASCII(USVString) assert_own_property: interface object missing static operation expected property &quot;domainToASCII&quot; missing
+FAIL URL interface: operation domainToUnicode(USVString) assert_own_property: interface object missing static operation expected property &quot;domainToUnicode&quot; missing
+PASS URL interface: attribute href 
+PASS URL interface: attribute origin 
+PASS URL interface: attribute protocol 
+PASS URL interface: attribute username 
+PASS URL interface: attribute password 
+PASS URL interface: attribute host 
+PASS URL interface: attribute hostname 
+PASS URL interface: attribute port 
+PASS URL interface: attribute pathname 
+PASS URL interface: attribute search 
+FAIL URL interface: attribute searchParams assert_true: The prototype object must have a property &quot;searchParams&quot; expected true got false
+PASS URL interface: attribute hash 
+PASS URL must be primary interface of new URL(&quot;http://foo&quot;) 
+PASS Stringification of new URL(&quot;http://foo&quot;) 
+PASS URL interface: new URL(&quot;http://foo&quot;) must inherit property &quot;domainToASCII&quot; with the proper type (0) 
+PASS URL interface: calling domainToASCII(USVString) on new URL(&quot;http://foo&quot;) with too few arguments must throw TypeError 
+PASS URL interface: new URL(&quot;http://foo&quot;) must inherit property &quot;domainToUnicode&quot; with the proper type (1) 
+PASS URL interface: calling domainToUnicode(USVString) on new URL(&quot;http://foo&quot;) with too few arguments must throw TypeError 
+PASS URL interface: new URL(&quot;http://foo&quot;) must inherit property &quot;href&quot; with the proper type (2) 
+PASS URL interface: new URL(&quot;http://foo&quot;) must inherit property &quot;origin&quot; with the proper type (3) 
+PASS URL interface: new URL(&quot;http://foo&quot;) must inherit property &quot;protocol&quot; with the proper type (4) 
+PASS URL interface: new URL(&quot;http://foo&quot;) must inherit property &quot;username&quot; with the proper type (5) 
+PASS URL interface: new URL(&quot;http://foo&quot;) must inherit property &quot;password&quot; with the proper type (6) 
+PASS URL interface: new URL(&quot;http://foo&quot;) must inherit property &quot;host&quot; with the proper type (7) 
+PASS URL interface: new URL(&quot;http://foo&quot;) must inherit property &quot;hostname&quot; with the proper type (8) 
+PASS URL interface: new URL(&quot;http://foo&quot;) must inherit property &quot;port&quot; with the proper type (9) 
+PASS URL interface: new URL(&quot;http://foo&quot;) must inherit property &quot;pathname&quot; with the proper type (10) 
+PASS URL interface: new URL(&quot;http://foo&quot;) must inherit property &quot;search&quot; with the proper type (11) 
+FAIL URL interface: new URL(&quot;http://foo&quot;) must inherit property &quot;searchParams&quot; with the proper type (12) assert_inherits: property &quot;searchParams&quot; not found in prototype chain
+PASS URL interface: new URL(&quot;http://foo&quot;) must inherit property &quot;hash&quot; with the proper type (13) 
+FAIL URLSearchParams interface: existence and properties of interface object assert_own_property: self does not have own property &quot;URLSearchParams&quot; expected property &quot;URLSearchParams&quot; missing
+FAIL URLSearchParams interface object length assert_own_property: self does not have own property &quot;URLSearchParams&quot; expected property &quot;URLSearchParams&quot; missing
+FAIL URLSearchParams interface object name assert_own_property: self does not have own property &quot;URLSearchParams&quot; expected property &quot;URLSearchParams&quot; missing
+FAIL URLSearchParams interface: existence and properties of interface prototype object assert_own_property: self does not have own property &quot;URLSearchParams&quot; expected property &quot;URLSearchParams&quot; missing
+FAIL URLSearchParams interface: existence and properties of interface prototype object's &quot;constructor&quot; property assert_own_property: self does not have own property &quot;URLSearchParams&quot; expected property &quot;URLSearchParams&quot; missing
+FAIL URLSearchParams interface: operation append(USVString,USVString) assert_own_property: self does not have own property &quot;URLSearchParams&quot; expected property &quot;URLSearchParams&quot; missing
+FAIL URLSearchParams interface: operation delete(USVString) assert_own_property: self does not have own property &quot;URLSearchParams&quot; expected property &quot;URLSearchParams&quot; missing
+FAIL URLSearchParams interface: operation get(USVString) assert_own_property: self does not have own property &quot;URLSearchParams&quot; expected property &quot;URLSearchParams&quot; missing
+FAIL URLSearchParams interface: operation getAll(USVString) assert_own_property: self does not have own property &quot;URLSearchParams&quot; expected property &quot;URLSearchParams&quot; missing
+FAIL URLSearchParams interface: operation has(USVString) assert_own_property: self does not have own property &quot;URLSearchParams&quot; expected property &quot;URLSearchParams&quot; missing
+FAIL URLSearchParams interface: operation set(USVString,USVString) assert_own_property: self does not have own property &quot;URLSearchParams&quot; expected property &quot;URLSearchParams&quot; missing
+FAIL URLSearchParams interface: stringifier assert_own_property: self does not have own property &quot;URLSearchParams&quot; expected property &quot;URLSearchParams&quot; missing
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlinterfaceshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/interfaces.html (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/interfaces.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/interfaces.html        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,65 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;title&gt;URL IDL tests&lt;/title&gt;
+&lt;script src=/resources/testharness.js&gt;&lt;/script&gt;
+&lt;script src=/resources/testharnessreport.js&gt;&lt;/script&gt;
+&lt;script src=/resources/WebIDLParser.js&gt;&lt;/script&gt;
+&lt;script src=/resources/idlharness.js&gt;&lt;/script&gt;
+
+&lt;h1&gt;URL IDL tests&lt;/h1&gt;
+&lt;div id=log&gt;&lt;/div&gt;
+
+&lt;script type=text/plain&gt;
+[Constructor(USVString url, optional USVString base),
+ Exposed=(Window,Worker)]
+interface URL {
+  static USVString domainToASCII(USVString domain);
+  static USVString domainToUnicode(USVString domain);
+
+  stringifier attribute USVString href;
+  readonly attribute USVString origin;
+           attribute USVString protocol;
+           attribute USVString username;
+           attribute USVString password;
+           attribute USVString host;
+           attribute USVString hostname;
+           attribute USVString port;
+           attribute USVString pathname;
+           attribute USVString search;
+  readonly attribute URLSearchParams searchParams;
+           attribute USVString hash;
+};
+
+[Constructor(optional (USVString or URLSearchParams) init = &quot;&quot;),
+ Exposed=(Window,Worker)]
+interface URLSearchParams {
+  void append(USVString name, USVString value);
+  void delete(USVString name);
+  USVString? get(USVString name);
+  sequence&lt;USVString&gt; getAll(USVString name);
+  boolean has(USVString name);
+  void set(USVString name, USVString value);
+  iterable&lt;USVString, USVString&gt;;
+  stringifier;
+};
+&lt;/script&gt;
+&lt;script&gt;
+&quot;use strict&quot;;
+var idlArray;
+setup(function() {
+  idlArray = new IdlArray();
+  [].forEach.call(document.querySelectorAll(&quot;script[type=text\\/plain]&quot;), function(node) {
+    if (node.className == &quot;untested&quot;) {
+      idlArray.add_untested_idls(node.textContent);
+    } else {
+      idlArray.add_idls(node.textContent);
+    }
+  });
+}, {explicit_done:true});
+window.onload = function() {
+  idlArray.add_objects({
+    URL: ['new URL(&quot;http://foo&quot;)']
+  });
+  idlArray.test();
+  done();
+};
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlsetters_testsjson"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/setters_tests.json (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/setters_tests.json                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/setters_tests.json        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,1130 @@
</span><ins>+{
+    &quot;comment&quot;: [
+        &quot;## Tests for setters of https://url.spec.whatwg.org/#urlutils-members&quot;,
+        &quot;&quot;,
+        &quot;This file contains a JSON object.&quot;,
+        &quot;Other than 'comment', each key is an attribute of the `URL` interface&quot;,
+        &quot;defined in WHATWG’s URL Standard.&quot;,
+        &quot;The values are arrays of test case objects for that attribute.&quot;,
+        &quot;&quot;,
+        &quot;To run a test case for the attribute `attr`:&quot;,
+        &quot;&quot;,
+        &quot;* Create a new `URL` object with the value for the 'href' key&quot;,
+        &quot;  the constructor single parameter. (Without a base URL.)&quot;,
+        &quot;  This must not throw.&quot;,
+        &quot;* Set the attribute `attr` to (invoke its setter with)&quot;,
+        &quot;  with the value of for 'new_value' key.&quot;,
+        &quot;* The value for the 'expected' key is another object.&quot;,
+        &quot;  For each `key` / `value` pair of that object,&quot;,
+        &quot;  get the attribute `key` (invoke its getter).&quot;,
+        &quot;  The returned string must be equal to `value`.&quot;,
+        &quot;&quot;,
+        &quot;Note: the 'href' setter is already covered by urltestdata.json.&quot;
+    ],
+    &quot;protocol&quot;: [
+        {
+            &quot;comment&quot;: &quot;The empty string is not a valid scheme. Setter leaves the URL unchanged.&quot;,
+            &quot;href&quot;: &quot;a://example.net&quot;,
+            &quot;new_value&quot;: &quot;&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;a://example.net/&quot;,
+                &quot;protocol&quot;: &quot;a:&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;a://example.net&quot;,
+            &quot;new_value&quot;: &quot;b&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;b://example.net/&quot;,
+                &quot;protocol&quot;: &quot;b:&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Upper-case ASCII is lower-cased&quot;,
+            &quot;href&quot;: &quot;a://example.net&quot;,
+            &quot;new_value&quot;: &quot;B&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;b://example.net/&quot;,
+                &quot;protocol&quot;: &quot;b:&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Non-ASCII is rejected&quot;,
+            &quot;href&quot;: &quot;a://example.net&quot;,
+            &quot;new_value&quot;: &quot;é&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;a://example.net/&quot;,
+                &quot;protocol&quot;: &quot;a:&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;No leading digit&quot;,
+            &quot;href&quot;: &quot;a://example.net&quot;,
+            &quot;new_value&quot;: &quot;0b&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;a://example.net/&quot;,
+                &quot;protocol&quot;: &quot;a:&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;No leading punctuation&quot;,
+            &quot;href&quot;: &quot;a://example.net&quot;,
+            &quot;new_value&quot;: &quot;+b&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;a://example.net/&quot;,
+                &quot;protocol&quot;: &quot;a:&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;a://example.net&quot;,
+            &quot;new_value&quot;: &quot;bC0+-.&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;bc0+-.://example.net/&quot;,
+                &quot;protocol&quot;: &quot;bc0+-.:&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Only some punctuation is acceptable&quot;,
+            &quot;href&quot;: &quot;a://example.net&quot;,
+            &quot;new_value&quot;: &quot;b,c&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;a://example.net/&quot;,
+                &quot;protocol&quot;: &quot;a:&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Non-ASCII is rejected&quot;,
+            &quot;href&quot;: &quot;a://example.net&quot;,
+            &quot;new_value&quot;: &quot;bé&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;a://example.net/&quot;,
+                &quot;protocol&quot;: &quot;a:&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Can’t switch from special scheme to non-special. Note: this may change, see https://github.com/whatwg/url/issues/104&quot;,
+            &quot;href&quot;: &quot;http://example.net&quot;,
+            &quot;new_value&quot;: &quot;b&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.net/&quot;,
+                &quot;protocol&quot;: &quot;http:&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Cannot-be-a-base URL doesn’t have a host, but URL in a special scheme must.&quot;,
+            &quot;href&quot;: &quot;mailto:me@example.net&quot;,
+            &quot;new_value&quot;: &quot;http&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;mailto:me@example.net&quot;,
+                &quot;protocol&quot;: &quot;mailto:&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Can’t switch from non-special scheme to special. Note: this may change, see https://github.com/whatwg/url/issues/104&quot;,
+            &quot;href&quot;: &quot;ssh://me@example.net&quot;,
+            &quot;new_value&quot;: &quot;http&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;ssh://me@example.net/&quot;,
+                &quot;protocol&quot;: &quot;ssh:&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Stuff after the first ':' is ignored&quot;,
+            &quot;href&quot;: &quot;http://example.net&quot;,
+            &quot;new_value&quot;: &quot;https:foo : bar&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;https://example.net/&quot;,
+                &quot;protocol&quot;: &quot;https:&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Stuff after the first ':' is ignored&quot;,
+            &quot;href&quot;: &quot;data:text/html,&lt;p&gt;Test&quot;,
+            &quot;new_value&quot;: &quot;view-source+data:foo : bar&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;view-source+data:text/html,&lt;p&gt;Test&quot;,
+                &quot;protocol&quot;: &quot;view-source+data:&quot;
+            }
+        }
+    ],
+    &quot;username&quot;: [
+        {
+            &quot;comment&quot;: &quot;No host means no username&quot;,
+            &quot;href&quot;: &quot;file:///home/you/index.html&quot;,
+            &quot;new_value&quot;: &quot;me&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;file:///home/you/index.html&quot;,
+                &quot;username&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;No host means no username&quot;,
+            &quot;href&quot;: &quot;unix:/run/foo.socket&quot;,
+            &quot;new_value&quot;: &quot;me&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;unix:/run/foo.socket&quot;,
+                &quot;username&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Cannot-be-a-base means no username&quot;,
+            &quot;href&quot;: &quot;mailto:you@example.net&quot;,
+            &quot;new_value&quot;: &quot;me&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;mailto:you@example.net&quot;,
+                &quot;username&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;http://example.net&quot;,
+            &quot;new_value&quot;: &quot;me&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://me@example.net/&quot;,
+                &quot;username&quot;: &quot;me&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;http://:secret@example.net&quot;,
+            &quot;new_value&quot;: &quot;me&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://me:secret@example.net/&quot;,
+                &quot;username&quot;: &quot;me&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;http://me@example.net&quot;,
+            &quot;new_value&quot;: &quot;&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.net/&quot;,
+                &quot;username&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;http://me:secret@example.net&quot;,
+            &quot;new_value&quot;: &quot;&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://:secret@example.net/&quot;,
+                &quot;username&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;UTF-8 percent encoding with the userinfo encode set.&quot;,
+            &quot;href&quot;: &quot;http://example.net&quot;,
+            &quot;new_value&quot;: &quot;\u0000\u0001\t\n\r\u001f !\&quot;#$%&amp;'()*+,-./09:;&lt;=&gt;?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://%00%01%09%0A%0D%1F%20!%22%23$%&amp;'()*+,-.%2F09%3A%3B%3C%3D%3E%3F%40AZ%5B%5C%5D%5E_%60az%7B%7C%7D~%7F%C2%80%C2%81%C3%89%C3%A9@example.net/&quot;,
+                &quot;username&quot;: &quot;%00%01%09%0A%0D%1F%20!%22%23$%&amp;'()*+,-.%2F09%3A%3B%3C%3D%3E%3F%40AZ%5B%5C%5D%5E_%60az%7B%7C%7D~%7F%C2%80%C2%81%C3%89%C3%A9&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Bytes already percent-encoded are left as-is.&quot;,
+            &quot;href&quot;: &quot;http://example.net&quot;,
+            &quot;new_value&quot;: &quot;%c3%89té&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://%c3%89t%C3%A9@example.net/&quot;,
+                &quot;username&quot;: &quot;%c3%89t%C3%A9&quot;
+            }
+        }
+    ],
+    &quot;password&quot;: [
+        {
+            &quot;comment&quot;: &quot;No host means no password&quot;,
+            &quot;href&quot;: &quot;file:///home/me/index.html&quot;,
+            &quot;new_value&quot;: &quot;secret&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;file:///home/me/index.html&quot;,
+                &quot;password&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;No host means no password&quot;,
+            &quot;href&quot;: &quot;unix:/run/foo.socket&quot;,
+            &quot;new_value&quot;: &quot;secret&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;unix:/run/foo.socket&quot;,
+                &quot;password&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Cannot-be-a-base means no password&quot;,
+            &quot;href&quot;: &quot;mailto:me@example.net&quot;,
+            &quot;new_value&quot;: &quot;secret&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;mailto:me@example.net&quot;,
+                &quot;password&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;http://example.net&quot;,
+            &quot;new_value&quot;: &quot;secret&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://:secret@example.net/&quot;,
+                &quot;password&quot;: &quot;secret&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;http://me@example.net&quot;,
+            &quot;new_value&quot;: &quot;secret&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://me:secret@example.net/&quot;,
+                &quot;password&quot;: &quot;secret&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;http://:secret@example.net&quot;,
+            &quot;new_value&quot;: &quot;&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.net/&quot;,
+                &quot;password&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;http://me:secret@example.net&quot;,
+            &quot;new_value&quot;: &quot;&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://me@example.net/&quot;,
+                &quot;password&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;UTF-8 percent encoding with the userinfo encode set.&quot;,
+            &quot;href&quot;: &quot;http://example.net&quot;,
+            &quot;new_value&quot;: &quot;\u0000\u0001\t\n\r\u001f !\&quot;#$%&amp;'()*+,-./09:;&lt;=&gt;?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://:%00%01%09%0A%0D%1F%20!%22%23$%&amp;'()*+,-.%2F09%3A%3B%3C%3D%3E%3F%40AZ%5B%5C%5D%5E_%60az%7B%7C%7D~%7F%C2%80%C2%81%C3%89%C3%A9@example.net/&quot;,
+                &quot;password&quot;: &quot;%00%01%09%0A%0D%1F%20!%22%23$%&amp;'()*+,-.%2F09%3A%3B%3C%3D%3E%3F%40AZ%5B%5C%5D%5E_%60az%7B%7C%7D~%7F%C2%80%C2%81%C3%89%C3%A9&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Bytes already percent-encoded are left as-is.&quot;,
+            &quot;href&quot;: &quot;http://example.net&quot;,
+            &quot;new_value&quot;: &quot;%c3%89té&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://:%c3%89t%C3%A9@example.net/&quot;,
+                &quot;password&quot;: &quot;%c3%89t%C3%A9&quot;
+            }
+        }
+    ],
+    &quot;host&quot;: [
+        {
+            &quot;comment&quot;: &quot;Cannot-be-a-base means no host&quot;,
+            &quot;href&quot;: &quot;mailto:me@example.net&quot;,
+            &quot;new_value&quot;: &quot;example.com&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;mailto:me@example.net&quot;,
+                &quot;host&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Cannot-be-a-base means no password&quot;,
+            &quot;href&quot;: &quot;data:text/plain,Stuff&quot;,
+            &quot;new_value&quot;: &quot;example.net&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;data:text/plain,Stuff&quot;,
+                &quot;host&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;http://example.net&quot;,
+            &quot;new_value&quot;: &quot;example.com:8080&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.com:8080/&quot;,
+                &quot;host&quot;: &quot;example.com:8080&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Port number is unchanged if not specified in the new value&quot;,
+            &quot;href&quot;: &quot;http://example.net:8080&quot;,
+            &quot;new_value&quot;: &quot;example.com&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.com:8080/&quot;,
+                &quot;host&quot;: &quot;example.com:8080&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Port number is unchanges if empty in the new value. Note: this may change, see https://github.com/whatwg/url/pull/113&quot;,
+            &quot;href&quot;: &quot;http://example.net:8080&quot;,
+            &quot;new_value&quot;: &quot;example.com:&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.com:8080/&quot;,
+                &quot;host&quot;: &quot;example.com:8080&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;The empty host is not valid for special schemes&quot;,
+            &quot;href&quot;: &quot;http://example.net&quot;,
+            &quot;new_value&quot;: &quot;&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.net/&quot;,
+                &quot;host&quot;: &quot;example.net&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;The empty host is OK for non-special schemes&quot;,
+            &quot;href&quot;: &quot;view-source+http://example.net/foo&quot;,
+            &quot;new_value&quot;: &quot;&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;view-source+http:///foo&quot;,
+                &quot;host&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Path-only URLs can gain a host&quot;,
+            &quot;href&quot;: &quot;a:/foo&quot;,
+            &quot;new_value&quot;: &quot;example.net&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;a://example.net/foo&quot;,
+                &quot;host&quot;: &quot;example.net&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;IPv4 address syntax is normalized&quot;,
+            &quot;href&quot;: &quot;http://example.net&quot;,
+            &quot;new_value&quot;: &quot;0x7F000001:8080&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://127.0.0.1:8080/&quot;,
+                &quot;host&quot;: &quot;127.0.0.1:8080&quot;,
+                &quot;hostname&quot;: &quot;127.0.0.1&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;IPv6 address syntax is normalized&quot;,
+            &quot;href&quot;: &quot;http://example.net&quot;,
+            &quot;new_value&quot;: &quot;[::0:01]:2&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://[::1]:2/&quot;,
+                &quot;host&quot;: &quot;[::1]:2&quot;,
+                &quot;hostname&quot;: &quot;[::1]&quot;,
+                &quot;port&quot;: &quot;2&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Default port number is removed&quot;,
+            &quot;href&quot;: &quot;http://example.net&quot;,
+            &quot;new_value&quot;: &quot;example.com:80&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.com/&quot;,
+                &quot;host&quot;: &quot;example.com&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Default port number is removed&quot;,
+            &quot;href&quot;: &quot;https://example.net&quot;,
+            &quot;new_value&quot;: &quot;example.com:443&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;https://example.com/&quot;,
+                &quot;host&quot;: &quot;example.com&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Default port number is only removed for the relevant scheme&quot;,
+            &quot;href&quot;: &quot;https://example.net&quot;,
+            &quot;new_value&quot;: &quot;example.com:80&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;https://example.com:80/&quot;,
+                &quot;host&quot;: &quot;example.com:80&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;80&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Stuff after a / delimiter is ignored&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;example.com/stuff&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.com/path&quot;,
+                &quot;host&quot;: &quot;example.com&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Stuff after a / delimiter is ignored&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;example.com:8080/stuff&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.com:8080/path&quot;,
+                &quot;host&quot;: &quot;example.com:8080&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Stuff after a ? delimiter is ignored&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;example.com?stuff&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.com/path&quot;,
+                &quot;host&quot;: &quot;example.com&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Stuff after a ? delimiter is ignored&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;example.com:8080?stuff&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.com:8080/path&quot;,
+                &quot;host&quot;: &quot;example.com:8080&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Stuff after a # delimiter is ignored&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;example.com#stuff&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.com/path&quot;,
+                &quot;host&quot;: &quot;example.com&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Stuff after a # delimiter is ignored&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;example.com:8080#stuff&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.com:8080/path&quot;,
+                &quot;host&quot;: &quot;example.com:8080&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Stuff after a \\ delimiter is ignored for special schemes&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;example.com\\stuff&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.com/path&quot;,
+                &quot;host&quot;: &quot;example.com&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Stuff after a \\ delimiter is ignored for special schemes&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;example.com:8080\\stuff&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.com:8080/path&quot;,
+                &quot;host&quot;: &quot;example.com:8080&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;\\ is not a delimiter for non-special schemes, and it’s invalid in a domain&quot;,
+            &quot;href&quot;: &quot;view-source+http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;example.com\\stuff&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;view-source+http://example.net/path&quot;,
+                &quot;host&quot;: &quot;example.net&quot;,
+                &quot;hostname&quot;: &quot;example.net&quot;,
+                &quot;port&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Anything other than ASCII digit stops the port parser in a setter but is not an error&quot;,
+            &quot;href&quot;: &quot;view-source+http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;example.com:8080stuff2&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;view-source+http://example.com:8080/path&quot;,
+                &quot;host&quot;: &quot;example.com:8080&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Anything other than ASCII digit stops the port parser in a setter but is not an error&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;example.com:8080stuff2&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.com:8080/path&quot;,
+                &quot;host&quot;: &quot;example.com:8080&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Anything other than ASCII digit stops the port parser in a setter but is not an error&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;example.com:8080+2&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.com:8080/path&quot;,
+                &quot;host&quot;: &quot;example.com:8080&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Port numbers are 16 bit integers&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;example.com:65535&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.com:65535/path&quot;,
+                &quot;host&quot;: &quot;example.com:65535&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;65535&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Port numbers are 16 bit integers, overflowing is an error. Hostname is still set, though.&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;example.com:65536&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.com/path&quot;,
+                &quot;host&quot;: &quot;example.com&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;&quot;
+            }
+        }
+    ],
+    &quot;hostname&quot;: [
+        {
+            &quot;comment&quot;: &quot;Cannot-be-a-base means no host&quot;,
+            &quot;href&quot;: &quot;mailto:me@example.net&quot;,
+            &quot;new_value&quot;: &quot;example.com&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;mailto:me@example.net&quot;,
+                &quot;host&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Cannot-be-a-base means no password&quot;,
+            &quot;href&quot;: &quot;data:text/plain,Stuff&quot;,
+            &quot;new_value&quot;: &quot;example.net&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;data:text/plain,Stuff&quot;,
+                &quot;host&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;http://example.net:8080&quot;,
+            &quot;new_value&quot;: &quot;example.com&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.com:8080/&quot;,
+                &quot;host&quot;: &quot;example.com:8080&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;The empty host is not valid for special schemes&quot;,
+            &quot;href&quot;: &quot;http://example.net&quot;,
+            &quot;new_value&quot;: &quot;&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.net/&quot;,
+                &quot;host&quot;: &quot;example.net&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;The empty host is OK for non-special schemes&quot;,
+            &quot;href&quot;: &quot;view-source+http://example.net/foo&quot;,
+            &quot;new_value&quot;: &quot;&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;view-source+http:///foo&quot;,
+                &quot;host&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Path-only URLs can gain a host&quot;,
+            &quot;href&quot;: &quot;a:/foo&quot;,
+            &quot;new_value&quot;: &quot;example.net&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;a://example.net/foo&quot;,
+                &quot;host&quot;: &quot;example.net&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;IPv4 address syntax is normalized&quot;,
+            &quot;href&quot;: &quot;http://example.net:8080&quot;,
+            &quot;new_value&quot;: &quot;0x7F000001&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://127.0.0.1:8080/&quot;,
+                &quot;host&quot;: &quot;127.0.0.1:8080&quot;,
+                &quot;hostname&quot;: &quot;127.0.0.1&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;IPv6 address syntax is normalized&quot;,
+            &quot;href&quot;: &quot;http://example.net&quot;,
+            &quot;new_value&quot;: &quot;[::0:01]&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://[::1]/&quot;,
+                &quot;host&quot;: &quot;[::1]&quot;,
+                &quot;hostname&quot;: &quot;[::1]&quot;,
+                &quot;port&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Stuff after a : delimiter is ignored&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;example.com:8080&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.com/path&quot;,
+                &quot;host&quot;: &quot;example.com&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Stuff after a : delimiter is ignored&quot;,
+            &quot;href&quot;: &quot;http://example.net:8080/path&quot;,
+            &quot;new_value&quot;: &quot;example.com:&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.com:8080/path&quot;,
+                &quot;host&quot;: &quot;example.com:8080&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Stuff after a / delimiter is ignored&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;example.com/stuff&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.com/path&quot;,
+                &quot;host&quot;: &quot;example.com&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Stuff after a ? delimiter is ignored&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;example.com?stuff&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.com/path&quot;,
+                &quot;host&quot;: &quot;example.com&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Stuff after a # delimiter is ignored&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;example.com#stuff&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.com/path&quot;,
+                &quot;host&quot;: &quot;example.com&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Stuff after a \\ delimiter is ignored for special schemes&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;example.com\\stuff&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.com/path&quot;,
+                &quot;host&quot;: &quot;example.com&quot;,
+                &quot;hostname&quot;: &quot;example.com&quot;,
+                &quot;port&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;\\ is not a delimiter for non-special schemes, and it’s invalid in a domain&quot;,
+            &quot;href&quot;: &quot;view-source+http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;example.com\\stuff&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;view-source+http://example.net/path&quot;,
+                &quot;host&quot;: &quot;example.net&quot;,
+                &quot;hostname&quot;: &quot;example.net&quot;,
+                &quot;port&quot;: &quot;&quot;
+            }
+        }
+    ],
+    &quot;port&quot;: [
+        {
+            &quot;href&quot;: &quot;http://example.net&quot;,
+            &quot;new_value&quot;: &quot;8080&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.net:8080/&quot;,
+                &quot;host&quot;: &quot;example.net:8080&quot;,
+                &quot;hostname&quot;: &quot;example.net&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Port number is unchanged if empty in the new value. Note: this may change, see https://github.com/whatwg/url/pull/113&quot;,
+            &quot;href&quot;: &quot;http://example.net:8080&quot;,
+            &quot;new_value&quot;: &quot;&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.net:8080/&quot;,
+                &quot;host&quot;: &quot;example.net:8080&quot;,
+                &quot;hostname&quot;: &quot;example.net&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Default port number is removed&quot;,
+            &quot;href&quot;: &quot;http://example.net:8080&quot;,
+            &quot;new_value&quot;: &quot;80&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.net/&quot;,
+                &quot;host&quot;: &quot;example.net&quot;,
+                &quot;hostname&quot;: &quot;example.net&quot;,
+                &quot;port&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Default port number is removed&quot;,
+            &quot;href&quot;: &quot;https://example.net:4433&quot;,
+            &quot;new_value&quot;: &quot;443&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;https://example.net/&quot;,
+                &quot;host&quot;: &quot;example.net&quot;,
+                &quot;hostname&quot;: &quot;example.net&quot;,
+                &quot;port&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Default port number is only removed for the relevant scheme&quot;,
+            &quot;href&quot;: &quot;https://example.net&quot;,
+            &quot;new_value&quot;: &quot;80&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;https://example.net:80/&quot;,
+                &quot;host&quot;: &quot;example.net:80&quot;,
+                &quot;hostname&quot;: &quot;example.net&quot;,
+                &quot;port&quot;: &quot;80&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Stuff after a / delimiter is ignored&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;8080/stuff&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.net:8080/path&quot;,
+                &quot;host&quot;: &quot;example.net:8080&quot;,
+                &quot;hostname&quot;: &quot;example.net&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Stuff after a ? delimiter is ignored&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;8080?stuff&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.net:8080/path&quot;,
+                &quot;host&quot;: &quot;example.net:8080&quot;,
+                &quot;hostname&quot;: &quot;example.net&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Stuff after a # delimiter is ignored&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;8080#stuff&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.net:8080/path&quot;,
+                &quot;host&quot;: &quot;example.net:8080&quot;,
+                &quot;hostname&quot;: &quot;example.net&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Stuff after a \\ delimiter is ignored for special schemes&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;8080\\stuff&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.net:8080/path&quot;,
+                &quot;host&quot;: &quot;example.net:8080&quot;,
+                &quot;hostname&quot;: &quot;example.net&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Anything other than ASCII digit stops the port parser in a setter but is not an error&quot;,
+            &quot;href&quot;: &quot;view-source+http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;8080stuff2&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;view-source+http://example.net:8080/path&quot;,
+                &quot;host&quot;: &quot;example.net:8080&quot;,
+                &quot;hostname&quot;: &quot;example.net&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Anything other than ASCII digit stops the port parser in a setter but is not an error&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;8080stuff2&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.net:8080/path&quot;,
+                &quot;host&quot;: &quot;example.net:8080&quot;,
+                &quot;hostname&quot;: &quot;example.net&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Anything other than ASCII digit stops the port parser in a setter but is not an error&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;8080+2&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.net:8080/path&quot;,
+                &quot;host&quot;: &quot;example.net:8080&quot;,
+                &quot;hostname&quot;: &quot;example.net&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Port numbers are 16 bit integers&quot;,
+            &quot;href&quot;: &quot;http://example.net/path&quot;,
+            &quot;new_value&quot;: &quot;65535&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.net:65535/path&quot;,
+                &quot;host&quot;: &quot;example.net:65535&quot;,
+                &quot;hostname&quot;: &quot;example.net&quot;,
+                &quot;port&quot;: &quot;65535&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Port numbers are 16 bit integers, overflowing is an error&quot;,
+            &quot;href&quot;: &quot;http://example.net:8080/path&quot;,
+            &quot;new_value&quot;: &quot;65536&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.net:8080/path&quot;,
+                &quot;host&quot;: &quot;example.net:8080&quot;,
+                &quot;hostname&quot;: &quot;example.net&quot;,
+                &quot;port&quot;: &quot;8080&quot;
+            }
+        }
+    ],
+    &quot;pathname&quot;: [
+        {
+            &quot;comment&quot;: &quot;Cannot-be-a-base don’t have a path&quot;,
+            &quot;href&quot;: &quot;mailto:me@example.net&quot;,
+            &quot;new_value&quot;: &quot;/foo&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;mailto:me@example.net&quot;,
+                &quot;pathname&quot;: &quot;me@example.net&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;unix:/run/foo.socket?timeout=10&quot;,
+            &quot;new_value&quot;: &quot;/var/log/../run/bar.socket&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;unix:/var/run/bar.socket?timeout=10&quot;,
+                &quot;pathname&quot;: &quot;/var/run/bar.socket&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;https://example.net#nav&quot;,
+            &quot;new_value&quot;: &quot;home&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;https://example.net/home#nav&quot;,
+                &quot;pathname&quot;: &quot;/home&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;https://example.net#nav&quot;,
+            &quot;new_value&quot;: &quot;../home&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;https://example.net/home#nav&quot;,
+                &quot;pathname&quot;: &quot;/home&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;\\ is a segment delimiter for 'special' URLs&quot;,
+            &quot;href&quot;: &quot;http://example.net/home?lang=fr#nav&quot;,
+            &quot;new_value&quot;: &quot;\\a\\%2E\\b\\%2e.\\c&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.net/a/c?lang=fr#nav&quot;,
+                &quot;pathname&quot;: &quot;/a/c&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;\\ is *not* a segment delimiter for non-'special' URLs&quot;,
+            &quot;href&quot;: &quot;view-source+http://example.net/home?lang=fr#nav&quot;,
+            &quot;new_value&quot;: &quot;\\a\\%2E\\b\\%2e.\\c&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;view-source+http://example.net/\\a\\.\\b\\..\\c?lang=fr#nav&quot;,
+                &quot;pathname&quot;: &quot;/\\a\\.\\b\\..\\c&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;UTF-8 percent encoding with the default encode set. Tabs and newlines are removed.&quot;,
+            &quot;href&quot;: &quot;a:/&quot;,
+            &quot;new_value&quot;: &quot;\u0000\u0001\t\n\r\u001f !\&quot;#$%&amp;'()*+,-./09:;&lt;=&gt;?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;a:/%00%01%1F%20!%22%23$%&amp;'()*+,-./09:;%3C=%3E%3F@AZ[\\]^_%60az%7B|%7D~%7F%C2%80%C2%81%C3%89%C3%A9&quot;,
+                &quot;pathname&quot;: &quot;/%00%01%1F%20!%22%23$%&amp;'()*+,-./09:;%3C=%3E%3F@AZ[\\]^_%60az%7B|%7D~%7F%C2%80%C2%81%C3%89%C3%A9&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Bytes already percent-encoded are left as-is, except %2E.&quot;,
+            &quot;href&quot;: &quot;http://example.net&quot;,
+            &quot;new_value&quot;: &quot;%2e%2E%c3%89té&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.net/..%c3%89t%C3%A9&quot;,
+                &quot;pathname&quot;: &quot;/..%c3%89t%C3%A9&quot;
+            }
+        }
+    ],
+    &quot;search&quot;: [
+        {
+            &quot;href&quot;: &quot;https://example.net#nav&quot;,
+            &quot;new_value&quot;: &quot;lang=fr&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;https://example.net/?lang=fr#nav&quot;,
+                &quot;search&quot;: &quot;?lang=fr&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;https://example.net?lang=en-US#nav&quot;,
+            &quot;new_value&quot;: &quot;lang=fr&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;https://example.net/?lang=fr#nav&quot;,
+                &quot;search&quot;: &quot;?lang=fr&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;https://example.net?lang=en-US#nav&quot;,
+            &quot;new_value&quot;: &quot;?lang=fr&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;https://example.net/?lang=fr#nav&quot;,
+                &quot;search&quot;: &quot;?lang=fr&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;https://example.net?lang=en-US#nav&quot;,
+            &quot;new_value&quot;: &quot;??lang=fr&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;https://example.net/??lang=fr#nav&quot;,
+                &quot;search&quot;: &quot;??lang=fr&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;https://example.net?lang=en-US#nav&quot;,
+            &quot;new_value&quot;: &quot;?&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;https://example.net/?#nav&quot;,
+                &quot;search&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;https://example.net?lang=en-US#nav&quot;,
+            &quot;new_value&quot;: &quot;&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;https://example.net/#nav&quot;,
+                &quot;search&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;https://example.net?lang=en-US&quot;,
+            &quot;new_value&quot;: &quot;&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;https://example.net/&quot;,
+                &quot;search&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;https://example.net&quot;,
+            &quot;new_value&quot;: &quot;&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;https://example.net/&quot;,
+                &quot;search&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;UTF-8 percent encoding with the query encode set. Tabs and newlines are removed.&quot;,
+            &quot;href&quot;: &quot;a:/&quot;,
+            &quot;new_value&quot;: &quot;\u0000\u0001\t\n\r\u001f !\&quot;#$%&amp;'()*+,-./09:;&lt;=&gt;?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;a:/?%00%01%1F%20!%22%23$%&amp;'()*+,-./09:;%3C=%3E?@AZ[\\]^_`az{|}~%7F%C2%80%C2%81%C3%89%C3%A9&quot;,
+                &quot;search&quot;: &quot;?%00%01%1F%20!%22%23$%&amp;'()*+,-./09:;%3C=%3E?@AZ[\\]^_`az{|}~%7F%C2%80%C2%81%C3%89%C3%A9&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Bytes already percent-encoded are left as-is&quot;,
+            &quot;href&quot;: &quot;http://example.net&quot;,
+            &quot;new_value&quot;: &quot;%c3%89té&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.net/?%c3%89t%C3%A9&quot;,
+                &quot;search&quot;: &quot;?%c3%89t%C3%A9&quot;
+            }
+        }
+    ],
+    &quot;hash&quot;: [
+        {
+            &quot;href&quot;: &quot;https://example.net&quot;,
+            &quot;new_value&quot;: &quot;main&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;https://example.net/#main&quot;,
+                &quot;hash&quot;: &quot;#main&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;https://example.net#nav&quot;,
+            &quot;new_value&quot;: &quot;main&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;https://example.net/#main&quot;,
+                &quot;hash&quot;: &quot;#main&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;https://example.net?lang=en-US&quot;,
+            &quot;new_value&quot;: &quot;##nav&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;https://example.net/?lang=en-US##nav&quot;,
+                &quot;hash&quot;: &quot;##nav&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;https://example.net?lang=en-US#nav&quot;,
+            &quot;new_value&quot;: &quot;#main&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;https://example.net/?lang=en-US#main&quot;,
+                &quot;hash&quot;: &quot;#main&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;https://example.net?lang=en-US#nav&quot;,
+            &quot;new_value&quot;: &quot;#&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;https://example.net/?lang=en-US#&quot;,
+                &quot;hash&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;href&quot;: &quot;https://example.net?lang=en-US#nav&quot;,
+            &quot;new_value&quot;: &quot;&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;https://example.net/?lang=en-US&quot;,
+                &quot;hash&quot;: &quot;&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;No percent-encoding at all (!); nuls, tabs, and newlines are removed&quot;,
+            &quot;href&quot;: &quot;a:/&quot;,
+            &quot;new_value&quot;: &quot;\u0000\u0001\t\n\r\u001f !\&quot;#$%&amp;'()*+,-./09:;&lt;=&gt;?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;a:/#\u0001\u001f !\&quot;#$%&amp;'()*+,-./09:;&lt;=&gt;?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé&quot;,
+                &quot;hash&quot;: &quot;#\u0001\u001f !\&quot;#$%&amp;'()*+,-./09:;&lt;=&gt;?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé&quot;
+            }
+        },
+        {
+            &quot;comment&quot;: &quot;Bytes already percent-encoded are left as-is&quot;,
+            &quot;href&quot;: &quot;http://example.net&quot;,
+            &quot;new_value&quot;: &quot;%c3%89té&quot;,
+            &quot;expected&quot;: {
+                &quot;href&quot;: &quot;http://example.net/#%c3%89té&quot;,
+                &quot;hash&quot;: &quot;#%c3%89té&quot;
+            }
+        }
+    ]
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurlconstructorexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,358 @@
</span><ins>+
+FAIL URL.searchParams getter assert_true: expected true got false
+FAIL URL.searchParams updating, clearing assert_true: expected true got false
+FAIL URL.searchParams setter, invalid values assert_throws: function &quot;function () { url.searchParams = new URLSearchParams(urlS...&quot; threw object &quot;ReferenceError: Can't find variable: URLSearchParams&quot; (&quot;ReferenceError&quot;) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL URL.searchParams and URL.search setters, update propagation assert_true: expected true got false
+PASS Loading data… 
+PASS Parsing: &lt;http://example        .
+org&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://user:pass@foo:21/bar;par?b#c&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http:foo.com&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;           :foo.com   
+&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt; foo.com  &gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;a:         foo.com&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;a://&quot;
+PASS Parsing: &lt;http://f:21/ b ? d # e &gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://f:/c&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;http://f:0/c&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;http://f:0&quot; but got &quot;http://f&quot;
+FAIL Parsing: &lt;http://f:00000000000000/c&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: href expected &quot;http://f:0/c&quot; but got &quot;http://f:00000000000000/c&quot;
+FAIL Parsing: &lt;http://f:00000000000000000000080/c&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: href expected &quot;http://f/c&quot; but got &quot;http://f:00000000000000000000080/c&quot;
+PASS Parsing: &lt;http://f:b/c&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://f: /c&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://f:
+/c&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://f:fifty-two/c&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;http://f:999999/c&gt; against &lt;http://example.org/foo/bar&gt; assert_throws: function &quot;function () {
+          bURL(expected.input, expected.bas...&quot; did not throw
+PASS Parsing: &lt;http://f: 21 / b ? d # e &gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;          &gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:foo.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:foo.com\&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:a&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:\&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:#&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;#&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;#/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;#\&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;#;?&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;?&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;:23&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;/:23&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;::&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;::23&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;foo://&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: href expected &quot;foo:///&quot; but got &quot;foo://&quot;
+PASS Parsing: &lt;http://a:b@c:29/d&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http::@c:29&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;http://&amp;a:foo(b]c@d:2/&gt; against &lt;http://example.org/foo/bar&gt; Type error
+FAIL Parsing: &lt;http://::@c@d:2&gt; against &lt;http://example.org/foo/bar&gt; Type error
+PASS Parsing: &lt;http://foo.com:b@d/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://foo.com/\@&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http:\\foo.com\&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http:\\a\b:c\d@foo.com\&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;foo:/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;foo://&quot;
+FAIL Parsing: &lt;foo:/bar.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;foo://&quot;
+FAIL Parsing: &lt;foo://///////&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;foo://&quot;
+FAIL Parsing: &lt;foo://///////bar.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;foo://&quot;
+FAIL Parsing: &lt;foo:////://///&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;foo://&quot;
+FAIL Parsing: &lt;c:/foo&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;c://&quot;
+PASS Parsing: &lt;//foo/bar&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://foo/path;a??e#f#g&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://foo/abcd?efgh?ijkl&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://foo/abcd#foo?bar&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;[61:24:74]:98&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http:[61:27]/:foo&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://[1::2]:3:4&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://2001::1&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://2001::1]&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://2001::1]:80&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://[2001::1]&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;http://[2001::1]:80&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;http:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: href expected &quot;http://example.org/example.com/&quot; but got &quot;http://example.com/&quot;
+PASS Parsing: &lt;ftp:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;https:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;madeupscheme:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;madeupscheme://&quot;
+PASS Parsing: &lt;file:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;ftps:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;ftps://&quot;
+PASS Parsing: &lt;gopher:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;ws:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;wss:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;data:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;javascript:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;mailto:/example.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;mailto://&quot;
+PASS Parsing: &lt;http:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;ftp:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;https:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;madeupscheme:example.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;madeupscheme://&quot;
+FAIL Parsing: &lt;ftps:example.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;ftps://&quot;
+PASS Parsing: &lt;gopher:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;ws:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;wss:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;data:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;javascript:example.com/&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;mailto:example.com/&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;mailto://&quot;
+PASS Parsing: &lt;/a/b/c&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;/a/ /c&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;/a%2fc&gt; against &lt;http://example.org/foo/bar&gt; 
+PASS Parsing: &lt;/a/%2f/c&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;#β&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: href expected &quot;http://example.org/foo/bar#β&quot; but got &quot;http://example.org/foo/bar#%CE%B2&quot;
+PASS Parsing: &lt;data:text/html,test#test&gt; against &lt;http://example.org/foo/bar&gt; 
+FAIL Parsing: &lt;tel:1234567890&gt; against &lt;http://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;tel://&quot;
+FAIL Parsing: &lt;file:c:\foo\bar.html&gt; against &lt;file:///tmp/mock/path&gt; assert_equals: href expected &quot;file:///c:/foo/bar.html&quot; but got &quot;file:///tmp/mock/c:/foo/bar.html&quot;
+FAIL Parsing: &lt;  File:c|////foo\bar.html&gt; against &lt;file:///tmp/mock/path&gt; assert_equals: href expected &quot;file:///c:////foo/bar.html&quot; but got &quot;file:///tmp/mock/c|////foo/bar.html&quot;
+FAIL Parsing: &lt;C|/foo/bar&gt; against &lt;file:///tmp/mock/path&gt; assert_equals: href expected &quot;file:///C:/foo/bar&quot; but got &quot;file:///tmp/mock/C|/foo/bar&quot;
+FAIL Parsing: &lt;/C|\foo\bar&gt; against &lt;file:///tmp/mock/path&gt; assert_equals: href expected &quot;file:///C:/foo/bar&quot; but got &quot;file:///C|/foo/bar&quot;
+FAIL Parsing: &lt;//C|/foo/bar&gt; against &lt;file:///tmp/mock/path&gt; Type error
+PASS Parsing: &lt;//server/file&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;\\server\file&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;/\server/file&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;file:///foo/bar.txt&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;file:///home/me&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;//&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;///&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;///test&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;file://test&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;file://localhost&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;file://localhost/&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;file://localhost/test&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;test&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;file:test&gt; against &lt;file:///tmp/mock/path&gt; 
+PASS Parsing: &lt;http://example.com/././foo&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/./.foo&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/.&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/./&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/bar/..&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/bar/../&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/..bar&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/bar/../ton&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/bar/../ton/../../a&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/../../..&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/../../../ton&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;http://example.com/foo/%2e&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://example.com/foo/&quot; but got &quot;http://example.com/foo/%2e&quot;
+FAIL Parsing: &lt;http://example.com/foo/%2e%2&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://example.com/foo/.%2&quot; but got &quot;http://example.com/foo/%2e%2&quot;
+FAIL Parsing: &lt;http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://example.com/..bar&quot; but got &quot;http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar&quot;
+PASS Parsing: &lt;http://example.com////../..&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/bar//../..&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo/bar//..&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/%20foo&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo%&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo%2&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo%2zbar&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo%2©zbar&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo%41%7a&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo        ‘%91&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo%00%51&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/(%28:%3A%29)&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/%3A%3a%3C%3c&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/foo        bar&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com\\foo\\bar&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/@asdf%40&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/你好你好&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/‥/foo&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com//foo&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://example.com/‮/foo/‭/bar&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://www.google.com/foo?bar=baz#&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;http://www.google.com/foo?bar=baz# »&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://www.google.com/foo?bar=baz# »&quot; but got &quot;http://www.google.com/foo?bar=baz# %C2%BB&quot;
+FAIL Parsing: &lt;data:test# »&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;data:test# »&quot; but got &quot;data:test# %C2%BB&quot;
+PASS Parsing: &lt;http://[www.google.com]/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://www.google.com&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;http://192.0x00A80001&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://192.168.0.1/&quot; but got &quot;http://192.0x00a80001/&quot;
+FAIL Parsing: &lt;http://www/foo%2Ehtml&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://www/foo.html&quot; but got &quot;http://www/foo%2Ehtml&quot;
+FAIL Parsing: &lt;http://www/foo/%2E/html&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://www/foo/html&quot; but got &quot;http://www/foo/%2E/html&quot;
+PASS Parsing: &lt;http://user:pass@/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://%25DOMAIN:foobar@foodomain.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:\\www.google.com\foo&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://foo:80/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://foo:81/&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;httpa://foo:80/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;httpa://foo:80&quot;
+PASS Parsing: &lt;http://foo:-80/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;https://foo:443/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;https://foo:80/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ftp://foo:21/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ftp://foo:80/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;gopher://foo:70/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;gopher://foo:443/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ws://foo:80/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ws://foo:81/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ws://foo:443/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ws://foo:815/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;wss://foo:80/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;wss://foo:81/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;wss://foo:443/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;wss://foo:815/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ftp:/example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;https:/example.com/&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;madeupscheme:/example.com/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;madeupscheme://&quot;
+PASS Parsing: &lt;file:/example.com/&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;ftps:/example.com/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;ftps://&quot;
+PASS Parsing: &lt;gopher:/example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ws:/example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;wss:/example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;data:/example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;javascript:/example.com/&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;mailto:/example.com/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;mailto://&quot;
+PASS Parsing: &lt;http:example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ftp:example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;https:example.com/&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;madeupscheme:example.com/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;madeupscheme://&quot;
+FAIL Parsing: &lt;ftps:example.com/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;ftps://&quot;
+PASS Parsing: &lt;gopher:example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;ws:example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;wss:example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;data:example.com/&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;javascript:example.com/&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;mailto:example.com/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;mailto://&quot;
+PASS Parsing: &lt;http:@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:a:b@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/a:b@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://a:b@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://@pple.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http::b@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/:b@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://:b@www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/:@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://user@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;https:@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:a:b@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/a:b@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://a:b@/www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http::@/www.example.com&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;http:a:@www.example.com&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://a:@www.example.com/&quot; but got &quot;http://a@www.example.com/&quot;
+FAIL Parsing: &lt;http:/a:@www.example.com&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://a:@www.example.com/&quot; but got &quot;http://a@www.example.com/&quot;
+FAIL Parsing: &lt;http://a:@www.example.com&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://a:@www.example.com/&quot; but got &quot;http://a@www.example.com/&quot;
+PASS Parsing: &lt;http://www.@pple.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:@:www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http:/@:www.example.com&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://@:www.example.com&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;http://:@www.example.com&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;http://:@www.example.com/&quot; but got &quot;http://www.example.com/&quot;
+PASS Parsing: &lt;/&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;/test.txt&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;.&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;..&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;test.txt&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;./test.txt&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;../test.txt&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;../aaa/test.txt&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;../../test.txt&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;中/test.txt&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;http://www.example2.com&gt; against &lt;http://www.example.com/test&gt; 
+PASS Parsing: &lt;//www.example2.com&gt; against &lt;http://www.example.com/test&gt; 
+FAIL Parsing: &lt;file:...&gt; against &lt;http://www.example.com/test&gt; assert_equals: href expected &quot;file:///...&quot; but got &quot;file://...&quot;
+FAIL Parsing: &lt;file:..&gt; against &lt;http://www.example.com/test&gt; assert_equals: href expected &quot;file:///&quot; but got &quot;file://..&quot;
+FAIL Parsing: &lt;file:a&gt; against &lt;http://www.example.com/test&gt; assert_equals: href expected &quot;file:///a&quot; but got &quot;file://a&quot;
+PASS Parsing: &lt;http://ExAmPlE.CoM&gt; against &lt;http://other.com/&gt; 
+PASS Parsing: &lt;http://example example.com&gt; against &lt;http://other.com/&gt; 
+PASS Parsing: &lt;http://Goo%20 goo%7C|.com&gt; against &lt;http://other.com/&gt; 
+FAIL Parsing: &lt;http://[]&gt; against &lt;http://other.com/&gt; assert_throws: function &quot;function () {
+          bURL(expected.input, expected.bas...&quot; did not throw
+FAIL Parsing: &lt;http://[:]&gt; against &lt;http://other.com/&gt; assert_throws: function &quot;function () {
+          bURL(expected.input, expected.bas...&quot; did not throw
+PASS Parsing: &lt;http://GOO  goo.com&gt; against &lt;http://other.com/&gt; 
+PASS Parsing: &lt;http://GOO​⁠goo.com&gt; against &lt;http://other.com/&gt; 
+PASS Parsing: &lt;http://www.foo。bar.com&gt; against &lt;http://other.com/&gt; 
+PASS Parsing: &lt;http://﷐zyx.com&gt; against &lt;http://other.com/&gt; 
+FAIL Parsing: &lt;http://%ef%b7%90zyx.com&gt; against &lt;http://other.com/&gt; assert_throws: function &quot;function () {
+          bURL(expected.input, expected.bas...&quot; did not throw
+PASS Parsing: &lt;http://Go.com&gt; against &lt;http://other.com/&gt; 
+FAIL Parsing: &lt;http://%41.com&gt; against &lt;http://other.com/&gt; assert_throws: function &quot;function () {
+          bURL(expected.input, expected.bas...&quot; did not throw
+FAIL Parsing: &lt;http://%ef%bc%85%ef%bc%94%ef%bc%91.com&gt; against &lt;http://other.com/&gt; assert_throws: function &quot;function () {
+          bURL(expected.input, expected.bas...&quot; did not throw
+FAIL Parsing: &lt;http://%00.com&gt; against &lt;http://other.com/&gt; assert_throws: function &quot;function () {
+          bURL(expected.input, expected.bas...&quot; did not throw
+FAIL Parsing: &lt;http://%ef%bc%85%ef%bc%90%ef%bc%90.com&gt; against &lt;http://other.com/&gt; assert_throws: function &quot;function () {
+          bURL(expected.input, expected.bas...&quot; did not throw
+FAIL Parsing: &lt;http://你好你好&gt; against &lt;http://other.com/&gt; assert_equals: origin expected &quot;http://你好你好&quot; but got &quot;http://xn--6qqa088eba&quot;
+FAIL Parsing: &lt;http://%zz%66%a.com&gt; against &lt;http://other.com/&gt; assert_throws: function &quot;function () {
+          bURL(expected.input, expected.bas...&quot; did not throw
+FAIL Parsing: &lt;http://%25&gt; against &lt;http://other.com/&gt; assert_throws: function &quot;function () {
+          bURL(expected.input, expected.bas...&quot; did not throw
+FAIL Parsing: &lt;http://hello%00&gt; against &lt;http://other.com/&gt; assert_throws: function &quot;function () {
+          bURL(expected.input, expected.bas...&quot; did not throw
+FAIL Parsing: &lt;http://%30%78%63%30%2e%30%32%35%30.01&gt; against &lt;http://other.com/&gt; assert_equals: href expected &quot;http://192.168.0.1/&quot; but got &quot;http://%30%78%63%30%2e%30%32%35%30.01/&quot;
+FAIL Parsing: &lt;http://%30%78%63%30%2e%30%32%35%30.01%2e&gt; against &lt;http://other.com/&gt; assert_equals: href expected &quot;http://192.168.0.1/&quot; but got &quot;http://%30%78%63%30%2e%30%32%35%30.01%2e/&quot;
+FAIL Parsing: &lt;http://192.168.0.257&gt; against &lt;http://other.com/&gt; assert_throws: function &quot;function () {
+          bURL(expected.input, expected.bas...&quot; did not throw
+FAIL Parsing: &lt;http://%3g%78%63%30%2e%30%32%35%30%2E.01&gt; against &lt;http://other.com/&gt; assert_throws: function &quot;function () {
+          bURL(expected.input, expected.bas...&quot; did not throw
+PASS Parsing: &lt;http://192.168.0.1 hello&gt; against &lt;http://other.com/&gt; 
+FAIL Parsing: &lt;http://0Xc0.0250.01&gt; against &lt;http://other.com/&gt; assert_equals: href expected &quot;http://192.168.0.1/&quot; but got &quot;http://0xc0.0250.01/&quot;
+PASS Parsing: &lt;http://[google.com]&gt; against &lt;http://other.com/&gt; 
+FAIL Parsing: &lt;http://foo:💩@example.com/bar&gt; against &lt;http://other.com/&gt; Type error
+FAIL Parsing: &lt;#&gt; against &lt;test:test&gt; assert_equals: origin expected &quot;null&quot; but got &quot;test://&quot;
+FAIL Parsing: &lt;#x&gt; against &lt;mailto:x@x.com&gt; assert_equals: origin expected &quot;null&quot; but got &quot;mailto://&quot;
+PASS Parsing: &lt;#x&gt; against &lt;data:,&gt; 
+PASS Parsing: &lt;#x&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;#&gt; against &lt;test:test?test&gt; assert_equals: origin expected &quot;null&quot; but got &quot;test://&quot;
+FAIL Parsing: &lt;https://@test@test@example:800/&gt; against &lt;http://doesnotmatter/&gt; Type error
+FAIL Parsing: &lt;https://@@@example&gt; against &lt;http://doesnotmatter/&gt; Type error
+FAIL Parsing: &lt;http://`{}:`{}@h/`{}?`{}&gt; against &lt;http://doesnotmatter/&gt; Type error
+PASS Parsing: &lt;/some/path&gt; against &lt;http://user@example.org/smth&gt; 
+PASS Parsing: &lt;&gt; against &lt;http://user:pass@example.org:21/smth&gt; 
+PASS Parsing: &lt;/some/path&gt; against &lt;http://user:pass@example.org:21/smth&gt; 
+PASS Parsing: &lt;i&gt; against &lt;sc:sd&gt; 
+PASS Parsing: &lt;i&gt; against &lt;sc:sd/sd&gt; 
+FAIL Parsing: &lt;i&gt; against &lt;sc:/pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;i&gt; against &lt;sc://ho/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://ho&quot;
+FAIL Parsing: &lt;i&gt; against &lt;sc:///pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+PASS Parsing: &lt;../i&gt; against &lt;sc:sd&gt; 
+PASS Parsing: &lt;../i&gt; against &lt;sc:sd/sd&gt; 
+FAIL Parsing: &lt;../i&gt; against &lt;sc:/pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;../i&gt; against &lt;sc://ho/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://ho&quot;
+FAIL Parsing: &lt;../i&gt; against &lt;sc:///pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+PASS Parsing: &lt;/i&gt; against &lt;sc:sd&gt; 
+PASS Parsing: &lt;/i&gt; against &lt;sc:sd/sd&gt; 
+FAIL Parsing: &lt;/i&gt; against &lt;sc:/pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;/i&gt; against &lt;sc://ho/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://ho&quot;
+FAIL Parsing: &lt;/i&gt; against &lt;sc:///pa/pa&gt; assert_equals: href expected &quot;sc:///i&quot; but got &quot;sc:/i&quot;
+PASS Parsing: &lt;?i&gt; against &lt;sc:sd&gt; 
+PASS Parsing: &lt;?i&gt; against &lt;sc:sd/sd&gt; 
+FAIL Parsing: &lt;?i&gt; against &lt;sc:/pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;?i&gt; against &lt;sc://ho/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://ho&quot;
+FAIL Parsing: &lt;?i&gt; against &lt;sc:///pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;#i&gt; against &lt;sc:sd&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;#i&gt; against &lt;sc:sd/sd&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;#i&gt; against &lt;sc:/pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+FAIL Parsing: &lt;#i&gt; against &lt;sc://ho/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://ho&quot;
+FAIL Parsing: &lt;#i&gt; against &lt;sc:///pa/pa&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+PASS Parsing: &lt;about:/../&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;data:/../&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;javascript:/../&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;mailto:/../&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;mailto://&quot;
+FAIL Parsing: &lt;sc://ñ.test/&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://xn--ida.test&quot;
+FAIL Parsing: &lt;sc:\../&gt; against &lt;about:blank&gt; assert_equals: href expected &quot;sc:\\../&quot; but got &quot;sc:/&quot;
+FAIL Parsing: &lt;sc::a@example.net&gt; against &lt;about:blank&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+PASS Parsing: &lt;http://127.0.0.1:10100/relative_import.html&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;http://facebook.com/?foo=%7B%22abc%22&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;https://localhost:3000/jqueryui@1.2.3&gt; against &lt;about:blank&gt; 
+PASS Parsing: &lt;h        t
+t
+p://h        o
+s
+t:9        0
+0
+0/p        a
+t
+h?q        u
+e
+ry#f        r
+a
+g&gt; against &lt;about:blank&gt; 
+FAIL Parsing: &lt;?a=b&amp;c=d&gt; against &lt;http://example.org/foo/bar&gt; assert_true: expected true got false
+FAIL Parsing: &lt;??a=b&amp;c=d&gt; against &lt;http://example.org/foo/bar&gt; assert_true: expected true got false
+FAIL Parsing: &lt;http:&gt; against &lt;http://example.org/foo/bar&gt; assert_true: expected true got false
+FAIL Parsing: &lt;http:&gt; against &lt;https://example.org/foo/bar&gt; assert_throws: function &quot;function () {
+          bURL(expected.input, expected.bas...&quot; did not throw
+FAIL Parsing: &lt;sc:&gt; against &lt;https://example.org/foo/bar&gt; assert_equals: origin expected &quot;null&quot; but got &quot;sc://&quot;
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurlconstructorhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor.html (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor.html        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,129 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;meta charset=utf-8&gt;
+&lt;script src=/resources/testharness.js&gt;&lt;/script&gt;
+&lt;script src=/resources/testharnessreport.js&gt;&lt;/script&gt;
+&lt;div id=log&gt;&lt;/div&gt;
+&lt;script&gt;
+function runURLConstructorTests() {
+  var setup = async_test(&quot;Loading data…&quot;)
+  setup.step(function() {
+    var request = new XMLHttpRequest()
+    request.open(&quot;GET&quot;, &quot;urltestdata.json&quot;)
+    request.send()
+    request.responseType = &quot;json&quot;
+    request.onload = setup.step_func(function() {
+      runURLTests(request.response)
+      setup.done()
+    })
+  })
+}
+
+function bURL(url, base) {
+  return new URL(url, base || &quot;about:blank&quot;)
+}
+
+function runURLTests(urltests) {
+  for(var i = 0, l = urltests.length; i &lt; l; i++) {
+    var expected = urltests[i]
+    if (typeof expected === &quot;string&quot;) continue // skip comments
+
+    test(function() {
+      if (expected.failure) {
+        assert_throws(new TypeError(), function() {
+          bURL(expected.input, expected.base)
+        })
+        return
+      }
+
+      var url = bURL(expected.input, expected.base)
+      assert_equals(url.href, expected.href, &quot;href&quot;)
+      if (&quot;origin&quot; in expected) {
+        assert_equals(url.origin, expected.origin, &quot;origin&quot;)
+      }
+      assert_equals(url.protocol, expected.protocol, &quot;protocol&quot;)
+      assert_equals(url.username, expected.username, &quot;username&quot;)
+      assert_equals(url.password, expected.password, &quot;password&quot;)
+      assert_equals(url.host, expected.host, &quot;host&quot;)
+      assert_equals(url.hostname, expected.hostname, &quot;hostname&quot;)
+      assert_equals(url.port, expected.port, &quot;port&quot;)
+      assert_equals(url.pathname, expected.pathname, &quot;pathname&quot;)
+      assert_equals(url.search, expected.search, &quot;search&quot;)
+      if (&quot;searchParams&quot; in expected) {
+        assert_true(&quot;searchParams&quot; in url)
+        assert_equals(url.searchParams.toString(), expected.searchParams, &quot;searchParams&quot;)
+      }
+      assert_equals(url.hash, expected.hash, &quot;hash&quot;)
+    }, &quot;Parsing: &lt;&quot; + expected.input + &quot;&gt; against &lt;&quot; + expected.base + &quot;&gt;&quot;)
+  }
+}
+
+function runURLSearchParamTests() {
+  test(function() {
+    var url = bURL('http://example.org/?a=b')
+    assert_true(&quot;searchParams&quot; in url)
+    var searchParams = url.searchParams
+    assert_true(url.searchParams === searchParams, 'Object identity should hold.')
+  }, 'URL.searchParams getter')
+
+  test(function() {
+    var url = bURL('http://example.org/?a=b')
+    assert_true(&quot;searchParams&quot; in url)
+    var searchParams = url.searchParams
+    assert_equals(searchParams.toString(), 'a=b')
+
+    searchParams.set('a', 'b')
+    assert_equals(url.searchParams.toString(), 'a=b')
+    assert_equals(url.search, '?a=b')
+    url.search = ''
+    assert_equals(url.searchParams.toString(), '')
+    assert_equals(url.search, '')
+    assert_equals(searchParams.toString(), '')
+  }, 'URL.searchParams updating, clearing')
+
+  test(function() {
+    'use strict'
+    var urlString = 'http://example.org'
+    var url = bURL(urlString)
+    assert_throws(TypeError(), function() { url.searchParams = new URLSearchParams(urlString) })
+  }, 'URL.searchParams setter, invalid values')
+
+  test(function() {
+    var url = bURL('http://example.org/file?a=b&amp;c=d')
+    assert_true(&quot;searchParams&quot; in url)
+    var searchParams = url.searchParams
+    assert_equals(url.search, '?a=b&amp;c=d')
+    assert_equals(searchParams.toString(), 'a=b&amp;c=d')
+
+    // Test that setting 'search' propagates to the URL object's query object.
+    url.search = 'e=f&amp;g=h'
+    assert_equals(url.search, '?e=f&amp;g=h')
+    assert_equals(searchParams.toString(), 'e=f&amp;g=h')
+
+    // ..and same but with a leading '?'.
+    url.search = '?e=f&amp;g=h'
+    assert_equals(url.search, '?e=f&amp;g=h')
+    assert_equals(searchParams.toString(), 'e=f&amp;g=h')
+
+    // And in the other direction, altering searchParams propagates
+    // back to 'search'.
+    searchParams.append('i', ' j ')
+    assert_equals(url.search, '?e=f&amp;g=h&amp;i=+j+')
+    assert_equals(url.searchParams.toString(), 'e=f&amp;g=h&amp;i=+j+')
+    assert_equals(searchParams.get('i'), ' j ')
+
+    searchParams.set('e', 'updated')
+    assert_equals(url.search, '?e=updated&amp;g=h&amp;i=+j+')
+    assert_equals(searchParams.get('e'), 'updated')
+
+    var url2 = bURL('http://example.org/file??a=b&amp;c=d')
+    assert_equals(url2.search, '??a=b&amp;c=d')
+    assert_equals(url2.searchParams.toString(), '%3Fa=b&amp;c=d')
+
+    url2.href = 'http://example.org/file??a=b'
+    assert_equals(url2.search, '??a=b')
+    assert_equals(url2.searchParams.toString(), '%3Fa=b')
+  }, 'URL.searchParams and URL.search setters, update propagation')
+}
+runURLSearchParamTests()
+runURLConstructorTests()
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurldomainToUnicodeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-domainToUnicode-expected.txt (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-domainToUnicode-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-domainToUnicode-expected.txt        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+
+FAIL URL.domainToUnicode valid input URL.domainToUnicode is not a function. (In 'URL.domainToUnicode(domain)', 'URL.domainToUnicode' is undefined)
+FAIL URL.domainToUnicode valid encoded input URL.domainToUnicode is not a function. (In 'URL.domainToUnicode(domain)', 'URL.domainToUnicode' is undefined)
+FAIL URL.domainToUnicode invalid input URL.domainToUnicode is not a function. (In 'URL.domainToUnicode(domain)', 'URL.domainToUnicode' is undefined)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurldomainToUnicodehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-domainToUnicode.html (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-domainToUnicode.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-domainToUnicode.html        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;title&gt;&lt;/title&gt;
+&lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+  test(function() {
+    var domain = 'example.org'
+    assert_true(URL.domainToUnicode(domain) === domain, 'Ascii domain should be parsed correctly.')
+  }, 'URL.domainToUnicode valid input')
+
+  test(function() {
+    var domain = 'xn--maana-pta.com'
+    assert_true(URL.domainToUnicode(domain) === 'mañana.com', ' Ascii encoded domain should be parsed correctly.')
+  }, 'URL.domainToUnicode valid encoded input')
+
+  test(function() {
+    var domain = 'http://not.a.domain'
+    assert_true(URL.domainToUnicode(domain) === &quot;&quot;, 'Invalid domain should be return an empty string.')
+  }, 'URL.domainToUnicode invalid input')
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurlsettersexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-setters-expected.txt (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-setters-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-setters-expected.txt        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,24 @@
</span><ins>+
+PASS Loading data… 
+FAIL Setting &lt;a://example.net&gt;.protocol = '' The empty string is not a valid scheme. Setter leaves the URL unchanged. assert_equals: expected &quot;a://example.net/&quot; but got &quot;a://example.net&quot;
+FAIL Setting &lt;a://example.net&gt;.protocol = 'b' assert_equals: expected &quot;b://example.net/&quot; but got &quot;b://example.net&quot;
+FAIL Setting &lt;a://example.net&gt;.protocol = 'B' Upper-case ASCII is lower-cased assert_equals: expected &quot;b://example.net/&quot; but got &quot;b://example.net&quot;
+FAIL Setting &lt;a://example.net&gt;.protocol = 'é' Non-ASCII is rejected assert_equals: expected &quot;a://example.net/&quot; but got &quot;a://example.net&quot;
+FAIL Setting &lt;a://example.net&gt;.protocol = '0b' No leading digit assert_equals: expected &quot;a://example.net/&quot; but got &quot;a://example.net&quot;
+FAIL Setting &lt;a://example.net&gt;.protocol = '+b' No leading punctuation assert_equals: expected &quot;a://example.net/&quot; but got &quot;a://example.net&quot;
+FAIL Setting &lt;a://example.net&gt;.protocol = 'bC0+-.' assert_equals: expected &quot;bc0+-.://example.net/&quot; but got &quot;bc0+-.://example.net&quot;
+FAIL Setting &lt;a://example.net&gt;.protocol = 'b,c' Only some punctuation is acceptable assert_equals: expected &quot;a://example.net/&quot; but got &quot;a://example.net&quot;
+FAIL Setting &lt;a://example.net&gt;.protocol = 'bé' Non-ASCII is rejected assert_equals: expected &quot;a://example.net/&quot; but got &quot;a://example.net&quot;
+FAIL Setting &lt;http://example.net&gt;.protocol = 'b' Can’t switch from special scheme to non-special. Note: this may change, see https://github.com/whatwg/url/issues/104 assert_equals: expected &quot;http://example.net/&quot; but got &quot;b://example.net/&quot;
+FAIL Setting &lt;mailto:me@example.net&gt;.protocol = 'http' Cannot-be-a-base URL doesn’t have a host, but URL in a special scheme must. assert_equals: expected &quot;mailto:me@example.net&quot; but got &quot;http://me@example.net/&quot;
+FAIL Setting &lt;ssh://me@example.net&gt;.protocol = 'http' Can’t switch from non-special scheme to special. Note: this may change, see https://github.com/whatwg/url/issues/104 assert_equals: expected &quot;ssh://me@example.net/&quot; but got &quot;http://me@example.net/&quot;
+PASS Setting &lt;http://example.net&gt;.protocol = 'https:foo : bar' Stuff after the first ':' is ignored 
+PASS Setting &lt;data:text/html,&lt;p&gt;Test&gt;.protocol = 'view-source+data:foo : bar' Stuff after the first ':' is ignored 
+FAIL Setting &lt;file:///home/you/index.html&gt;.username = 'me' No host means no username assert_equals: expected &quot;file:///home/you/index.html&quot; but got &quot;file://me@/home/you/index.html&quot;
+FAIL Setting &lt;unix:/run/foo.socket&gt;.username = 'me' No host means no username assert_equals: expected &quot;unix:/run/foo.socket&quot; but got &quot;unix://me@/run/foo.socket&quot;
+FAIL Setting &lt;mailto:you@example.net&gt;.username = 'me' Cannot-be-a-base means no username assert_equals: expected &quot;mailto:you@example.net&quot; but got &quot;mailto://me@you@example.net&quot;
+PASS Setting &lt;http://example.net&gt;.username = 'me' 
+PASS Setting &lt;http://:secret@example.net&gt;.username = 'me' 
+PASS Setting &lt;http://me@example.net&gt;.username = '' 
+PASS Setting &lt;http://me:secret@example.net&gt;.username = '' 
+FAIL Setting &lt;http://example.net&gt;.username = '
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurlsettershtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-setters.html (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-setters.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-setters.html        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;meta charset=utf-8&gt;
+&lt;script src=/resources/testharness.js&gt;&lt;/script&gt;
+&lt;script src=/resources/testharnessreport.js&gt;&lt;/script&gt;
+&lt;div id=log&gt;&lt;/div&gt;
+&lt;script&gt;
+function startURLSettersTests() {
+  var setup = async_test(&quot;Loading data…&quot;)
+  setup.step(function() {
+    var request = new XMLHttpRequest()
+    request.open(&quot;GET&quot;, &quot;setters_tests.json&quot;)
+    request.send()
+    request.responseType = &quot;json&quot;
+    request.onload = setup.step_func(function() {
+      runURLSettersTests(request.response)
+      setup.done()
+    })
+  })
+}
+
+function runURLSettersTests(all_test_cases) {
+  for (var attribute_to_be_set in all_test_cases) {
+    if (attribute_to_be_set == &quot;comment&quot;) {
+      continue;
+    }
+    var test_cases = all_test_cases[attribute_to_be_set];
+    for(var i = 0, l = test_cases.length; i &lt; l; i++) {
+      var test_case = test_cases[i];
+      var name = &quot;Setting &lt;&quot; + test_case.href + &quot;&gt;.&quot; + attribute_to_be_set +
+                 &quot; = '&quot; + test_case.new_value + &quot;'&quot;;
+      if (&quot;comment&quot; in test_case) {
+        name += &quot; &quot; + test_case.comment;
+      }
+      test(function() {
+        var url = new URL(test_case.href);
+        url[attribute_to_be_set] = test_case.new_value;
+        for (var attribute in test_case.expected) {
+          assert_equals(url[attribute], test_case.expected[attribute])
+        }
+      }, name)
+    }
+  }
+}
+
+startURLSettersTests()
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsappendexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-append-expected.txt (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-append-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-append-expected.txt        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+
+FAIL Append same name Can't find variable: URLSearchParams
+FAIL Append empty strings Can't find variable: URLSearchParams
+FAIL Append null Can't find variable: URLSearchParams
+FAIL Append multiple Can't find variable: URLSearchParams
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsappendhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-append.html (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-append.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-append.html        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,51 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf8&quot;&gt;
+&lt;link rel=&quot;help&quot; href=&quot;http://url.spec.whatwg.org/#dom-urlsearchparams-append&quot;&gt;
+&lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/testharness-extras.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+test(function() {
+    var params = new URLSearchParams();
+    params.append('a', 'b');
+    assert_equals(params + '', 'a=b');
+    params.append('a', 'b');
+    assert_equals(params + '', 'a=b&amp;a=b');
+    params.append('a', 'c');
+    assert_equals(params + '', 'a=b&amp;a=b&amp;a=c');
+}, 'Append same name');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('', '');
+    assert_equals(params + '', '=');
+    params.append('', '');
+    assert_equals(params + '', '=&amp;=');
+}, 'Append empty strings');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append(null, null);
+    assert_equals(params + '', 'null=null');
+    params.append(null, null);
+    assert_equals(params + '', 'null=null&amp;null=null');
+}, 'Append null');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('first', 1);
+    params.append('second', 2);
+    params.append('third', '');
+    params.append('first', 10);
+    assert_true(params.has('first'), 'Search params object has name &quot;first&quot;');
+    assert_equals(params.get('first'), '1', 'Search params object has name &quot;first&quot; with value &quot;1&quot;');
+    assert_equals(params.get('second'), '2', 'Search params object has name &quot;second&quot; with value &quot;2&quot;');
+    assert_equals(params.get('third'), '', 'Search params object has name &quot;third&quot; with value &quot;&quot;');
+    params.append('first', 10);
+    assert_equals(params.get('first'), '1', 'Search params object has name &quot;first&quot; with value &quot;1&quot;');
+}, 'Append multiple');
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsconstructorexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-constructor-expected.txt (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-constructor-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-constructor-expected.txt        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+
+FAIL Basic URLSearchParams construction Can't find variable: URLSearchParams
+FAIL URLSearchParams constructor, empty. assert_throws: Calling 'URLSearchParams' without 'new' should throw. function &quot;function () { URLSearchParams(); }&quot; threw object &quot;ReferenceError: Can't find variable: URLSearchParams&quot; (&quot;ReferenceError&quot;) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL URLSearchParams constructor, string. Can't find variable: URLSearchParams
+FAIL URLSearchParams constructor, object. Can't find variable: URLSearchParams
+FAIL Parse + Can't find variable: URLSearchParams
+FAIL Parse space Can't find variable: URLSearchParams
+FAIL Parse %20 Can't find variable: URLSearchParams
+FAIL Parse \0 Can't find variable: URLSearchParams
+FAIL Parse %00 Can't find variable: URLSearchParams
+FAIL Parse ⎄ Can't find variable: URLSearchParams
+FAIL Parse %e2%8e%84 Can't find variable: URLSearchParams
+FAIL Parse 💩 Can't find variable: URLSearchParams
+FAIL Parse %f0%9f%92%a9 Can't find variable: URLSearchParams
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsconstructorhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-constructor.html (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-constructor.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-constructor.html        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,129 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf8&quot;&gt;
+&lt;link rel=&quot;help&quot; href=&quot;http://url.spec.whatwg.org/#urlsearchparams&quot;&gt;
+&lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+test(function() {
+    var params = new URLSearchParams();
+    assert_equals(params + '', '');
+    params = new URLSearchParams('');
+    assert_equals(params + '', '');
+    params = new URLSearchParams('a=b');
+    assert_equals(params + '', 'a=b');
+    params = new URLSearchParams(params);
+    assert_equals(params + '', 'a=b');
+}, 'Basic URLSearchParams construction');
+
+test(function() {
+    assert_throws(new TypeError(), function () { URLSearchParams(); },
+                  'Calling \'URLSearchParams\' without \'new\' should throw.');
+    assert_throws(new TypeError(), function () { new URLSearchParams(DOMException.prototype); });
+    var params = new URLSearchParams('');
+    assert_true(params != null, 'constructor returned non-null value.');
+    assert_equals(params.__proto__, URLSearchParams.prototype, 'expected URLSearchParams.prototype as prototype.');
+    params = new URLSearchParams({});
+    assert_equals(params + '', '%5Bobject+Object%5D=');
+}, 'URLSearchParams constructor, empty.');
+
+test(function() {
+    var params = new URLSearchParams('a=b');
+    assert_true(params != null, 'constructor returned non-null value.');
+    assert_true(params.has('a'), 'Search params object has name &quot;a&quot;');
+    assert_false(params.has('b'), 'Search params object has not got name &quot;b&quot;');
+    var params = new URLSearchParams('a=b&amp;c');
+    assert_true(params != null, 'constructor returned non-null value.');
+    assert_true(params.has('a'), 'Search params object has name &quot;a&quot;');
+    assert_true(params.has('c'), 'Search params object has name &quot;c&quot;');
+    var params = new URLSearchParams('&amp;a&amp;&amp;&amp; &amp;&amp;&amp;&amp;&amp;a+b=&amp; c&amp;m%c3%b8%c3%b8');
+    assert_true(params != null, 'constructor returned non-null value.');
+    assert_true(params.has('a'), 'Search params object has name &quot;a&quot;');
+    assert_true(params.has('a b'), 'Search params object has name &quot;a b&quot;');
+    assert_true(params.has(' '), 'Search params object has name &quot; &quot;');
+    assert_false(params.has('c'), 'Search params object did not have the name &quot;c&quot;');
+    assert_true(params.has(' c'), 'Search params object has name &quot; c&quot;');
+    assert_true(params.has('møø'), 'Search params object has name &quot;møø&quot;');
+}, 'URLSearchParams constructor, string.');
+
+test(function() {
+    var seed = new URLSearchParams('a=b&amp;c=d');
+    var params = new URLSearchParams(seed);
+    assert_true(params != null, 'constructor returned non-null value.');
+    assert_equals(params.get('a'), 'b');
+    assert_equals(params.get('c'), 'd');
+    assert_false(params.has('d'));
+    // The name-value pairs are copied when created; later updates
+    // should not be observable.
+    seed.append('e', 'f');
+    assert_false(params.has('e'));
+    params.append('g', 'h');
+    assert_false(seed.has('g'));
+}, 'URLSearchParams constructor, object.');
+
+test(function() {
+    var params = new URLSearchParams('a=b+c');
+    assert_equals(params.get('a'), 'b c');
+    params = new URLSearchParams('a+b=c');
+    assert_equals(params.get('a b'), 'c');
+}, 'Parse +');
+
+test(function() {
+    var params = new URLSearchParams('a=b c');
+    assert_equals(params.get('a'), 'b c');
+    params = new URLSearchParams('a b=c');
+    assert_equals(params.get('a b'), 'c');
+}, 'Parse space');
+
+test(function() {
+    var params = new URLSearchParams('a=b%20c');
+    assert_equals(params.get('a'), 'b c');
+    params = new URLSearchParams('a%20b=c');
+    assert_equals(params.get('a b'), 'c');
+}, 'Parse %20');
+
+test(function() {
+    var params = new URLSearchParams('a=b\0c');
+    assert_equals(params.get('a'), 'b\0c');
+    params = new URLSearchParams('a\0b=c');
+    assert_equals(params.get('a\0b'), 'c');
+}, 'Parse \\0');
+
+test(function() {
+    var params = new URLSearchParams('a=b%00c');
+    assert_equals(params.get('a'), 'b\0c');
+    params = new URLSearchParams('a%00b=c');
+    assert_equals(params.get('a\0b'), 'c');
+}, 'Parse %00');
+
+test(function() {
+    var params = new URLSearchParams('a=b\u2384');
+    assert_equals(params.get('a'), 'b\u2384');
+    params = new URLSearchParams('a\u2384b=c');
+    assert_equals(params.get('a\u2384b'), 'c');
+}, 'Parse \u2384');  // Unicode Character 'COMPOSITION SYMBOL' (U+2384)
+
+test(function() {
+    var params = new URLSearchParams('a=b%e2%8e%84');
+    assert_equals(params.get('a'), 'b\u2384');
+    params = new URLSearchParams('a%e2%8e%84b=c');
+    assert_equals(params.get('a\u2384b'), 'c');
+}, 'Parse %e2%8e%84');  // Unicode Character 'COMPOSITION SYMBOL' (U+2384)
+
+test(function() {
+    var params = new URLSearchParams('a=b\uD83D\uDCA9c');
+    assert_equals(params.get('a'), 'b\uD83D\uDCA9c');
+    params = new URLSearchParams('a\uD83D\uDCA9b=c');
+    assert_equals(params.get('a\uD83D\uDCA9b'), 'c');
+}, 'Parse \uD83D\uDCA9');  // Unicode Character 'PILE OF POO' (U+1F4A9)
+
+test(function() {
+    var params = new URLSearchParams('a=b%f0%9f%92%a9c');
+    assert_equals(params.get('a'), 'b\uD83D\uDCA9c');
+    params = new URLSearchParams('a%f0%9f%92%a9b=c');
+    assert_equals(params.get('a\uD83D\uDCA9b'), 'c');
+}, 'Parse %f0%9f%92%a9');  // Unicode Character 'PILE OF POO' (U+1F4A9)
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsdeleteexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-delete-expected.txt (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-delete-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-delete-expected.txt        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+FAIL Delete basics Can't find variable: URLSearchParams
+FAIL Deleting appended multiple Can't find variable: URLSearchParams
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsdeletehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-delete.html (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-delete.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-delete.html        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf8&quot;&gt;
+&lt;link rel=&quot;help&quot; href=&quot;http://url.spec.whatwg.org/#dom-urlsearchparams-delete&quot;&gt;
+&lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/testharness-extras.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+test(function() {
+    var params = new URLSearchParams('a=b&amp;c=d');
+    params.delete('a');
+    assert_equals(params + '', 'c=d');
+    params = new URLSearchParams('a=a&amp;b=b&amp;a=a&amp;c=c');
+    params.delete('a');
+    assert_equals(params + '', 'b=b&amp;c=c');
+    params = new URLSearchParams('a=a&amp;=&amp;b=b&amp;c=c');
+    params.delete('');
+    assert_equals(params + '', 'a=a&amp;b=b&amp;c=c');
+    params = new URLSearchParams('a=a&amp;null=null&amp;b=b');
+    params.delete(null);
+    assert_equals(params + '', 'a=a&amp;b=b');
+    params = new URLSearchParams('a=a&amp;undefined=undefined&amp;b=b');
+    params.delete(undefined);
+    assert_equals(params + '', 'a=a&amp;b=b');
+}, 'Delete basics');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('first', 1);
+    assert_true(params.has('first'), 'Search params object has name &quot;first&quot;');
+    assert_equals(params.get('first'), '1', 'Search params object has name &quot;first&quot; with value &quot;1&quot;');
+    params.delete('first');
+    assert_false(params.has('first'), 'Search params object has no &quot;first&quot; name');
+    params.append('first', 1);
+    params.append('first', 10);
+    params.delete('first');
+    assert_false(params.has('first'), 'Search params object has no &quot;first&quot; name');
+}, 'Deleting appended multiple');
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsgetexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-get-expected.txt (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-get-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-get-expected.txt        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+FAIL Get basics Can't find variable: URLSearchParams
+FAIL More get() basics Can't find variable: URLSearchParams
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsgethtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-get.html (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-get.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-get.html        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf8&quot;&gt;
+&lt;link rel=&quot;help&quot; href=&quot;http://url.spec.whatwg.org/#dom-urlsearchparams-get&quot;&gt;
+&lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/testharness-extras.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+test(function() {
+    var params = new URLSearchParams('a=b&amp;c=d');
+    assert_equals(params.get('a'), 'b');
+    assert_equals(params.get('c'), 'd');
+    assert_equals(params.get('e'), null);
+    params = new URLSearchParams('a=b&amp;c=d&amp;a=e');
+    assert_equals(params.get('a'), 'b');
+    params = new URLSearchParams('=b&amp;c=d');
+    assert_equals(params.get(''), 'b');
+    params = new URLSearchParams('a=&amp;c=d&amp;a=e');
+    assert_equals(params.get('a'), '');
+}, 'Get basics');
+
+test(function() {
+    var params = new URLSearchParams('first=second&amp;third&amp;&amp;');
+    assert_true(params != null, 'constructor returned non-null value.');
+    assert_true(params.has('first'), 'Search params object has name &quot;first&quot;');
+    assert_equals(params.get('first'), 'second', 'Search params object has name &quot;first&quot; with value &quot;second&quot;');
+    assert_equals(params.get('third'), '', 'Search params object has name &quot;third&quot; with the empty value.');
+    assert_equals(params.get('fourth'), null, 'Search params object has no &quot;fourth&quot; name and value.');
+}, 'More get() basics');
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsgetallexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-getall-expected.txt (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-getall-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-getall-expected.txt        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+FAIL getAll() basics Can't find variable: URLSearchParams
+FAIL getAll() multiples Can't find variable: URLSearchParams
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsgetallhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-getall.html (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-getall.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-getall.html        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf8&quot;&gt;
+&lt;link rel=&quot;help&quot; href=&quot;http://url.spec.whatwg.org/#dom-urlsearchparams-getAll&quot;&gt;
+&lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/testharness-extras.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+test(function() {
+    var params = new URLSearchParams('a=b&amp;c=d');
+    assert_array_equals(params.getAll('a'), ['b']);
+    assert_array_equals(params.getAll('c'), ['d']);
+    assert_array_equals(params.getAll('e'), []);
+    params = new URLSearchParams('a=b&amp;c=d&amp;a=e');
+    assert_array_equals(params.getAll('a'), ['b', 'e']);
+    params = new URLSearchParams('=b&amp;c=d');
+    assert_array_equals(params.getAll(''), ['b']);
+    params = new URLSearchParams('a=&amp;c=d&amp;a=e');
+    assert_array_equals(params.getAll('a'), ['', 'e']);
+}, 'getAll() basics');
+
+test(function() {
+    var params = new URLSearchParams('a=1&amp;a=2&amp;a=3&amp;a');
+    assert_true(params.has('a'), 'Search params object has name &quot;a&quot;');
+    var matches = params.getAll('a');
+    assert_true(matches &amp;&amp; matches.length == 4, 'Search params object has values for name &quot;a&quot;');
+    assert_array_equals(matches, ['1', '2', '3', ''], 'Search params object has expected name &quot;a&quot; values');
+    params.set('a', 'one');
+    assert_equals(params.get('a'), 'one', 'Search params object has name &quot;a&quot; with value &quot;one&quot;');
+    var matches = params.getAll('a');
+    assert_true(matches &amp;&amp; matches.length == 1, 'Search params object has values for name &quot;a&quot;');
+    assert_array_equals(matches, ['one'], 'Search params object has expected name &quot;a&quot; values');
+}, 'getAll() multiples');
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamshasexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-has-expected.txt (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-has-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-has-expected.txt        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+FAIL Has basics Can't find variable: URLSearchParams
+FAIL has() following delete() Can't find variable: URLSearchParams
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamshashtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-has.html (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-has.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-has.html        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf8&quot;&gt;
+&lt;link rel=&quot;help&quot; href=&quot;http://url.spec.whatwg.org/#dom-urlsearchparams-has&quot;&gt;
+&lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/testharness-extras.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+test(function() {
+    var params = new URLSearchParams('a=b&amp;c=d');
+    assert_true(params.has('a'));
+    assert_true(params.has('c'));
+    assert_false(params.has('e'));
+    params = new URLSearchParams('a=b&amp;c=d&amp;a=e');
+    assert_true(params.has('a'));
+    params = new URLSearchParams('=b&amp;c=d');
+    assert_true(params.has(''));
+    params = new URLSearchParams('null=a');
+    assert_true(params.has(null));
+}, 'Has basics');
+
+test(function() {
+    var params = new URLSearchParams('a=b&amp;c=d&amp;&amp;');
+    params.append('first', 1);
+    params.append('first', 2);
+    assert_true(params.has('a'), 'Search params object has name &quot;a&quot;');
+    assert_true(params.has('c'), 'Search params object has name &quot;c&quot;');
+    assert_true(params.has('first'), 'Search params object has name &quot;first&quot;');
+    assert_false(params.has('d'), 'Search params object has no name &quot;d&quot;');
+    params.delete('first');
+    assert_false(params.has('first'), 'Search params object has no name &quot;first&quot;');
+}, 'has() following delete()');
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamssetexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-set-expected.txt (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-set-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-set-expected.txt        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+FAIL Set basics Can't find variable: URLSearchParams
+FAIL URLSearchParams.set Can't find variable: URLSearchParams
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamssethtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-set.html (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-set.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-set.html        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf8&quot;&gt;
+&lt;link rel=&quot;help&quot; href=&quot;http://url.spec.whatwg.org/#dom-urlsearchparams-set&quot;&gt;
+&lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/testharness-extras.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+test(function() {
+    var params = new URLSearchParams('a=b&amp;c=d');
+    params.set('a', 'B');
+    assert_equals(params + '', 'a=B&amp;c=d');
+    params = new URLSearchParams('a=b&amp;c=d&amp;a=e');
+    params.set('a', 'B');
+    assert_equals(params + '', 'a=B&amp;c=d')
+    params.set('e', 'f');
+    assert_equals(params + '', 'a=B&amp;c=d&amp;e=f')
+}, 'Set basics');
+
+test(function() {
+    var params = new URLSearchParams('a=1&amp;a=2&amp;a=3');
+    assert_true(params.has('a'), 'Search params object has name &quot;a&quot;');
+    assert_equals(params.get('a'), '1', 'Search params object has name &quot;a&quot; with value &quot;1&quot;');
+    params.set('first', 4);
+    assert_true(params.has('a'), 'Search params object has name &quot;a&quot;');
+    assert_equals(params.get('a'), '1', 'Search params object has name &quot;a&quot; with value &quot;1&quot;');
+    params.set('a', 4);
+    assert_true(params.has('a'), 'Search params object has name &quot;a&quot;');
+    assert_equals(params.get('a'), '4', 'Search params object has name &quot;a&quot; with value &quot;4&quot;');
+}, 'URLSearchParams.set');
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;/html&gt;
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsstringifierexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-stringifier-expected.txt (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-stringifier-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-stringifier-expected.txt        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+
+FAIL Serialize space Can't find variable: URLSearchParams
+FAIL Serialize empty value Can't find variable: URLSearchParams
+FAIL Serialize empty name Can't find variable: URLSearchParams
+FAIL Serialize empty name and value Can't find variable: URLSearchParams
+FAIL Serialize + Can't find variable: URLSearchParams
+FAIL Serialize = Can't find variable: URLSearchParams
+FAIL Serialize &amp; Can't find variable: URLSearchParams
+FAIL Serialize *-._ Can't find variable: URLSearchParams
+FAIL Serialize % Can't find variable: URLSearchParams
+FAIL Serialize \0 Can't find variable: URLSearchParams
+FAIL Serialize 💩 Can't find variable: URLSearchParams
+FAIL URLSearchParams.toString Can't find variable: URLSearchParams
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurlsearchparamsstringifierhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-stringifier.html (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-stringifier.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-stringifier.html        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,123 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf8&quot;&gt;
+&lt;link rel=&quot;help&quot; href=&quot;http://url.spec.whatwg.org/#dom-urlsearchparams-set&quot;&gt;
+&lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/testharness-extras.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+test(function() {
+    var params = new URLSearchParams();
+    params.append('a', 'b c');
+    assert_equals(params + '', 'a=b+c');
+    params.delete('a');
+    params.append('a b', 'c');
+    assert_equals(params + '', 'a+b=c');
+}, 'Serialize space');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('a', '');
+    assert_equals(params + '', 'a=');
+    params.append('a', '');
+    assert_equals(params + '', 'a=&amp;a=');
+    params.append('', 'b');
+    assert_equals(params + '', 'a=&amp;a=&amp;=b');
+    params.append('', '');
+    assert_equals(params + '', 'a=&amp;a=&amp;=b&amp;=');
+    params.append('', '');
+    assert_equals(params + '', 'a=&amp;a=&amp;=b&amp;=&amp;=');
+}, 'Serialize empty value');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('', 'b');
+    assert_equals(params + '', '=b');
+    params.append('', 'b');
+    assert_equals(params + '', '=b&amp;=b');
+}, 'Serialize empty name');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('', '');
+    assert_equals(params + '', '=');
+    params.append('', '');
+    assert_equals(params + '', '=&amp;=');
+}, 'Serialize empty name and value');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('a', 'b+c');
+    assert_equals(params + '', 'a=b%2Bc');
+    params.delete('a');
+    params.append('a+b', 'c');
+    assert_equals(params + '', 'a%2Bb=c');
+}, 'Serialize +');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('=', 'a');
+    assert_equals(params + '', '%3D=a');
+    params.append('b', '=');
+    assert_equals(params + '', '%3D=a&amp;b=%3D');
+}, 'Serialize =');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('&amp;', 'a');
+    assert_equals(params + '', '%26=a');
+    params.append('b', '&amp;');
+    assert_equals(params + '', '%26=a&amp;b=%26');
+}, 'Serialize &amp;');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('a', '*-._');
+    assert_equals(params + '', 'a=*-._');
+    params.delete('a');
+    params.append('*-._', 'c');
+    assert_equals(params + '', '*-._=c');
+}, 'Serialize *-._');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('a', 'b%c');
+    assert_equals(params + '', 'a=b%25c');
+    params.delete('a');
+    params.append('a%b', 'c');
+    assert_equals(params + '', 'a%25b=c');
+}, 'Serialize %');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('a', 'b\0c');
+    assert_equals(params + '', 'a=b%00c');
+    params.delete('a');
+    params.append('a\0b', 'c');
+    assert_equals(params + '', 'a%00b=c');
+}, 'Serialize \\0');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('a', 'b\uD83D\uDCA9c');
+    assert_equals(params + '', 'a=b%F0%9F%92%A9c');
+    params.delete('a');
+    params.append('a\uD83D\uDCA9b', 'c');
+    assert_equals(params + '', 'a%F0%9F%92%A9b=c');
+}, 'Serialize \uD83D\uDCA9');  // Unicode Character 'PILE OF POO' (U+1F4A9)
+
+test(function() {
+    var params;
+    params = new URLSearchParams('a=b&amp;c=d&amp;&amp;e&amp;&amp;');
+    assert_equals(params.toString(), 'a=b&amp;c=d&amp;e=');
+    params = new URLSearchParams('a = b &amp;a=b&amp;c=d%20');
+    assert_equals(params.toString(), 'a+=+b+&amp;a=b&amp;c=d+');
+    // The lone '=' _does_ survive the roundtrip.
+    params = new URLSearchParams('a=&amp;a=b');
+    assert_equals(params.toString(), 'a=&amp;a=b');
+}, 'URLSearchParams.toString');
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;/html&gt;
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurltestdatajson"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/url/urltestdata.json (0 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/urltestdata.json                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/urltestdata.json        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -0,0 +1,4330 @@
</span><ins>+[
+  &quot;# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/segments.js&quot;,
+  {
+    &quot;input&quot;: &quot;http://example\t.\norg&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://user:pass@foo:21/bar;par?b#c&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://user:pass@foo:21/bar;par?b#c&quot;,
+    &quot;origin&quot;: &quot;http://foo:21&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;user&quot;,
+    &quot;password&quot;: &quot;pass&quot;,
+    &quot;host&quot;: &quot;foo:21&quot;,
+    &quot;hostname&quot;: &quot;foo&quot;,
+    &quot;port&quot;: &quot;21&quot;,
+    &quot;pathname&quot;: &quot;/bar;par&quot;,
+    &quot;search&quot;: &quot;?b&quot;,
+    &quot;hash&quot;: &quot;#c&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http:foo.com&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/foo.com&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/foo.com&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;\t   :foo.com   \n&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/:foo.com&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/:foo.com&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot; foo.com  &quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/foo.com&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/foo.com&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;a:\t foo.com&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;a: foo.com&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;a:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot; foo.com&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://f:21/ b ? d # e &quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://f:21/%20b%20?%20d%20# e&quot;,
+    &quot;origin&quot;: &quot;http://f:21&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;f:21&quot;,
+    &quot;hostname&quot;: &quot;f&quot;,
+    &quot;port&quot;: &quot;21&quot;,
+    &quot;pathname&quot;: &quot;/%20b%20&quot;,
+    &quot;search&quot;: &quot;?%20d%20&quot;,
+    &quot;hash&quot;: &quot;# e&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://f:/c&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://f/c&quot;,
+    &quot;origin&quot;: &quot;http://f&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;f&quot;,
+    &quot;hostname&quot;: &quot;f&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/c&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://f:0/c&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://f:0/c&quot;,
+    &quot;origin&quot;: &quot;http://f:0&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;f:0&quot;,
+    &quot;hostname&quot;: &quot;f&quot;,
+    &quot;port&quot;: &quot;0&quot;,
+    &quot;pathname&quot;: &quot;/c&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://f:00000000000000/c&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://f:0/c&quot;,
+    &quot;origin&quot;: &quot;http://f:0&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;f:0&quot;,
+    &quot;hostname&quot;: &quot;f&quot;,
+    &quot;port&quot;: &quot;0&quot;,
+    &quot;pathname&quot;: &quot;/c&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://f:00000000000000000000080/c&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://f/c&quot;,
+    &quot;origin&quot;: &quot;http://f&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;f&quot;,
+    &quot;hostname&quot;: &quot;f&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/c&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://f:b/c&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http://f: /c&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http://f:\n/c&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://f/c&quot;,
+    &quot;origin&quot;: &quot;http://f&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;f&quot;,
+    &quot;hostname&quot;: &quot;f&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/c&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://f:fifty-two/c&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http://f:999999/c&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http://f: 21 / b ? d # e &quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/bar&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;  \t&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/bar&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;:foo.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/:foo.com/&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/:foo.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;:foo.com\\&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/:foo.com/&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/:foo.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;:&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/:&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/:&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;:a&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/:a&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/:a&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;:/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/:/&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/:/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;:\\&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/:/&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/:/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;:#&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/:#&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/:&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;#&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/bar#&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/bar&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;#/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/bar#/&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/bar&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;#/&quot;
+  },
+  {
+    &quot;input&quot;: &quot;#\\&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/bar#\\&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/bar&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;#\\&quot;
+  },
+  {
+    &quot;input&quot;: &quot;#;?&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/bar#;?&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/bar&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;#;?&quot;
+  },
+  {
+    &quot;input&quot;: &quot;?&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/bar?&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/bar&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;:23&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/:23&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/:23&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;/:23&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/:23&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/:23&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;::&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/::&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/::&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;::23&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/::23&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/::23&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;foo://&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;foo:///&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;foo:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://a:b@c:29/d&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://a:b@c:29/d&quot;,
+    &quot;origin&quot;: &quot;http://c:29&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;a&quot;,
+    &quot;password&quot;: &quot;b&quot;,
+    &quot;host&quot;: &quot;c:29&quot;,
+    &quot;hostname&quot;: &quot;c&quot;,
+    &quot;port&quot;: &quot;29&quot;,
+    &quot;pathname&quot;: &quot;/d&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http::@c:29&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/:@c:29&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/:@c:29&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://&amp;a:foo(b]c@d:2/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://&amp;a:foo(b%5Dc@d:2/&quot;,
+    &quot;origin&quot;: &quot;http://d:2&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&amp;a&quot;,
+    &quot;password&quot;: &quot;foo(b%5Dc&quot;,
+    &quot;host&quot;: &quot;d:2&quot;,
+    &quot;hostname&quot;: &quot;d&quot;,
+    &quot;port&quot;: &quot;2&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://::@c@d:2&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://:%3A%40c@d:2/&quot;,
+    &quot;origin&quot;: &quot;http://d:2&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;%3A%40c&quot;,
+    &quot;host&quot;: &quot;d:2&quot;,
+    &quot;hostname&quot;: &quot;d&quot;,
+    &quot;port&quot;: &quot;2&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://foo.com:b@d/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://foo.com:b@d/&quot;,
+    &quot;origin&quot;: &quot;http://d&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;foo.com&quot;,
+    &quot;password&quot;: &quot;b&quot;,
+    &quot;host&quot;: &quot;d&quot;,
+    &quot;hostname&quot;: &quot;d&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://foo.com/\\@&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://foo.com//@&quot;,
+    &quot;origin&quot;: &quot;http://foo.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;foo.com&quot;,
+    &quot;hostname&quot;: &quot;foo.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;//@&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http:\\\\foo.com\\&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://foo.com/&quot;,
+    &quot;origin&quot;: &quot;http://foo.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;foo.com&quot;,
+    &quot;hostname&quot;: &quot;foo.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http:\\\\a\\b:c\\d@foo.com\\&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://a/b:c/d@foo.com/&quot;,
+    &quot;origin&quot;: &quot;http://a&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;a&quot;,
+    &quot;hostname&quot;: &quot;a&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/b:c/d@foo.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;foo:/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;foo:/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;foo:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;foo:/bar.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;foo:/bar.com/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;foo:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/bar.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;foo://///////&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;foo://///////&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;foo:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;///////&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;foo://///////bar.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;foo://///////bar.com/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;foo:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;///////bar.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;foo:////://///&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;foo:////://///&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;foo:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;//://///&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;c:/foo&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;c:/foo&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;c:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;//foo/bar&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://foo/bar&quot;,
+    &quot;origin&quot;: &quot;http://foo&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;foo&quot;,
+    &quot;hostname&quot;: &quot;foo&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/bar&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://foo/path;a??e#f#g&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://foo/path;a??e#f#g&quot;,
+    &quot;origin&quot;: &quot;http://foo&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;foo&quot;,
+    &quot;hostname&quot;: &quot;foo&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/path;a&quot;,
+    &quot;search&quot;: &quot;??e&quot;,
+    &quot;hash&quot;: &quot;#f#g&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://foo/abcd?efgh?ijkl&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://foo/abcd?efgh?ijkl&quot;,
+    &quot;origin&quot;: &quot;http://foo&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;foo&quot;,
+    &quot;hostname&quot;: &quot;foo&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/abcd&quot;,
+    &quot;search&quot;: &quot;?efgh?ijkl&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://foo/abcd#foo?bar&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://foo/abcd#foo?bar&quot;,
+    &quot;origin&quot;: &quot;http://foo&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;foo&quot;,
+    &quot;hostname&quot;: &quot;foo&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/abcd&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;#foo?bar&quot;
+  },
+  {
+    &quot;input&quot;: &quot;[61:24:74]:98&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/[61:24:74]:98&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/[61:24:74]:98&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http:[61:27]/:foo&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/[61:27]/:foo&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/[61:27]/:foo&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://[1::2]:3:4&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http://2001::1&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http://2001::1]&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http://2001::1]:80&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http://[2001::1]&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://[2001::1]/&quot;,
+    &quot;origin&quot;: &quot;http://[2001::1]&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;[2001::1]&quot;,
+    &quot;hostname&quot;: &quot;[2001::1]&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://[2001::1]:80&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://[2001::1]/&quot;,
+    &quot;origin&quot;: &quot;http://[2001::1]&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;[2001::1]&quot;,
+    &quot;hostname&quot;: &quot;[2001::1]&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http:/example.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/example.com/&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;ftp:/example.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;ftp://example.com/&quot;,
+    &quot;origin&quot;: &quot;ftp://example.com&quot;,
+    &quot;protocol&quot;: &quot;ftp:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;https:/example.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;https://example.com/&quot;,
+    &quot;origin&quot;: &quot;https://example.com&quot;,
+    &quot;protocol&quot;: &quot;https:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;madeupscheme:/example.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;madeupscheme:/example.com/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;madeupscheme:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;file:/example.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;file:///example.com/&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;ftps:/example.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;ftps:/example.com/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;ftps:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;gopher:/example.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;gopher://example.com/&quot;,
+    &quot;origin&quot;: &quot;gopher://example.com&quot;,
+    &quot;protocol&quot;: &quot;gopher:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;ws:/example.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;ws://example.com/&quot;,
+    &quot;origin&quot;: &quot;ws://example.com&quot;,
+    &quot;protocol&quot;: &quot;ws:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;wss:/example.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;wss://example.com/&quot;,
+    &quot;origin&quot;: &quot;wss://example.com&quot;,
+    &quot;protocol&quot;: &quot;wss:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;data:/example.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;data:/example.com/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;data:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;javascript:/example.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;javascript:/example.com/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;javascript:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;mailto:/example.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;mailto:/example.com/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;mailto:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http:example.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/example.com/&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;ftp:example.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;ftp://example.com/&quot;,
+    &quot;origin&quot;: &quot;ftp://example.com&quot;,
+    &quot;protocol&quot;: &quot;ftp:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;https:example.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;https://example.com/&quot;,
+    &quot;origin&quot;: &quot;https://example.com&quot;,
+    &quot;protocol&quot;: &quot;https:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;madeupscheme:example.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;madeupscheme:example.com/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;madeupscheme:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;ftps:example.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;ftps:example.com/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;ftps:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;gopher:example.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;gopher://example.com/&quot;,
+    &quot;origin&quot;: &quot;gopher://example.com&quot;,
+    &quot;protocol&quot;: &quot;gopher:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;ws:example.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;ws://example.com/&quot;,
+    &quot;origin&quot;: &quot;ws://example.com&quot;,
+    &quot;protocol&quot;: &quot;ws:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;wss:example.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;wss://example.com/&quot;,
+    &quot;origin&quot;: &quot;wss://example.com&quot;,
+    &quot;protocol&quot;: &quot;wss:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;data:example.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;data:example.com/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;data:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;javascript:example.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;javascript:example.com/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;javascript:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;mailto:example.com/&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;mailto:example.com/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;mailto:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;/a/b/c&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/a/b/c&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/a/b/c&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;/a/ /c&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/a/%20/c&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/a/%20/c&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;/a%2fc&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/a%2fc&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/a%2fc&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;/a/%2f/c&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/a/%2f/c&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/a/%2f/c&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;#β&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/bar#β&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/bar&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;#β&quot;
+  },
+  {
+    &quot;input&quot;: &quot;data:text/html,test#test&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;data:text/html,test#test&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;data:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;text/html,test&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;#test&quot;
+  },
+  {
+    &quot;input&quot;: &quot;tel:1234567890&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;tel:1234567890&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;tel:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;1234567890&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  &quot;# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/file.html&quot;,
+  {
+    &quot;input&quot;: &quot;file:c:\\foo\\bar.html&quot;,
+    &quot;base&quot;: &quot;file:///tmp/mock/path&quot;,
+    &quot;href&quot;: &quot;file:///c:/foo/bar.html&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/c:/foo/bar.html&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;  File:c|////foo\\bar.html&quot;,
+    &quot;base&quot;: &quot;file:///tmp/mock/path&quot;,
+    &quot;href&quot;: &quot;file:///c:////foo/bar.html&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/c:////foo/bar.html&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;C|/foo/bar&quot;,
+    &quot;base&quot;: &quot;file:///tmp/mock/path&quot;,
+    &quot;href&quot;: &quot;file:///C:/foo/bar&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/C:/foo/bar&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;/C|\\foo\\bar&quot;,
+    &quot;base&quot;: &quot;file:///tmp/mock/path&quot;,
+    &quot;href&quot;: &quot;file:///C:/foo/bar&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/C:/foo/bar&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;//C|/foo/bar&quot;,
+    &quot;base&quot;: &quot;file:///tmp/mock/path&quot;,
+    &quot;href&quot;: &quot;file:///C:/foo/bar&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/C:/foo/bar&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;//server/file&quot;,
+    &quot;base&quot;: &quot;file:///tmp/mock/path&quot;,
+    &quot;href&quot;: &quot;file://server/file&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;server&quot;,
+    &quot;hostname&quot;: &quot;server&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/file&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;\\\\server\\file&quot;,
+    &quot;base&quot;: &quot;file:///tmp/mock/path&quot;,
+    &quot;href&quot;: &quot;file://server/file&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;server&quot;,
+    &quot;hostname&quot;: &quot;server&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/file&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;/\\server/file&quot;,
+    &quot;base&quot;: &quot;file:///tmp/mock/path&quot;,
+    &quot;href&quot;: &quot;file://server/file&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;server&quot;,
+    &quot;hostname&quot;: &quot;server&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/file&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;file:///foo/bar.txt&quot;,
+    &quot;base&quot;: &quot;file:///tmp/mock/path&quot;,
+    &quot;href&quot;: &quot;file:///foo/bar.txt&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/bar.txt&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;file:///home/me&quot;,
+    &quot;base&quot;: &quot;file:///tmp/mock/path&quot;,
+    &quot;href&quot;: &quot;file:///home/me&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/home/me&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;//&quot;,
+    &quot;base&quot;: &quot;file:///tmp/mock/path&quot;,
+    &quot;href&quot;: &quot;file:///&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;///&quot;,
+    &quot;base&quot;: &quot;file:///tmp/mock/path&quot;,
+    &quot;href&quot;: &quot;file:///&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;///test&quot;,
+    &quot;base&quot;: &quot;file:///tmp/mock/path&quot;,
+    &quot;href&quot;: &quot;file:///test&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/test&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;file://test&quot;,
+    &quot;base&quot;: &quot;file:///tmp/mock/path&quot;,
+    &quot;href&quot;: &quot;file://test/&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;test&quot;,
+    &quot;hostname&quot;: &quot;test&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;file://localhost&quot;,
+    &quot;base&quot;: &quot;file:///tmp/mock/path&quot;,
+    &quot;href&quot;: &quot;file:///&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;file://localhost/&quot;,
+    &quot;base&quot;: &quot;file:///tmp/mock/path&quot;,
+    &quot;href&quot;: &quot;file:///&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;file://localhost/test&quot;,
+    &quot;base&quot;: &quot;file:///tmp/mock/path&quot;,
+    &quot;href&quot;: &quot;file:///test&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/test&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;test&quot;,
+    &quot;base&quot;: &quot;file:///tmp/mock/path&quot;,
+    &quot;href&quot;: &quot;file:///tmp/mock/test&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/tmp/mock/test&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;file:test&quot;,
+    &quot;base&quot;: &quot;file:///tmp/mock/path&quot;,
+    &quot;href&quot;: &quot;file:///tmp/mock/test&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/tmp/mock/test&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  &quot;# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/path.js&quot;,
+  {
+    &quot;input&quot;: &quot;http://example.com/././foo&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/foo&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/./.foo&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/.foo&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/.foo&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/foo/.&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/foo/&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/foo/./&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/foo/&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/foo/bar/..&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/foo/&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/foo/bar/../&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/foo/&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/foo/..bar&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/foo/..bar&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/..bar&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/foo/bar/../ton&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/foo/ton&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/ton&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/foo/bar/../ton/../../a&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/a&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/a&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/foo/../../..&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/foo/../../../ton&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/ton&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/ton&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/foo/%2e&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/foo/&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/foo/%2e%2&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/foo/.%2&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/.%2&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/..bar&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/..bar&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com////../..&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com//&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;//&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/foo/bar//../..&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/foo/&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/foo/bar//..&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/foo/bar/&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/bar/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/foo&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/foo&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/%20foo&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/%20foo&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/%20foo&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/foo%&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/foo%&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo%&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/foo%2&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/foo%2&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo%2&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/foo%2zbar&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/foo%2zbar&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo%2zbar&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/foo%2©zbar&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/foo%2%C3%82%C2%A9zbar&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo%2%C3%82%C2%A9zbar&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/foo%41%7a&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/foo%41%7a&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo%41%7a&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/foo\t\u0091%91&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/foo%C2%91%91&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo%C2%91%91&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/foo%00%51&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/foo%00%51&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo%00%51&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/(%28:%3A%29)&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/(%28:%3A%29)&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/(%28:%3A%29)&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/%3A%3a%3C%3c&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/%3A%3a%3C%3c&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/%3A%3a%3C%3c&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/foo\tbar&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/foobar&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foobar&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com\\\\foo\\\\bar&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com//foo//bar&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;//foo//bar&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/%7Ffp3%3Eju%3Dduvgw%3Dd&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/@asdf%40&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/@asdf%40&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/@asdf%40&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/你好你好&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/‥/foo&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/%E2%80%A5/foo&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/%E2%80%A5/foo&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com//foo&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/%EF%BB%BF/foo&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/%EF%BB%BF/foo&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example.com/‮/foo/‭/bar&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/%E2%80%AE/foo/%E2%80%AD/bar&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/%E2%80%AE/foo/%E2%80%AD/bar&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  &quot;# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/relative.js&quot;,
+  {
+    &quot;input&quot;: &quot;http://www.google.com/foo?bar=baz#&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://www.google.com/foo?bar=baz#&quot;,
+    &quot;origin&quot;: &quot;http://www.google.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.google.com&quot;,
+    &quot;hostname&quot;: &quot;www.google.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo&quot;,
+    &quot;search&quot;: &quot;?bar=baz&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://www.google.com/foo?bar=baz# »&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://www.google.com/foo?bar=baz# »&quot;,
+    &quot;origin&quot;: &quot;http://www.google.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.google.com&quot;,
+    &quot;hostname&quot;: &quot;www.google.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo&quot;,
+    &quot;search&quot;: &quot;?bar=baz&quot;,
+    &quot;hash&quot;: &quot;# »&quot;
+  },
+  {
+    &quot;input&quot;: &quot;data:test# »&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;data:test# »&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;data:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;test&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;# »&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://[www.google.com]/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http://www.google.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://www.google.com/&quot;,
+    &quot;origin&quot;: &quot;http://www.google.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.google.com&quot;,
+    &quot;hostname&quot;: &quot;www.google.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://192.0x00A80001&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://192.168.0.1/&quot;,
+    &quot;origin&quot;: &quot;http://192.168.0.1&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;192.168.0.1&quot;,
+    &quot;hostname&quot;: &quot;192.168.0.1&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://www/foo%2Ehtml&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://www/foo.html&quot;,
+    &quot;origin&quot;: &quot;http://www&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www&quot;,
+    &quot;hostname&quot;: &quot;www&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo.html&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://www/foo/%2E/html&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://www/foo/html&quot;,
+    &quot;origin&quot;: &quot;http://www&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www&quot;,
+    &quot;hostname&quot;: &quot;www&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/html&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://user:pass@/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http://%25DOMAIN:foobar@foodomain.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://%25DOMAIN:foobar@foodomain.com/&quot;,
+    &quot;origin&quot;: &quot;http://foodomain.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;%25DOMAIN&quot;,
+    &quot;password&quot;: &quot;foobar&quot;,
+    &quot;host&quot;: &quot;foodomain.com&quot;,
+    &quot;hostname&quot;: &quot;foodomain.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http:\\\\www.google.com\\foo&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://www.google.com/foo&quot;,
+    &quot;origin&quot;: &quot;http://www.google.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.google.com&quot;,
+    &quot;hostname&quot;: &quot;www.google.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://foo:80/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://foo/&quot;,
+    &quot;origin&quot;: &quot;http://foo&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;foo&quot;,
+    &quot;hostname&quot;: &quot;foo&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://foo:81/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://foo:81/&quot;,
+    &quot;origin&quot;: &quot;http://foo:81&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;foo:81&quot;,
+    &quot;hostname&quot;: &quot;foo&quot;,
+    &quot;port&quot;: &quot;81&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;httpa://foo:80/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;httpa://foo:80/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;httpa:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;foo:80&quot;,
+    &quot;hostname&quot;: &quot;foo&quot;,
+    &quot;port&quot;: &quot;80&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://foo:-80/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;https://foo:443/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;https://foo/&quot;,
+    &quot;origin&quot;: &quot;https://foo&quot;,
+    &quot;protocol&quot;: &quot;https:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;foo&quot;,
+    &quot;hostname&quot;: &quot;foo&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;https://foo:80/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;https://foo:80/&quot;,
+    &quot;origin&quot;: &quot;https://foo:80&quot;,
+    &quot;protocol&quot;: &quot;https:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;foo:80&quot;,
+    &quot;hostname&quot;: &quot;foo&quot;,
+    &quot;port&quot;: &quot;80&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;ftp://foo:21/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;ftp://foo/&quot;,
+    &quot;origin&quot;: &quot;ftp://foo&quot;,
+    &quot;protocol&quot;: &quot;ftp:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;foo&quot;,
+    &quot;hostname&quot;: &quot;foo&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;ftp://foo:80/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;ftp://foo:80/&quot;,
+    &quot;origin&quot;: &quot;ftp://foo:80&quot;,
+    &quot;protocol&quot;: &quot;ftp:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;foo:80&quot;,
+    &quot;hostname&quot;: &quot;foo&quot;,
+    &quot;port&quot;: &quot;80&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;gopher://foo:70/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;gopher://foo/&quot;,
+    &quot;origin&quot;: &quot;gopher://foo&quot;,
+    &quot;protocol&quot;: &quot;gopher:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;foo&quot;,
+    &quot;hostname&quot;: &quot;foo&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;gopher://foo:443/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;gopher://foo:443/&quot;,
+    &quot;origin&quot;: &quot;gopher://foo:443&quot;,
+    &quot;protocol&quot;: &quot;gopher:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;foo:443&quot;,
+    &quot;hostname&quot;: &quot;foo&quot;,
+    &quot;port&quot;: &quot;443&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;ws://foo:80/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;ws://foo/&quot;,
+    &quot;origin&quot;: &quot;ws://foo&quot;,
+    &quot;protocol&quot;: &quot;ws:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;foo&quot;,
+    &quot;hostname&quot;: &quot;foo&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;ws://foo:81/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;ws://foo:81/&quot;,
+    &quot;origin&quot;: &quot;ws://foo:81&quot;,
+    &quot;protocol&quot;: &quot;ws:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;foo:81&quot;,
+    &quot;hostname&quot;: &quot;foo&quot;,
+    &quot;port&quot;: &quot;81&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;ws://foo:443/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;ws://foo:443/&quot;,
+    &quot;origin&quot;: &quot;ws://foo:443&quot;,
+    &quot;protocol&quot;: &quot;ws:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;foo:443&quot;,
+    &quot;hostname&quot;: &quot;foo&quot;,
+    &quot;port&quot;: &quot;443&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;ws://foo:815/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;ws://foo:815/&quot;,
+    &quot;origin&quot;: &quot;ws://foo:815&quot;,
+    &quot;protocol&quot;: &quot;ws:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;foo:815&quot;,
+    &quot;hostname&quot;: &quot;foo&quot;,
+    &quot;port&quot;: &quot;815&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;wss://foo:80/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;wss://foo:80/&quot;,
+    &quot;origin&quot;: &quot;wss://foo:80&quot;,
+    &quot;protocol&quot;: &quot;wss:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;foo:80&quot;,
+    &quot;hostname&quot;: &quot;foo&quot;,
+    &quot;port&quot;: &quot;80&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;wss://foo:81/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;wss://foo:81/&quot;,
+    &quot;origin&quot;: &quot;wss://foo:81&quot;,
+    &quot;protocol&quot;: &quot;wss:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;foo:81&quot;,
+    &quot;hostname&quot;: &quot;foo&quot;,
+    &quot;port&quot;: &quot;81&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;wss://foo:443/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;wss://foo/&quot;,
+    &quot;origin&quot;: &quot;wss://foo&quot;,
+    &quot;protocol&quot;: &quot;wss:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;foo&quot;,
+    &quot;hostname&quot;: &quot;foo&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;wss://foo:815/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;wss://foo:815/&quot;,
+    &quot;origin&quot;: &quot;wss://foo:815&quot;,
+    &quot;protocol&quot;: &quot;wss:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;foo:815&quot;,
+    &quot;hostname&quot;: &quot;foo&quot;,
+    &quot;port&quot;: &quot;815&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http:/example.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;ftp:/example.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;ftp://example.com/&quot;,
+    &quot;origin&quot;: &quot;ftp://example.com&quot;,
+    &quot;protocol&quot;: &quot;ftp:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;https:/example.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;https://example.com/&quot;,
+    &quot;origin&quot;: &quot;https://example.com&quot;,
+    &quot;protocol&quot;: &quot;https:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;madeupscheme:/example.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;madeupscheme:/example.com/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;madeupscheme:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;file:/example.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;file:///example.com/&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;ftps:/example.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;ftps:/example.com/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;ftps:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;gopher:/example.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;gopher://example.com/&quot;,
+    &quot;origin&quot;: &quot;gopher://example.com&quot;,
+    &quot;protocol&quot;: &quot;gopher:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;ws:/example.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;ws://example.com/&quot;,
+    &quot;origin&quot;: &quot;ws://example.com&quot;,
+    &quot;protocol&quot;: &quot;ws:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;wss:/example.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;wss://example.com/&quot;,
+    &quot;origin&quot;: &quot;wss://example.com&quot;,
+    &quot;protocol&quot;: &quot;wss:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;data:/example.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;data:/example.com/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;data:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;javascript:/example.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;javascript:/example.com/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;javascript:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;mailto:/example.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;mailto:/example.com/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;mailto:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http:example.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://example.com/&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;ftp:example.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;ftp://example.com/&quot;,
+    &quot;origin&quot;: &quot;ftp://example.com&quot;,
+    &quot;protocol&quot;: &quot;ftp:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;https:example.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;https://example.com/&quot;,
+    &quot;origin&quot;: &quot;https://example.com&quot;,
+    &quot;protocol&quot;: &quot;https:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;madeupscheme:example.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;madeupscheme:example.com/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;madeupscheme:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;ftps:example.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;ftps:example.com/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;ftps:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;gopher:example.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;gopher://example.com/&quot;,
+    &quot;origin&quot;: &quot;gopher://example.com&quot;,
+    &quot;protocol&quot;: &quot;gopher:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;ws:example.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;ws://example.com/&quot;,
+    &quot;origin&quot;: &quot;ws://example.com&quot;,
+    &quot;protocol&quot;: &quot;ws:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;wss:example.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;wss://example.com/&quot;,
+    &quot;origin&quot;: &quot;wss://example.com&quot;,
+    &quot;protocol&quot;: &quot;wss:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;data:example.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;data:example.com/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;data:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;javascript:example.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;javascript:example.com/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;javascript:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;mailto:example.com/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;mailto:example.com/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;mailto:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;example.com/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  &quot;# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/segments-userinfo-vs-host.html&quot;,
+  {
+    &quot;input&quot;: &quot;http:@www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://www.example.com/&quot;,
+    &quot;origin&quot;: &quot;http://www.example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.example.com&quot;,
+    &quot;hostname&quot;: &quot;www.example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http:/@www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://www.example.com/&quot;,
+    &quot;origin&quot;: &quot;http://www.example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.example.com&quot;,
+    &quot;hostname&quot;: &quot;www.example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://@www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://www.example.com/&quot;,
+    &quot;origin&quot;: &quot;http://www.example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.example.com&quot;,
+    &quot;hostname&quot;: &quot;www.example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http:a:b@www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://a:b@www.example.com/&quot;,
+    &quot;origin&quot;: &quot;http://www.example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;a&quot;,
+    &quot;password&quot;: &quot;b&quot;,
+    &quot;host&quot;: &quot;www.example.com&quot;,
+    &quot;hostname&quot;: &quot;www.example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http:/a:b@www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://a:b@www.example.com/&quot;,
+    &quot;origin&quot;: &quot;http://www.example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;a&quot;,
+    &quot;password&quot;: &quot;b&quot;,
+    &quot;host&quot;: &quot;www.example.com&quot;,
+    &quot;hostname&quot;: &quot;www.example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://a:b@www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://a:b@www.example.com/&quot;,
+    &quot;origin&quot;: &quot;http://www.example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;a&quot;,
+    &quot;password&quot;: &quot;b&quot;,
+    &quot;host&quot;: &quot;www.example.com&quot;,
+    &quot;hostname&quot;: &quot;www.example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://@pple.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://pple.com/&quot;,
+    &quot;origin&quot;: &quot;http://pple.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;pple.com&quot;,
+    &quot;hostname&quot;: &quot;pple.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http::b@www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://:b@www.example.com/&quot;,
+    &quot;origin&quot;: &quot;http://www.example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;b&quot;,
+    &quot;host&quot;: &quot;www.example.com&quot;,
+    &quot;hostname&quot;: &quot;www.example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http:/:b@www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://:b@www.example.com/&quot;,
+    &quot;origin&quot;: &quot;http://www.example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;b&quot;,
+    &quot;host&quot;: &quot;www.example.com&quot;,
+    &quot;hostname&quot;: &quot;www.example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://:b@www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://:b@www.example.com/&quot;,
+    &quot;origin&quot;: &quot;http://www.example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;b&quot;,
+    &quot;host&quot;: &quot;www.example.com&quot;,
+    &quot;hostname&quot;: &quot;www.example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http:/:@/www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http://user@/www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http:@/www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http:/@/www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http://@/www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;https:@/www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http:a:b@/www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http:/a:b@/www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http://a:b@/www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http::@/www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http:a:@www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://a:@www.example.com/&quot;,
+    &quot;origin&quot;: &quot;http://www.example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;a&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.example.com&quot;,
+    &quot;hostname&quot;: &quot;www.example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http:/a:@www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://a:@www.example.com/&quot;,
+    &quot;origin&quot;: &quot;http://www.example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;a&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.example.com&quot;,
+    &quot;hostname&quot;: &quot;www.example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://a:@www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://a:@www.example.com/&quot;,
+    &quot;origin&quot;: &quot;http://www.example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;a&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.example.com&quot;,
+    &quot;hostname&quot;: &quot;www.example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://www.@pple.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://www.@pple.com/&quot;,
+    &quot;origin&quot;: &quot;http://pple.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;www.&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;pple.com&quot;,
+    &quot;hostname&quot;: &quot;pple.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http:@:www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http:/@:www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http://@:www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http://:@www.example.com&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://:@www.example.com/&quot;,
+    &quot;origin&quot;: &quot;http://www.example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.example.com&quot;,
+    &quot;hostname&quot;: &quot;www.example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  &quot;# Others&quot;,
+  {
+    &quot;input&quot;: &quot;/&quot;,
+    &quot;base&quot;: &quot;http://www.example.com/test&quot;,
+    &quot;href&quot;: &quot;http://www.example.com/&quot;,
+    &quot;origin&quot;: &quot;http://www.example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.example.com&quot;,
+    &quot;hostname&quot;: &quot;www.example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;/test.txt&quot;,
+    &quot;base&quot;: &quot;http://www.example.com/test&quot;,
+    &quot;href&quot;: &quot;http://www.example.com/test.txt&quot;,
+    &quot;origin&quot;: &quot;http://www.example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.example.com&quot;,
+    &quot;hostname&quot;: &quot;www.example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/test.txt&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;.&quot;,
+    &quot;base&quot;: &quot;http://www.example.com/test&quot;,
+    &quot;href&quot;: &quot;http://www.example.com/&quot;,
+    &quot;origin&quot;: &quot;http://www.example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.example.com&quot;,
+    &quot;hostname&quot;: &quot;www.example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;..&quot;,
+    &quot;base&quot;: &quot;http://www.example.com/test&quot;,
+    &quot;href&quot;: &quot;http://www.example.com/&quot;,
+    &quot;origin&quot;: &quot;http://www.example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.example.com&quot;,
+    &quot;hostname&quot;: &quot;www.example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;test.txt&quot;,
+    &quot;base&quot;: &quot;http://www.example.com/test&quot;,
+    &quot;href&quot;: &quot;http://www.example.com/test.txt&quot;,
+    &quot;origin&quot;: &quot;http://www.example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.example.com&quot;,
+    &quot;hostname&quot;: &quot;www.example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/test.txt&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;./test.txt&quot;,
+    &quot;base&quot;: &quot;http://www.example.com/test&quot;,
+    &quot;href&quot;: &quot;http://www.example.com/test.txt&quot;,
+    &quot;origin&quot;: &quot;http://www.example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.example.com&quot;,
+    &quot;hostname&quot;: &quot;www.example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/test.txt&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;../test.txt&quot;,
+    &quot;base&quot;: &quot;http://www.example.com/test&quot;,
+    &quot;href&quot;: &quot;http://www.example.com/test.txt&quot;,
+    &quot;origin&quot;: &quot;http://www.example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.example.com&quot;,
+    &quot;hostname&quot;: &quot;www.example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/test.txt&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;../aaa/test.txt&quot;,
+    &quot;base&quot;: &quot;http://www.example.com/test&quot;,
+    &quot;href&quot;: &quot;http://www.example.com/aaa/test.txt&quot;,
+    &quot;origin&quot;: &quot;http://www.example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.example.com&quot;,
+    &quot;hostname&quot;: &quot;www.example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/aaa/test.txt&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;../../test.txt&quot;,
+    &quot;base&quot;: &quot;http://www.example.com/test&quot;,
+    &quot;href&quot;: &quot;http://www.example.com/test.txt&quot;,
+    &quot;origin&quot;: &quot;http://www.example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.example.com&quot;,
+    &quot;hostname&quot;: &quot;www.example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/test.txt&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;中/test.txt&quot;,
+    &quot;base&quot;: &quot;http://www.example.com/test&quot;,
+    &quot;href&quot;: &quot;http://www.example.com/%E4%B8%AD/test.txt&quot;,
+    &quot;origin&quot;: &quot;http://www.example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.example.com&quot;,
+    &quot;hostname&quot;: &quot;www.example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/%E4%B8%AD/test.txt&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://www.example2.com&quot;,
+    &quot;base&quot;: &quot;http://www.example.com/test&quot;,
+    &quot;href&quot;: &quot;http://www.example2.com/&quot;,
+    &quot;origin&quot;: &quot;http://www.example2.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.example2.com&quot;,
+    &quot;hostname&quot;: &quot;www.example2.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;//www.example2.com&quot;,
+    &quot;base&quot;: &quot;http://www.example.com/test&quot;,
+    &quot;href&quot;: &quot;http://www.example2.com/&quot;,
+    &quot;origin&quot;: &quot;http://www.example2.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.example2.com&quot;,
+    &quot;hostname&quot;: &quot;www.example2.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;file:...&quot;,
+    &quot;base&quot;: &quot;http://www.example.com/test&quot;,
+    &quot;href&quot;: &quot;file:///...&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/...&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;file:..&quot;,
+    &quot;base&quot;: &quot;http://www.example.com/test&quot;,
+    &quot;href&quot;: &quot;file:///&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;file:a&quot;,
+    &quot;base&quot;: &quot;http://www.example.com/test&quot;,
+    &quot;href&quot;: &quot;file:///a&quot;,
+    &quot;protocol&quot;: &quot;file:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/a&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  &quot;# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/host.html&quot;,
+  &quot;Basic canonicalization, uppercase should be converted to lowercase&quot;,
+  {
+    &quot;input&quot;: &quot;http://ExAmPlE.CoM&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;href&quot;: &quot;http://example.com/&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://example example.com&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http://Goo%20 goo%7C|.com&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http://[]&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http://[:]&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;failure&quot;: true
+  },
+  &quot;U+3000 is mapped to U+0020 (space) which is disallowed&quot;,
+  {
+    &quot;input&quot;: &quot;http://GOO\u00a0\u3000goo.com&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;failure&quot;: true
+  },
+  &quot;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&quot;,
+  {
+    &quot;input&quot;: &quot;http://GOO\u200b\u2060\ufeffgoo.com&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;href&quot;: &quot;http://googoo.com/&quot;,
+    &quot;origin&quot;: &quot;http://googoo.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;googoo.com&quot;,
+    &quot;hostname&quot;: &quot;googoo.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  &quot;Ideographic full stop (full-width period for Chinese, etc.) should be treated as a dot. U+3002 is mapped to U+002E (dot)&quot;,
+  {
+    &quot;input&quot;: &quot;http://www.foo。bar.com&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;href&quot;: &quot;http://www.foo.bar.com/&quot;,
+    &quot;origin&quot;: &quot;http://www.foo.bar.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;www.foo.bar.com&quot;,
+    &quot;hostname&quot;: &quot;www.foo.bar.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  &quot;Invalid unicode characters should fail... U+FDD0 is disallowed; %ef%b7%90 is U+FDD0&quot;,
+  {
+    &quot;input&quot;: &quot;http://\ufdd0zyx.com&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;failure&quot;: true
+  },
+  &quot;This is the same as previous but escaped&quot;,
+  {
+    &quot;input&quot;: &quot;http://%ef%b7%90zyx.com&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;failure&quot;: true
+  },
+  &quot;Test name prepping, fullwidth input should be converted to ASCII and NOT IDN-ized. This is 'Go' in fullwidth UTF-8/UTF-16.&quot;,
+  {
+    &quot;input&quot;: &quot;http://Go.com&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;href&quot;: &quot;http://go.com/&quot;,
+    &quot;origin&quot;: &quot;http://go.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;go.com&quot;,
+    &quot;hostname&quot;: &quot;go.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  &quot;URL spec forbids the following. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24257&quot;,
+  {
+    &quot;input&quot;: &quot;http://%41.com&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http://%ef%bc%85%ef%bc%94%ef%bc%91.com&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;failure&quot;: true
+  },
+  &quot;...%00 in fullwidth should fail (also as escaped UTF-8 input)&quot;,
+  {
+    &quot;input&quot;: &quot;http://%00.com&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http://%ef%bc%85%ef%bc%90%ef%bc%90.com&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;failure&quot;: true
+  },
+  &quot;Basic IDN support, UTF-8 and UTF-16 input should be converted to IDN&quot;,
+  {
+    &quot;input&quot;: &quot;http://你好你好&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;href&quot;: &quot;http://xn--6qqa088eba/&quot;,
+    &quot;origin&quot;: &quot;http://你好你好&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;xn--6qqa088eba&quot;,
+    &quot;hostname&quot;: &quot;xn--6qqa088eba&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  &quot;Invalid escaped characters should fail and the percents should be escaped. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24191&quot;,
+  {
+    &quot;input&quot;: &quot;http://%zz%66%a.com&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;failure&quot;: true
+  },
+  &quot;If we get an invalid character that has been escaped.&quot;,
+  {
+    &quot;input&quot;: &quot;http://%25&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;http://hello%00&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;failure&quot;: true
+  },
+  &quot;Escaped numbers should be treated like IP addresses if they are.&quot;,
+  {
+    &quot;input&quot;: &quot;http://%30%78%63%30%2e%30%32%35%30.01&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;href&quot;: &quot;http://192.168.0.1/&quot;,
+    &quot;origin&quot;: &quot;http://192.168.0.1&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;192.168.0.1&quot;,
+    &quot;hostname&quot;: &quot;192.168.0.1&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://%30%78%63%30%2e%30%32%35%30.01%2e&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;href&quot;: &quot;http://192.168.0.1/&quot;,
+    &quot;origin&quot;: &quot;http://192.168.0.1&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;192.168.0.1&quot;,
+    &quot;hostname&quot;: &quot;192.168.0.1&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://192.168.0.257&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;failure&quot;: true
+  },
+  &quot;Invalid escaping should trigger the regular host error handling&quot;,
+  {
+    &quot;input&quot;: &quot;http://%3g%78%63%30%2e%30%32%35%30%2E.01&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;failure&quot;: true
+  },
+  &quot;Something that isn't exactly an IP should get treated as a host and spaces escaped&quot;,
+  {
+    &quot;input&quot;: &quot;http://192.168.0.1 hello&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;failure&quot;: true
+  },
+  &quot;Fullwidth and escaped UTF-8 fullwidth should still be treated as IP&quot;,
+  {
+    &quot;input&quot;: &quot;http://0Xc0.0250.01&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;href&quot;: &quot;http://192.168.0.1/&quot;,
+    &quot;origin&quot;: &quot;http://192.168.0.1&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;192.168.0.1&quot;,
+    &quot;hostname&quot;: &quot;192.168.0.1&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  &quot;Broken IPv6&quot;,
+  {
+    &quot;input&quot;: &quot;http://[google.com]&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;failure&quot;: true
+  },
+  &quot;Misc Unicode&quot;,
+  {
+    &quot;input&quot;: &quot;http://foo:💩@example.com/bar&quot;,
+    &quot;base&quot;: &quot;http://other.com/&quot;,
+    &quot;href&quot;: &quot;http://foo:%F0%9F%92%A9@example.com/bar&quot;,
+    &quot;origin&quot;: &quot;http://example.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;foo&quot;,
+    &quot;password&quot;: &quot;%F0%9F%92%A9&quot;,
+    &quot;host&quot;: &quot;example.com&quot;,
+    &quot;hostname&quot;: &quot;example.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/bar&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  &quot;# resolving a fragment against any scheme succeeds&quot;,
+  {
+    &quot;input&quot;: &quot;#&quot;,
+    &quot;base&quot;: &quot;test:test&quot;,
+    &quot;href&quot;: &quot;test:test#&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;test:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;test&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;#x&quot;,
+    &quot;base&quot;: &quot;mailto:x@x.com&quot;,
+    &quot;href&quot;: &quot;mailto:x@x.com#x&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;mailto:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;x@x.com&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;#x&quot;
+  },
+  {
+    &quot;input&quot;: &quot;#x&quot;,
+    &quot;base&quot;: &quot;data:,&quot;,
+    &quot;href&quot;: &quot;data:,#x&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;data:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;,&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;#x&quot;
+  },
+  {
+    &quot;input&quot;: &quot;#x&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;about:blank#x&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;about:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;blank&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;#x&quot;
+  },
+  {
+    &quot;input&quot;: &quot;#&quot;,
+    &quot;base&quot;: &quot;test:test?test&quot;,
+    &quot;href&quot;: &quot;test:test?test#&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;test:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;test&quot;,
+    &quot;search&quot;: &quot;?test&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  &quot;# multiple @ in authority state&quot;,
+  {
+    &quot;input&quot;: &quot;https://@test@test@example:800/&quot;,
+    &quot;base&quot;: &quot;http://doesnotmatter/&quot;,
+    &quot;href&quot;: &quot;https://%40test%40test@example:800/&quot;,
+    &quot;origin&quot;: &quot;https://example:800&quot;,
+    &quot;protocol&quot;: &quot;https:&quot;,
+    &quot;username&quot;: &quot;%40test%40test&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example:800&quot;,
+    &quot;hostname&quot;: &quot;example&quot;,
+    &quot;port&quot;: &quot;800&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;https://@@@example&quot;,
+    &quot;base&quot;: &quot;http://doesnotmatter/&quot;,
+    &quot;href&quot;: &quot;https://%40%40@example/&quot;,
+    &quot;origin&quot;: &quot;https://example&quot;,
+    &quot;protocol&quot;: &quot;https:&quot;,
+    &quot;username&quot;: &quot;%40%40&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example&quot;,
+    &quot;hostname&quot;: &quot;example&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  &quot;non-az-09 characters&quot;,
+  {
+    &quot;input&quot;: &quot;http://`{}:`{}@h/`{}?`{}&quot;,
+    &quot;base&quot;: &quot;http://doesnotmatter/&quot;,
+    &quot;href&quot;: &quot;http://%60%7B%7D:%60%7B%7D@h/%60%7B%7D?`{}&quot;,
+    &quot;origin&quot;: &quot;http://h&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;%60%7B%7D&quot;,
+    &quot;password&quot;: &quot;%60%7B%7D&quot;,
+    &quot;host&quot;: &quot;h&quot;,
+    &quot;hostname&quot;: &quot;h&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/%60%7B%7D&quot;,
+    &quot;search&quot;: &quot;?`{}&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  &quot;# Credentials in base&quot;,
+  {
+    &quot;input&quot;: &quot;/some/path&quot;,
+    &quot;base&quot;: &quot;http://user@example.org/smth&quot;,
+    &quot;href&quot;: &quot;http://user@example.org/some/path&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;user&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/some/path&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;&quot;,
+    &quot;base&quot;: &quot;http://user:pass@example.org:21/smth&quot;,
+    &quot;href&quot;: &quot;http://user:pass@example.org:21/smth&quot;,
+    &quot;origin&quot;: &quot;http://example.org:21&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;user&quot;,
+    &quot;password&quot;: &quot;pass&quot;,
+    &quot;host&quot;: &quot;example.org:21&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;21&quot;,
+    &quot;pathname&quot;: &quot;/smth&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;/some/path&quot;,
+    &quot;base&quot;: &quot;http://user:pass@example.org:21/smth&quot;,
+    &quot;href&quot;: &quot;http://user:pass@example.org:21/some/path&quot;,
+    &quot;origin&quot;: &quot;http://example.org:21&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;user&quot;,
+    &quot;password&quot;: &quot;pass&quot;,
+    &quot;host&quot;: &quot;example.org:21&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;21&quot;,
+    &quot;pathname&quot;: &quot;/some/path&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  &quot;# a set of tests designed by zcorpan for relative URLs with unknown schemes&quot;,
+  {
+    &quot;input&quot;: &quot;i&quot;,
+    &quot;base&quot;: &quot;sc:sd&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;i&quot;,
+    &quot;base&quot;: &quot;sc:sd/sd&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;i&quot;,
+    &quot;base&quot;: &quot;sc:/pa/pa&quot;,
+    &quot;href&quot;: &quot;sc:/pa/i&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;sc:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/pa/i&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;i&quot;,
+    &quot;base&quot;: &quot;sc://ho/pa&quot;,
+    &quot;href&quot;: &quot;sc://ho/i&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;sc:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;ho&quot;,
+    &quot;hostname&quot;: &quot;ho&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/i&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;i&quot;,
+    &quot;base&quot;: &quot;sc:///pa/pa&quot;,
+    &quot;href&quot;: &quot;sc:///pa/i&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;sc:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/pa/i&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;../i&quot;,
+    &quot;base&quot;: &quot;sc:sd&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;../i&quot;,
+    &quot;base&quot;: &quot;sc:sd/sd&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;../i&quot;,
+    &quot;base&quot;: &quot;sc:/pa/pa&quot;,
+    &quot;href&quot;: &quot;sc:/i&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;sc:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/i&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;../i&quot;,
+    &quot;base&quot;: &quot;sc://ho/pa&quot;,
+    &quot;href&quot;: &quot;sc://ho/i&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;sc:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;ho&quot;,
+    &quot;hostname&quot;: &quot;ho&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/i&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;../i&quot;,
+    &quot;base&quot;: &quot;sc:///pa/pa&quot;,
+    &quot;href&quot;: &quot;sc:///i&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;sc:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/i&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;/i&quot;,
+    &quot;base&quot;: &quot;sc:sd&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;/i&quot;,
+    &quot;base&quot;: &quot;sc:sd/sd&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;/i&quot;,
+    &quot;base&quot;: &quot;sc:/pa/pa&quot;,
+    &quot;href&quot;: &quot;sc:/i&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;sc:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/i&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;/i&quot;,
+    &quot;base&quot;: &quot;sc://ho/pa&quot;,
+    &quot;href&quot;: &quot;sc://ho/i&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;sc:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;ho&quot;,
+    &quot;hostname&quot;: &quot;ho&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/i&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;/i&quot;,
+    &quot;base&quot;: &quot;sc:///pa/pa&quot;,
+    &quot;href&quot;: &quot;sc:///i&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;sc:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/i&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;?i&quot;,
+    &quot;base&quot;: &quot;sc:sd&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;?i&quot;,
+    &quot;base&quot;: &quot;sc:sd/sd&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;?i&quot;,
+    &quot;base&quot;: &quot;sc:/pa/pa&quot;,
+    &quot;href&quot;: &quot;sc:/pa/pa?i&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;sc:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/pa/pa&quot;,
+    &quot;search&quot;: &quot;?i&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;?i&quot;,
+    &quot;base&quot;: &quot;sc://ho/pa&quot;,
+    &quot;href&quot;: &quot;sc://ho/pa?i&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;sc:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;ho&quot;,
+    &quot;hostname&quot;: &quot;ho&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/pa&quot;,
+    &quot;search&quot;: &quot;?i&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;?i&quot;,
+    &quot;base&quot;: &quot;sc:///pa/pa&quot;,
+    &quot;href&quot;: &quot;sc:///pa/pa?i&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;sc:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/pa/pa&quot;,
+    &quot;search&quot;: &quot;?i&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;#i&quot;,
+    &quot;base&quot;: &quot;sc:sd&quot;,
+    &quot;href&quot;: &quot;sc:sd#i&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;sc:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;sd&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;#i&quot;
+  },
+  {
+    &quot;input&quot;: &quot;#i&quot;,
+    &quot;base&quot;: &quot;sc:sd/sd&quot;,
+    &quot;href&quot;: &quot;sc:sd/sd#i&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;sc:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;sd/sd&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;#i&quot;
+  },
+  {
+    &quot;input&quot;: &quot;#i&quot;,
+    &quot;base&quot;: &quot;sc:/pa/pa&quot;,
+    &quot;href&quot;: &quot;sc:/pa/pa#i&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;sc:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/pa/pa&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;#i&quot;
+  },
+  {
+    &quot;input&quot;: &quot;#i&quot;,
+    &quot;base&quot;: &quot;sc://ho/pa&quot;,
+    &quot;href&quot;: &quot;sc://ho/pa#i&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;sc:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;ho&quot;,
+    &quot;hostname&quot;: &quot;ho&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/pa&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;#i&quot;
+  },
+  {
+    &quot;input&quot;: &quot;#i&quot;,
+    &quot;base&quot;: &quot;sc:///pa/pa&quot;,
+    &quot;href&quot;: &quot;sc:///pa/pa#i&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;sc:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/pa/pa&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;#i&quot;
+  },
+  &quot;# make sure that relative URL logic works on known typically non-relative schemes too&quot;,
+  {
+    &quot;input&quot;: &quot;about:/../&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;about:/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;about:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;data:/../&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;data:/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;data:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;javascript:/../&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;javascript:/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;javascript:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;mailto:/../&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;mailto:/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;mailto:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  &quot;# unknown schemes and non-ASCII domains&quot;,
+  {
+    &quot;input&quot;: &quot;sc://ñ.test/&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;sc://xn--ida.test/&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;sc:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;xn--ida.test&quot;,
+    &quot;hostname&quot;: &quot;xn--ida.test&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  &quot;# unknown schemes and backslashes&quot;,
+  {
+    &quot;input&quot;: &quot;sc:\\../&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;sc:\\../&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;sc:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;\\../&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  &quot;# unknown scheme with path looking like a password&quot;,
+  {
+    &quot;input&quot;: &quot;sc::a@example.net&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;sc::a@example.net&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;sc:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;:a@example.net&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  &quot;# tests from jsdom/whatwg-url designed for code coverage&quot;,
+  {
+    &quot;input&quot;: &quot;http://127.0.0.1:10100/relative_import.html&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://127.0.0.1:10100/relative_import.html&quot;,
+    &quot;origin&quot;: &quot;http://127.0.0.1:10100&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;127.0.0.1:10100&quot;,
+    &quot;hostname&quot;: &quot;127.0.0.1&quot;,
+    &quot;port&quot;: &quot;10100&quot;,
+    &quot;pathname&quot;: &quot;/relative_import.html&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http://facebook.com/?foo=%7B%22abc%22&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://facebook.com/?foo=%7B%22abc%22&quot;,
+    &quot;origin&quot;: &quot;http://facebook.com&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;facebook.com&quot;,
+    &quot;hostname&quot;: &quot;facebook.com&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/&quot;,
+    &quot;search&quot;: &quot;?foo=%7B%22abc%22&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;https://localhost:3000/jqueryui@1.2.3&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;https://localhost:3000/jqueryui@1.2.3&quot;,
+    &quot;origin&quot;: &quot;https://localhost:3000&quot;,
+    &quot;protocol&quot;: &quot;https:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;localhost:3000&quot;,
+    &quot;hostname&quot;: &quot;localhost&quot;,
+    &quot;port&quot;: &quot;3000&quot;,
+    &quot;pathname&quot;: &quot;/jqueryui@1.2.3&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  &quot;# tab/LF/CR&quot;,
+  {
+    &quot;input&quot;: &quot;h\tt\nt\rp://h\to\ns\rt:9\t0\n0\r0/p\ta\nt\rh?q\tu\ne\rry#f\tr\na\rg&quot;,
+    &quot;base&quot;: &quot;about:blank&quot;,
+    &quot;href&quot;: &quot;http://host:9000/path?query#frag&quot;,
+    &quot;origin&quot;: &quot;http://host:9000&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;host:9000&quot;,
+    &quot;hostname&quot;: &quot;host&quot;,
+    &quot;port&quot;: &quot;9000&quot;,
+    &quot;pathname&quot;: &quot;/path&quot;,
+    &quot;search&quot;: &quot;?query&quot;,
+    &quot;hash&quot;: &quot;#frag&quot;
+  },
+  &quot;# Stringification of URL.searchParams&quot;,
+  {
+    &quot;input&quot;: &quot;?a=b&amp;c=d&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/bar?a=b&amp;c=d&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/bar&quot;,
+    &quot;search&quot;: &quot;?a=b&amp;c=d&quot;,
+    &quot;searchParams&quot;: &quot;a=b&amp;c=d&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;??a=b&amp;c=d&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/bar??a=b&amp;c=d&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/bar&quot;,
+    &quot;search&quot;: &quot;??a=b&amp;c=d&quot;,
+    &quot;searchParams&quot;: &quot;%3Fa=b&amp;c=d&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  &quot;# Scheme only&quot;,
+  {
+    &quot;input&quot;: &quot;http:&quot;,
+    &quot;base&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;http://example.org/foo/bar&quot;,
+    &quot;origin&quot;: &quot;http://example.org&quot;,
+    &quot;protocol&quot;: &quot;http:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;example.org&quot;,
+    &quot;hostname&quot;: &quot;example.org&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;/foo/bar&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;searchParams&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  },
+  {
+    &quot;input&quot;: &quot;http:&quot;,
+    &quot;base&quot;: &quot;https://example.org/foo/bar&quot;,
+    &quot;failure&quot;: true
+  },
+  {
+    &quot;input&quot;: &quot;sc:&quot;,
+    &quot;base&quot;: &quot;https://example.org/foo/bar&quot;,
+    &quot;href&quot;: &quot;sc:&quot;,
+    &quot;origin&quot;: &quot;null&quot;,
+    &quot;protocol&quot;: &quot;sc:&quot;,
+    &quot;username&quot;: &quot;&quot;,
+    &quot;password&quot;: &quot;&quot;,
+    &quot;host&quot;: &quot;&quot;,
+    &quot;hostname&quot;: &quot;&quot;,
+    &quot;port&quot;: &quot;&quot;,
+    &quot;pathname&quot;: &quot;&quot;,
+    &quot;search&quot;: &quot;&quot;,
+    &quot;searchParams&quot;: &quot;&quot;,
+    &quot;hash&quot;: &quot;&quot;
+  }
+]
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (204947 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-08-25 01:21:43 UTC (rev 204947)
+++ trunk/Source/WebCore/ChangeLog        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2016-08-24  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        Import w3c URL tests
+        https://bugs.webkit.org/show_bug.cgi?id=161177
+
+        Reviewed by Tim Horton.
+
+        Tests: imported/w3c/web-platform-tests/url/a-element-xhtml.xhtml
+               imported/w3c/web-platform-tests/url/a-element.html
+               imported/w3c/web-platform-tests/url/historical.html
+               imported/w3c/web-platform-tests/url/interfaces.html
+               imported/w3c/web-platform-tests/url/url-constructor.html
+               imported/w3c/web-platform-tests/url/url-domainToUnicode.html
+               imported/w3c/web-platform-tests/url/url-setters.html
+               imported/w3c/web-platform-tests/url/urlsearchparams-append.html
+               imported/w3c/web-platform-tests/url/urlsearchparams-constructor.html
+               imported/w3c/web-platform-tests/url/urlsearchparams-delete.html
+               imported/w3c/web-platform-tests/url/urlsearchparams-get.html
+               imported/w3c/web-platform-tests/url/urlsearchparams-getall.html
+               imported/w3c/web-platform-tests/url/urlsearchparams-has.html
+               imported/w3c/web-platform-tests/url/urlsearchparams-set.html
+               imported/w3c/web-platform-tests/url/urlsearchparams-stringifier.html
+
+        * platform/URL.cpp:
+        (WebCore::URL::setQuery):
+
</ins><span class="cx"> 2016-08-24  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Rebaseline bindings tests after r204923.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformURLcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/URL.cpp (204947 => 204948)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/URL.cpp        2016-08-25 01:21:43 UTC (rev 204947)
+++ trunk/Source/WebCore/platform/URL.cpp        2016-08-25 01:22:33 UTC (rev 204948)
</span><span class="lines">@@ -1037,6 +1037,7 @@
</span><span class="cx">     // FIXME: '#' and non-ASCII characters must be encoded and escaped.
</span><span class="cx">     // Usually, the query is encoded using document encoding, not UTF-8, but we don't have
</span><span class="cx">     // access to the document in this function.
</span><ins>+    // https://webkit.org/b/161176
</ins><span class="cx">     if ((query.isEmpty() || query[0] != '?') &amp;&amp; !query.isNull())
</span><span class="cx">         parse(m_string.left(m_pathEnd) + &quot;?&quot; + query + m_string.substring(m_queryEnd));
</span><span class="cx">     else
</span></span></pre>
</div>
</div>

</body>
</html>