• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[
2  "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/segments.js",
3  "# AS OF https://github.com/web-platform-tests/wpt/commit/2a64dae4641fbd61bd4257df460e188f425b492e",
4  {
5    "input": "http://example\t.\norg",
6    "base": "http://example.org/foo/bar",
7    "href": "http://example.org/",
8    "origin": "http://example.org",
9    "protocol": "http:",
10    "username": "",
11    "password": "",
12    "host": "example.org",
13    "hostname": "example.org",
14    "port": "",
15    "pathname": "/",
16    "search": "",
17    "hash": ""
18  },
19  {
20    "input": "http://user:pass@foo:21/bar;par?b#c",
21    "base": "http://example.org/foo/bar",
22    "href": "http://user:pass@foo:21/bar;par?b#c",
23    "origin": "http://foo:21",
24    "protocol": "http:",
25    "username": "user",
26    "password": "pass",
27    "host": "foo:21",
28    "hostname": "foo",
29    "port": "21",
30    "pathname": "/bar;par",
31    "search": "?b",
32    "hash": "#c"
33  },
34  {
35    "input": "https://test:@test",
36    "base": "about:blank",
37    "href": "https://test@test/",
38    "origin": "https://test",
39    "protocol": "https:",
40    "username": "test",
41    "password": "",
42    "host": "test",
43    "hostname": "test",
44    "port": "",
45    "pathname": "/",
46    "search": "",
47    "hash": ""
48  },
49  {
50    "input": "https://:@test",
51    "base": "about:blank",
52    "href": "https://test/",
53    "origin": "https://test",
54    "protocol": "https:",
55    "username": "",
56    "password": "",
57    "host": "test",
58    "hostname": "test",
59    "port": "",
60    "pathname": "/",
61    "search": "",
62    "hash": ""
63  },
64  {
65    "input": "non-special://test:@test/x",
66    "base": "about:blank",
67    "href": "non-special://test@test/x",
68    "origin": "null",
69    "protocol": "non-special:",
70    "username": "test",
71    "password": "",
72    "host": "test",
73    "hostname": "test",
74    "port": "",
75    "pathname": "/x",
76    "search": "",
77    "hash": ""
78  },
79  {
80    "input": "non-special://:@test/x",
81    "base": "about:blank",
82    "href": "non-special://test/x",
83    "origin": "null",
84    "protocol": "non-special:",
85    "username": "",
86    "password": "",
87    "host": "test",
88    "hostname": "test",
89    "port": "",
90    "pathname": "/x",
91    "search": "",
92    "hash": ""
93  },
94  {
95    "input": "http:foo.com",
96    "base": "http://example.org/foo/bar",
97    "href": "http://example.org/foo/foo.com",
98    "origin": "http://example.org",
99    "protocol": "http:",
100    "username": "",
101    "password": "",
102    "host": "example.org",
103    "hostname": "example.org",
104    "port": "",
105    "pathname": "/foo/foo.com",
106    "search": "",
107    "hash": ""
108  },
109  {
110    "input": "\t   :foo.com   \n",
111    "base": "http://example.org/foo/bar",
112    "href": "http://example.org/foo/:foo.com",
113    "origin": "http://example.org",
114    "protocol": "http:",
115    "username": "",
116    "password": "",
117    "host": "example.org",
118    "hostname": "example.org",
119    "port": "",
120    "pathname": "/foo/:foo.com",
121    "search": "",
122    "hash": ""
123  },
124  {
125    "input": " foo.com  ",
126    "base": "http://example.org/foo/bar",
127    "href": "http://example.org/foo/foo.com",
128    "origin": "http://example.org",
129    "protocol": "http:",
130    "username": "",
131    "password": "",
132    "host": "example.org",
133    "hostname": "example.org",
134    "port": "",
135    "pathname": "/foo/foo.com",
136    "search": "",
137    "hash": ""
138  },
139  {
140    "input": "a:\t foo.com",
141    "base": "http://example.org/foo/bar",
142    "href": "a: foo.com",
143    "origin": "null",
144    "protocol": "a:",
145    "username": "",
146    "password": "",
147    "host": "",
148    "hostname": "",
149    "port": "",
150    "pathname": " foo.com",
151    "search": "",
152    "hash": ""
153  },
154  {
155    "input": "http://f:21/ b ? d # e ",
156    "base": "http://example.org/foo/bar",
157    "href": "http://f:21/%20b%20?%20d%20#%20e",
158    "origin": "http://f:21",
159    "protocol": "http:",
160    "username": "",
161    "password": "",
162    "host": "f:21",
163    "hostname": "f",
164    "port": "21",
165    "pathname": "/%20b%20",
166    "search": "?%20d%20",
167    "hash": "#%20e"
168  },
169  {
170    "input": "lolscheme:x x#x x",
171    "base": "about:blank",
172    "href": "lolscheme:x x#x%20x",
173    "protocol": "lolscheme:",
174    "username": "",
175    "password": "",
176    "host": "",
177    "hostname": "",
178    "port": "",
179    "pathname": "x x",
180    "search": "",
181    "hash": "#x%20x"
182  },
183  {
184    "input": "http://f:/c",
185    "base": "http://example.org/foo/bar",
186    "href": "http://f/c",
187    "origin": "http://f",
188    "protocol": "http:",
189    "username": "",
190    "password": "",
191    "host": "f",
192    "hostname": "f",
193    "port": "",
194    "pathname": "/c",
195    "search": "",
196    "hash": ""
197  },
198  {
199    "input": "http://f:0/c",
200    "base": "http://example.org/foo/bar",
201    "href": "http://f:0/c",
202    "origin": "http://f:0",
203    "protocol": "http:",
204    "username": "",
205    "password": "",
206    "host": "f:0",
207    "hostname": "f",
208    "port": "0",
209    "pathname": "/c",
210    "search": "",
211    "hash": ""
212  },
213  {
214    "input": "http://f:00000000000000/c",
215    "base": "http://example.org/foo/bar",
216    "href": "http://f:0/c",
217    "origin": "http://f:0",
218    "protocol": "http:",
219    "username": "",
220    "password": "",
221    "host": "f:0",
222    "hostname": "f",
223    "port": "0",
224    "pathname": "/c",
225    "search": "",
226    "hash": ""
227  },
228  {
229    "input": "http://f:00000000000000000000080/c",
230    "base": "http://example.org/foo/bar",
231    "href": "http://f/c",
232    "origin": "http://f",
233    "protocol": "http:",
234    "username": "",
235    "password": "",
236    "host": "f",
237    "hostname": "f",
238    "port": "",
239    "pathname": "/c",
240    "search": "",
241    "hash": ""
242  },
243  {
244    "input": "http://f:b/c",
245    "base": "http://example.org/foo/bar",
246    "failure": true
247  },
248  {
249    "input": "http://f: /c",
250    "base": "http://example.org/foo/bar",
251    "failure": true
252  },
253  {
254    "input": "http://f:\n/c",
255    "base": "http://example.org/foo/bar",
256    "href": "http://f/c",
257    "origin": "http://f",
258    "protocol": "http:",
259    "username": "",
260    "password": "",
261    "host": "f",
262    "hostname": "f",
263    "port": "",
264    "pathname": "/c",
265    "search": "",
266    "hash": ""
267  },
268  {
269    "input": "http://f:fifty-two/c",
270    "base": "http://example.org/foo/bar",
271    "failure": true
272  },
273  {
274    "input": "http://f:999999/c",
275    "base": "http://example.org/foo/bar",
276    "failure": true
277  },
278  {
279    "input": "non-special://f:999999/c",
280    "base": "http://example.org/foo/bar",
281    "failure": true
282  },
283  {
284    "input": "http://f: 21 / b ? d # e ",
285    "base": "http://example.org/foo/bar",
286    "failure": true
287  },
288  {
289    "input": "",
290    "base": "http://example.org/foo/bar",
291    "href": "http://example.org/foo/bar",
292    "origin": "http://example.org",
293    "protocol": "http:",
294    "username": "",
295    "password": "",
296    "host": "example.org",
297    "hostname": "example.org",
298    "port": "",
299    "pathname": "/foo/bar",
300    "search": "",
301    "hash": ""
302  },
303  {
304    "input": "  \t",
305    "base": "http://example.org/foo/bar",
306    "href": "http://example.org/foo/bar",
307    "origin": "http://example.org",
308    "protocol": "http:",
309    "username": "",
310    "password": "",
311    "host": "example.org",
312    "hostname": "example.org",
313    "port": "",
314    "pathname": "/foo/bar",
315    "search": "",
316    "hash": ""
317  },
318  {
319    "input": ":foo.com/",
320    "base": "http://example.org/foo/bar",
321    "href": "http://example.org/foo/:foo.com/",
322    "origin": "http://example.org",
323    "protocol": "http:",
324    "username": "",
325    "password": "",
326    "host": "example.org",
327    "hostname": "example.org",
328    "port": "",
329    "pathname": "/foo/:foo.com/",
330    "search": "",
331    "hash": ""
332  },
333  {
334    "input": ":foo.com\\",
335    "base": "http://example.org/foo/bar",
336    "href": "http://example.org/foo/:foo.com/",
337    "origin": "http://example.org",
338    "protocol": "http:",
339    "username": "",
340    "password": "",
341    "host": "example.org",
342    "hostname": "example.org",
343    "port": "",
344    "pathname": "/foo/:foo.com/",
345    "search": "",
346    "hash": ""
347  },
348  {
349    "input": ":",
350    "base": "http://example.org/foo/bar",
351    "href": "http://example.org/foo/:",
352    "origin": "http://example.org",
353    "protocol": "http:",
354    "username": "",
355    "password": "",
356    "host": "example.org",
357    "hostname": "example.org",
358    "port": "",
359    "pathname": "/foo/:",
360    "search": "",
361    "hash": ""
362  },
363  {
364    "input": ":a",
365    "base": "http://example.org/foo/bar",
366    "href": "http://example.org/foo/:a",
367    "origin": "http://example.org",
368    "protocol": "http:",
369    "username": "",
370    "password": "",
371    "host": "example.org",
372    "hostname": "example.org",
373    "port": "",
374    "pathname": "/foo/:a",
375    "search": "",
376    "hash": ""
377  },
378  {
379    "input": ":/",
380    "base": "http://example.org/foo/bar",
381    "href": "http://example.org/foo/:/",
382    "origin": "http://example.org",
383    "protocol": "http:",
384    "username": "",
385    "password": "",
386    "host": "example.org",
387    "hostname": "example.org",
388    "port": "",
389    "pathname": "/foo/:/",
390    "search": "",
391    "hash": ""
392  },
393  {
394    "input": ":\\",
395    "base": "http://example.org/foo/bar",
396    "href": "http://example.org/foo/:/",
397    "origin": "http://example.org",
398    "protocol": "http:",
399    "username": "",
400    "password": "",
401    "host": "example.org",
402    "hostname": "example.org",
403    "port": "",
404    "pathname": "/foo/:/",
405    "search": "",
406    "hash": ""
407  },
408  {
409    "input": ":#",
410    "base": "http://example.org/foo/bar",
411    "href": "http://example.org/foo/:#",
412    "origin": "http://example.org",
413    "protocol": "http:",
414    "username": "",
415    "password": "",
416    "host": "example.org",
417    "hostname": "example.org",
418    "port": "",
419    "pathname": "/foo/:",
420    "search": "",
421    "hash": ""
422  },
423  {
424    "input": "#",
425    "base": "http://example.org/foo/bar",
426    "href": "http://example.org/foo/bar#",
427    "origin": "http://example.org",
428    "protocol": "http:",
429    "username": "",
430    "password": "",
431    "host": "example.org",
432    "hostname": "example.org",
433    "port": "",
434    "pathname": "/foo/bar",
435    "search": "",
436    "hash": ""
437  },
438  {
439    "input": "#/",
440    "base": "http://example.org/foo/bar",
441    "href": "http://example.org/foo/bar#/",
442    "origin": "http://example.org",
443    "protocol": "http:",
444    "username": "",
445    "password": "",
446    "host": "example.org",
447    "hostname": "example.org",
448    "port": "",
449    "pathname": "/foo/bar",
450    "search": "",
451    "hash": "#/"
452  },
453  {
454    "input": "#\\",
455    "base": "http://example.org/foo/bar",
456    "href": "http://example.org/foo/bar#\\",
457    "origin": "http://example.org",
458    "protocol": "http:",
459    "username": "",
460    "password": "",
461    "host": "example.org",
462    "hostname": "example.org",
463    "port": "",
464    "pathname": "/foo/bar",
465    "search": "",
466    "hash": "#\\"
467  },
468  {
469    "input": "#;?",
470    "base": "http://example.org/foo/bar",
471    "href": "http://example.org/foo/bar#;?",
472    "origin": "http://example.org",
473    "protocol": "http:",
474    "username": "",
475    "password": "",
476    "host": "example.org",
477    "hostname": "example.org",
478    "port": "",
479    "pathname": "/foo/bar",
480    "search": "",
481    "hash": "#;?"
482  },
483  {
484    "input": "?",
485    "base": "http://example.org/foo/bar",
486    "href": "http://example.org/foo/bar?",
487    "origin": "http://example.org",
488    "protocol": "http:",
489    "username": "",
490    "password": "",
491    "host": "example.org",
492    "hostname": "example.org",
493    "port": "",
494    "pathname": "/foo/bar",
495    "search": "",
496    "hash": ""
497  },
498  {
499    "input": "/",
500    "base": "http://example.org/foo/bar",
501    "href": "http://example.org/",
502    "origin": "http://example.org",
503    "protocol": "http:",
504    "username": "",
505    "password": "",
506    "host": "example.org",
507    "hostname": "example.org",
508    "port": "",
509    "pathname": "/",
510    "search": "",
511    "hash": ""
512  },
513  {
514    "input": ":23",
515    "base": "http://example.org/foo/bar",
516    "href": "http://example.org/foo/:23",
517    "origin": "http://example.org",
518    "protocol": "http:",
519    "username": "",
520    "password": "",
521    "host": "example.org",
522    "hostname": "example.org",
523    "port": "",
524    "pathname": "/foo/:23",
525    "search": "",
526    "hash": ""
527  },
528  {
529    "input": "/:23",
530    "base": "http://example.org/foo/bar",
531    "href": "http://example.org/:23",
532    "origin": "http://example.org",
533    "protocol": "http:",
534    "username": "",
535    "password": "",
536    "host": "example.org",
537    "hostname": "example.org",
538    "port": "",
539    "pathname": "/:23",
540    "search": "",
541    "hash": ""
542  },
543  {
544    "input": "\\x",
545    "base": "http://example.org/foo/bar",
546    "href": "http://example.org/x",
547    "origin": "http://example.org",
548    "protocol": "http:",
549    "username": "",
550    "password": "",
551    "host": "example.org",
552    "hostname": "example.org",
553    "port": "",
554    "pathname": "/x",
555    "search": "",
556    "hash": ""
557  },
558  {
559    "input": "\\\\x\\hello",
560    "base": "http://example.org/foo/bar",
561    "href": "http://x/hello",
562    "origin": "http://x",
563    "protocol": "http:",
564    "username": "",
565    "password": "",
566    "host": "x",
567    "hostname": "x",
568    "port": "",
569    "pathname": "/hello",
570    "search": "",
571    "hash": ""
572  },
573  {
574    "input": "::",
575    "base": "http://example.org/foo/bar",
576    "href": "http://example.org/foo/::",
577    "origin": "http://example.org",
578    "protocol": "http:",
579    "username": "",
580    "password": "",
581    "host": "example.org",
582    "hostname": "example.org",
583    "port": "",
584    "pathname": "/foo/::",
585    "search": "",
586    "hash": ""
587  },
588  {
589    "input": "::23",
590    "base": "http://example.org/foo/bar",
591    "href": "http://example.org/foo/::23",
592    "origin": "http://example.org",
593    "protocol": "http:",
594    "username": "",
595    "password": "",
596    "host": "example.org",
597    "hostname": "example.org",
598    "port": "",
599    "pathname": "/foo/::23",
600    "search": "",
601    "hash": ""
602  },
603  {
604    "input": "foo://",
605    "base": "http://example.org/foo/bar",
606    "href": "foo://",
607    "origin": "null",
608    "protocol": "foo:",
609    "username": "",
610    "password": "",
611    "host": "",
612    "hostname": "",
613    "port": "",
614    "pathname": "",
615    "search": "",
616    "hash": ""
617  },
618  {
619    "input": "http://a:b@c:29/d",
620    "base": "http://example.org/foo/bar",
621    "href": "http://a:b@c:29/d",
622    "origin": "http://c:29",
623    "protocol": "http:",
624    "username": "a",
625    "password": "b",
626    "host": "c:29",
627    "hostname": "c",
628    "port": "29",
629    "pathname": "/d",
630    "search": "",
631    "hash": ""
632  },
633  {
634    "input": "http::@c:29",
635    "base": "http://example.org/foo/bar",
636    "href": "http://example.org/foo/:@c:29",
637    "origin": "http://example.org",
638    "protocol": "http:",
639    "username": "",
640    "password": "",
641    "host": "example.org",
642    "hostname": "example.org",
643    "port": "",
644    "pathname": "/foo/:@c:29",
645    "search": "",
646    "hash": ""
647  },
648  {
649    "input": "http://&a:foo(b]c@d:2/",
650    "base": "http://example.org/foo/bar",
651    "href": "http://&a:foo(b%5Dc@d:2/",
652    "origin": "http://d:2",
653    "protocol": "http:",
654    "username": "&a",
655    "password": "foo(b%5Dc",
656    "host": "d:2",
657    "hostname": "d",
658    "port": "2",
659    "pathname": "/",
660    "search": "",
661    "hash": ""
662  },
663  {
664    "input": "http://::@c@d:2",
665    "base": "http://example.org/foo/bar",
666    "href": "http://:%3A%40c@d:2/",
667    "origin": "http://d:2",
668    "protocol": "http:",
669    "username": "",
670    "password": "%3A%40c",
671    "host": "d:2",
672    "hostname": "d",
673    "port": "2",
674    "pathname": "/",
675    "search": "",
676    "hash": ""
677  },
678  {
679    "input": "http://foo.com:b@d/",
680    "base": "http://example.org/foo/bar",
681    "href": "http://foo.com:b@d/",
682    "origin": "http://d",
683    "protocol": "http:",
684    "username": "foo.com",
685    "password": "b",
686    "host": "d",
687    "hostname": "d",
688    "port": "",
689    "pathname": "/",
690    "search": "",
691    "hash": ""
692  },
693  {
694    "input": "http://foo.com/\\@",
695    "base": "http://example.org/foo/bar",
696    "href": "http://foo.com//@",
697    "origin": "http://foo.com",
698    "protocol": "http:",
699    "username": "",
700    "password": "",
701    "host": "foo.com",
702    "hostname": "foo.com",
703    "port": "",
704    "pathname": "//@",
705    "search": "",
706    "hash": ""
707  },
708  {
709    "input": "http:\\\\foo.com\\",
710    "base": "http://example.org/foo/bar",
711    "href": "http://foo.com/",
712    "origin": "http://foo.com",
713    "protocol": "http:",
714    "username": "",
715    "password": "",
716    "host": "foo.com",
717    "hostname": "foo.com",
718    "port": "",
719    "pathname": "/",
720    "search": "",
721    "hash": ""
722  },
723  {
724    "input": "http:\\\\a\\b:c\\d@foo.com\\",
725    "base": "http://example.org/foo/bar",
726    "href": "http://a/b:c/d@foo.com/",
727    "origin": "http://a",
728    "protocol": "http:",
729    "username": "",
730    "password": "",
731    "host": "a",
732    "hostname": "a",
733    "port": "",
734    "pathname": "/b:c/d@foo.com/",
735    "search": "",
736    "hash": ""
737  },
738  {
739    "input": "foo:/",
740    "base": "http://example.org/foo/bar",
741    "href": "foo:/",
742    "origin": "null",
743    "protocol": "foo:",
744    "username": "",
745    "password": "",
746    "host": "",
747    "hostname": "",
748    "port": "",
749    "pathname": "/",
750    "search": "",
751    "hash": ""
752  },
753  {
754    "input": "foo:/bar.com/",
755    "base": "http://example.org/foo/bar",
756    "href": "foo:/bar.com/",
757    "origin": "null",
758    "protocol": "foo:",
759    "username": "",
760    "password": "",
761    "host": "",
762    "hostname": "",
763    "port": "",
764    "pathname": "/bar.com/",
765    "search": "",
766    "hash": ""
767  },
768  {
769    "input": "foo://///////",
770    "base": "http://example.org/foo/bar",
771    "href": "foo://///////",
772    "origin": "null",
773    "protocol": "foo:",
774    "username": "",
775    "password": "",
776    "host": "",
777    "hostname": "",
778    "port": "",
779    "pathname": "///////",
780    "search": "",
781    "hash": ""
782  },
783  {
784    "input": "foo://///////bar.com/",
785    "base": "http://example.org/foo/bar",
786    "href": "foo://///////bar.com/",
787    "origin": "null",
788    "protocol": "foo:",
789    "username": "",
790    "password": "",
791    "host": "",
792    "hostname": "",
793    "port": "",
794    "pathname": "///////bar.com/",
795    "search": "",
796    "hash": ""
797  },
798  {
799    "input": "foo:////://///",
800    "base": "http://example.org/foo/bar",
801    "href": "foo:////://///",
802    "origin": "null",
803    "protocol": "foo:",
804    "username": "",
805    "password": "",
806    "host": "",
807    "hostname": "",
808    "port": "",
809    "pathname": "//://///",
810    "search": "",
811    "hash": ""
812  },
813  {
814    "input": "c:/foo",
815    "base": "http://example.org/foo/bar",
816    "href": "c:/foo",
817    "origin": "null",
818    "protocol": "c:",
819    "username": "",
820    "password": "",
821    "host": "",
822    "hostname": "",
823    "port": "",
824    "pathname": "/foo",
825    "search": "",
826    "hash": ""
827  },
828  {
829    "input": "//foo/bar",
830    "base": "http://example.org/foo/bar",
831    "href": "http://foo/bar",
832    "origin": "http://foo",
833    "protocol": "http:",
834    "username": "",
835    "password": "",
836    "host": "foo",
837    "hostname": "foo",
838    "port": "",
839    "pathname": "/bar",
840    "search": "",
841    "hash": ""
842  },
843  {
844    "input": "http://foo/path;a??e#f#g",
845    "base": "http://example.org/foo/bar",
846    "href": "http://foo/path;a??e#f#g",
847    "origin": "http://foo",
848    "protocol": "http:",
849    "username": "",
850    "password": "",
851    "host": "foo",
852    "hostname": "foo",
853    "port": "",
854    "pathname": "/path;a",
855    "search": "??e",
856    "hash": "#f#g"
857  },
858  {
859    "input": "http://foo/abcd?efgh?ijkl",
860    "base": "http://example.org/foo/bar",
861    "href": "http://foo/abcd?efgh?ijkl",
862    "origin": "http://foo",
863    "protocol": "http:",
864    "username": "",
865    "password": "",
866    "host": "foo",
867    "hostname": "foo",
868    "port": "",
869    "pathname": "/abcd",
870    "search": "?efgh?ijkl",
871    "hash": ""
872  },
873  {
874    "input": "http://foo/abcd#foo?bar",
875    "base": "http://example.org/foo/bar",
876    "href": "http://foo/abcd#foo?bar",
877    "origin": "http://foo",
878    "protocol": "http:",
879    "username": "",
880    "password": "",
881    "host": "foo",
882    "hostname": "foo",
883    "port": "",
884    "pathname": "/abcd",
885    "search": "",
886    "hash": "#foo?bar"
887  },
888  {
889    "input": "[61:24:74]:98",
890    "base": "http://example.org/foo/bar",
891    "href": "http://example.org/foo/[61:24:74]:98",
892    "origin": "http://example.org",
893    "protocol": "http:",
894    "username": "",
895    "password": "",
896    "host": "example.org",
897    "hostname": "example.org",
898    "port": "",
899    "pathname": "/foo/[61:24:74]:98",
900    "search": "",
901    "hash": ""
902  },
903  {
904    "input": "http:[61:27]/:foo",
905    "base": "http://example.org/foo/bar",
906    "href": "http://example.org/foo/[61:27]/:foo",
907    "origin": "http://example.org",
908    "protocol": "http:",
909    "username": "",
910    "password": "",
911    "host": "example.org",
912    "hostname": "example.org",
913    "port": "",
914    "pathname": "/foo/[61:27]/:foo",
915    "search": "",
916    "hash": ""
917  },
918  {
919    "input": "http://[1::2]:3:4",
920    "base": "http://example.org/foo/bar",
921    "failure": true
922  },
923  {
924    "input": "http://2001::1",
925    "base": "http://example.org/foo/bar",
926    "failure": true
927  },
928  {
929    "input": "http://2001::1]",
930    "base": "http://example.org/foo/bar",
931    "failure": true
932  },
933  {
934    "input": "http://2001::1]:80",
935    "base": "http://example.org/foo/bar",
936    "failure": true
937  },
938  {
939    "input": "http://[2001::1]",
940    "base": "http://example.org/foo/bar",
941    "href": "http://[2001::1]/",
942    "origin": "http://[2001::1]",
943    "protocol": "http:",
944    "username": "",
945    "password": "",
946    "host": "[2001::1]",
947    "hostname": "[2001::1]",
948    "port": "",
949    "pathname": "/",
950    "search": "",
951    "hash": ""
952  },
953  {
954    "input": "http://[::127.0.0.1]",
955    "base": "http://example.org/foo/bar",
956    "href": "http://[::7f00:1]/",
957    "origin": "http://[::7f00:1]",
958    "protocol": "http:",
959    "username": "",
960    "password": "",
961    "host": "[::7f00:1]",
962    "hostname": "[::7f00:1]",
963    "port": "",
964    "pathname": "/",
965    "search": "",
966    "hash": ""
967  },
968  {
969    "input": "http://[0:0:0:0:0:0:13.1.68.3]",
970    "base": "http://example.org/foo/bar",
971    "href": "http://[::d01:4403]/",
972    "origin": "http://[::d01:4403]",
973    "protocol": "http:",
974    "username": "",
975    "password": "",
976    "host": "[::d01:4403]",
977    "hostname": "[::d01:4403]",
978    "port": "",
979    "pathname": "/",
980    "search": "",
981    "hash": ""
982  },
983  {
984    "input": "http://[2001::1]:80",
985    "base": "http://example.org/foo/bar",
986    "href": "http://[2001::1]/",
987    "origin": "http://[2001::1]",
988    "protocol": "http:",
989    "username": "",
990    "password": "",
991    "host": "[2001::1]",
992    "hostname": "[2001::1]",
993    "port": "",
994    "pathname": "/",
995    "search": "",
996    "hash": ""
997  },
998  {
999    "input": "http:/example.com/",
1000    "base": "http://example.org/foo/bar",
1001    "href": "http://example.org/example.com/",
1002    "origin": "http://example.org",
1003    "protocol": "http:",
1004    "username": "",
1005    "password": "",
1006    "host": "example.org",
1007    "hostname": "example.org",
1008    "port": "",
1009    "pathname": "/example.com/",
1010    "search": "",
1011    "hash": ""
1012  },
1013  {
1014    "input": "ftp:/example.com/",
1015    "base": "http://example.org/foo/bar",
1016    "href": "ftp://example.com/",
1017    "origin": "ftp://example.com",
1018    "protocol": "ftp:",
1019    "username": "",
1020    "password": "",
1021    "host": "example.com",
1022    "hostname": "example.com",
1023    "port": "",
1024    "pathname": "/",
1025    "search": "",
1026    "hash": ""
1027  },
1028  {
1029    "input": "https:/example.com/",
1030    "base": "http://example.org/foo/bar",
1031    "href": "https://example.com/",
1032    "origin": "https://example.com",
1033    "protocol": "https:",
1034    "username": "",
1035    "password": "",
1036    "host": "example.com",
1037    "hostname": "example.com",
1038    "port": "",
1039    "pathname": "/",
1040    "search": "",
1041    "hash": ""
1042  },
1043  {
1044    "input": "madeupscheme:/example.com/",
1045    "base": "http://example.org/foo/bar",
1046    "href": "madeupscheme:/example.com/",
1047    "origin": "null",
1048    "protocol": "madeupscheme:",
1049    "username": "",
1050    "password": "",
1051    "host": "",
1052    "hostname": "",
1053    "port": "",
1054    "pathname": "/example.com/",
1055    "search": "",
1056    "hash": ""
1057  },
1058  {
1059    "input": "file:/example.com/",
1060    "base": "http://example.org/foo/bar",
1061    "href": "file:///example.com/",
1062    "protocol": "file:",
1063    "username": "",
1064    "password": "",
1065    "host": "",
1066    "hostname": "",
1067    "port": "",
1068    "pathname": "/example.com/",
1069    "search": "",
1070    "hash": ""
1071  },
1072  {
1073    "input": "file://example:1/",
1074    "base": "about:blank",
1075    "failure": true
1076  },
1077  {
1078    "input": "file://example:test/",
1079    "base": "about:blank",
1080    "failure": true
1081  },
1082  {
1083    "input": "file://example%/",
1084    "base": "about:blank",
1085    "failure": true
1086  },
1087  {
1088    "input": "file://[example]/",
1089    "base": "about:blank",
1090    "failure": true
1091  },
1092  {
1093    "input": "ftps:/example.com/",
1094    "base": "http://example.org/foo/bar",
1095    "href": "ftps:/example.com/",
1096    "origin": "null",
1097    "protocol": "ftps:",
1098    "username": "",
1099    "password": "",
1100    "host": "",
1101    "hostname": "",
1102    "port": "",
1103    "pathname": "/example.com/",
1104    "search": "",
1105    "hash": ""
1106  },
1107  {
1108    "input": "gopher:/example.com/",
1109    "base": "http://example.org/foo/bar",
1110    "href": "gopher:/example.com/",
1111    "origin": "null",
1112    "protocol": "gopher:",
1113    "username": "",
1114    "password": "",
1115    "host": "",
1116    "hostname": "",
1117    "port": "",
1118    "pathname": "/example.com/",
1119    "search": "",
1120    "hash": ""
1121  },
1122  {
1123    "input": "ws:/example.com/",
1124    "base": "http://example.org/foo/bar",
1125    "href": "ws://example.com/",
1126    "origin": "ws://example.com",
1127    "protocol": "ws:",
1128    "username": "",
1129    "password": "",
1130    "host": "example.com",
1131    "hostname": "example.com",
1132    "port": "",
1133    "pathname": "/",
1134    "search": "",
1135    "hash": ""
1136  },
1137  {
1138    "input": "wss:/example.com/",
1139    "base": "http://example.org/foo/bar",
1140    "href": "wss://example.com/",
1141    "origin": "wss://example.com",
1142    "protocol": "wss:",
1143    "username": "",
1144    "password": "",
1145    "host": "example.com",
1146    "hostname": "example.com",
1147    "port": "",
1148    "pathname": "/",
1149    "search": "",
1150    "hash": ""
1151  },
1152  {
1153    "input": "data:/example.com/",
1154    "base": "http://example.org/foo/bar",
1155    "href": "data:/example.com/",
1156    "origin": "null",
1157    "protocol": "data:",
1158    "username": "",
1159    "password": "",
1160    "host": "",
1161    "hostname": "",
1162    "port": "",
1163    "pathname": "/example.com/",
1164    "search": "",
1165    "hash": ""
1166  },
1167  {
1168    "input": "javascript:/example.com/",
1169    "base": "http://example.org/foo/bar",
1170    "href": "javascript:/example.com/",
1171    "origin": "null",
1172    "protocol": "javascript:",
1173    "username": "",
1174    "password": "",
1175    "host": "",
1176    "hostname": "",
1177    "port": "",
1178    "pathname": "/example.com/",
1179    "search": "",
1180    "hash": ""
1181  },
1182  {
1183    "input": "mailto:/example.com/",
1184    "base": "http://example.org/foo/bar",
1185    "href": "mailto:/example.com/",
1186    "origin": "null",
1187    "protocol": "mailto:",
1188    "username": "",
1189    "password": "",
1190    "host": "",
1191    "hostname": "",
1192    "port": "",
1193    "pathname": "/example.com/",
1194    "search": "",
1195    "hash": ""
1196  },
1197  {
1198    "input": "http:example.com/",
1199    "base": "http://example.org/foo/bar",
1200    "href": "http://example.org/foo/example.com/",
1201    "origin": "http://example.org",
1202    "protocol": "http:",
1203    "username": "",
1204    "password": "",
1205    "host": "example.org",
1206    "hostname": "example.org",
1207    "port": "",
1208    "pathname": "/foo/example.com/",
1209    "search": "",
1210    "hash": ""
1211  },
1212  {
1213    "input": "ftp:example.com/",
1214    "base": "http://example.org/foo/bar",
1215    "href": "ftp://example.com/",
1216    "origin": "ftp://example.com",
1217    "protocol": "ftp:",
1218    "username": "",
1219    "password": "",
1220    "host": "example.com",
1221    "hostname": "example.com",
1222    "port": "",
1223    "pathname": "/",
1224    "search": "",
1225    "hash": ""
1226  },
1227  {
1228    "input": "https:example.com/",
1229    "base": "http://example.org/foo/bar",
1230    "href": "https://example.com/",
1231    "origin": "https://example.com",
1232    "protocol": "https:",
1233    "username": "",
1234    "password": "",
1235    "host": "example.com",
1236    "hostname": "example.com",
1237    "port": "",
1238    "pathname": "/",
1239    "search": "",
1240    "hash": ""
1241  },
1242  {
1243    "input": "madeupscheme:example.com/",
1244    "base": "http://example.org/foo/bar",
1245    "href": "madeupscheme:example.com/",
1246    "origin": "null",
1247    "protocol": "madeupscheme:",
1248    "username": "",
1249    "password": "",
1250    "host": "",
1251    "hostname": "",
1252    "port": "",
1253    "pathname": "example.com/",
1254    "search": "",
1255    "hash": ""
1256  },
1257  {
1258    "input": "ftps:example.com/",
1259    "base": "http://example.org/foo/bar",
1260    "href": "ftps:example.com/",
1261    "origin": "null",
1262    "protocol": "ftps:",
1263    "username": "",
1264    "password": "",
1265    "host": "",
1266    "hostname": "",
1267    "port": "",
1268    "pathname": "example.com/",
1269    "search": "",
1270    "hash": ""
1271  },
1272  {
1273    "input": "gopher:example.com/",
1274    "base": "http://example.org/foo/bar",
1275    "href": "gopher:example.com/",
1276    "origin": "null",
1277    "protocol": "gopher:",
1278    "username": "",
1279    "password": "",
1280    "host": "",
1281    "hostname": "",
1282    "port": "",
1283    "pathname": "example.com/",
1284    "search": "",
1285    "hash": ""
1286  },
1287  {
1288    "input": "ws:example.com/",
1289    "base": "http://example.org/foo/bar",
1290    "href": "ws://example.com/",
1291    "origin": "ws://example.com",
1292    "protocol": "ws:",
1293    "username": "",
1294    "password": "",
1295    "host": "example.com",
1296    "hostname": "example.com",
1297    "port": "",
1298    "pathname": "/",
1299    "search": "",
1300    "hash": ""
1301  },
1302  {
1303    "input": "wss:example.com/",
1304    "base": "http://example.org/foo/bar",
1305    "href": "wss://example.com/",
1306    "origin": "wss://example.com",
1307    "protocol": "wss:",
1308    "username": "",
1309    "password": "",
1310    "host": "example.com",
1311    "hostname": "example.com",
1312    "port": "",
1313    "pathname": "/",
1314    "search": "",
1315    "hash": ""
1316  },
1317  {
1318    "input": "data:example.com/",
1319    "base": "http://example.org/foo/bar",
1320    "href": "data:example.com/",
1321    "origin": "null",
1322    "protocol": "data:",
1323    "username": "",
1324    "password": "",
1325    "host": "",
1326    "hostname": "",
1327    "port": "",
1328    "pathname": "example.com/",
1329    "search": "",
1330    "hash": ""
1331  },
1332  {
1333    "input": "javascript:example.com/",
1334    "base": "http://example.org/foo/bar",
1335    "href": "javascript:example.com/",
1336    "origin": "null",
1337    "protocol": "javascript:",
1338    "username": "",
1339    "password": "",
1340    "host": "",
1341    "hostname": "",
1342    "port": "",
1343    "pathname": "example.com/",
1344    "search": "",
1345    "hash": ""
1346  },
1347  {
1348    "input": "mailto:example.com/",
1349    "base": "http://example.org/foo/bar",
1350    "href": "mailto:example.com/",
1351    "origin": "null",
1352    "protocol": "mailto:",
1353    "username": "",
1354    "password": "",
1355    "host": "",
1356    "hostname": "",
1357    "port": "",
1358    "pathname": "example.com/",
1359    "search": "",
1360    "hash": ""
1361  },
1362  {
1363    "input": "/a/b/c",
1364    "base": "http://example.org/foo/bar",
1365    "href": "http://example.org/a/b/c",
1366    "origin": "http://example.org",
1367    "protocol": "http:",
1368    "username": "",
1369    "password": "",
1370    "host": "example.org",
1371    "hostname": "example.org",
1372    "port": "",
1373    "pathname": "/a/b/c",
1374    "search": "",
1375    "hash": ""
1376  },
1377  {
1378    "input": "/a/ /c",
1379    "base": "http://example.org/foo/bar",
1380    "href": "http://example.org/a/%20/c",
1381    "origin": "http://example.org",
1382    "protocol": "http:",
1383    "username": "",
1384    "password": "",
1385    "host": "example.org",
1386    "hostname": "example.org",
1387    "port": "",
1388    "pathname": "/a/%20/c",
1389    "search": "",
1390    "hash": ""
1391  },
1392  {
1393    "input": "/a%2fc",
1394    "base": "http://example.org/foo/bar",
1395    "href": "http://example.org/a%2fc",
1396    "origin": "http://example.org",
1397    "protocol": "http:",
1398    "username": "",
1399    "password": "",
1400    "host": "example.org",
1401    "hostname": "example.org",
1402    "port": "",
1403    "pathname": "/a%2fc",
1404    "search": "",
1405    "hash": ""
1406  },
1407  {
1408    "input": "/a/%2f/c",
1409    "base": "http://example.org/foo/bar",
1410    "href": "http://example.org/a/%2f/c",
1411    "origin": "http://example.org",
1412    "protocol": "http:",
1413    "username": "",
1414    "password": "",
1415    "host": "example.org",
1416    "hostname": "example.org",
1417    "port": "",
1418    "pathname": "/a/%2f/c",
1419    "search": "",
1420    "hash": ""
1421  },
1422  {
1423    "input": "#β",
1424    "base": "http://example.org/foo/bar",
1425    "href": "http://example.org/foo/bar#%CE%B2",
1426    "origin": "http://example.org",
1427    "protocol": "http:",
1428    "username": "",
1429    "password": "",
1430    "host": "example.org",
1431    "hostname": "example.org",
1432    "port": "",
1433    "pathname": "/foo/bar",
1434    "search": "",
1435    "hash": "#%CE%B2"
1436  },
1437  {
1438    "input": "data:text/html,test#test",
1439    "base": "http://example.org/foo/bar",
1440    "href": "data:text/html,test#test",
1441    "origin": "null",
1442    "protocol": "data:",
1443    "username": "",
1444    "password": "",
1445    "host": "",
1446    "hostname": "",
1447    "port": "",
1448    "pathname": "text/html,test",
1449    "search": "",
1450    "hash": "#test"
1451  },
1452  {
1453    "input": "tel:1234567890",
1454    "base": "http://example.org/foo/bar",
1455    "href": "tel:1234567890",
1456    "origin": "null",
1457    "protocol": "tel:",
1458    "username": "",
1459    "password": "",
1460    "host": "",
1461    "hostname": "",
1462    "port": "",
1463    "pathname": "1234567890",
1464    "search": "",
1465    "hash": ""
1466  },
1467  "# Based on https://felixfbecker.github.io/whatwg-url-custom-host-repro/",
1468  {
1469    "input": "ssh://example.com/foo/bar.git",
1470    "base": "http://example.org/",
1471    "href": "ssh://example.com/foo/bar.git",
1472    "origin": "null",
1473    "protocol": "ssh:",
1474    "username": "",
1475    "password": "",
1476    "host": "example.com",
1477    "hostname": "example.com",
1478    "port": "",
1479    "pathname": "/foo/bar.git",
1480    "search": "",
1481    "hash": ""
1482  },
1483  "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/file.html",
1484  {
1485    "input": "file:c:\\foo\\bar.html",
1486    "base": "file:///tmp/mock/path",
1487    "href": "file:///c:/foo/bar.html",
1488    "protocol": "file:",
1489    "username": "",
1490    "password": "",
1491    "host": "",
1492    "hostname": "",
1493    "port": "",
1494    "pathname": "/c:/foo/bar.html",
1495    "search": "",
1496    "hash": ""
1497  },
1498  {
1499    "input": "  File:c|////foo\\bar.html",
1500    "base": "file:///tmp/mock/path",
1501    "href": "file:///c:////foo/bar.html",
1502    "protocol": "file:",
1503    "username": "",
1504    "password": "",
1505    "host": "",
1506    "hostname": "",
1507    "port": "",
1508    "pathname": "/c:////foo/bar.html",
1509    "search": "",
1510    "hash": ""
1511  },
1512  {
1513    "input": "C|/foo/bar",
1514    "base": "file:///tmp/mock/path",
1515    "href": "file:///C:/foo/bar",
1516    "protocol": "file:",
1517    "username": "",
1518    "password": "",
1519    "host": "",
1520    "hostname": "",
1521    "port": "",
1522    "pathname": "/C:/foo/bar",
1523    "search": "",
1524    "hash": ""
1525  },
1526  {
1527    "input": "/C|\\foo\\bar",
1528    "base": "file:///tmp/mock/path",
1529    "href": "file:///C:/foo/bar",
1530    "protocol": "file:",
1531    "username": "",
1532    "password": "",
1533    "host": "",
1534    "hostname": "",
1535    "port": "",
1536    "pathname": "/C:/foo/bar",
1537    "search": "",
1538    "hash": ""
1539  },
1540  {
1541    "input": "//C|/foo/bar",
1542    "base": "file:///tmp/mock/path",
1543    "href": "file:///C:/foo/bar",
1544    "protocol": "file:",
1545    "username": "",
1546    "password": "",
1547    "host": "",
1548    "hostname": "",
1549    "port": "",
1550    "pathname": "/C:/foo/bar",
1551    "search": "",
1552    "hash": ""
1553  },
1554  {
1555    "input": "//server/file",
1556    "base": "file:///tmp/mock/path",
1557    "href": "file://server/file",
1558    "protocol": "file:",
1559    "username": "",
1560    "password": "",
1561    "host": "server",
1562    "hostname": "server",
1563    "port": "",
1564    "pathname": "/file",
1565    "search": "",
1566    "hash": ""
1567  },
1568  {
1569    "input": "\\\\server\\file",
1570    "base": "file:///tmp/mock/path",
1571    "href": "file://server/file",
1572    "protocol": "file:",
1573    "username": "",
1574    "password": "",
1575    "host": "server",
1576    "hostname": "server",
1577    "port": "",
1578    "pathname": "/file",
1579    "search": "",
1580    "hash": ""
1581  },
1582  {
1583    "input": "/\\server/file",
1584    "base": "file:///tmp/mock/path",
1585    "href": "file://server/file",
1586    "protocol": "file:",
1587    "username": "",
1588    "password": "",
1589    "host": "server",
1590    "hostname": "server",
1591    "port": "",
1592    "pathname": "/file",
1593    "search": "",
1594    "hash": ""
1595  },
1596  {
1597    "input": "file:///foo/bar.txt",
1598    "base": "file:///tmp/mock/path",
1599    "href": "file:///foo/bar.txt",
1600    "protocol": "file:",
1601    "username": "",
1602    "password": "",
1603    "host": "",
1604    "hostname": "",
1605    "port": "",
1606    "pathname": "/foo/bar.txt",
1607    "search": "",
1608    "hash": ""
1609  },
1610  {
1611    "input": "file:///home/me",
1612    "base": "file:///tmp/mock/path",
1613    "href": "file:///home/me",
1614    "protocol": "file:",
1615    "username": "",
1616    "password": "",
1617    "host": "",
1618    "hostname": "",
1619    "port": "",
1620    "pathname": "/home/me",
1621    "search": "",
1622    "hash": ""
1623  },
1624  {
1625    "input": "//",
1626    "base": "file:///tmp/mock/path",
1627    "href": "file:///",
1628    "protocol": "file:",
1629    "username": "",
1630    "password": "",
1631    "host": "",
1632    "hostname": "",
1633    "port": "",
1634    "pathname": "/",
1635    "search": "",
1636    "hash": ""
1637  },
1638  {
1639    "input": "///",
1640    "base": "file:///tmp/mock/path",
1641    "href": "file:///",
1642    "protocol": "file:",
1643    "username": "",
1644    "password": "",
1645    "host": "",
1646    "hostname": "",
1647    "port": "",
1648    "pathname": "/",
1649    "search": "",
1650    "hash": ""
1651  },
1652  {
1653    "input": "///test",
1654    "base": "file:///tmp/mock/path",
1655    "href": "file:///test",
1656    "protocol": "file:",
1657    "username": "",
1658    "password": "",
1659    "host": "",
1660    "hostname": "",
1661    "port": "",
1662    "pathname": "/test",
1663    "search": "",
1664    "hash": ""
1665  },
1666  {
1667    "input": "file://test",
1668    "base": "file:///tmp/mock/path",
1669    "href": "file://test/",
1670    "protocol": "file:",
1671    "username": "",
1672    "password": "",
1673    "host": "test",
1674    "hostname": "test",
1675    "port": "",
1676    "pathname": "/",
1677    "search": "",
1678    "hash": ""
1679  },
1680  {
1681    "input": "file://localhost",
1682    "base": "file:///tmp/mock/path",
1683    "href": "file:///",
1684    "protocol": "file:",
1685    "username": "",
1686    "password": "",
1687    "host": "",
1688    "hostname": "",
1689    "port": "",
1690    "pathname": "/",
1691    "search": "",
1692    "hash": ""
1693  },
1694  {
1695    "input": "file://localhost/",
1696    "base": "file:///tmp/mock/path",
1697    "href": "file:///",
1698    "protocol": "file:",
1699    "username": "",
1700    "password": "",
1701    "host": "",
1702    "hostname": "",
1703    "port": "",
1704    "pathname": "/",
1705    "search": "",
1706    "hash": ""
1707  },
1708  {
1709    "input": "file://localhost/test",
1710    "base": "file:///tmp/mock/path",
1711    "href": "file:///test",
1712    "protocol": "file:",
1713    "username": "",
1714    "password": "",
1715    "host": "",
1716    "hostname": "",
1717    "port": "",
1718    "pathname": "/test",
1719    "search": "",
1720    "hash": ""
1721  },
1722  {
1723    "input": "test",
1724    "base": "file:///tmp/mock/path",
1725    "href": "file:///tmp/mock/test",
1726    "protocol": "file:",
1727    "username": "",
1728    "password": "",
1729    "host": "",
1730    "hostname": "",
1731    "port": "",
1732    "pathname": "/tmp/mock/test",
1733    "search": "",
1734    "hash": ""
1735  },
1736  {
1737    "input": "file:test",
1738    "base": "file:///tmp/mock/path",
1739    "href": "file:///tmp/mock/test",
1740    "protocol": "file:",
1741    "username": "",
1742    "password": "",
1743    "host": "",
1744    "hostname": "",
1745    "port": "",
1746    "pathname": "/tmp/mock/test",
1747    "search": "",
1748    "hash": ""
1749  },
1750  "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/path.js",
1751  {
1752    "input": "http://example.com/././foo",
1753    "base": "about:blank",
1754    "href": "http://example.com/foo",
1755    "origin": "http://example.com",
1756    "protocol": "http:",
1757    "username": "",
1758    "password": "",
1759    "host": "example.com",
1760    "hostname": "example.com",
1761    "port": "",
1762    "pathname": "/foo",
1763    "search": "",
1764    "hash": ""
1765  },
1766  {
1767    "input": "http://example.com/./.foo",
1768    "base": "about:blank",
1769    "href": "http://example.com/.foo",
1770    "origin": "http://example.com",
1771    "protocol": "http:",
1772    "username": "",
1773    "password": "",
1774    "host": "example.com",
1775    "hostname": "example.com",
1776    "port": "",
1777    "pathname": "/.foo",
1778    "search": "",
1779    "hash": ""
1780  },
1781  {
1782    "input": "http://example.com/foo/.",
1783    "base": "about:blank",
1784    "href": "http://example.com/foo/",
1785    "origin": "http://example.com",
1786    "protocol": "http:",
1787    "username": "",
1788    "password": "",
1789    "host": "example.com",
1790    "hostname": "example.com",
1791    "port": "",
1792    "pathname": "/foo/",
1793    "search": "",
1794    "hash": ""
1795  },
1796  {
1797    "input": "http://example.com/foo/./",
1798    "base": "about:blank",
1799    "href": "http://example.com/foo/",
1800    "origin": "http://example.com",
1801    "protocol": "http:",
1802    "username": "",
1803    "password": "",
1804    "host": "example.com",
1805    "hostname": "example.com",
1806    "port": "",
1807    "pathname": "/foo/",
1808    "search": "",
1809    "hash": ""
1810  },
1811  {
1812    "input": "http://example.com/foo/bar/..",
1813    "base": "about:blank",
1814    "href": "http://example.com/foo/",
1815    "origin": "http://example.com",
1816    "protocol": "http:",
1817    "username": "",
1818    "password": "",
1819    "host": "example.com",
1820    "hostname": "example.com",
1821    "port": "",
1822    "pathname": "/foo/",
1823    "search": "",
1824    "hash": ""
1825  },
1826  {
1827    "input": "http://example.com/foo/bar/../",
1828    "base": "about:blank",
1829    "href": "http://example.com/foo/",
1830    "origin": "http://example.com",
1831    "protocol": "http:",
1832    "username": "",
1833    "password": "",
1834    "host": "example.com",
1835    "hostname": "example.com",
1836    "port": "",
1837    "pathname": "/foo/",
1838    "search": "",
1839    "hash": ""
1840  },
1841  {
1842    "input": "http://example.com/foo/..bar",
1843    "base": "about:blank",
1844    "href": "http://example.com/foo/..bar",
1845    "origin": "http://example.com",
1846    "protocol": "http:",
1847    "username": "",
1848    "password": "",
1849    "host": "example.com",
1850    "hostname": "example.com",
1851    "port": "",
1852    "pathname": "/foo/..bar",
1853    "search": "",
1854    "hash": ""
1855  },
1856  {
1857    "input": "http://example.com/foo/bar/../ton",
1858    "base": "about:blank",
1859    "href": "http://example.com/foo/ton",
1860    "origin": "http://example.com",
1861    "protocol": "http:",
1862    "username": "",
1863    "password": "",
1864    "host": "example.com",
1865    "hostname": "example.com",
1866    "port": "",
1867    "pathname": "/foo/ton",
1868    "search": "",
1869    "hash": ""
1870  },
1871  {
1872    "input": "http://example.com/foo/bar/../ton/../../a",
1873    "base": "about:blank",
1874    "href": "http://example.com/a",
1875    "origin": "http://example.com",
1876    "protocol": "http:",
1877    "username": "",
1878    "password": "",
1879    "host": "example.com",
1880    "hostname": "example.com",
1881    "port": "",
1882    "pathname": "/a",
1883    "search": "",
1884    "hash": ""
1885  },
1886  {
1887    "input": "http://example.com/foo/../../..",
1888    "base": "about:blank",
1889    "href": "http://example.com/",
1890    "origin": "http://example.com",
1891    "protocol": "http:",
1892    "username": "",
1893    "password": "",
1894    "host": "example.com",
1895    "hostname": "example.com",
1896    "port": "",
1897    "pathname": "/",
1898    "search": "",
1899    "hash": ""
1900  },
1901  {
1902    "input": "http://example.com/foo/../../../ton",
1903    "base": "about:blank",
1904    "href": "http://example.com/ton",
1905    "origin": "http://example.com",
1906    "protocol": "http:",
1907    "username": "",
1908    "password": "",
1909    "host": "example.com",
1910    "hostname": "example.com",
1911    "port": "",
1912    "pathname": "/ton",
1913    "search": "",
1914    "hash": ""
1915  },
1916  {
1917    "input": "http://example.com/foo/%2e",
1918    "base": "about:blank",
1919    "href": "http://example.com/foo/",
1920    "origin": "http://example.com",
1921    "protocol": "http:",
1922    "username": "",
1923    "password": "",
1924    "host": "example.com",
1925    "hostname": "example.com",
1926    "port": "",
1927    "pathname": "/foo/",
1928    "search": "",
1929    "hash": ""
1930  },
1931  {
1932    "input": "http://example.com/foo/%2e%2",
1933    "base": "about:blank",
1934    "href": "http://example.com/foo/%2e%2",
1935    "origin": "http://example.com",
1936    "protocol": "http:",
1937    "username": "",
1938    "password": "",
1939    "host": "example.com",
1940    "hostname": "example.com",
1941    "port": "",
1942    "pathname": "/foo/%2e%2",
1943    "search": "",
1944    "hash": ""
1945  },
1946  {
1947    "input": "http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar",
1948    "base": "about:blank",
1949    "href": "http://example.com/%2e.bar",
1950    "origin": "http://example.com",
1951    "protocol": "http:",
1952    "username": "",
1953    "password": "",
1954    "host": "example.com",
1955    "hostname": "example.com",
1956    "port": "",
1957    "pathname": "/%2e.bar",
1958    "search": "",
1959    "hash": ""
1960  },
1961  {
1962    "input": "http://example.com////../..",
1963    "base": "about:blank",
1964    "href": "http://example.com//",
1965    "origin": "http://example.com",
1966    "protocol": "http:",
1967    "username": "",
1968    "password": "",
1969    "host": "example.com",
1970    "hostname": "example.com",
1971    "port": "",
1972    "pathname": "//",
1973    "search": "",
1974    "hash": ""
1975  },
1976  {
1977    "input": "http://example.com/foo/bar//../..",
1978    "base": "about:blank",
1979    "href": "http://example.com/foo/",
1980    "origin": "http://example.com",
1981    "protocol": "http:",
1982    "username": "",
1983    "password": "",
1984    "host": "example.com",
1985    "hostname": "example.com",
1986    "port": "",
1987    "pathname": "/foo/",
1988    "search": "",
1989    "hash": ""
1990  },
1991  {
1992    "input": "http://example.com/foo/bar//..",
1993    "base": "about:blank",
1994    "href": "http://example.com/foo/bar/",
1995    "origin": "http://example.com",
1996    "protocol": "http:",
1997    "username": "",
1998    "password": "",
1999    "host": "example.com",
2000    "hostname": "example.com",
2001    "port": "",
2002    "pathname": "/foo/bar/",
2003    "search": "",
2004    "hash": ""
2005  },
2006  {
2007    "input": "http://example.com/foo",
2008    "base": "about:blank",
2009    "href": "http://example.com/foo",
2010    "origin": "http://example.com",
2011    "protocol": "http:",
2012    "username": "",
2013    "password": "",
2014    "host": "example.com",
2015    "hostname": "example.com",
2016    "port": "",
2017    "pathname": "/foo",
2018    "search": "",
2019    "hash": ""
2020  },
2021  {
2022    "input": "http://example.com/%20foo",
2023    "base": "about:blank",
2024    "href": "http://example.com/%20foo",
2025    "origin": "http://example.com",
2026    "protocol": "http:",
2027    "username": "",
2028    "password": "",
2029    "host": "example.com",
2030    "hostname": "example.com",
2031    "port": "",
2032    "pathname": "/%20foo",
2033    "search": "",
2034    "hash": ""
2035  },
2036  {
2037    "input": "http://example.com/foo%",
2038    "base": "about:blank",
2039    "href": "http://example.com/foo%",
2040    "origin": "http://example.com",
2041    "protocol": "http:",
2042    "username": "",
2043    "password": "",
2044    "host": "example.com",
2045    "hostname": "example.com",
2046    "port": "",
2047    "pathname": "/foo%",
2048    "search": "",
2049    "hash": ""
2050  },
2051  {
2052    "input": "http://example.com/foo%2",
2053    "base": "about:blank",
2054    "href": "http://example.com/foo%2",
2055    "origin": "http://example.com",
2056    "protocol": "http:",
2057    "username": "",
2058    "password": "",
2059    "host": "example.com",
2060    "hostname": "example.com",
2061    "port": "",
2062    "pathname": "/foo%2",
2063    "search": "",
2064    "hash": ""
2065  },
2066  {
2067    "input": "http://example.com/foo%2zbar",
2068    "base": "about:blank",
2069    "href": "http://example.com/foo%2zbar",
2070    "origin": "http://example.com",
2071    "protocol": "http:",
2072    "username": "",
2073    "password": "",
2074    "host": "example.com",
2075    "hostname": "example.com",
2076    "port": "",
2077    "pathname": "/foo%2zbar",
2078    "search": "",
2079    "hash": ""
2080  },
2081  {
2082    "input": "http://example.com/foo%2©zbar",
2083    "base": "about:blank",
2084    "href": "http://example.com/foo%2%C3%82%C2%A9zbar",
2085    "origin": "http://example.com",
2086    "protocol": "http:",
2087    "username": "",
2088    "password": "",
2089    "host": "example.com",
2090    "hostname": "example.com",
2091    "port": "",
2092    "pathname": "/foo%2%C3%82%C2%A9zbar",
2093    "search": "",
2094    "hash": ""
2095  },
2096  {
2097    "input": "http://example.com/foo%41%7a",
2098    "base": "about:blank",
2099    "href": "http://example.com/foo%41%7a",
2100    "origin": "http://example.com",
2101    "protocol": "http:",
2102    "username": "",
2103    "password": "",
2104    "host": "example.com",
2105    "hostname": "example.com",
2106    "port": "",
2107    "pathname": "/foo%41%7a",
2108    "search": "",
2109    "hash": ""
2110  },
2111  {
2112    "input": "http://example.com/foo\t\u0091%91",
2113    "base": "about:blank",
2114    "href": "http://example.com/foo%C2%91%91",
2115    "origin": "http://example.com",
2116    "protocol": "http:",
2117    "username": "",
2118    "password": "",
2119    "host": "example.com",
2120    "hostname": "example.com",
2121    "port": "",
2122    "pathname": "/foo%C2%91%91",
2123    "search": "",
2124    "hash": ""
2125  },
2126  {
2127    "input": "http://example.com/foo%00%51",
2128    "base": "about:blank",
2129    "href": "http://example.com/foo%00%51",
2130    "origin": "http://example.com",
2131    "protocol": "http:",
2132    "username": "",
2133    "password": "",
2134    "host": "example.com",
2135    "hostname": "example.com",
2136    "port": "",
2137    "pathname": "/foo%00%51",
2138    "search": "",
2139    "hash": ""
2140  },
2141  {
2142    "input": "http://example.com/(%28:%3A%29)",
2143    "base": "about:blank",
2144    "href": "http://example.com/(%28:%3A%29)",
2145    "origin": "http://example.com",
2146    "protocol": "http:",
2147    "username": "",
2148    "password": "",
2149    "host": "example.com",
2150    "hostname": "example.com",
2151    "port": "",
2152    "pathname": "/(%28:%3A%29)",
2153    "search": "",
2154    "hash": ""
2155  },
2156  {
2157    "input": "http://example.com/%3A%3a%3C%3c",
2158    "base": "about:blank",
2159    "href": "http://example.com/%3A%3a%3C%3c",
2160    "origin": "http://example.com",
2161    "protocol": "http:",
2162    "username": "",
2163    "password": "",
2164    "host": "example.com",
2165    "hostname": "example.com",
2166    "port": "",
2167    "pathname": "/%3A%3a%3C%3c",
2168    "search": "",
2169    "hash": ""
2170  },
2171  {
2172    "input": "http://example.com/foo\tbar",
2173    "base": "about:blank",
2174    "href": "http://example.com/foobar",
2175    "origin": "http://example.com",
2176    "protocol": "http:",
2177    "username": "",
2178    "password": "",
2179    "host": "example.com",
2180    "hostname": "example.com",
2181    "port": "",
2182    "pathname": "/foobar",
2183    "search": "",
2184    "hash": ""
2185  },
2186  {
2187    "input": "http://example.com\\\\foo\\\\bar",
2188    "base": "about:blank",
2189    "href": "http://example.com//foo//bar",
2190    "origin": "http://example.com",
2191    "protocol": "http:",
2192    "username": "",
2193    "password": "",
2194    "host": "example.com",
2195    "hostname": "example.com",
2196    "port": "",
2197    "pathname": "//foo//bar",
2198    "search": "",
2199    "hash": ""
2200  },
2201  {
2202    "input": "http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd",
2203    "base": "about:blank",
2204    "href": "http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd",
2205    "origin": "http://example.com",
2206    "protocol": "http:",
2207    "username": "",
2208    "password": "",
2209    "host": "example.com",
2210    "hostname": "example.com",
2211    "port": "",
2212    "pathname": "/%7Ffp3%3Eju%3Dduvgw%3Dd",
2213    "search": "",
2214    "hash": ""
2215  },
2216  {
2217    "input": "http://example.com/@asdf%40",
2218    "base": "about:blank",
2219    "href": "http://example.com/@asdf%40",
2220    "origin": "http://example.com",
2221    "protocol": "http:",
2222    "username": "",
2223    "password": "",
2224    "host": "example.com",
2225    "hostname": "example.com",
2226    "port": "",
2227    "pathname": "/@asdf%40",
2228    "search": "",
2229    "hash": ""
2230  },
2231  {
2232    "input": "http://example.com/你好你好",
2233    "base": "about:blank",
2234    "href": "http://example.com/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD",
2235    "origin": "http://example.com",
2236    "protocol": "http:",
2237    "username": "",
2238    "password": "",
2239    "host": "example.com",
2240    "hostname": "example.com",
2241    "port": "",
2242    "pathname": "/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD",
2243    "search": "",
2244    "hash": ""
2245  },
2246  {
2247    "input": "http://example.com/‥/foo",
2248    "base": "about:blank",
2249    "href": "http://example.com/%E2%80%A5/foo",
2250    "origin": "http://example.com",
2251    "protocol": "http:",
2252    "username": "",
2253    "password": "",
2254    "host": "example.com",
2255    "hostname": "example.com",
2256    "port": "",
2257    "pathname": "/%E2%80%A5/foo",
2258    "search": "",
2259    "hash": ""
2260  },
2261  {
2262    "input": "http://example.com//foo",
2263    "base": "about:blank",
2264    "href": "http://example.com/%EF%BB%BF/foo",
2265    "origin": "http://example.com",
2266    "protocol": "http:",
2267    "username": "",
2268    "password": "",
2269    "host": "example.com",
2270    "hostname": "example.com",
2271    "port": "",
2272    "pathname": "/%EF%BB%BF/foo",
2273    "search": "",
2274    "hash": ""
2275  },
2276  {
2277    "input": "http://example.com/‮/foo/‭/bar",
2278    "base": "about:blank",
2279    "href": "http://example.com/%E2%80%AE/foo/%E2%80%AD/bar",
2280    "origin": "http://example.com",
2281    "protocol": "http:",
2282    "username": "",
2283    "password": "",
2284    "host": "example.com",
2285    "hostname": "example.com",
2286    "port": "",
2287    "pathname": "/%E2%80%AE/foo/%E2%80%AD/bar",
2288    "search": "",
2289    "hash": ""
2290  },
2291  "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/relative.js",
2292  {
2293    "input": "http://www.google.com/foo?bar=baz#",
2294    "base": "about:blank",
2295    "href": "http://www.google.com/foo?bar=baz#",
2296    "origin": "http://www.google.com",
2297    "protocol": "http:",
2298    "username": "",
2299    "password": "",
2300    "host": "www.google.com",
2301    "hostname": "www.google.com",
2302    "port": "",
2303    "pathname": "/foo",
2304    "search": "?bar=baz",
2305    "hash": ""
2306  },
2307  {
2308    "input": "http://www.google.com/foo?bar=baz# »",
2309    "base": "about:blank",
2310    "href": "http://www.google.com/foo?bar=baz#%20%C2%BB",
2311    "origin": "http://www.google.com",
2312    "protocol": "http:",
2313    "username": "",
2314    "password": "",
2315    "host": "www.google.com",
2316    "hostname": "www.google.com",
2317    "port": "",
2318    "pathname": "/foo",
2319    "search": "?bar=baz",
2320    "hash": "#%20%C2%BB"
2321  },
2322  {
2323    "input": "data:test# »",
2324    "base": "about:blank",
2325    "href": "data:test#%20%C2%BB",
2326    "origin": "null",
2327    "protocol": "data:",
2328    "username": "",
2329    "password": "",
2330    "host": "",
2331    "hostname": "",
2332    "port": "",
2333    "pathname": "test",
2334    "search": "",
2335    "hash": "#%20%C2%BB"
2336  },
2337  {
2338    "input": "http://www.google.com",
2339    "base": "about:blank",
2340    "href": "http://www.google.com/",
2341    "origin": "http://www.google.com",
2342    "protocol": "http:",
2343    "username": "",
2344    "password": "",
2345    "host": "www.google.com",
2346    "hostname": "www.google.com",
2347    "port": "",
2348    "pathname": "/",
2349    "search": "",
2350    "hash": ""
2351  },
2352  {
2353    "input": "http://192.0x00A80001",
2354    "base": "about:blank",
2355    "href": "http://192.168.0.1/",
2356    "origin": "http://192.168.0.1",
2357    "protocol": "http:",
2358    "username": "",
2359    "password": "",
2360    "host": "192.168.0.1",
2361    "hostname": "192.168.0.1",
2362    "port": "",
2363    "pathname": "/",
2364    "search": "",
2365    "hash": ""
2366  },
2367  {
2368    "input": "http://www/foo%2Ehtml",
2369    "base": "about:blank",
2370    "href": "http://www/foo%2Ehtml",
2371    "origin": "http://www",
2372    "protocol": "http:",
2373    "username": "",
2374    "password": "",
2375    "host": "www",
2376    "hostname": "www",
2377    "port": "",
2378    "pathname": "/foo%2Ehtml",
2379    "search": "",
2380    "hash": ""
2381  },
2382  {
2383    "input": "http://www/foo/%2E/html",
2384    "base": "about:blank",
2385    "href": "http://www/foo/html",
2386    "origin": "http://www",
2387    "protocol": "http:",
2388    "username": "",
2389    "password": "",
2390    "host": "www",
2391    "hostname": "www",
2392    "port": "",
2393    "pathname": "/foo/html",
2394    "search": "",
2395    "hash": ""
2396  },
2397  {
2398    "input": "http://user:pass@/",
2399    "base": "about:blank",
2400    "failure": true
2401  },
2402  {
2403    "input": "http://%25DOMAIN:foobar@foodomain.com/",
2404    "base": "about:blank",
2405    "href": "http://%25DOMAIN:foobar@foodomain.com/",
2406    "origin": "http://foodomain.com",
2407    "protocol": "http:",
2408    "username": "%25DOMAIN",
2409    "password": "foobar",
2410    "host": "foodomain.com",
2411    "hostname": "foodomain.com",
2412    "port": "",
2413    "pathname": "/",
2414    "search": "",
2415    "hash": ""
2416  },
2417  {
2418    "input": "http:\\\\www.google.com\\foo",
2419    "base": "about:blank",
2420    "href": "http://www.google.com/foo",
2421    "origin": "http://www.google.com",
2422    "protocol": "http:",
2423    "username": "",
2424    "password": "",
2425    "host": "www.google.com",
2426    "hostname": "www.google.com",
2427    "port": "",
2428    "pathname": "/foo",
2429    "search": "",
2430    "hash": ""
2431  },
2432  {
2433    "input": "http://foo:80/",
2434    "base": "about:blank",
2435    "href": "http://foo/",
2436    "origin": "http://foo",
2437    "protocol": "http:",
2438    "username": "",
2439    "password": "",
2440    "host": "foo",
2441    "hostname": "foo",
2442    "port": "",
2443    "pathname": "/",
2444    "search": "",
2445    "hash": ""
2446  },
2447  {
2448    "input": "http://foo:81/",
2449    "base": "about:blank",
2450    "href": "http://foo:81/",
2451    "origin": "http://foo:81",
2452    "protocol": "http:",
2453    "username": "",
2454    "password": "",
2455    "host": "foo:81",
2456    "hostname": "foo",
2457    "port": "81",
2458    "pathname": "/",
2459    "search": "",
2460    "hash": ""
2461  },
2462  {
2463    "input": "httpa://foo:80/",
2464    "base": "about:blank",
2465    "href": "httpa://foo:80/",
2466    "origin": "null",
2467    "protocol": "httpa:",
2468    "username": "",
2469    "password": "",
2470    "host": "foo:80",
2471    "hostname": "foo",
2472    "port": "80",
2473    "pathname": "/",
2474    "search": "",
2475    "hash": ""
2476  },
2477  {
2478    "input": "http://foo:-80/",
2479    "base": "about:blank",
2480    "failure": true
2481  },
2482  {
2483    "input": "https://foo:443/",
2484    "base": "about:blank",
2485    "href": "https://foo/",
2486    "origin": "https://foo",
2487    "protocol": "https:",
2488    "username": "",
2489    "password": "",
2490    "host": "foo",
2491    "hostname": "foo",
2492    "port": "",
2493    "pathname": "/",
2494    "search": "",
2495    "hash": ""
2496  },
2497  {
2498    "input": "https://foo:80/",
2499    "base": "about:blank",
2500    "href": "https://foo:80/",
2501    "origin": "https://foo:80",
2502    "protocol": "https:",
2503    "username": "",
2504    "password": "",
2505    "host": "foo:80",
2506    "hostname": "foo",
2507    "port": "80",
2508    "pathname": "/",
2509    "search": "",
2510    "hash": ""
2511  },
2512  {
2513    "input": "ftp://foo:21/",
2514    "base": "about:blank",
2515    "href": "ftp://foo/",
2516    "origin": "ftp://foo",
2517    "protocol": "ftp:",
2518    "username": "",
2519    "password": "",
2520    "host": "foo",
2521    "hostname": "foo",
2522    "port": "",
2523    "pathname": "/",
2524    "search": "",
2525    "hash": ""
2526  },
2527  {
2528    "input": "ftp://foo:80/",
2529    "base": "about:blank",
2530    "href": "ftp://foo:80/",
2531    "origin": "ftp://foo:80",
2532    "protocol": "ftp:",
2533    "username": "",
2534    "password": "",
2535    "host": "foo:80",
2536    "hostname": "foo",
2537    "port": "80",
2538    "pathname": "/",
2539    "search": "",
2540    "hash": ""
2541  },
2542  {
2543    "input": "gopher://foo:70/",
2544    "base": "about:blank",
2545    "href": "gopher://foo:70/",
2546    "origin": "null",
2547    "protocol": "gopher:",
2548    "username": "",
2549    "password": "",
2550    "host": "foo:70",
2551    "hostname": "foo",
2552    "port": "70",
2553    "pathname": "/",
2554    "search": "",
2555    "hash": ""
2556  },
2557  {
2558    "input": "gopher://foo:443/",
2559    "base": "about:blank",
2560    "href": "gopher://foo:443/",
2561    "origin": "null",
2562    "protocol": "gopher:",
2563    "username": "",
2564    "password": "",
2565    "host": "foo:443",
2566    "hostname": "foo",
2567    "port": "443",
2568    "pathname": "/",
2569    "search": "",
2570    "hash": ""
2571  },
2572  {
2573    "input": "ws://foo:80/",
2574    "base": "about:blank",
2575    "href": "ws://foo/",
2576    "origin": "ws://foo",
2577    "protocol": "ws:",
2578    "username": "",
2579    "password": "",
2580    "host": "foo",
2581    "hostname": "foo",
2582    "port": "",
2583    "pathname": "/",
2584    "search": "",
2585    "hash": ""
2586  },
2587  {
2588    "input": "ws://foo:81/",
2589    "base": "about:blank",
2590    "href": "ws://foo:81/",
2591    "origin": "ws://foo:81",
2592    "protocol": "ws:",
2593    "username": "",
2594    "password": "",
2595    "host": "foo:81",
2596    "hostname": "foo",
2597    "port": "81",
2598    "pathname": "/",
2599    "search": "",
2600    "hash": ""
2601  },
2602  {
2603    "input": "ws://foo:443/",
2604    "base": "about:blank",
2605    "href": "ws://foo:443/",
2606    "origin": "ws://foo:443",
2607    "protocol": "ws:",
2608    "username": "",
2609    "password": "",
2610    "host": "foo:443",
2611    "hostname": "foo",
2612    "port": "443",
2613    "pathname": "/",
2614    "search": "",
2615    "hash": ""
2616  },
2617  {
2618    "input": "ws://foo:815/",
2619    "base": "about:blank",
2620    "href": "ws://foo:815/",
2621    "origin": "ws://foo:815",
2622    "protocol": "ws:",
2623    "username": "",
2624    "password": "",
2625    "host": "foo:815",
2626    "hostname": "foo",
2627    "port": "815",
2628    "pathname": "/",
2629    "search": "",
2630    "hash": ""
2631  },
2632  {
2633    "input": "wss://foo:80/",
2634    "base": "about:blank",
2635    "href": "wss://foo:80/",
2636    "origin": "wss://foo:80",
2637    "protocol": "wss:",
2638    "username": "",
2639    "password": "",
2640    "host": "foo:80",
2641    "hostname": "foo",
2642    "port": "80",
2643    "pathname": "/",
2644    "search": "",
2645    "hash": ""
2646  },
2647  {
2648    "input": "wss://foo:81/",
2649    "base": "about:blank",
2650    "href": "wss://foo:81/",
2651    "origin": "wss://foo:81",
2652    "protocol": "wss:",
2653    "username": "",
2654    "password": "",
2655    "host": "foo:81",
2656    "hostname": "foo",
2657    "port": "81",
2658    "pathname": "/",
2659    "search": "",
2660    "hash": ""
2661  },
2662  {
2663    "input": "wss://foo:443/",
2664    "base": "about:blank",
2665    "href": "wss://foo/",
2666    "origin": "wss://foo",
2667    "protocol": "wss:",
2668    "username": "",
2669    "password": "",
2670    "host": "foo",
2671    "hostname": "foo",
2672    "port": "",
2673    "pathname": "/",
2674    "search": "",
2675    "hash": ""
2676  },
2677  {
2678    "input": "wss://foo:815/",
2679    "base": "about:blank",
2680    "href": "wss://foo:815/",
2681    "origin": "wss://foo:815",
2682    "protocol": "wss:",
2683    "username": "",
2684    "password": "",
2685    "host": "foo:815",
2686    "hostname": "foo",
2687    "port": "815",
2688    "pathname": "/",
2689    "search": "",
2690    "hash": ""
2691  },
2692  {
2693    "input": "http:/example.com/",
2694    "base": "about:blank",
2695    "href": "http://example.com/",
2696    "origin": "http://example.com",
2697    "protocol": "http:",
2698    "username": "",
2699    "password": "",
2700    "host": "example.com",
2701    "hostname": "example.com",
2702    "port": "",
2703    "pathname": "/",
2704    "search": "",
2705    "hash": ""
2706  },
2707  {
2708    "input": "ftp:/example.com/",
2709    "base": "about:blank",
2710    "href": "ftp://example.com/",
2711    "origin": "ftp://example.com",
2712    "protocol": "ftp:",
2713    "username": "",
2714    "password": "",
2715    "host": "example.com",
2716    "hostname": "example.com",
2717    "port": "",
2718    "pathname": "/",
2719    "search": "",
2720    "hash": ""
2721  },
2722  {
2723    "input": "https:/example.com/",
2724    "base": "about:blank",
2725    "href": "https://example.com/",
2726    "origin": "https://example.com",
2727    "protocol": "https:",
2728    "username": "",
2729    "password": "",
2730    "host": "example.com",
2731    "hostname": "example.com",
2732    "port": "",
2733    "pathname": "/",
2734    "search": "",
2735    "hash": ""
2736  },
2737  {
2738    "input": "madeupscheme:/example.com/",
2739    "base": "about:blank",
2740    "href": "madeupscheme:/example.com/",
2741    "origin": "null",
2742    "protocol": "madeupscheme:",
2743    "username": "",
2744    "password": "",
2745    "host": "",
2746    "hostname": "",
2747    "port": "",
2748    "pathname": "/example.com/",
2749    "search": "",
2750    "hash": ""
2751  },
2752  {
2753    "input": "file:/example.com/",
2754    "base": "about:blank",
2755    "href": "file:///example.com/",
2756    "protocol": "file:",
2757    "username": "",
2758    "password": "",
2759    "host": "",
2760    "hostname": "",
2761    "port": "",
2762    "pathname": "/example.com/",
2763    "search": "",
2764    "hash": ""
2765  },
2766  {
2767    "input": "ftps:/example.com/",
2768    "base": "about:blank",
2769    "href": "ftps:/example.com/",
2770    "origin": "null",
2771    "protocol": "ftps:",
2772    "username": "",
2773    "password": "",
2774    "host": "",
2775    "hostname": "",
2776    "port": "",
2777    "pathname": "/example.com/",
2778    "search": "",
2779    "hash": ""
2780  },
2781  {
2782    "input": "gopher:/example.com/",
2783    "base": "about:blank",
2784    "href": "gopher:/example.com/",
2785    "origin": "null",
2786    "protocol": "gopher:",
2787    "username": "",
2788    "password": "",
2789    "host": "",
2790    "hostname": "",
2791    "port": "",
2792    "pathname": "/example.com/",
2793    "search": "",
2794    "hash": ""
2795  },
2796  {
2797    "input": "ws:/example.com/",
2798    "base": "about:blank",
2799    "href": "ws://example.com/",
2800    "origin": "ws://example.com",
2801    "protocol": "ws:",
2802    "username": "",
2803    "password": "",
2804    "host": "example.com",
2805    "hostname": "example.com",
2806    "port": "",
2807    "pathname": "/",
2808    "search": "",
2809    "hash": ""
2810  },
2811  {
2812    "input": "wss:/example.com/",
2813    "base": "about:blank",
2814    "href": "wss://example.com/",
2815    "origin": "wss://example.com",
2816    "protocol": "wss:",
2817    "username": "",
2818    "password": "",
2819    "host": "example.com",
2820    "hostname": "example.com",
2821    "port": "",
2822    "pathname": "/",
2823    "search": "",
2824    "hash": ""
2825  },
2826  {
2827    "input": "data:/example.com/",
2828    "base": "about:blank",
2829    "href": "data:/example.com/",
2830    "origin": "null",
2831    "protocol": "data:",
2832    "username": "",
2833    "password": "",
2834    "host": "",
2835    "hostname": "",
2836    "port": "",
2837    "pathname": "/example.com/",
2838    "search": "",
2839    "hash": ""
2840  },
2841  {
2842    "input": "javascript:/example.com/",
2843    "base": "about:blank",
2844    "href": "javascript:/example.com/",
2845    "origin": "null",
2846    "protocol": "javascript:",
2847    "username": "",
2848    "password": "",
2849    "host": "",
2850    "hostname": "",
2851    "port": "",
2852    "pathname": "/example.com/",
2853    "search": "",
2854    "hash": ""
2855  },
2856  {
2857    "input": "mailto:/example.com/",
2858    "base": "about:blank",
2859    "href": "mailto:/example.com/",
2860    "origin": "null",
2861    "protocol": "mailto:",
2862    "username": "",
2863    "password": "",
2864    "host": "",
2865    "hostname": "",
2866    "port": "",
2867    "pathname": "/example.com/",
2868    "search": "",
2869    "hash": ""
2870  },
2871  {
2872    "input": "http:example.com/",
2873    "base": "about:blank",
2874    "href": "http://example.com/",
2875    "origin": "http://example.com",
2876    "protocol": "http:",
2877    "username": "",
2878    "password": "",
2879    "host": "example.com",
2880    "hostname": "example.com",
2881    "port": "",
2882    "pathname": "/",
2883    "search": "",
2884    "hash": ""
2885  },
2886  {
2887    "input": "ftp:example.com/",
2888    "base": "about:blank",
2889    "href": "ftp://example.com/",
2890    "origin": "ftp://example.com",
2891    "protocol": "ftp:",
2892    "username": "",
2893    "password": "",
2894    "host": "example.com",
2895    "hostname": "example.com",
2896    "port": "",
2897    "pathname": "/",
2898    "search": "",
2899    "hash": ""
2900  },
2901  {
2902    "input": "https:example.com/",
2903    "base": "about:blank",
2904    "href": "https://example.com/",
2905    "origin": "https://example.com",
2906    "protocol": "https:",
2907    "username": "",
2908    "password": "",
2909    "host": "example.com",
2910    "hostname": "example.com",
2911    "port": "",
2912    "pathname": "/",
2913    "search": "",
2914    "hash": ""
2915  },
2916  {
2917    "input": "madeupscheme:example.com/",
2918    "base": "about:blank",
2919    "href": "madeupscheme:example.com/",
2920    "origin": "null",
2921    "protocol": "madeupscheme:",
2922    "username": "",
2923    "password": "",
2924    "host": "",
2925    "hostname": "",
2926    "port": "",
2927    "pathname": "example.com/",
2928    "search": "",
2929    "hash": ""
2930  },
2931  {
2932    "input": "ftps:example.com/",
2933    "base": "about:blank",
2934    "href": "ftps:example.com/",
2935    "origin": "null",
2936    "protocol": "ftps:",
2937    "username": "",
2938    "password": "",
2939    "host": "",
2940    "hostname": "",
2941    "port": "",
2942    "pathname": "example.com/",
2943    "search": "",
2944    "hash": ""
2945  },
2946  {
2947    "input": "gopher:example.com/",
2948    "base": "about:blank",
2949    "href": "gopher:example.com/",
2950    "origin": "null",
2951    "protocol": "gopher:",
2952    "username": "",
2953    "password": "",
2954    "host": "",
2955    "hostname": "",
2956    "port": "",
2957    "pathname": "example.com/",
2958    "search": "",
2959    "hash": ""
2960  },
2961  {
2962    "input": "ws:example.com/",
2963    "base": "about:blank",
2964    "href": "ws://example.com/",
2965    "origin": "ws://example.com",
2966    "protocol": "ws:",
2967    "username": "",
2968    "password": "",
2969    "host": "example.com",
2970    "hostname": "example.com",
2971    "port": "",
2972    "pathname": "/",
2973    "search": "",
2974    "hash": ""
2975  },
2976  {
2977    "input": "wss:example.com/",
2978    "base": "about:blank",
2979    "href": "wss://example.com/",
2980    "origin": "wss://example.com",
2981    "protocol": "wss:",
2982    "username": "",
2983    "password": "",
2984    "host": "example.com",
2985    "hostname": "example.com",
2986    "port": "",
2987    "pathname": "/",
2988    "search": "",
2989    "hash": ""
2990  },
2991  {
2992    "input": "data:example.com/",
2993    "base": "about:blank",
2994    "href": "data:example.com/",
2995    "origin": "null",
2996    "protocol": "data:",
2997    "username": "",
2998    "password": "",
2999    "host": "",
3000    "hostname": "",
3001    "port": "",
3002    "pathname": "example.com/",
3003    "search": "",
3004    "hash": ""
3005  },
3006  {
3007    "input": "javascript:example.com/",
3008    "base": "about:blank",
3009    "href": "javascript:example.com/",
3010    "origin": "null",
3011    "protocol": "javascript:",
3012    "username": "",
3013    "password": "",
3014    "host": "",
3015    "hostname": "",
3016    "port": "",
3017    "pathname": "example.com/",
3018    "search": "",
3019    "hash": ""
3020  },
3021  {
3022    "input": "mailto:example.com/",
3023    "base": "about:blank",
3024    "href": "mailto:example.com/",
3025    "origin": "null",
3026    "protocol": "mailto:",
3027    "username": "",
3028    "password": "",
3029    "host": "",
3030    "hostname": "",
3031    "port": "",
3032    "pathname": "example.com/",
3033    "search": "",
3034    "hash": ""
3035  },
3036  "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/segments-userinfo-vs-host.html",
3037  {
3038    "input": "http:@www.example.com",
3039    "base": "about:blank",
3040    "href": "http://www.example.com/",
3041    "origin": "http://www.example.com",
3042    "protocol": "http:",
3043    "username": "",
3044    "password": "",
3045    "host": "www.example.com",
3046    "hostname": "www.example.com",
3047    "port": "",
3048    "pathname": "/",
3049    "search": "",
3050    "hash": ""
3051  },
3052  {
3053    "input": "http:/@www.example.com",
3054    "base": "about:blank",
3055    "href": "http://www.example.com/",
3056    "origin": "http://www.example.com",
3057    "protocol": "http:",
3058    "username": "",
3059    "password": "",
3060    "host": "www.example.com",
3061    "hostname": "www.example.com",
3062    "port": "",
3063    "pathname": "/",
3064    "search": "",
3065    "hash": ""
3066  },
3067  {
3068    "input": "http://@www.example.com",
3069    "base": "about:blank",
3070    "href": "http://www.example.com/",
3071    "origin": "http://www.example.com",
3072    "protocol": "http:",
3073    "username": "",
3074    "password": "",
3075    "host": "www.example.com",
3076    "hostname": "www.example.com",
3077    "port": "",
3078    "pathname": "/",
3079    "search": "",
3080    "hash": ""
3081  },
3082  {
3083    "input": "http:a:b@www.example.com",
3084    "base": "about:blank",
3085    "href": "http://a:b@www.example.com/",
3086    "origin": "http://www.example.com",
3087    "protocol": "http:",
3088    "username": "a",
3089    "password": "b",
3090    "host": "www.example.com",
3091    "hostname": "www.example.com",
3092    "port": "",
3093    "pathname": "/",
3094    "search": "",
3095    "hash": ""
3096  },
3097  {
3098    "input": "http:/a:b@www.example.com",
3099    "base": "about:blank",
3100    "href": "http://a:b@www.example.com/",
3101    "origin": "http://www.example.com",
3102    "protocol": "http:",
3103    "username": "a",
3104    "password": "b",
3105    "host": "www.example.com",
3106    "hostname": "www.example.com",
3107    "port": "",
3108    "pathname": "/",
3109    "search": "",
3110    "hash": ""
3111  },
3112  {
3113    "input": "http://a:b@www.example.com",
3114    "base": "about:blank",
3115    "href": "http://a:b@www.example.com/",
3116    "origin": "http://www.example.com",
3117    "protocol": "http:",
3118    "username": "a",
3119    "password": "b",
3120    "host": "www.example.com",
3121    "hostname": "www.example.com",
3122    "port": "",
3123    "pathname": "/",
3124    "search": "",
3125    "hash": ""
3126  },
3127  {
3128    "input": "http://@pple.com",
3129    "base": "about:blank",
3130    "href": "http://pple.com/",
3131    "origin": "http://pple.com",
3132    "protocol": "http:",
3133    "username": "",
3134    "password": "",
3135    "host": "pple.com",
3136    "hostname": "pple.com",
3137    "port": "",
3138    "pathname": "/",
3139    "search": "",
3140    "hash": ""
3141  },
3142  {
3143    "input": "http::b@www.example.com",
3144    "base": "about:blank",
3145    "href": "http://:b@www.example.com/",
3146    "origin": "http://www.example.com",
3147    "protocol": "http:",
3148    "username": "",
3149    "password": "b",
3150    "host": "www.example.com",
3151    "hostname": "www.example.com",
3152    "port": "",
3153    "pathname": "/",
3154    "search": "",
3155    "hash": ""
3156  },
3157  {
3158    "input": "http:/:b@www.example.com",
3159    "base": "about:blank",
3160    "href": "http://:b@www.example.com/",
3161    "origin": "http://www.example.com",
3162    "protocol": "http:",
3163    "username": "",
3164    "password": "b",
3165    "host": "www.example.com",
3166    "hostname": "www.example.com",
3167    "port": "",
3168    "pathname": "/",
3169    "search": "",
3170    "hash": ""
3171  },
3172  {
3173    "input": "http://:b@www.example.com",
3174    "base": "about:blank",
3175    "href": "http://:b@www.example.com/",
3176    "origin": "http://www.example.com",
3177    "protocol": "http:",
3178    "username": "",
3179    "password": "b",
3180    "host": "www.example.com",
3181    "hostname": "www.example.com",
3182    "port": "",
3183    "pathname": "/",
3184    "search": "",
3185    "hash": ""
3186  },
3187  {
3188    "input": "http:/:@/www.example.com",
3189    "base": "about:blank",
3190    "failure": true,
3191    "inputCanBeRelative": true
3192  },
3193  {
3194    "input": "http://user@/www.example.com",
3195    "base": "about:blank",
3196    "failure": true
3197  },
3198  {
3199    "input": "http:@/www.example.com",
3200    "base": "about:blank",
3201    "failure": true,
3202    "inputCanBeRelative": true
3203  },
3204  {
3205    "input": "http:/@/www.example.com",
3206    "base": "about:blank",
3207    "failure": true,
3208    "inputCanBeRelative": true
3209  },
3210  {
3211    "input": "http://@/www.example.com",
3212    "base": "about:blank",
3213    "failure": true
3214  },
3215  {
3216    "input": "https:@/www.example.com",
3217    "base": "about:blank",
3218    "failure": true,
3219    "inputCanBeRelative": true
3220  },
3221  {
3222    "input": "http:a:b@/www.example.com",
3223    "base": "about:blank",
3224    "failure": true,
3225    "inputCanBeRelative": true
3226  },
3227  {
3228    "input": "http:/a:b@/www.example.com",
3229    "base": "about:blank",
3230    "failure": true,
3231    "inputCanBeRelative": true
3232  },
3233  {
3234    "input": "http://a:b@/www.example.com",
3235    "base": "about:blank",
3236    "failure": true
3237  },
3238  {
3239    "input": "http::@/www.example.com",
3240    "base": "about:blank",
3241    "failure": true,
3242    "inputCanBeRelative": true
3243  },
3244  {
3245    "input": "http:a:@www.example.com",
3246    "base": "about:blank",
3247    "href": "http://a@www.example.com/",
3248    "origin": "http://www.example.com",
3249    "protocol": "http:",
3250    "username": "a",
3251    "password": "",
3252    "host": "www.example.com",
3253    "hostname": "www.example.com",
3254    "port": "",
3255    "pathname": "/",
3256    "search": "",
3257    "hash": ""
3258  },
3259  {
3260    "input": "http:/a:@www.example.com",
3261    "base": "about:blank",
3262    "href": "http://a@www.example.com/",
3263    "origin": "http://www.example.com",
3264    "protocol": "http:",
3265    "username": "a",
3266    "password": "",
3267    "host": "www.example.com",
3268    "hostname": "www.example.com",
3269    "port": "",
3270    "pathname": "/",
3271    "search": "",
3272    "hash": ""
3273  },
3274  {
3275    "input": "http://a:@www.example.com",
3276    "base": "about:blank",
3277    "href": "http://a@www.example.com/",
3278    "origin": "http://www.example.com",
3279    "protocol": "http:",
3280    "username": "a",
3281    "password": "",
3282    "host": "www.example.com",
3283    "hostname": "www.example.com",
3284    "port": "",
3285    "pathname": "/",
3286    "search": "",
3287    "hash": ""
3288  },
3289  {
3290    "input": "http://www.@pple.com",
3291    "base": "about:blank",
3292    "href": "http://www.@pple.com/",
3293    "origin": "http://pple.com",
3294    "protocol": "http:",
3295    "username": "www.",
3296    "password": "",
3297    "host": "pple.com",
3298    "hostname": "pple.com",
3299    "port": "",
3300    "pathname": "/",
3301    "search": "",
3302    "hash": ""
3303  },
3304  {
3305    "input": "http:@:www.example.com",
3306    "base": "about:blank",
3307    "failure": true,
3308    "inputCanBeRelative": true
3309  },
3310  {
3311    "input": "http:/@:www.example.com",
3312    "base": "about:blank",
3313    "failure": true,
3314    "inputCanBeRelative": true
3315  },
3316  {
3317    "input": "http://@:www.example.com",
3318    "base": "about:blank",
3319    "failure": true
3320  },
3321  {
3322    "input": "http://:@www.example.com",
3323    "base": "about:blank",
3324    "href": "http://www.example.com/",
3325    "origin": "http://www.example.com",
3326    "protocol": "http:",
3327    "username": "",
3328    "password": "",
3329    "host": "www.example.com",
3330    "hostname": "www.example.com",
3331    "port": "",
3332    "pathname": "/",
3333    "search": "",
3334    "hash": ""
3335  },
3336  "# Others",
3337  {
3338    "input": "/",
3339    "base": "http://www.example.com/test",
3340    "href": "http://www.example.com/",
3341    "origin": "http://www.example.com",
3342    "protocol": "http:",
3343    "username": "",
3344    "password": "",
3345    "host": "www.example.com",
3346    "hostname": "www.example.com",
3347    "port": "",
3348    "pathname": "/",
3349    "search": "",
3350    "hash": ""
3351  },
3352  {
3353    "input": "/test.txt",
3354    "base": "http://www.example.com/test",
3355    "href": "http://www.example.com/test.txt",
3356    "origin": "http://www.example.com",
3357    "protocol": "http:",
3358    "username": "",
3359    "password": "",
3360    "host": "www.example.com",
3361    "hostname": "www.example.com",
3362    "port": "",
3363    "pathname": "/test.txt",
3364    "search": "",
3365    "hash": ""
3366  },
3367  {
3368    "input": ".",
3369    "base": "http://www.example.com/test",
3370    "href": "http://www.example.com/",
3371    "origin": "http://www.example.com",
3372    "protocol": "http:",
3373    "username": "",
3374    "password": "",
3375    "host": "www.example.com",
3376    "hostname": "www.example.com",
3377    "port": "",
3378    "pathname": "/",
3379    "search": "",
3380    "hash": ""
3381  },
3382  {
3383    "input": "..",
3384    "base": "http://www.example.com/test",
3385    "href": "http://www.example.com/",
3386    "origin": "http://www.example.com",
3387    "protocol": "http:",
3388    "username": "",
3389    "password": "",
3390    "host": "www.example.com",
3391    "hostname": "www.example.com",
3392    "port": "",
3393    "pathname": "/",
3394    "search": "",
3395    "hash": ""
3396  },
3397  {
3398    "input": "test.txt",
3399    "base": "http://www.example.com/test",
3400    "href": "http://www.example.com/test.txt",
3401    "origin": "http://www.example.com",
3402    "protocol": "http:",
3403    "username": "",
3404    "password": "",
3405    "host": "www.example.com",
3406    "hostname": "www.example.com",
3407    "port": "",
3408    "pathname": "/test.txt",
3409    "search": "",
3410    "hash": ""
3411  },
3412  {
3413    "input": "./test.txt",
3414    "base": "http://www.example.com/test",
3415    "href": "http://www.example.com/test.txt",
3416    "origin": "http://www.example.com",
3417    "protocol": "http:",
3418    "username": "",
3419    "password": "",
3420    "host": "www.example.com",
3421    "hostname": "www.example.com",
3422    "port": "",
3423    "pathname": "/test.txt",
3424    "search": "",
3425    "hash": ""
3426  },
3427  {
3428    "input": "../test.txt",
3429    "base": "http://www.example.com/test",
3430    "href": "http://www.example.com/test.txt",
3431    "origin": "http://www.example.com",
3432    "protocol": "http:",
3433    "username": "",
3434    "password": "",
3435    "host": "www.example.com",
3436    "hostname": "www.example.com",
3437    "port": "",
3438    "pathname": "/test.txt",
3439    "search": "",
3440    "hash": ""
3441  },
3442  {
3443    "input": "../aaa/test.txt",
3444    "base": "http://www.example.com/test",
3445    "href": "http://www.example.com/aaa/test.txt",
3446    "origin": "http://www.example.com",
3447    "protocol": "http:",
3448    "username": "",
3449    "password": "",
3450    "host": "www.example.com",
3451    "hostname": "www.example.com",
3452    "port": "",
3453    "pathname": "/aaa/test.txt",
3454    "search": "",
3455    "hash": ""
3456  },
3457  {
3458    "input": "../../test.txt",
3459    "base": "http://www.example.com/test",
3460    "href": "http://www.example.com/test.txt",
3461    "origin": "http://www.example.com",
3462    "protocol": "http:",
3463    "username": "",
3464    "password": "",
3465    "host": "www.example.com",
3466    "hostname": "www.example.com",
3467    "port": "",
3468    "pathname": "/test.txt",
3469    "search": "",
3470    "hash": ""
3471  },
3472  {
3473    "input": "中/test.txt",
3474    "base": "http://www.example.com/test",
3475    "href": "http://www.example.com/%E4%B8%AD/test.txt",
3476    "origin": "http://www.example.com",
3477    "protocol": "http:",
3478    "username": "",
3479    "password": "",
3480    "host": "www.example.com",
3481    "hostname": "www.example.com",
3482    "port": "",
3483    "pathname": "/%E4%B8%AD/test.txt",
3484    "search": "",
3485    "hash": ""
3486  },
3487  {
3488    "input": "http://www.example2.com",
3489    "base": "http://www.example.com/test",
3490    "href": "http://www.example2.com/",
3491    "origin": "http://www.example2.com",
3492    "protocol": "http:",
3493    "username": "",
3494    "password": "",
3495    "host": "www.example2.com",
3496    "hostname": "www.example2.com",
3497    "port": "",
3498    "pathname": "/",
3499    "search": "",
3500    "hash": ""
3501  },
3502  {
3503    "input": "//www.example2.com",
3504    "base": "http://www.example.com/test",
3505    "href": "http://www.example2.com/",
3506    "origin": "http://www.example2.com",
3507    "protocol": "http:",
3508    "username": "",
3509    "password": "",
3510    "host": "www.example2.com",
3511    "hostname": "www.example2.com",
3512    "port": "",
3513    "pathname": "/",
3514    "search": "",
3515    "hash": ""
3516  },
3517  {
3518    "input": "file:...",
3519    "base": "http://www.example.com/test",
3520    "href": "file:///...",
3521    "protocol": "file:",
3522    "username": "",
3523    "password": "",
3524    "host": "",
3525    "hostname": "",
3526    "port": "",
3527    "pathname": "/...",
3528    "search": "",
3529    "hash": ""
3530  },
3531  {
3532    "input": "file:..",
3533    "base": "http://www.example.com/test",
3534    "href": "file:///",
3535    "protocol": "file:",
3536    "username": "",
3537    "password": "",
3538    "host": "",
3539    "hostname": "",
3540    "port": "",
3541    "pathname": "/",
3542    "search": "",
3543    "hash": ""
3544  },
3545  {
3546    "input": "file:a",
3547    "base": "http://www.example.com/test",
3548    "href": "file:///a",
3549    "protocol": "file:",
3550    "username": "",
3551    "password": "",
3552    "host": "",
3553    "hostname": "",
3554    "port": "",
3555    "pathname": "/a",
3556    "search": "",
3557    "hash": ""
3558  },
3559  "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/host.html",
3560  "Basic canonicalization, uppercase should be converted to lowercase",
3561  {
3562    "input": "http://ExAmPlE.CoM",
3563    "base": "http://other.com/",
3564    "href": "http://example.com/",
3565    "origin": "http://example.com",
3566    "protocol": "http:",
3567    "username": "",
3568    "password": "",
3569    "host": "example.com",
3570    "hostname": "example.com",
3571    "port": "",
3572    "pathname": "/",
3573    "search": "",
3574    "hash": ""
3575  },
3576  {
3577    "input": "http://example example.com",
3578    "base": "http://other.com/",
3579    "failure": true
3580  },
3581  {
3582    "input": "http://Goo%20 goo%7C|.com",
3583    "base": "http://other.com/",
3584    "failure": true
3585  },
3586  {
3587    "input": "http://[]",
3588    "base": "http://other.com/",
3589    "failure": true
3590  },
3591  {
3592    "input": "http://[:]",
3593    "base": "http://other.com/",
3594    "failure": true
3595  },
3596  "U+3000 is mapped to U+0020 (space) which is disallowed",
3597  {
3598    "input": "http://GOO\u00a0\u3000goo.com",
3599    "base": "http://other.com/",
3600    "failure": true
3601  },
3602  "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",
3603  {
3604    "input": "http://GOO\u200b\u2060\ufeffgoo.com",
3605    "base": "http://other.com/",
3606    "href": "http://googoo.com/",
3607    "origin": "http://googoo.com",
3608    "protocol": "http:",
3609    "username": "",
3610    "password": "",
3611    "host": "googoo.com",
3612    "hostname": "googoo.com",
3613    "port": "",
3614    "pathname": "/",
3615    "search": "",
3616    "hash": ""
3617  },
3618  "Leading and trailing C0 control or space",
3619  {
3620    "input": "\u0000\u001b\u0004\u0012 http://example.com/\u001f \u000d ",
3621    "base": "about:blank",
3622    "href": "http://example.com/",
3623    "origin": "http://example.com",
3624    "protocol": "http:",
3625    "username": "",
3626    "password": "",
3627    "host": "example.com",
3628    "hostname": "example.com",
3629    "port": "",
3630    "pathname": "/",
3631    "search": "",
3632    "hash": ""
3633  },
3634  "Ideographic full stop (full-width period for Chinese, etc.) should be treated as a dot. U+3002 is mapped to U+002E (dot)",
3635  {
3636    "input": "http://www.foo。bar.com",
3637    "base": "http://other.com/",
3638    "href": "http://www.foo.bar.com/",
3639    "origin": "http://www.foo.bar.com",
3640    "protocol": "http:",
3641    "username": "",
3642    "password": "",
3643    "host": "www.foo.bar.com",
3644    "hostname": "www.foo.bar.com",
3645    "port": "",
3646    "pathname": "/",
3647    "search": "",
3648    "hash": ""
3649  },
3650  "Invalid unicode characters should fail... U+FDD0 is disallowed; %ef%b7%90 is U+FDD0",
3651  {
3652    "input": "http://\ufdd0zyx.com",
3653    "base": "http://other.com/",
3654    "failure": true
3655  },
3656  "This is the same as previous but escaped",
3657  {
3658    "input": "http://%ef%b7%90zyx.com",
3659    "base": "http://other.com/",
3660    "failure": true
3661  },
3662  "U+FFFD",
3663  {
3664    "input": "https://\ufffd",
3665    "base": "about:blank",
3666    "failure": true
3667  },
3668  {
3669    "input": "https://%EF%BF%BD",
3670    "base": "about:blank",
3671    "failure": true
3672  },
3673  {
3674    "input": "https://x/\ufffd?\ufffd#\ufffd",
3675    "base": "about:blank",
3676    "href": "https://x/%EF%BF%BD?%EF%BF%BD#%EF%BF%BD",
3677    "origin": "https://x",
3678    "protocol": "https:",
3679    "username": "",
3680    "password": "",
3681    "host": "x",
3682    "hostname": "x",
3683    "port": "",
3684    "pathname": "/%EF%BF%BD",
3685    "search": "?%EF%BF%BD",
3686    "hash": "#%EF%BF%BD"
3687  },
3688  "Domain is ASCII, but a label is invalid IDNA",
3689  {
3690    "input": "http://a.b.c.xn--pokxncvks",
3691    "base": "about:blank",
3692    "failure": true
3693  },
3694  {
3695    "input": "http://10.0.0.xn--pokxncvks",
3696    "base": "about:blank",
3697    "failure": true
3698  },
3699  "IDNA labels should be matched case-insensitively",
3700  {
3701    "input": "http://a.b.c.XN--pokxncvks",
3702    "base": "about:blank",
3703    "failure": true
3704  },
3705  {
3706    "input": "http://a.b.c.Xn--pokxncvks",
3707    "base": "about:blank",
3708    "failure": true
3709  },
3710  {
3711    "input": "http://10.0.0.XN--pokxncvks",
3712    "base": "about:blank",
3713    "failure": true
3714  },
3715  {
3716    "input": "http://10.0.0.xN--pokxncvks",
3717    "base": "about:blank",
3718    "failure": true
3719  },
3720  "Test name prepping, fullwidth input should be converted to ASCII and NOT IDN-ized. This is 'Go' in fullwidth UTF-8/UTF-16.",
3721  {
3722    "input": "http://Go.com",
3723    "base": "http://other.com/",
3724    "href": "http://go.com/",
3725    "origin": "http://go.com",
3726    "protocol": "http:",
3727    "username": "",
3728    "password": "",
3729    "host": "go.com",
3730    "hostname": "go.com",
3731    "port": "",
3732    "pathname": "/",
3733    "search": "",
3734    "hash": ""
3735  },
3736  "URL spec forbids the following. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24257",
3737  {
3738    "input": "http://%41.com",
3739    "base": "http://other.com/",
3740    "failure": true
3741  },
3742  {
3743    "input": "http://%ef%bc%85%ef%bc%94%ef%bc%91.com",
3744    "base": "http://other.com/",
3745    "failure": true
3746  },
3747  "...%00 in fullwidth should fail (also as escaped UTF-8 input)",
3748  {
3749    "input": "http://%00.com",
3750    "base": "http://other.com/",
3751    "failure": true
3752  },
3753  {
3754    "input": "http://%ef%bc%85%ef%bc%90%ef%bc%90.com",
3755    "base": "http://other.com/",
3756    "failure": true
3757  },
3758  "Basic IDN support, UTF-8 and UTF-16 input should be converted to IDN",
3759  {
3760    "input": "http://你好你好",
3761    "base": "http://other.com/",
3762    "href": "http://xn--6qqa088eba/",
3763    "origin": "http://xn--6qqa088eba",
3764    "protocol": "http:",
3765    "username": "",
3766    "password": "",
3767    "host": "xn--6qqa088eba",
3768    "hostname": "xn--6qqa088eba",
3769    "port": "",
3770    "pathname": "/",
3771    "search": "",
3772    "hash": ""
3773  },
3774  {
3775    "input": "https://faß.ExAmPlE/",
3776    "base": "about:blank",
3777    "href": "https://xn--fa-hia.example/",
3778    "origin": "https://xn--fa-hia.example",
3779    "protocol": "https:",
3780    "username": "",
3781    "password": "",
3782    "host": "xn--fa-hia.example",
3783    "hostname": "xn--fa-hia.example",
3784    "port": "",
3785    "pathname": "/",
3786    "search": "",
3787    "hash": ""
3788  },
3789  {
3790    "input": "sc://faß.ExAmPlE/",
3791    "base": "about:blank",
3792    "href": "sc://fa%C3%9F.ExAmPlE/",
3793    "origin": "null",
3794    "protocol": "sc:",
3795    "username": "",
3796    "password": "",
3797    "host": "fa%C3%9F.ExAmPlE",
3798    "hostname": "fa%C3%9F.ExAmPlE",
3799    "port": "",
3800    "pathname": "/",
3801    "search": "",
3802    "hash": ""
3803  },
3804  "Invalid escaped characters should fail and the percents should be escaped. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24191",
3805  {
3806    "input": "http://%zz%66%a.com",
3807    "base": "http://other.com/",
3808    "failure": true
3809  },
3810  "If we get an invalid character that has been escaped.",
3811  {
3812    "input": "http://%25",
3813    "base": "http://other.com/",
3814    "failure": true
3815  },
3816  {
3817    "input": "http://hello%00",
3818    "base": "http://other.com/",
3819    "failure": true
3820  },
3821  "Escaped numbers should be treated like IP addresses if they are.",
3822  {
3823    "input": "http://%30%78%63%30%2e%30%32%35%30.01",
3824    "base": "http://other.com/",
3825    "href": "http://192.168.0.1/",
3826    "origin": "http://192.168.0.1",
3827    "protocol": "http:",
3828    "username": "",
3829    "password": "",
3830    "host": "192.168.0.1",
3831    "hostname": "192.168.0.1",
3832    "port": "",
3833    "pathname": "/",
3834    "search": "",
3835    "hash": ""
3836  },
3837  {
3838    "input": "http://%30%78%63%30%2e%30%32%35%30.01%2e",
3839    "base": "http://other.com/",
3840    "href": "http://192.168.0.1/",
3841    "origin": "http://192.168.0.1",
3842    "protocol": "http:",
3843    "username": "",
3844    "password": "",
3845    "host": "192.168.0.1",
3846    "hostname": "192.168.0.1",
3847    "port": "",
3848    "pathname": "/",
3849    "search": "",
3850    "hash": ""
3851  },
3852  {
3853    "input": "http://192.168.0.257",
3854    "base": "http://other.com/",
3855    "failure": true
3856  },
3857  "Invalid escaping in hosts causes failure",
3858  {
3859    "input": "http://%3g%78%63%30%2e%30%32%35%30%2E.01",
3860    "base": "http://other.com/",
3861    "failure": true
3862  },
3863  "A space in a host causes failure",
3864  {
3865    "input": "http://192.168.0.1 hello",
3866    "base": "http://other.com/",
3867    "failure": true
3868  },
3869  {
3870    "input": "https://x x:12",
3871    "base": "about:blank",
3872    "failure": true
3873  },
3874  "Fullwidth and escaped UTF-8 fullwidth should still be treated as IP",
3875  {
3876    "input": "http://0Xc0.0250.01",
3877    "base": "http://other.com/",
3878    "href": "http://192.168.0.1/",
3879    "origin": "http://192.168.0.1",
3880    "protocol": "http:",
3881    "username": "",
3882    "password": "",
3883    "host": "192.168.0.1",
3884    "hostname": "192.168.0.1",
3885    "port": "",
3886    "pathname": "/",
3887    "search": "",
3888    "hash": ""
3889  },
3890  "Domains with empty labels",
3891  {
3892    "input": "http://./",
3893    "base": "about:blank",
3894    "href": "http://./",
3895    "origin": "http://.",
3896    "protocol": "http:",
3897    "username": "",
3898    "password": "",
3899    "host": ".",
3900    "hostname": ".",
3901    "port": "",
3902    "pathname": "/",
3903    "search": "",
3904    "hash": ""
3905  },
3906  {
3907    "input": "http://../",
3908    "base": "about:blank",
3909    "href": "http://../",
3910    "origin": "http://..",
3911    "protocol": "http:",
3912    "username": "",
3913    "password": "",
3914    "host": "..",
3915    "hostname": "..",
3916    "port": "",
3917    "pathname": "/",
3918    "search": "",
3919    "hash": ""
3920  },
3921  "Broken IPv6",
3922  {
3923    "input": "http://[www.google.com]/",
3924    "base": "about:blank",
3925    "failure": true
3926  },
3927  {
3928    "input": "http://[google.com]",
3929    "base": "http://other.com/",
3930    "failure": true
3931  },
3932  {
3933    "input": "http://[::1.2.3.4x]",
3934    "base": "http://other.com/",
3935    "failure": true
3936  },
3937  {
3938    "input": "http://[::1.2.3.]",
3939    "base": "http://other.com/",
3940    "failure": true
3941  },
3942  {
3943    "input": "http://[::1.2.]",
3944    "base": "http://other.com/",
3945    "failure": true
3946  },
3947  {
3948    "input": "http://[::1.]",
3949    "base": "http://other.com/",
3950    "failure": true
3951  },
3952  "Misc Unicode",
3953  {
3954    "input": "http://foo:��@example.com/bar",
3955    "base": "http://other.com/",
3956    "href": "http://foo:%F0%9F%92%A9@example.com/bar",
3957    "origin": "http://example.com",
3958    "protocol": "http:",
3959    "username": "foo",
3960    "password": "%F0%9F%92%A9",
3961    "host": "example.com",
3962    "hostname": "example.com",
3963    "port": "",
3964    "pathname": "/bar",
3965    "search": "",
3966    "hash": ""
3967  },
3968  "# resolving a fragment against any scheme succeeds",
3969  {
3970    "input": "#",
3971    "base": "test:test",
3972    "href": "test:test#",
3973    "origin": "null",
3974    "protocol": "test:",
3975    "username": "",
3976    "password": "",
3977    "host": "",
3978    "hostname": "",
3979    "port": "",
3980    "pathname": "test",
3981    "search": "",
3982    "hash": ""
3983  },
3984  {
3985    "input": "#x",
3986    "base": "mailto:x@x.com",
3987    "href": "mailto:x@x.com#x",
3988    "origin": "null",
3989    "protocol": "mailto:",
3990    "username": "",
3991    "password": "",
3992    "host": "",
3993    "hostname": "",
3994    "port": "",
3995    "pathname": "x@x.com",
3996    "search": "",
3997    "hash": "#x"
3998  },
3999  {
4000    "input": "#x",
4001    "base": "data:,",
4002    "href": "data:,#x",
4003    "origin": "null",
4004    "protocol": "data:",
4005    "username": "",
4006    "password": "",
4007    "host": "",
4008    "hostname": "",
4009    "port": "",
4010    "pathname": ",",
4011    "search": "",
4012    "hash": "#x"
4013  },
4014  {
4015    "input": "#x",
4016    "base": "about:blank",
4017    "href": "about:blank#x",
4018    "origin": "null",
4019    "protocol": "about:",
4020    "username": "",
4021    "password": "",
4022    "host": "",
4023    "hostname": "",
4024    "port": "",
4025    "pathname": "blank",
4026    "search": "",
4027    "hash": "#x"
4028  },
4029  {
4030    "input": "#",
4031    "base": "test:test?test",
4032    "href": "test:test?test#",
4033    "origin": "null",
4034    "protocol": "test:",
4035    "username": "",
4036    "password": "",
4037    "host": "",
4038    "hostname": "",
4039    "port": "",
4040    "pathname": "test",
4041    "search": "?test",
4042    "hash": ""
4043  },
4044  "# multiple @ in authority state",
4045  {
4046    "input": "https://@test@test@example:800/",
4047    "base": "http://doesnotmatter/",
4048    "href": "https://%40test%40test@example:800/",
4049    "origin": "https://example:800",
4050    "protocol": "https:",
4051    "username": "%40test%40test",
4052    "password": "",
4053    "host": "example:800",
4054    "hostname": "example",
4055    "port": "800",
4056    "pathname": "/",
4057    "search": "",
4058    "hash": ""
4059  },
4060  {
4061    "input": "https://@@@example",
4062    "base": "http://doesnotmatter/",
4063    "href": "https://%40%40@example/",
4064    "origin": "https://example",
4065    "protocol": "https:",
4066    "username": "%40%40",
4067    "password": "",
4068    "host": "example",
4069    "hostname": "example",
4070    "port": "",
4071    "pathname": "/",
4072    "search": "",
4073    "hash": ""
4074  },
4075  "non-az-09 characters",
4076  {
4077    "input": "http://`{}:`{}@h/`{}?`{}",
4078    "base": "http://doesnotmatter/",
4079    "href": "http://%60%7B%7D:%60%7B%7D@h/%60%7B%7D?`{}",
4080    "origin": "http://h",
4081    "protocol": "http:",
4082    "username": "%60%7B%7D",
4083    "password": "%60%7B%7D",
4084    "host": "h",
4085    "hostname": "h",
4086    "port": "",
4087    "pathname": "/%60%7B%7D",
4088    "search": "?`{}",
4089    "hash": ""
4090  },
4091  "byte is ' and url is special",
4092  {
4093    "input": "http://host/?'",
4094    "base": "about:blank",
4095    "href": "http://host/?%27",
4096    "origin": "http://host",
4097    "protocol": "http:",
4098    "username": "",
4099    "password": "",
4100    "host": "host",
4101    "hostname": "host",
4102    "port": "",
4103    "pathname": "/",
4104    "search": "?%27",
4105    "hash": ""
4106  },
4107  {
4108    "input": "notspecial://host/?'",
4109    "base": "about:blank",
4110    "href": "notspecial://host/?'",
4111    "origin": "null",
4112    "protocol": "notspecial:",
4113    "username": "",
4114    "password": "",
4115    "host": "host",
4116    "hostname": "host",
4117    "port": "",
4118    "pathname": "/",
4119    "search": "?'",
4120    "hash": ""
4121  },
4122  "# Credentials in base",
4123  {
4124    "input": "/some/path",
4125    "base": "http://user@example.org/smth",
4126    "href": "http://user@example.org/some/path",
4127    "origin": "http://example.org",
4128    "protocol": "http:",
4129    "username": "user",
4130    "password": "",
4131    "host": "example.org",
4132    "hostname": "example.org",
4133    "port": "",
4134    "pathname": "/some/path",
4135    "search": "",
4136    "hash": ""
4137  },
4138  {
4139    "input": "",
4140    "base": "http://user:pass@example.org:21/smth",
4141    "href": "http://user:pass@example.org:21/smth",
4142    "origin": "http://example.org:21",
4143    "protocol": "http:",
4144    "username": "user",
4145    "password": "pass",
4146    "host": "example.org:21",
4147    "hostname": "example.org",
4148    "port": "21",
4149    "pathname": "/smth",
4150    "search": "",
4151    "hash": ""
4152  },
4153  {
4154    "input": "/some/path",
4155    "base": "http://user:pass@example.org:21/smth",
4156    "href": "http://user:pass@example.org:21/some/path",
4157    "origin": "http://example.org:21",
4158    "protocol": "http:",
4159    "username": "user",
4160    "password": "pass",
4161    "host": "example.org:21",
4162    "hostname": "example.org",
4163    "port": "21",
4164    "pathname": "/some/path",
4165    "search": "",
4166    "hash": ""
4167  },
4168  "# a set of tests designed by zcorpan for relative URLs with unknown schemes",
4169  {
4170    "input": "i",
4171    "base": "sc:sd",
4172    "failure": true
4173  },
4174  {
4175    "input": "i",
4176    "base": "sc:sd/sd",
4177    "failure": true
4178  },
4179  {
4180    "input": "i",
4181    "base": "sc:/pa/pa",
4182    "href": "sc:/pa/i",
4183    "origin": "null",
4184    "protocol": "sc:",
4185    "username": "",
4186    "password": "",
4187    "host": "",
4188    "hostname": "",
4189    "port": "",
4190    "pathname": "/pa/i",
4191    "search": "",
4192    "hash": ""
4193  },
4194  {
4195    "input": "i",
4196    "base": "sc://ho/pa",
4197    "href": "sc://ho/i",
4198    "origin": "null",
4199    "protocol": "sc:",
4200    "username": "",
4201    "password": "",
4202    "host": "ho",
4203    "hostname": "ho",
4204    "port": "",
4205    "pathname": "/i",
4206    "search": "",
4207    "hash": ""
4208  },
4209  {
4210    "input": "i",
4211    "base": "sc:///pa/pa",
4212    "href": "sc:///pa/i",
4213    "origin": "null",
4214    "protocol": "sc:",
4215    "username": "",
4216    "password": "",
4217    "host": "",
4218    "hostname": "",
4219    "port": "",
4220    "pathname": "/pa/i",
4221    "search": "",
4222    "hash": ""
4223  },
4224  {
4225    "input": "../i",
4226    "base": "sc:sd",
4227    "failure": true
4228  },
4229  {
4230    "input": "../i",
4231    "base": "sc:sd/sd",
4232    "failure": true
4233  },
4234  {
4235    "input": "../i",
4236    "base": "sc:/pa/pa",
4237    "href": "sc:/i",
4238    "origin": "null",
4239    "protocol": "sc:",
4240    "username": "",
4241    "password": "",
4242    "host": "",
4243    "hostname": "",
4244    "port": "",
4245    "pathname": "/i",
4246    "search": "",
4247    "hash": ""
4248  },
4249  {
4250    "input": "../i",
4251    "base": "sc://ho/pa",
4252    "href": "sc://ho/i",
4253    "origin": "null",
4254    "protocol": "sc:",
4255    "username": "",
4256    "password": "",
4257    "host": "ho",
4258    "hostname": "ho",
4259    "port": "",
4260    "pathname": "/i",
4261    "search": "",
4262    "hash": ""
4263  },
4264  {
4265    "input": "../i",
4266    "base": "sc:///pa/pa",
4267    "href": "sc:///i",
4268    "origin": "null",
4269    "protocol": "sc:",
4270    "username": "",
4271    "password": "",
4272    "host": "",
4273    "hostname": "",
4274    "port": "",
4275    "pathname": "/i",
4276    "search": "",
4277    "hash": ""
4278  },
4279  {
4280    "input": "/i",
4281    "base": "sc:sd",
4282    "failure": true
4283  },
4284  {
4285    "input": "/i",
4286    "base": "sc:sd/sd",
4287    "failure": true
4288  },
4289  {
4290    "input": "/i",
4291    "base": "sc:/pa/pa",
4292    "href": "sc:/i",
4293    "origin": "null",
4294    "protocol": "sc:",
4295    "username": "",
4296    "password": "",
4297    "host": "",
4298    "hostname": "",
4299    "port": "",
4300    "pathname": "/i",
4301    "search": "",
4302    "hash": ""
4303  },
4304  {
4305    "input": "/i",
4306    "base": "sc://ho/pa",
4307    "href": "sc://ho/i",
4308    "origin": "null",
4309    "protocol": "sc:",
4310    "username": "",
4311    "password": "",
4312    "host": "ho",
4313    "hostname": "ho",
4314    "port": "",
4315    "pathname": "/i",
4316    "search": "",
4317    "hash": ""
4318  },
4319  {
4320    "input": "/i",
4321    "base": "sc:///pa/pa",
4322    "href": "sc:///i",
4323    "origin": "null",
4324    "protocol": "sc:",
4325    "username": "",
4326    "password": "",
4327    "host": "",
4328    "hostname": "",
4329    "port": "",
4330    "pathname": "/i",
4331    "search": "",
4332    "hash": ""
4333  },
4334  {
4335    "input": "?i",
4336    "base": "sc:sd",
4337    "failure": true
4338  },
4339  {
4340    "input": "?i",
4341    "base": "sc:sd/sd",
4342    "failure": true
4343  },
4344  {
4345    "input": "?i",
4346    "base": "sc:/pa/pa",
4347    "href": "sc:/pa/pa?i",
4348    "origin": "null",
4349    "protocol": "sc:",
4350    "username": "",
4351    "password": "",
4352    "host": "",
4353    "hostname": "",
4354    "port": "",
4355    "pathname": "/pa/pa",
4356    "search": "?i",
4357    "hash": ""
4358  },
4359  {
4360    "input": "?i",
4361    "base": "sc://ho/pa",
4362    "href": "sc://ho/pa?i",
4363    "origin": "null",
4364    "protocol": "sc:",
4365    "username": "",
4366    "password": "",
4367    "host": "ho",
4368    "hostname": "ho",
4369    "port": "",
4370    "pathname": "/pa",
4371    "search": "?i",
4372    "hash": ""
4373  },
4374  {
4375    "input": "?i",
4376    "base": "sc:///pa/pa",
4377    "href": "sc:///pa/pa?i",
4378    "origin": "null",
4379    "protocol": "sc:",
4380    "username": "",
4381    "password": "",
4382    "host": "",
4383    "hostname": "",
4384    "port": "",
4385    "pathname": "/pa/pa",
4386    "search": "?i",
4387    "hash": ""
4388  },
4389  {
4390    "input": "#i",
4391    "base": "sc:sd",
4392    "href": "sc:sd#i",
4393    "origin": "null",
4394    "protocol": "sc:",
4395    "username": "",
4396    "password": "",
4397    "host": "",
4398    "hostname": "",
4399    "port": "",
4400    "pathname": "sd",
4401    "search": "",
4402    "hash": "#i"
4403  },
4404  {
4405    "input": "#i",
4406    "base": "sc:sd/sd",
4407    "href": "sc:sd/sd#i",
4408    "origin": "null",
4409    "protocol": "sc:",
4410    "username": "",
4411    "password": "",
4412    "host": "",
4413    "hostname": "",
4414    "port": "",
4415    "pathname": "sd/sd",
4416    "search": "",
4417    "hash": "#i"
4418  },
4419  {
4420    "input": "#i",
4421    "base": "sc:/pa/pa",
4422    "href": "sc:/pa/pa#i",
4423    "origin": "null",
4424    "protocol": "sc:",
4425    "username": "",
4426    "password": "",
4427    "host": "",
4428    "hostname": "",
4429    "port": "",
4430    "pathname": "/pa/pa",
4431    "search": "",
4432    "hash": "#i"
4433  },
4434  {
4435    "input": "#i",
4436    "base": "sc://ho/pa",
4437    "href": "sc://ho/pa#i",
4438    "origin": "null",
4439    "protocol": "sc:",
4440    "username": "",
4441    "password": "",
4442    "host": "ho",
4443    "hostname": "ho",
4444    "port": "",
4445    "pathname": "/pa",
4446    "search": "",
4447    "hash": "#i"
4448  },
4449  {
4450    "input": "#i",
4451    "base": "sc:///pa/pa",
4452    "href": "sc:///pa/pa#i",
4453    "origin": "null",
4454    "protocol": "sc:",
4455    "username": "",
4456    "password": "",
4457    "host": "",
4458    "hostname": "",
4459    "port": "",
4460    "pathname": "/pa/pa",
4461    "search": "",
4462    "hash": "#i"
4463  },
4464  "# make sure that relative URL logic works on known typically non-relative schemes too",
4465  {
4466    "input": "about:/../",
4467    "base": "about:blank",
4468    "href": "about:/",
4469    "origin": "null",
4470    "protocol": "about:",
4471    "username": "",
4472    "password": "",
4473    "host": "",
4474    "hostname": "",
4475    "port": "",
4476    "pathname": "/",
4477    "search": "",
4478    "hash": ""
4479  },
4480  {
4481    "input": "data:/../",
4482    "base": "about:blank",
4483    "href": "data:/",
4484    "origin": "null",
4485    "protocol": "data:",
4486    "username": "",
4487    "password": "",
4488    "host": "",
4489    "hostname": "",
4490    "port": "",
4491    "pathname": "/",
4492    "search": "",
4493    "hash": ""
4494  },
4495  {
4496    "input": "javascript:/../",
4497    "base": "about:blank",
4498    "href": "javascript:/",
4499    "origin": "null",
4500    "protocol": "javascript:",
4501    "username": "",
4502    "password": "",
4503    "host": "",
4504    "hostname": "",
4505    "port": "",
4506    "pathname": "/",
4507    "search": "",
4508    "hash": ""
4509  },
4510  {
4511    "input": "mailto:/../",
4512    "base": "about:blank",
4513    "href": "mailto:/",
4514    "origin": "null",
4515    "protocol": "mailto:",
4516    "username": "",
4517    "password": "",
4518    "host": "",
4519    "hostname": "",
4520    "port": "",
4521    "pathname": "/",
4522    "search": "",
4523    "hash": ""
4524  },
4525  "# unknown schemes and their hosts",
4526  {
4527    "input": "sc://ñ.test/",
4528    "base": "about:blank",
4529    "href": "sc://%C3%B1.test/",
4530    "origin": "null",
4531    "protocol": "sc:",
4532    "username": "",
4533    "password": "",
4534    "host": "%C3%B1.test",
4535    "hostname": "%C3%B1.test",
4536    "port": "",
4537    "pathname": "/",
4538    "search": "",
4539    "hash": ""
4540  },
4541  {
4542    "input": "sc://%/",
4543    "base": "about:blank",
4544    "href": "sc://%/",
4545    "protocol": "sc:",
4546    "username": "",
4547    "password": "",
4548    "host": "%",
4549    "hostname": "%",
4550    "port": "",
4551    "pathname": "/",
4552    "search": "",
4553    "hash": ""
4554  },
4555  {
4556    "input": "sc://@/",
4557    "base": "about:blank",
4558    "failure": true
4559  },
4560  {
4561    "input": "sc://te@s:t@/",
4562    "base": "about:blank",
4563    "failure": true
4564  },
4565  {
4566    "input": "sc://:/",
4567    "base": "about:blank",
4568    "failure": true
4569  },
4570  {
4571    "input": "sc://:12/",
4572    "base": "about:blank",
4573    "failure": true
4574  },
4575  {
4576    "input": "x",
4577    "base": "sc://ñ",
4578    "href": "sc://%C3%B1/x",
4579    "origin": "null",
4580    "protocol": "sc:",
4581    "username": "",
4582    "password": "",
4583    "host": "%C3%B1",
4584    "hostname": "%C3%B1",
4585    "port": "",
4586    "pathname": "/x",
4587    "search": "",
4588    "hash": ""
4589  },
4590  "# unknown schemes and backslashes",
4591  {
4592    "input": "sc:\\../",
4593    "base": "about:blank",
4594    "href": "sc:\\../",
4595    "origin": "null",
4596    "protocol": "sc:",
4597    "username": "",
4598    "password": "",
4599    "host": "",
4600    "hostname": "",
4601    "port": "",
4602    "pathname": "\\../",
4603    "search": "",
4604    "hash": ""
4605  },
4606  "# unknown scheme with path looking like a password",
4607  {
4608    "input": "sc::a@example.net",
4609    "base": "about:blank",
4610    "href": "sc::a@example.net",
4611    "origin": "null",
4612    "protocol": "sc:",
4613    "username": "",
4614    "password": "",
4615    "host": "",
4616    "hostname": "",
4617    "port": "",
4618    "pathname": ":a@example.net",
4619    "search": "",
4620    "hash": ""
4621  },
4622  "# unknown scheme with bogus percent-encoding",
4623  {
4624    "input": "wow:%NBD",
4625    "base": "about:blank",
4626    "href": "wow:%NBD",
4627    "origin": "null",
4628    "protocol": "wow:",
4629    "username": "",
4630    "password": "",
4631    "host": "",
4632    "hostname": "",
4633    "port": "",
4634    "pathname": "%NBD",
4635    "search": "",
4636    "hash": ""
4637  },
4638  {
4639    "input": "wow:%1G",
4640    "base": "about:blank",
4641    "href": "wow:%1G",
4642    "origin": "null",
4643    "protocol": "wow:",
4644    "username": "",
4645    "password": "",
4646    "host": "",
4647    "hostname": "",
4648    "port": "",
4649    "pathname": "%1G",
4650    "search": "",
4651    "hash": ""
4652  },
4653  "# unknown scheme with non-URL characters",
4654  {
4655    "input": "wow:\uFFFF",
4656    "base": "about:blank",
4657    "href": "wow:%EF%BF%BF",
4658    "origin": "null",
4659    "protocol": "wow:",
4660    "username": "",
4661    "password": "",
4662    "host": "",
4663    "hostname": "",
4664    "port": "",
4665    "pathname": "%EF%BF%BF",
4666    "search": "",
4667    "hash": ""
4668  },
4669  "Forbidden host code points",
4670  {
4671    "input": "sc://a\u0000b/",
4672    "base": "about:blank",
4673    "failure": true
4674  },
4675  {
4676    "input": "sc://a b/",
4677    "base": "about:blank",
4678    "failure": true
4679  },
4680  {
4681    "input": "sc://a<b",
4682    "base": "about:blank",
4683    "failure": true
4684  },
4685  {
4686    "input": "sc://a>b",
4687    "base": "about:blank",
4688    "failure": true
4689  },
4690  {
4691    "input": "sc://a[b/",
4692    "base": "about:blank",
4693    "failure": true
4694  },
4695  {
4696    "input": "sc://a\\b/",
4697    "base": "about:blank",
4698    "failure": true
4699  },
4700  {
4701    "input": "sc://a]b/",
4702    "base": "about:blank",
4703    "failure": true
4704  },
4705  {
4706    "input": "sc://a^b",
4707    "base": "about:blank",
4708    "failure": true
4709  },
4710  {
4711    "input": "sc://a|b/",
4712    "base": "about:blank",
4713    "failure": true
4714  },
4715  "Forbidden host codepoints: tabs and newlines are removed during preprocessing",
4716  {
4717    "input": "foo://ho\u0009st/",
4718    "base": "about:blank",
4719    "hash": "",
4720    "host": "host",
4721    "hostname": "host",
4722    "href":"foo://host/",
4723    "password": "",
4724    "pathname": "/",
4725    "port":"",
4726    "protocol": "foo:",
4727    "search": "",
4728    "username": ""
4729  },
4730  {
4731    "input": "foo://ho\u000Ast/",
4732    "base": "about:blank",
4733    "hash": "",
4734    "host": "host",
4735    "hostname": "host",
4736    "href":"foo://host/",
4737    "password": "",
4738    "pathname": "/",
4739    "port":"",
4740    "protocol": "foo:",
4741    "search": "",
4742    "username": ""
4743  },
4744  {
4745    "input": "foo://ho\u000Dst/",
4746    "base": "about:blank",
4747    "hash": "",
4748    "host": "host",
4749    "hostname": "host",
4750    "href":"foo://host/",
4751    "password": "",
4752    "pathname": "/",
4753    "port":"",
4754    "protocol": "foo:",
4755    "search": "",
4756    "username": ""
4757  },
4758  "Forbidden domain code-points",
4759  {
4760    "input": "http://a\u0000b/",
4761    "base": "about:blank",
4762    "failure": true
4763  },
4764  {
4765    "input": "http://a\u0001b/",
4766    "base": "about:blank",
4767    "failure": true
4768  },
4769  {
4770    "input": "http://a\u0002b/",
4771    "base": "about:blank",
4772    "failure": true
4773  },
4774  {
4775    "input": "http://a\u0003b/",
4776    "base": "about:blank",
4777    "failure": true
4778  },
4779  {
4780    "input": "http://a\u0004b/",
4781    "base": "about:blank",
4782    "failure": true
4783  },
4784  {
4785    "input": "http://a\u0005b/",
4786    "base": "about:blank",
4787    "failure": true
4788  },
4789  {
4790    "input": "http://a\u0006b/",
4791    "base": "about:blank",
4792    "failure": true
4793  },
4794  {
4795    "input": "http://a\u0007b/",
4796    "base": "about:blank",
4797    "failure": true
4798  },
4799  {
4800    "input": "http://a\u0008b/",
4801    "base": "about:blank",
4802    "failure": true
4803  },
4804  {
4805    "input": "http://a\u000Bb/",
4806    "base": "about:blank",
4807    "failure": true
4808  },
4809  {
4810    "input": "http://a\u000Cb/",
4811    "base": "about:blank",
4812    "failure": true
4813  },
4814  {
4815    "input": "http://a\u000Eb/",
4816    "base": "about:blank",
4817    "failure": true
4818  },
4819  {
4820    "input": "http://a\u000Fb/",
4821    "base": "about:blank",
4822    "failure": true
4823  },
4824  {
4825    "input": "http://a\u0010b/",
4826    "base": "about:blank",
4827    "failure": true
4828  },
4829  {
4830    "input": "http://a\u0011b/",
4831    "base": "about:blank",
4832    "failure": true
4833  },
4834  {
4835    "input": "http://a\u0012b/",
4836    "base": "about:blank",
4837    "failure": true
4838  },
4839  {
4840    "input": "http://a\u0013b/",
4841    "base": "about:blank",
4842    "failure": true
4843  },
4844  {
4845    "input": "http://a\u0014b/",
4846    "base": "about:blank",
4847    "failure": true
4848  },
4849  {
4850    "input": "http://a\u0015b/",
4851    "base": "about:blank",
4852    "failure": true
4853  },
4854  {
4855    "input": "http://a\u0016b/",
4856    "base": "about:blank",
4857    "failure": true
4858  },
4859  {
4860    "input": "http://a\u0017b/",
4861    "base": "about:blank",
4862    "failure": true
4863  },
4864  {
4865    "input": "http://a\u0018b/",
4866    "base": "about:blank",
4867    "failure": true
4868  },
4869  {
4870    "input": "http://a\u0019b/",
4871    "base": "about:blank",
4872    "failure": true
4873  },
4874  {
4875    "input": "http://a\u001Ab/",
4876    "base": "about:blank",
4877    "failure": true
4878  },
4879  {
4880    "input": "http://a\u001Bb/",
4881    "base": "about:blank",
4882    "failure": true
4883  },
4884  {
4885    "input": "http://a\u001Cb/",
4886    "base": "about:blank",
4887    "failure": true
4888  },
4889  {
4890    "input": "http://a\u001Db/",
4891    "base": "about:blank",
4892    "failure": true
4893  },
4894  {
4895    "input": "http://a\u001Eb/",
4896    "base": "about:blank",
4897    "failure": true
4898  },
4899  {
4900    "input": "http://a\u001Fb/",
4901    "base": "about:blank",
4902    "failure": true
4903  },
4904  {
4905    "input": "http://a b/",
4906    "base": "about:blank",
4907    "failure": true
4908  },
4909  {
4910    "input": "http://a%b/",
4911    "base": "about:blank",
4912    "failure": true
4913  },
4914  {
4915    "input": "http://a<b",
4916    "base": "about:blank",
4917    "failure": true
4918  },
4919  {
4920    "input": "http://a>b",
4921    "base": "about:blank",
4922    "failure": true
4923  },
4924  {
4925    "input": "http://a[b/",
4926    "base": "about:blank",
4927    "failure": true
4928  },
4929  {
4930    "input": "http://a]b/",
4931    "base": "about:blank",
4932    "failure": true
4933  },
4934  {
4935    "input": "http://a^b",
4936    "base": "about:blank",
4937    "failure": true
4938  },
4939  {
4940    "input": "http://a|b/",
4941    "base": "about:blank",
4942    "failure": true
4943  },
4944  {
4945    "input": "http://a\u007Fb/",
4946    "base": "about:blank",
4947    "failure": true
4948  },
4949  "Forbidden domain codepoints: tabs and newlines are removed during preprocessing",
4950  {
4951    "input": "http://ho\u0009st/",
4952    "base": "about:blank",
4953    "hash": "",
4954    "host": "host",
4955    "hostname": "host",
4956    "href":"http://host/",
4957    "password": "",
4958    "pathname": "/",
4959    "port":"",
4960    "protocol": "http:",
4961    "search": "",
4962    "username": ""
4963  },
4964  {
4965    "input": "http://ho\u000Ast/",
4966    "base": "about:blank",
4967    "hash": "",
4968    "host": "host",
4969    "hostname": "host",
4970    "href":"http://host/",
4971    "password": "",
4972    "pathname": "/",
4973    "port":"",
4974    "protocol": "http:",
4975    "search": "",
4976    "username": ""
4977  },
4978  {
4979    "input": "http://ho\u000Dst/",
4980    "base": "about:blank",
4981    "hash": "",
4982    "host": "host",
4983    "hostname": "host",
4984    "href":"http://host/",
4985    "password": "",
4986    "pathname": "/",
4987    "port":"",
4988    "protocol": "http:",
4989    "search": "",
4990    "username": ""
4991  },
4992  "Encoded forbidden domain codepoints in special URLs",
4993  {
4994    "input": "http://ho%00st/",
4995    "base": "about:blank",
4996    "failure": true
4997  },
4998  {
4999    "input": "http://ho%01st/",
5000    "base": "about:blank",
5001    "failure": true
5002  },
5003  {
5004    "input": "http://ho%02st/",
5005    "base": "about:blank",
5006    "failure": true
5007  },
5008  {
5009    "input": "http://ho%03st/",
5010    "base": "about:blank",
5011    "failure": true
5012  },
5013  {
5014    "input": "http://ho%04st/",
5015    "base": "about:blank",
5016    "failure": true
5017  },
5018  {
5019    "input": "http://ho%05st/",
5020    "base": "about:blank",
5021    "failure": true
5022  },
5023  {
5024    "input": "http://ho%06st/",
5025    "base": "about:blank",
5026    "failure": true
5027  },
5028  {
5029    "input": "http://ho%07st/",
5030    "base": "about:blank",
5031    "failure": true
5032  },
5033  {
5034    "input": "http://ho%08st/",
5035    "base": "about:blank",
5036    "failure": true
5037  },
5038  {
5039    "input": "http://ho%09st/",
5040    "base": "about:blank",
5041    "failure": true
5042  },
5043  {
5044    "input": "http://ho%0Ast/",
5045    "base": "about:blank",
5046    "failure": true
5047  },
5048  {
5049    "input": "http://ho%0Bst/",
5050    "base": "about:blank",
5051    "failure": true
5052  },
5053  {
5054    "input": "http://ho%0Cst/",
5055    "base": "about:blank",
5056    "failure": true
5057  },
5058  {
5059    "input": "http://ho%0Dst/",
5060    "base": "about:blank",
5061    "failure": true
5062  },
5063  {
5064    "input": "http://ho%0Est/",
5065    "base": "about:blank",
5066    "failure": true
5067  },
5068  {
5069    "input": "http://ho%0Fst/",
5070    "base": "about:blank",
5071    "failure": true
5072  },
5073  {
5074    "input": "http://ho%10st/",
5075    "base": "about:blank",
5076    "failure": true
5077  },
5078  {
5079    "input": "http://ho%11st/",
5080    "base": "about:blank",
5081    "failure": true
5082  },
5083  {
5084    "input": "http://ho%12st/",
5085    "base": "about:blank",
5086    "failure": true
5087  },
5088  {
5089    "input": "http://ho%13st/",
5090    "base": "about:blank",
5091    "failure": true
5092  },
5093  {
5094    "input": "http://ho%14st/",
5095    "base": "about:blank",
5096    "failure": true
5097  },
5098  {
5099    "input": "http://ho%15st/",
5100    "base": "about:blank",
5101    "failure": true
5102  },
5103  {
5104    "input": "http://ho%16st/",
5105    "base": "about:blank",
5106    "failure": true
5107  },
5108  {
5109    "input": "http://ho%17st/",
5110    "base": "about:blank",
5111    "failure": true
5112  },
5113  {
5114    "input": "http://ho%18st/",
5115    "base": "about:blank",
5116    "failure": true
5117  },
5118  {
5119    "input": "http://ho%19st/",
5120    "base": "about:blank",
5121    "failure": true
5122  },
5123  {
5124    "input": "http://ho%1Ast/",
5125    "base": "about:blank",
5126    "failure": true
5127  },
5128  {
5129    "input": "http://ho%1Bst/",
5130    "base": "about:blank",
5131    "failure": true
5132  },
5133  {
5134    "input": "http://ho%1Cst/",
5135    "base": "about:blank",
5136    "failure": true
5137  },
5138  {
5139    "input": "http://ho%1Dst/",
5140    "base": "about:blank",
5141    "failure": true
5142  },
5143  {
5144    "input": "http://ho%1Est/",
5145    "base": "about:blank",
5146    "failure": true
5147  },
5148  {
5149    "input": "http://ho%1Fst/",
5150    "base": "about:blank",
5151    "failure": true
5152  },
5153  {
5154    "input": "http://ho%20st/",
5155    "base": "about:blank",
5156    "failure": true
5157  },
5158  {
5159    "input": "http://ho%23st/",
5160    "base": "about:blank",
5161    "failure": true
5162  },
5163  {
5164    "input": "http://ho%25st/",
5165    "base": "about:blank",
5166    "failure": true
5167  },
5168  {
5169    "input": "http://ho%2Fst/",
5170    "base": "about:blank",
5171    "failure": true
5172  },
5173  {
5174    "input": "http://ho%3Ast/",
5175    "base": "about:blank",
5176    "failure": true
5177  },
5178  {
5179    "input": "http://ho%3Cst/",
5180    "base": "about:blank",
5181    "failure": true
5182  },
5183  {
5184    "input": "http://ho%3Est/",
5185    "base": "about:blank",
5186    "failure": true
5187  },
5188  {
5189    "input": "http://ho%3Fst/",
5190    "base": "about:blank",
5191    "failure": true
5192  },
5193  {
5194    "input": "http://ho%40st/",
5195    "base": "about:blank",
5196    "failure": true
5197  },
5198  {
5199    "input": "http://ho%5Bst/",
5200    "base": "about:blank",
5201    "failure": true
5202  },
5203  {
5204    "input": "http://ho%5Cst/",
5205    "base": "about:blank",
5206    "failure": true
5207  },
5208  {
5209    "input": "http://ho%5Dst/",
5210    "base": "about:blank",
5211    "failure": true
5212  },
5213  {
5214    "input": "http://ho%7Cst/",
5215    "base": "about:blank",
5216    "failure": true
5217  },
5218  {
5219    "input": "http://ho%7Fst/",
5220    "base": "about:blank",
5221    "failure": true
5222  },
5223  "Allowed host/domain code points",
5224  {
5225    "input": "http://!\"$&'()*+,-.;=_`{}~/",
5226    "base": "about:blank",
5227    "href": "http://!\"$&'()*+,-.;=_`{}~/",
5228    "origin": "http://!\"$&'()*+,-.;=_`{}~",
5229    "protocol": "http:",
5230    "username": "",
5231    "password": "",
5232    "host": "!\"$&'()*+,-.;=_`{}~",
5233    "hostname": "!\"$&'()*+,-.;=_`{}~",
5234    "port": "",
5235    "pathname": "/",
5236    "search": "",
5237    "hash": ""
5238  },
5239  {
5240    "input": "sc://\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u000B\u000C\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F\u007F!\"$%&'()*+,-.;=_`{}~/",
5241    "base": "about:blank",
5242    "href": "sc://%01%02%03%04%05%06%07%08%0B%0C%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%7F!\"$%&'()*+,-.;=_`{}~/",
5243    "origin": "null",
5244    "protocol": "sc:",
5245    "username": "",
5246    "password": "",
5247    "host": "%01%02%03%04%05%06%07%08%0B%0C%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%7F!\"$%&'()*+,-.;=_`{}~",
5248    "hostname": "%01%02%03%04%05%06%07%08%0B%0C%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%7F!\"$%&'()*+,-.;=_`{}~",
5249    "port": "",
5250    "pathname": "/",
5251    "search": "",
5252    "hash": ""
5253  },
5254  "# Hosts and percent-encoding",
5255  {
5256    "input": "ftp://example.com%80/",
5257    "base": "about:blank",
5258    "failure": true
5259  },
5260  {
5261    "input": "ftp://example.com%A0/",
5262    "base": "about:blank",
5263    "failure": true
5264  },
5265  {
5266    "input": "https://example.com%80/",
5267    "base": "about:blank",
5268    "failure": true
5269  },
5270  {
5271    "input": "https://example.com%A0/",
5272    "base": "about:blank",
5273    "failure": true
5274  },
5275  {
5276    "input": "ftp://%e2%98%83",
5277    "base": "about:blank",
5278    "href": "ftp://xn--n3h/",
5279    "origin": "ftp://xn--n3h",
5280    "protocol": "ftp:",
5281    "username": "",
5282    "password": "",
5283    "host": "xn--n3h",
5284    "hostname": "xn--n3h",
5285    "port": "",
5286    "pathname": "/",
5287    "search": "",
5288    "hash": ""
5289  },
5290  {
5291    "input": "https://%e2%98%83",
5292    "base": "about:blank",
5293    "href": "https://xn--n3h/",
5294    "origin": "https://xn--n3h",
5295    "protocol": "https:",
5296    "username": "",
5297    "password": "",
5298    "host": "xn--n3h",
5299    "hostname": "xn--n3h",
5300    "port": "",
5301    "pathname": "/",
5302    "search": "",
5303    "hash": ""
5304  },
5305  "# tests from jsdom/whatwg-url designed for code coverage",
5306  {
5307    "input": "http://127.0.0.1:10100/relative_import.html",
5308    "base": "about:blank",
5309    "href": "http://127.0.0.1:10100/relative_import.html",
5310    "origin": "http://127.0.0.1:10100",
5311    "protocol": "http:",
5312    "username": "",
5313    "password": "",
5314    "host": "127.0.0.1:10100",
5315    "hostname": "127.0.0.1",
5316    "port": "10100",
5317    "pathname": "/relative_import.html",
5318    "search": "",
5319    "hash": ""
5320  },
5321  {
5322    "input": "http://facebook.com/?foo=%7B%22abc%22",
5323    "base": "about:blank",
5324    "href": "http://facebook.com/?foo=%7B%22abc%22",
5325    "origin": "http://facebook.com",
5326    "protocol": "http:",
5327    "username": "",
5328    "password": "",
5329    "host": "facebook.com",
5330    "hostname": "facebook.com",
5331    "port": "",
5332    "pathname": "/",
5333    "search": "?foo=%7B%22abc%22",
5334    "hash": ""
5335  },
5336  {
5337    "input": "https://localhost:3000/jqueryui@1.2.3",
5338    "base": "about:blank",
5339    "href": "https://localhost:3000/jqueryui@1.2.3",
5340    "origin": "https://localhost:3000",
5341    "protocol": "https:",
5342    "username": "",
5343    "password": "",
5344    "host": "localhost:3000",
5345    "hostname": "localhost",
5346    "port": "3000",
5347    "pathname": "/jqueryui@1.2.3",
5348    "search": "",
5349    "hash": ""
5350  },
5351  "# tab/LF/CR",
5352  {
5353    "input": "h\tt\nt\rp://h\to\ns\rt:9\t0\n0\r0/p\ta\nt\rh?q\tu\ne\rry#f\tr\na\rg",
5354    "base": "about:blank",
5355    "href": "http://host:9000/path?query#frag",
5356    "origin": "http://host:9000",
5357    "protocol": "http:",
5358    "username": "",
5359    "password": "",
5360    "host": "host:9000",
5361    "hostname": "host",
5362    "port": "9000",
5363    "pathname": "/path",
5364    "search": "?query",
5365    "hash": "#frag"
5366  },
5367  "# Stringification of URL.searchParams",
5368  {
5369    "input": "?a=b&c=d",
5370    "base": "http://example.org/foo/bar",
5371    "href": "http://example.org/foo/bar?a=b&c=d",
5372    "origin": "http://example.org",
5373    "protocol": "http:",
5374    "username": "",
5375    "password": "",
5376    "host": "example.org",
5377    "hostname": "example.org",
5378    "port": "",
5379    "pathname": "/foo/bar",
5380    "search": "?a=b&c=d",
5381    "searchParams": "a=b&c=d",
5382    "hash": ""
5383  },
5384  {
5385    "input": "??a=b&c=d",
5386    "base": "http://example.org/foo/bar",
5387    "href": "http://example.org/foo/bar??a=b&c=d",
5388    "origin": "http://example.org",
5389    "protocol": "http:",
5390    "username": "",
5391    "password": "",
5392    "host": "example.org",
5393    "hostname": "example.org",
5394    "port": "",
5395    "pathname": "/foo/bar",
5396    "search": "??a=b&c=d",
5397    "searchParams": "%3Fa=b&c=d",
5398    "hash": ""
5399  },
5400  "# Scheme only",
5401  {
5402    "input": "http:",
5403    "base": "http://example.org/foo/bar",
5404    "href": "http://example.org/foo/bar",
5405    "origin": "http://example.org",
5406    "protocol": "http:",
5407    "username": "",
5408    "password": "",
5409    "host": "example.org",
5410    "hostname": "example.org",
5411    "port": "",
5412    "pathname": "/foo/bar",
5413    "search": "",
5414    "searchParams": "",
5415    "hash": ""
5416  },
5417  {
5418    "input": "http:",
5419    "base": "https://example.org/foo/bar",
5420    "failure": true
5421  },
5422  {
5423    "input": "sc:",
5424    "base": "https://example.org/foo/bar",
5425    "href": "sc:",
5426    "origin": "null",
5427    "protocol": "sc:",
5428    "username": "",
5429    "password": "",
5430    "host": "",
5431    "hostname": "",
5432    "port": "",
5433    "pathname": "",
5434    "search": "",
5435    "searchParams": "",
5436    "hash": ""
5437  },
5438  "# Percent encoding of fragments",
5439  {
5440    "input": "http://foo.bar/baz?qux#foo\bbar",
5441    "base": "about:blank",
5442    "href": "http://foo.bar/baz?qux#foo%08bar",
5443    "origin": "http://foo.bar",
5444    "protocol": "http:",
5445    "username": "",
5446    "password": "",
5447    "host": "foo.bar",
5448    "hostname": "foo.bar",
5449    "port": "",
5450    "pathname": "/baz",
5451    "search": "?qux",
5452    "searchParams": "qux=",
5453    "hash": "#foo%08bar"
5454  },
5455  {
5456    "input": "http://foo.bar/baz?qux#foo\"bar",
5457    "base": "about:blank",
5458    "href": "http://foo.bar/baz?qux#foo%22bar",
5459    "origin": "http://foo.bar",
5460    "protocol": "http:",
5461    "username": "",
5462    "password": "",
5463    "host": "foo.bar",
5464    "hostname": "foo.bar",
5465    "port": "",
5466    "pathname": "/baz",
5467    "search": "?qux",
5468    "searchParams": "qux=",
5469    "hash": "#foo%22bar"
5470  },
5471  {
5472    "input": "http://foo.bar/baz?qux#foo<bar",
5473    "base": "about:blank",
5474    "href": "http://foo.bar/baz?qux#foo%3Cbar",
5475    "origin": "http://foo.bar",
5476    "protocol": "http:",
5477    "username": "",
5478    "password": "",
5479    "host": "foo.bar",
5480    "hostname": "foo.bar",
5481    "port": "",
5482    "pathname": "/baz",
5483    "search": "?qux",
5484    "searchParams": "qux=",
5485    "hash": "#foo%3Cbar"
5486  },
5487  {
5488    "input": "http://foo.bar/baz?qux#foo>bar",
5489    "base": "about:blank",
5490    "href": "http://foo.bar/baz?qux#foo%3Ebar",
5491    "origin": "http://foo.bar",
5492    "protocol": "http:",
5493    "username": "",
5494    "password": "",
5495    "host": "foo.bar",
5496    "hostname": "foo.bar",
5497    "port": "",
5498    "pathname": "/baz",
5499    "search": "?qux",
5500    "searchParams": "qux=",
5501    "hash": "#foo%3Ebar"
5502  },
5503  {
5504    "input": "http://foo.bar/baz?qux#foo`bar",
5505    "base": "about:blank",
5506    "href": "http://foo.bar/baz?qux#foo%60bar",
5507    "origin": "http://foo.bar",
5508    "protocol": "http:",
5509    "username": "",
5510    "password": "",
5511    "host": "foo.bar",
5512    "hostname": "foo.bar",
5513    "port": "",
5514    "pathname": "/baz",
5515    "search": "?qux",
5516    "searchParams": "qux=",
5517    "hash": "#foo%60bar"
5518  },
5519  "# IPv4 parsing (via https://github.com/nodejs/node/pull/10317)",
5520  {
5521    "input": "http://1.2.3.4/",
5522    "base": "http://other.com/",
5523    "href": "http://1.2.3.4/",
5524    "origin": "http://1.2.3.4",
5525    "protocol": "http:",
5526    "username": "",
5527    "password": "",
5528    "host": "1.2.3.4",
5529    "hostname": "1.2.3.4",
5530    "port": "",
5531    "pathname": "/",
5532    "search": "",
5533    "hash": ""
5534  },
5535  {
5536    "input": "http://1.2.3.4./",
5537    "base": "http://other.com/",
5538    "href": "http://1.2.3.4/",
5539    "origin": "http://1.2.3.4",
5540    "protocol": "http:",
5541    "username": "",
5542    "password": "",
5543    "host": "1.2.3.4",
5544    "hostname": "1.2.3.4",
5545    "port": "",
5546    "pathname": "/",
5547    "search": "",
5548    "hash": ""
5549  },
5550  {
5551    "input": "http://192.168.257",
5552    "base": "http://other.com/",
5553    "href": "http://192.168.1.1/",
5554    "origin": "http://192.168.1.1",
5555    "protocol": "http:",
5556    "username": "",
5557    "password": "",
5558    "host": "192.168.1.1",
5559    "hostname": "192.168.1.1",
5560    "port": "",
5561    "pathname": "/",
5562    "search": "",
5563    "hash": ""
5564  },
5565  {
5566    "input": "http://192.168.257.",
5567    "base": "http://other.com/",
5568    "href": "http://192.168.1.1/",
5569    "origin": "http://192.168.1.1",
5570    "protocol": "http:",
5571    "username": "",
5572    "password": "",
5573    "host": "192.168.1.1",
5574    "hostname": "192.168.1.1",
5575    "port": "",
5576    "pathname": "/",
5577    "search": "",
5578    "hash": ""
5579  },
5580  {
5581    "input": "http://192.168.257.com",
5582    "base": "http://other.com/",
5583    "href": "http://192.168.257.com/",
5584    "origin": "http://192.168.257.com",
5585    "protocol": "http:",
5586    "username": "",
5587    "password": "",
5588    "host": "192.168.257.com",
5589    "hostname": "192.168.257.com",
5590    "port": "",
5591    "pathname": "/",
5592    "search": "",
5593    "hash": ""
5594  },
5595  {
5596    "input": "http://256",
5597    "base": "http://other.com/",
5598    "href": "http://0.0.1.0/",
5599    "origin": "http://0.0.1.0",
5600    "protocol": "http:",
5601    "username": "",
5602    "password": "",
5603    "host": "0.0.1.0",
5604    "hostname": "0.0.1.0",
5605    "port": "",
5606    "pathname": "/",
5607    "search": "",
5608    "hash": ""
5609  },
5610  {
5611    "input": "http://256.com",
5612    "base": "http://other.com/",
5613    "href": "http://256.com/",
5614    "origin": "http://256.com",
5615    "protocol": "http:",
5616    "username": "",
5617    "password": "",
5618    "host": "256.com",
5619    "hostname": "256.com",
5620    "port": "",
5621    "pathname": "/",
5622    "search": "",
5623    "hash": ""
5624  },
5625  {
5626    "input": "http://999999999",
5627    "base": "http://other.com/",
5628    "href": "http://59.154.201.255/",
5629    "origin": "http://59.154.201.255",
5630    "protocol": "http:",
5631    "username": "",
5632    "password": "",
5633    "host": "59.154.201.255",
5634    "hostname": "59.154.201.255",
5635    "port": "",
5636    "pathname": "/",
5637    "search": "",
5638    "hash": ""
5639  },
5640  {
5641    "input": "http://999999999.",
5642    "base": "http://other.com/",
5643    "href": "http://59.154.201.255/",
5644    "origin": "http://59.154.201.255",
5645    "protocol": "http:",
5646    "username": "",
5647    "password": "",
5648    "host": "59.154.201.255",
5649    "hostname": "59.154.201.255",
5650    "port": "",
5651    "pathname": "/",
5652    "search": "",
5653    "hash": ""
5654  },
5655  {
5656    "input": "http://999999999.com",
5657    "base": "http://other.com/",
5658    "href": "http://999999999.com/",
5659    "origin": "http://999999999.com",
5660    "protocol": "http:",
5661    "username": "",
5662    "password": "",
5663    "host": "999999999.com",
5664    "hostname": "999999999.com",
5665    "port": "",
5666    "pathname": "/",
5667    "search": "",
5668    "hash": ""
5669  },
5670  {
5671    "input": "http://10000000000",
5672    "base": "http://other.com/",
5673    "failure": true
5674  },
5675  {
5676    "input": "http://10000000000.com",
5677    "base": "http://other.com/",
5678    "href": "http://10000000000.com/",
5679    "origin": "http://10000000000.com",
5680    "protocol": "http:",
5681    "username": "",
5682    "password": "",
5683    "host": "10000000000.com",
5684    "hostname": "10000000000.com",
5685    "port": "",
5686    "pathname": "/",
5687    "search": "",
5688    "hash": ""
5689  },
5690  {
5691    "input": "http://4294967295",
5692    "base": "http://other.com/",
5693    "href": "http://255.255.255.255/",
5694    "origin": "http://255.255.255.255",
5695    "protocol": "http:",
5696    "username": "",
5697    "password": "",
5698    "host": "255.255.255.255",
5699    "hostname": "255.255.255.255",
5700    "port": "",
5701    "pathname": "/",
5702    "search": "",
5703    "hash": ""
5704  },
5705  {
5706    "input": "http://4294967296",
5707    "base": "http://other.com/",
5708    "failure": true
5709  },
5710  {
5711    "input": "http://0xffffffff",
5712    "base": "http://other.com/",
5713    "href": "http://255.255.255.255/",
5714    "origin": "http://255.255.255.255",
5715    "protocol": "http:",
5716    "username": "",
5717    "password": "",
5718    "host": "255.255.255.255",
5719    "hostname": "255.255.255.255",
5720    "port": "",
5721    "pathname": "/",
5722    "search": "",
5723    "hash": ""
5724  },
5725  {
5726    "input": "http://0xffffffff1",
5727    "base": "http://other.com/",
5728    "failure": true
5729  },
5730  {
5731    "input": "http://256.256.256.256",
5732    "base": "http://other.com/",
5733    "failure": true
5734  },
5735  {
5736    "input": "https://0x.0x.0",
5737    "base": "about:blank",
5738    "href": "https://0.0.0.0/",
5739    "origin": "https://0.0.0.0",
5740    "protocol": "https:",
5741    "username": "",
5742    "password": "",
5743    "host": "0.0.0.0",
5744    "hostname": "0.0.0.0",
5745    "port": "",
5746    "pathname": "/",
5747    "search": "",
5748    "hash": ""
5749  },
5750  "More IPv4 parsing (via https://github.com/jsdom/whatwg-url/issues/92)",
5751  {
5752    "input": "https://0x100000000/test",
5753    "base": "about:blank",
5754    "failure": true
5755  },
5756  {
5757    "input": "https://256.0.0.1/test",
5758    "base": "about:blank",
5759    "failure": true
5760  },
5761  "# file URLs containing percent-encoded Windows drive letters (shouldn't work)",
5762  {
5763    "input": "file:///C%3A/",
5764    "base": "about:blank",
5765    "href": "file:///C%3A/",
5766    "protocol": "file:",
5767    "username": "",
5768    "password": "",
5769    "host": "",
5770    "hostname": "",
5771    "port": "",
5772    "pathname": "/C%3A/",
5773    "search": "",
5774    "hash": ""
5775  },
5776  {
5777    "input": "file:///C%7C/",
5778    "base": "about:blank",
5779    "href": "file:///C%7C/",
5780    "protocol": "file:",
5781    "username": "",
5782    "password": "",
5783    "host": "",
5784    "hostname": "",
5785    "port": "",
5786    "pathname": "/C%7C/",
5787    "search": "",
5788    "hash": ""
5789  },
5790  {
5791    "input": "file://%43%3A",
5792    "base": "about:blank",
5793    "failure": true
5794  },
5795  {
5796    "input": "file://%43%7C",
5797    "base": "about:blank",
5798    "failure": true
5799  },
5800  {
5801    "input": "file://%43|",
5802    "base": "about:blank",
5803    "failure": true
5804  },
5805  {
5806    "input": "file://C%7C",
5807    "base": "about:blank",
5808    "failure": true
5809  },
5810  {
5811    "input": "file://%43%7C/",
5812    "base": "about:blank",
5813    "failure": true
5814  },
5815  {
5816    "input": "https://%43%7C/",
5817    "base": "about:blank",
5818    "failure": true
5819  },
5820  {
5821    "input": "asdf://%43|/",
5822    "base": "about:blank",
5823    "failure": true
5824  },
5825  {
5826    "input": "asdf://%43%7C/",
5827    "base": "about:blank",
5828    "href": "asdf://%43%7C/",
5829    "origin": "null",
5830    "protocol": "asdf:",
5831    "username": "",
5832    "password": "",
5833    "host": "%43%7C",
5834    "hostname": "%43%7C",
5835    "port": "",
5836    "pathname": "/",
5837    "search": "",
5838    "hash": ""
5839  },
5840  "# file URLs relative to other file URLs (via https://github.com/jsdom/whatwg-url/pull/60)",
5841  {
5842    "input": "pix/submit.gif",
5843    "base": "file:///C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/anchor.html",
5844    "href": "file:///C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/pix/submit.gif",
5845    "protocol": "file:",
5846    "username": "",
5847    "password": "",
5848    "host": "",
5849    "hostname": "",
5850    "port": "",
5851    "pathname": "/C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/pix/submit.gif",
5852    "search": "",
5853    "hash": ""
5854  },
5855  {
5856    "input": "..",
5857    "base": "file:///C:/",
5858    "href": "file:///C:/",
5859    "protocol": "file:",
5860    "username": "",
5861    "password": "",
5862    "host": "",
5863    "hostname": "",
5864    "port": "",
5865    "pathname": "/C:/",
5866    "search": "",
5867    "hash": ""
5868  },
5869  {
5870    "input": "..",
5871    "base": "file:///",
5872    "href": "file:///",
5873    "protocol": "file:",
5874    "username": "",
5875    "password": "",
5876    "host": "",
5877    "hostname": "",
5878    "port": "",
5879    "pathname": "/",
5880    "search": "",
5881    "hash": ""
5882  },
5883  "# More file URL tests by zcorpan and annevk",
5884  {
5885    "input": "/",
5886    "base": "file:///C:/a/b",
5887    "href": "file:///C:/",
5888    "protocol": "file:",
5889    "username": "",
5890    "password": "",
5891    "host": "",
5892    "hostname": "",
5893    "port": "",
5894    "pathname": "/C:/",
5895    "search": "",
5896    "hash": ""
5897  },
5898  {
5899    "input": "/",
5900    "base": "file://h/a/b",
5901    "href": "file://h/",
5902    "protocol": "file:",
5903    "username": "",
5904    "password": "",
5905    "host": "h",
5906    "hostname": "h",
5907    "port": "",
5908    "pathname": "/",
5909    "search": "",
5910    "hash": ""
5911  },
5912  {
5913    "input": "//d:",
5914    "base": "file:///C:/a/b",
5915    "href": "file:///d:",
5916    "protocol": "file:",
5917    "username": "",
5918    "password": "",
5919    "host": "",
5920    "hostname": "",
5921    "port": "",
5922    "pathname": "/d:",
5923    "search": "",
5924    "hash": ""
5925  },
5926  {
5927    "input": "//d:/..",
5928    "base": "file:///C:/a/b",
5929    "href": "file:///d:/",
5930    "protocol": "file:",
5931    "username": "",
5932    "password": "",
5933    "host": "",
5934    "hostname": "",
5935    "port": "",
5936    "pathname": "/d:/",
5937    "search": "",
5938    "hash": ""
5939  },
5940  {
5941    "input": "..",
5942    "base": "file:///ab:/",
5943    "href": "file:///",
5944    "protocol": "file:",
5945    "username": "",
5946    "password": "",
5947    "host": "",
5948    "hostname": "",
5949    "port": "",
5950    "pathname": "/",
5951    "search": "",
5952    "hash": ""
5953  },
5954  {
5955    "input": "..",
5956    "base": "file:///1:/",
5957    "href": "file:///",
5958    "protocol": "file:",
5959    "username": "",
5960    "password": "",
5961    "host": "",
5962    "hostname": "",
5963    "port": "",
5964    "pathname": "/",
5965    "search": "",
5966    "hash": ""
5967  },
5968  {
5969    "input": "",
5970    "base": "file:///test?test#test",
5971    "href": "file:///test?test",
5972    "protocol": "file:",
5973    "username": "",
5974    "password": "",
5975    "host": "",
5976    "hostname": "",
5977    "port": "",
5978    "pathname": "/test",
5979    "search": "?test",
5980    "hash": ""
5981  },
5982  {
5983    "input": "file:",
5984    "base": "file:///test?test#test",
5985    "href": "file:///test?test",
5986    "protocol": "file:",
5987    "username": "",
5988    "password": "",
5989    "host": "",
5990    "hostname": "",
5991    "port": "",
5992    "pathname": "/test",
5993    "search": "?test",
5994    "hash": ""
5995  },
5996  {
5997    "input": "?x",
5998    "base": "file:///test?test#test",
5999    "href": "file:///test?x",
6000    "protocol": "file:",
6001    "username": "",
6002    "password": "",
6003    "host": "",
6004    "hostname": "",
6005    "port": "",
6006    "pathname": "/test",
6007    "search": "?x",
6008    "hash": ""
6009  },
6010  {
6011    "input": "file:?x",
6012    "base": "file:///test?test#test",
6013    "href": "file:///test?x",
6014    "protocol": "file:",
6015    "username": "",
6016    "password": "",
6017    "host": "",
6018    "hostname": "",
6019    "port": "",
6020    "pathname": "/test",
6021    "search": "?x",
6022    "hash": ""
6023  },
6024  {
6025    "input": "#x",
6026    "base": "file:///test?test#test",
6027    "href": "file:///test?test#x",
6028    "protocol": "file:",
6029    "username": "",
6030    "password": "",
6031    "host": "",
6032    "hostname": "",
6033    "port": "",
6034    "pathname": "/test",
6035    "search": "?test",
6036    "hash": "#x"
6037  },
6038  {
6039    "input": "file:#x",
6040    "base": "file:///test?test#test",
6041    "href": "file:///test?test#x",
6042    "protocol": "file:",
6043    "username": "",
6044    "password": "",
6045    "host": "",
6046    "hostname": "",
6047    "port": "",
6048    "pathname": "/test",
6049    "search": "?test",
6050    "hash": "#x"
6051  },
6052  "# File URLs and many (back)slashes",
6053  {
6054    "input": "file:///localhost//cat",
6055    "base": "about:blank",
6056    "href": "file:///localhost//cat",
6057    "protocol": "file:",
6058    "username": "",
6059    "password": "",
6060    "host": "",
6061    "hostname": "",
6062    "port": "",
6063    "pathname": "/localhost//cat",
6064    "search": "",
6065    "hash": ""
6066  },
6067  {
6068    "input": "\\//pig",
6069    "base": "file://lion/",
6070    "href": "file:///pig",
6071    "protocol": "file:",
6072    "username": "",
6073    "password": "",
6074    "host": "",
6075    "hostname": "",
6076    "port": "",
6077    "pathname": "/pig",
6078    "search": "",
6079    "hash": ""
6080  },
6081  {
6082    "input": "file://",
6083    "base": "file://ape/",
6084    "href": "file:///",
6085    "protocol": "file:",
6086    "username": "",
6087    "password": "",
6088    "host": "",
6089    "hostname": "",
6090    "port": "",
6091    "pathname": "/",
6092    "search": "",
6093    "hash": ""
6094  },
6095  "# File URLs with non-empty hosts",
6096  {
6097    "input": "/rooibos",
6098    "base": "file://tea/",
6099    "href": "file://tea/rooibos",
6100    "protocol": "file:",
6101    "username": "",
6102    "password": "",
6103    "host": "tea",
6104    "hostname": "tea",
6105    "port": "",
6106    "pathname": "/rooibos",
6107    "search": "",
6108    "hash": ""
6109  },
6110  {
6111    "input": "/?chai",
6112    "base": "file://tea/",
6113    "href": "file://tea/?chai",
6114    "protocol": "file:",
6115    "username": "",
6116    "password": "",
6117    "host": "tea",
6118    "hostname": "tea",
6119    "port": "",
6120    "pathname": "/",
6121    "search": "?chai",
6122    "hash": ""
6123  },
6124  "# Windows drive letter handling with the 'file:' base URL",
6125  {
6126    "input": "C",
6127    "base": "file://host/dir/file",
6128    "href": "file://host/dir/C",
6129    "protocol": "file:",
6130    "username": "",
6131    "password": "",
6132    "host": "host",
6133    "hostname": "host",
6134    "port": "",
6135    "pathname": "/dir/C",
6136    "search": "",
6137    "hash": ""
6138  },
6139  {
6140    "input": "C|a",
6141    "base": "file://host/dir/file",
6142    "href": "file://host/dir/C|a",
6143    "protocol": "file:",
6144    "username": "",
6145    "password": "",
6146    "host": "host",
6147    "hostname": "host",
6148    "port": "",
6149    "pathname": "/dir/C|a",
6150    "search": "",
6151    "hash": ""
6152  },
6153  "# Windows drive letter quirk in the file slash state",
6154  {
6155    "input": "/c:/foo/bar",
6156    "base": "file:///c:/baz/qux",
6157    "href": "file:///c:/foo/bar",
6158    "protocol": "file:",
6159    "username": "",
6160    "password": "",
6161    "host": "",
6162    "hostname": "",
6163    "port": "",
6164    "pathname": "/c:/foo/bar",
6165    "search": "",
6166    "hash": ""
6167  },
6168  {
6169    "input": "/c|/foo/bar",
6170    "base": "file:///c:/baz/qux",
6171    "href": "file:///c:/foo/bar",
6172    "protocol": "file:",
6173    "username": "",
6174    "password": "",
6175    "host": "",
6176    "hostname": "",
6177    "port": "",
6178    "pathname": "/c:/foo/bar",
6179    "search": "",
6180    "hash": ""
6181  },
6182  {
6183    "input": "file:\\c:\\foo\\bar",
6184    "base": "file:///c:/baz/qux",
6185    "href": "file:///c:/foo/bar",
6186    "protocol": "file:",
6187    "username": "",
6188    "password": "",
6189    "host": "",
6190    "hostname": "",
6191    "port": "",
6192    "pathname": "/c:/foo/bar",
6193    "search": "",
6194    "hash": ""
6195  },
6196  "# Copy the empty host from the input in the following cases",
6197  {
6198    "input": "//C:/",
6199    "base": "file://host/",
6200    "href": "file:///C:/",
6201    "protocol": "file:",
6202    "username": "",
6203    "password": "",
6204    "host": "",
6205    "hostname": "",
6206    "port": "",
6207    "pathname": "/C:/",
6208    "search": "",
6209    "hash": ""
6210  },
6211  {
6212    "input": "file://C:/",
6213    "base": "file://host/",
6214    "href": "file:///C:/",
6215    "protocol": "file:",
6216    "username": "",
6217    "password": "",
6218    "host": "",
6219    "hostname": "",
6220    "port": "",
6221    "pathname": "/C:/",
6222    "search": "",
6223    "hash": ""
6224  },
6225  {
6226    "input": "///C:/",
6227    "base": "file://host/",
6228    "href": "file:///C:/",
6229    "protocol": "file:",
6230    "username": "",
6231    "password": "",
6232    "host": "",
6233    "hostname": "",
6234    "port": "",
6235    "pathname": "/C:/",
6236    "search": "",
6237    "hash": ""
6238  },
6239  {
6240    "input": "file:///C:/",
6241    "base": "file://host/",
6242    "href": "file:///C:/",
6243    "protocol": "file:",
6244    "username": "",
6245    "password": "",
6246    "host": "",
6247    "hostname": "",
6248    "port": "",
6249    "pathname": "/C:/",
6250    "search": "",
6251    "hash": ""
6252  },
6253  "# Windows drive letter quirk (no host)",
6254  {
6255    "input": "file:/C|/",
6256    "base": "about:blank",
6257    "href": "file:///C:/",
6258    "protocol": "file:",
6259    "username": "",
6260    "password": "",
6261    "host": "",
6262    "hostname": "",
6263    "port": "",
6264    "pathname": "/C:/",
6265    "search": "",
6266    "hash": ""
6267  },
6268  {
6269    "input": "file://C|/",
6270    "base": "about:blank",
6271    "href": "file:///C:/",
6272    "protocol": "file:",
6273    "username": "",
6274    "password": "",
6275    "host": "",
6276    "hostname": "",
6277    "port": "",
6278    "pathname": "/C:/",
6279    "search": "",
6280    "hash": ""
6281  },
6282  "# file URLs without base URL by Rimas Misevičius",
6283  {
6284    "input": "file:",
6285    "base": "about:blank",
6286    "href": "file:///",
6287    "protocol": "file:",
6288    "username": "",
6289    "password": "",
6290    "host": "",
6291    "hostname": "",
6292    "port": "",
6293    "pathname": "/",
6294    "search": "",
6295    "hash": ""
6296  },
6297  {
6298    "input": "file:?q=v",
6299    "base": "about:blank",
6300    "href": "file:///?q=v",
6301    "protocol": "file:",
6302    "username": "",
6303    "password": "",
6304    "host": "",
6305    "hostname": "",
6306    "port": "",
6307    "pathname": "/",
6308    "search": "?q=v",
6309    "hash": ""
6310  },
6311  {
6312    "input": "file:#frag",
6313    "base": "about:blank",
6314    "href": "file:///#frag",
6315    "protocol": "file:",
6316    "username": "",
6317    "password": "",
6318    "host": "",
6319    "hostname": "",
6320    "port": "",
6321    "pathname": "/",
6322    "search": "",
6323    "hash": "#frag"
6324  },
6325  "# file: drive letter cases from https://crbug.com/1078698",
6326  {
6327    "input": "file:///Y:",
6328    "base": "about:blank",
6329    "href": "file:///Y:",
6330    "protocol": "file:",
6331    "username": "",
6332    "password": "",
6333    "host": "",
6334    "hostname": "",
6335    "port": "",
6336    "pathname": "/Y:",
6337    "search": "",
6338    "hash": ""
6339  },
6340  {
6341    "input": "file:///Y:/",
6342    "base": "about:blank",
6343    "href": "file:///Y:/",
6344    "protocol": "file:",
6345    "username": "",
6346    "password": "",
6347    "host": "",
6348    "hostname": "",
6349    "port": "",
6350    "pathname": "/Y:/",
6351    "search": "",
6352    "hash": ""
6353  },
6354  {
6355    "input": "file:///./Y",
6356    "base": "about:blank",
6357    "href": "file:///Y",
6358    "protocol": "file:",
6359    "username": "",
6360    "password": "",
6361    "host": "",
6362    "hostname": "",
6363    "port": "",
6364    "pathname": "/Y",
6365    "search": "",
6366    "hash": ""
6367  },
6368  {
6369    "input": "file:///./Y:",
6370    "base": "about:blank",
6371    "href": "file:///Y:",
6372    "protocol": "file:",
6373    "username": "",
6374    "password": "",
6375    "host": "",
6376    "hostname": "",
6377    "port": "",
6378    "pathname": "/Y:",
6379    "search": "",
6380    "hash": ""
6381  },
6382  {
6383    "input": "\\\\\\.\\Y:",
6384    "base": "about:blank",
6385    "failure": true,
6386    "inputCanBeRelative": true
6387  },
6388  "# file: drive letter cases from https://crbug.com/1078698 but lowercased",
6389  {
6390    "input": "file:///y:",
6391    "base": "about:blank",
6392    "href": "file:///y:",
6393    "protocol": "file:",
6394    "username": "",
6395    "password": "",
6396    "host": "",
6397    "hostname": "",
6398    "port": "",
6399    "pathname": "/y:",
6400    "search": "",
6401    "hash": ""
6402  },
6403  {
6404    "input": "file:///y:/",
6405    "base": "about:blank",
6406    "href": "file:///y:/",
6407    "protocol": "file:",
6408    "username": "",
6409    "password": "",
6410    "host": "",
6411    "hostname": "",
6412    "port": "",
6413    "pathname": "/y:/",
6414    "search": "",
6415    "hash": ""
6416  },
6417  {
6418    "input": "file:///./y",
6419    "base": "about:blank",
6420    "href": "file:///y",
6421    "protocol": "file:",
6422    "username": "",
6423    "password": "",
6424    "host": "",
6425    "hostname": "",
6426    "port": "",
6427    "pathname": "/y",
6428    "search": "",
6429    "hash": ""
6430  },
6431  {
6432    "input": "file:///./y:",
6433    "base": "about:blank",
6434    "href": "file:///y:",
6435    "protocol": "file:",
6436    "username": "",
6437    "password": "",
6438    "host": "",
6439    "hostname": "",
6440    "port": "",
6441    "pathname": "/y:",
6442    "search": "",
6443    "hash": ""
6444  },
6445  {
6446    "input": "\\\\\\.\\y:",
6447    "base": "about:blank",
6448    "failure": true,
6449    "inputCanBeRelative": true
6450  },
6451  "# Additional file URL tests for (https://github.com/whatwg/url/issues/405)",
6452  {
6453    "input": "file:///one/two",
6454    "base": "file:///",
6455    "href": "file:///one/two",
6456    "protocol": "file:",
6457    "username": "",
6458    "password": "",
6459    "host": "",
6460    "hostname": "",
6461    "port": "",
6462    "pathname": "/one/two",
6463    "search": "",
6464    "hash": ""
6465  },
6466  {
6467    "input": "//one/two",
6468    "base": "file:///",
6469    "href": "file://one/two",
6470    "protocol": "file:",
6471    "username": "",
6472    "password": "",
6473    "host": "one",
6474    "hostname": "one",
6475    "port": "",
6476    "pathname": "/two",
6477    "search": "",
6478    "hash": ""
6479  },
6480  {
6481    "input": "///one/two",
6482    "base": "file:///",
6483    "href": "file:///one/two",
6484    "protocol": "file:",
6485    "username": "",
6486    "password": "",
6487    "host": "",
6488    "hostname": "",
6489    "port": "",
6490    "pathname": "/one/two",
6491    "search": "",
6492    "hash": ""
6493  },
6494  "# IPv6 tests",
6495  {
6496    "input": "http://[1:0::]",
6497    "base": "http://example.net/",
6498    "href": "http://[1::]/",
6499    "origin": "http://[1::]",
6500    "protocol": "http:",
6501    "username": "",
6502    "password": "",
6503    "host": "[1::]",
6504    "hostname": "[1::]",
6505    "port": "",
6506    "pathname": "/",
6507    "search": "",
6508    "hash": ""
6509  },
6510  {
6511    "input": "http://[0:1:2:3:4:5:6:7:8]",
6512    "base": "http://example.net/",
6513    "failure": true
6514  },
6515  {
6516    "input": "https://[0::0::0]",
6517    "base": "about:blank",
6518    "failure": true
6519  },
6520  {
6521    "input": "https://[0:.0]",
6522    "base": "about:blank",
6523    "failure": true
6524  },
6525  {
6526    "input": "https://[0:0:]",
6527    "base": "about:blank",
6528    "failure": true
6529  },
6530  {
6531    "input": "https://[0:1:2:3:4:5:6:7.0.0.0.1]",
6532    "base": "about:blank",
6533    "failure": true
6534  },
6535  {
6536    "input": "https://[0:1.00.0.0.0]",
6537    "base": "about:blank",
6538    "failure": true
6539  },
6540  {
6541    "input": "https://[0:1.290.0.0.0]",
6542    "base": "about:blank",
6543    "failure": true
6544  },
6545  {
6546    "input": "https://[0:1.23.23]",
6547    "base": "about:blank",
6548    "failure": true
6549  },
6550  "# Empty host",
6551  {
6552    "input": "http://?",
6553    "base": "about:blank",
6554    "failure": true
6555  },
6556  {
6557    "input": "http://#",
6558    "base": "about:blank",
6559    "failure": true
6560  },
6561  "Port overflow (2^32 + 81)",
6562  {
6563    "input": "http://f:4294967377/c",
6564    "base": "http://example.org/",
6565    "failure": true
6566  },
6567  "Port overflow (2^64 + 81)",
6568  {
6569    "input": "http://f:18446744073709551697/c",
6570    "base": "http://example.org/",
6571    "failure": true
6572  },
6573  "Port overflow (2^128 + 81)",
6574  {
6575    "input": "http://f:340282366920938463463374607431768211537/c",
6576    "base": "http://example.org/",
6577    "failure": true
6578  },
6579  "# Non-special-URL path tests",
6580  {
6581    "input": "sc://ñ",
6582    "base": "about:blank",
6583    "href": "sc://%C3%B1",
6584    "origin": "null",
6585    "protocol": "sc:",
6586    "username": "",
6587    "password": "",
6588    "host": "%C3%B1",
6589    "hostname": "%C3%B1",
6590    "port": "",
6591    "pathname": "",
6592    "search": "",
6593    "hash": ""
6594  },
6595  {
6596    "input": "sc://ñ?x",
6597    "base": "about:blank",
6598    "href": "sc://%C3%B1?x",
6599    "origin": "null",
6600    "protocol": "sc:",
6601    "username": "",
6602    "password": "",
6603    "host": "%C3%B1",
6604    "hostname": "%C3%B1",
6605    "port": "",
6606    "pathname": "",
6607    "search": "?x",
6608    "hash": ""
6609  },
6610  {
6611    "input": "sc://ñ#x",
6612    "base": "about:blank",
6613    "href": "sc://%C3%B1#x",
6614    "origin": "null",
6615    "protocol": "sc:",
6616    "username": "",
6617    "password": "",
6618    "host": "%C3%B1",
6619    "hostname": "%C3%B1",
6620    "port": "",
6621    "pathname": "",
6622    "search": "",
6623    "hash": "#x"
6624  },
6625  {
6626    "input": "#x",
6627    "base": "sc://ñ",
6628    "href": "sc://%C3%B1#x",
6629    "origin": "null",
6630    "protocol": "sc:",
6631    "username": "",
6632    "password": "",
6633    "host": "%C3%B1",
6634    "hostname": "%C3%B1",
6635    "port": "",
6636    "pathname": "",
6637    "search": "",
6638    "hash": "#x"
6639  },
6640  {
6641    "input": "?x",
6642    "base": "sc://ñ",
6643    "href": "sc://%C3%B1?x",
6644    "origin": "null",
6645    "protocol": "sc:",
6646    "username": "",
6647    "password": "",
6648    "host": "%C3%B1",
6649    "hostname": "%C3%B1",
6650    "port": "",
6651    "pathname": "",
6652    "search": "?x",
6653    "hash": ""
6654  },
6655  {
6656    "input": "sc://?",
6657    "base": "about:blank",
6658    "href": "sc://?",
6659    "protocol": "sc:",
6660    "username": "",
6661    "password": "",
6662    "host": "",
6663    "hostname": "",
6664    "port": "",
6665    "pathname": "",
6666    "search": "",
6667    "hash": ""
6668  },
6669  {
6670    "input": "sc://#",
6671    "base": "about:blank",
6672    "href": "sc://#",
6673    "protocol": "sc:",
6674    "username": "",
6675    "password": "",
6676    "host": "",
6677    "hostname": "",
6678    "port": "",
6679    "pathname": "",
6680    "search": "",
6681    "hash": ""
6682  },
6683  {
6684    "input": "///",
6685    "base": "sc://x/",
6686    "href": "sc:///",
6687    "protocol": "sc:",
6688    "username": "",
6689    "password": "",
6690    "host": "",
6691    "hostname": "",
6692    "port": "",
6693    "pathname": "/",
6694    "search": "",
6695    "hash": ""
6696  },
6697  {
6698    "input": "////",
6699    "base": "sc://x/",
6700    "href": "sc:////",
6701    "protocol": "sc:",
6702    "username": "",
6703    "password": "",
6704    "host": "",
6705    "hostname": "",
6706    "port": "",
6707    "pathname": "//",
6708    "search": "",
6709    "hash": ""
6710  },
6711  {
6712    "input": "////x/",
6713    "base": "sc://x/",
6714    "href": "sc:////x/",
6715    "protocol": "sc:",
6716    "username": "",
6717    "password": "",
6718    "host": "",
6719    "hostname": "",
6720    "port": "",
6721    "pathname": "//x/",
6722    "search": "",
6723    "hash": ""
6724  },
6725  {
6726    "input": "tftp://foobar.com/someconfig;mode=netascii",
6727    "base": "about:blank",
6728    "href": "tftp://foobar.com/someconfig;mode=netascii",
6729    "origin": "null",
6730    "protocol": "tftp:",
6731    "username": "",
6732    "password": "",
6733    "host": "foobar.com",
6734    "hostname": "foobar.com",
6735    "port": "",
6736    "pathname": "/someconfig;mode=netascii",
6737    "search": "",
6738    "hash": ""
6739  },
6740  {
6741    "input": "telnet://user:pass@foobar.com:23/",
6742    "base": "about:blank",
6743    "href": "telnet://user:pass@foobar.com:23/",
6744    "origin": "null",
6745    "protocol": "telnet:",
6746    "username": "user",
6747    "password": "pass",
6748    "host": "foobar.com:23",
6749    "hostname": "foobar.com",
6750    "port": "23",
6751    "pathname": "/",
6752    "search": "",
6753    "hash": ""
6754  },
6755  {
6756    "input": "ut2004://10.10.10.10:7777/Index.ut2",
6757    "base": "about:blank",
6758    "href": "ut2004://10.10.10.10:7777/Index.ut2",
6759    "origin": "null",
6760    "protocol": "ut2004:",
6761    "username": "",
6762    "password": "",
6763    "host": "10.10.10.10:7777",
6764    "hostname": "10.10.10.10",
6765    "port": "7777",
6766    "pathname": "/Index.ut2",
6767    "search": "",
6768    "hash": ""
6769  },
6770  {
6771    "input": "redis://foo:bar@somehost:6379/0?baz=bam&qux=baz",
6772    "base": "about:blank",
6773    "href": "redis://foo:bar@somehost:6379/0?baz=bam&qux=baz",
6774    "origin": "null",
6775    "protocol": "redis:",
6776    "username": "foo",
6777    "password": "bar",
6778    "host": "somehost:6379",
6779    "hostname": "somehost",
6780    "port": "6379",
6781    "pathname": "/0",
6782    "search": "?baz=bam&qux=baz",
6783    "hash": ""
6784  },
6785  {
6786    "input": "rsync://foo@host:911/sup",
6787    "base": "about:blank",
6788    "href": "rsync://foo@host:911/sup",
6789    "origin": "null",
6790    "protocol": "rsync:",
6791    "username": "foo",
6792    "password": "",
6793    "host": "host:911",
6794    "hostname": "host",
6795    "port": "911",
6796    "pathname": "/sup",
6797    "search": "",
6798    "hash": ""
6799  },
6800  {
6801    "input": "git://github.com/foo/bar.git",
6802    "base": "about:blank",
6803    "href": "git://github.com/foo/bar.git",
6804    "origin": "null",
6805    "protocol": "git:",
6806    "username": "",
6807    "password": "",
6808    "host": "github.com",
6809    "hostname": "github.com",
6810    "port": "",
6811    "pathname": "/foo/bar.git",
6812    "search": "",
6813    "hash": ""
6814  },
6815  {
6816    "input": "irc://myserver.com:6999/channel?passwd",
6817    "base": "about:blank",
6818    "href": "irc://myserver.com:6999/channel?passwd",
6819    "origin": "null",
6820    "protocol": "irc:",
6821    "username": "",
6822    "password": "",
6823    "host": "myserver.com:6999",
6824    "hostname": "myserver.com",
6825    "port": "6999",
6826    "pathname": "/channel",
6827    "search": "?passwd",
6828    "hash": ""
6829  },
6830  {
6831    "input": "dns://fw.example.org:9999/foo.bar.org?type=TXT",
6832    "base": "about:blank",
6833    "href": "dns://fw.example.org:9999/foo.bar.org?type=TXT",
6834    "origin": "null",
6835    "protocol": "dns:",
6836    "username": "",
6837    "password": "",
6838    "host": "fw.example.org:9999",
6839    "hostname": "fw.example.org",
6840    "port": "9999",
6841    "pathname": "/foo.bar.org",
6842    "search": "?type=TXT",
6843    "hash": ""
6844  },
6845  {
6846    "input": "ldap://localhost:389/ou=People,o=JNDITutorial",
6847    "base": "about:blank",
6848    "href": "ldap://localhost:389/ou=People,o=JNDITutorial",
6849    "origin": "null",
6850    "protocol": "ldap:",
6851    "username": "",
6852    "password": "",
6853    "host": "localhost:389",
6854    "hostname": "localhost",
6855    "port": "389",
6856    "pathname": "/ou=People,o=JNDITutorial",
6857    "search": "",
6858    "hash": ""
6859  },
6860  {
6861    "input": "git+https://github.com/foo/bar",
6862    "base": "about:blank",
6863    "href": "git+https://github.com/foo/bar",
6864    "origin": "null",
6865    "protocol": "git+https:",
6866    "username": "",
6867    "password": "",
6868    "host": "github.com",
6869    "hostname": "github.com",
6870    "port": "",
6871    "pathname": "/foo/bar",
6872    "search": "",
6873    "hash": ""
6874  },
6875  {
6876    "input": "urn:ietf:rfc:2648",
6877    "base": "about:blank",
6878    "href": "urn:ietf:rfc:2648",
6879    "origin": "null",
6880    "protocol": "urn:",
6881    "username": "",
6882    "password": "",
6883    "host": "",
6884    "hostname": "",
6885    "port": "",
6886    "pathname": "ietf:rfc:2648",
6887    "search": "",
6888    "hash": ""
6889  },
6890  {
6891    "input": "tag:joe@example.org,2001:foo/bar",
6892    "base": "about:blank",
6893    "href": "tag:joe@example.org,2001:foo/bar",
6894    "origin": "null",
6895    "protocol": "tag:",
6896    "username": "",
6897    "password": "",
6898    "host": "",
6899    "hostname": "",
6900    "port": "",
6901    "pathname": "joe@example.org,2001:foo/bar",
6902    "search": "",
6903    "hash": ""
6904  },
6905  "# percent encoded hosts in non-special-URLs",
6906  {
6907    "input": "non-special://%E2%80%A0/",
6908    "base": "about:blank",
6909    "href": "non-special://%E2%80%A0/",
6910    "protocol": "non-special:",
6911    "username": "",
6912    "password": "",
6913    "host": "%E2%80%A0",
6914    "hostname": "%E2%80%A0",
6915    "port": "",
6916    "pathname": "/",
6917    "search": "",
6918    "hash": ""
6919  },
6920  {
6921    "input": "non-special://H%4fSt/path",
6922    "base": "about:blank",
6923    "href": "non-special://H%4fSt/path",
6924    "protocol": "non-special:",
6925    "username": "",
6926    "password": "",
6927    "host": "H%4fSt",
6928    "hostname": "H%4fSt",
6929    "port": "",
6930    "pathname": "/path",
6931    "search": "",
6932    "hash": ""
6933  },
6934  "# IPv6 in non-special-URLs",
6935  {
6936    "input": "non-special://[1:2:0:0:5:0:0:0]/",
6937    "base": "about:blank",
6938    "href": "non-special://[1:2:0:0:5::]/",
6939    "protocol": "non-special:",
6940    "username": "",
6941    "password": "",
6942    "host": "[1:2:0:0:5::]",
6943    "hostname": "[1:2:0:0:5::]",
6944    "port": "",
6945    "pathname": "/",
6946    "search": "",
6947    "hash": ""
6948  },
6949  {
6950    "input": "non-special://[1:2:0:0:0:0:0:3]/",
6951    "base": "about:blank",
6952    "href": "non-special://[1:2::3]/",
6953    "protocol": "non-special:",
6954    "username": "",
6955    "password": "",
6956    "host": "[1:2::3]",
6957    "hostname": "[1:2::3]",
6958    "port": "",
6959    "pathname": "/",
6960    "search": "",
6961    "hash": ""
6962  },
6963  {
6964    "input": "non-special://[1:2::3]:80/",
6965    "base": "about:blank",
6966    "href": "non-special://[1:2::3]:80/",
6967    "protocol": "non-special:",
6968    "username": "",
6969    "password": "",
6970    "host": "[1:2::3]:80",
6971    "hostname": "[1:2::3]",
6972    "port": "80",
6973    "pathname": "/",
6974    "search": "",
6975    "hash": ""
6976  },
6977  {
6978    "input": "non-special://[:80/",
6979    "base": "about:blank",
6980    "failure": true
6981  },
6982  {
6983    "input": "blob:https://example.com:443/",
6984    "base": "about:blank",
6985    "href": "blob:https://example.com:443/",
6986    "origin": "https://example.com",
6987    "protocol": "blob:",
6988    "username": "",
6989    "password": "",
6990    "host": "",
6991    "hostname": "",
6992    "port": "",
6993    "pathname": "https://example.com:443/",
6994    "search": "",
6995    "hash": ""
6996  },
6997  {
6998    "input": "blob:d3958f5c-0777-0845-9dcf-2cb28783acaf",
6999    "base": "about:blank",
7000    "href": "blob:d3958f5c-0777-0845-9dcf-2cb28783acaf",
7001    "origin": "null",
7002    "protocol": "blob:",
7003    "username": "",
7004    "password": "",
7005    "host": "",
7006    "hostname": "",
7007    "port": "",
7008    "pathname": "d3958f5c-0777-0845-9dcf-2cb28783acaf",
7009    "search": "",
7010    "hash": ""
7011  },
7012  {
7013    "input": "blob:",
7014    "base": "about:blank",
7015    "href": "blob:",
7016    "origin": "null",
7017    "protocol": "blob:",
7018    "username": "",
7019    "password": "",
7020    "host": "",
7021    "hostname": "",
7022    "port": "",
7023    "pathname": "",
7024    "search": "",
7025    "hash": ""
7026  },
7027  "Invalid IPv4 radix digits",
7028  {
7029    "input": "http://0x7f.0.0.0x7g",
7030    "base": "about:blank",
7031    "href": "http://0x7f.0.0.0x7g/",
7032    "protocol": "http:",
7033    "username": "",
7034    "password": "",
7035    "host": "0x7f.0.0.0x7g",
7036    "hostname": "0x7f.0.0.0x7g",
7037    "port": "",
7038    "pathname": "/",
7039    "search": "",
7040    "hash": ""
7041  },
7042  {
7043    "input": "http://0X7F.0.0.0X7G",
7044    "base": "about:blank",
7045    "href": "http://0x7f.0.0.0x7g/",
7046    "protocol": "http:",
7047    "username": "",
7048    "password": "",
7049    "host": "0x7f.0.0.0x7g",
7050    "hostname": "0x7f.0.0.0x7g",
7051    "port": "",
7052    "pathname": "/",
7053    "search": "",
7054    "hash": ""
7055  },
7056  "Invalid IPv4 portion of IPv6 address",
7057  {
7058    "input": "http://[::127.0.0.0.1]",
7059    "base": "about:blank",
7060    "failure": true
7061  },
7062  "Uncompressed IPv6 addresses with 0",
7063  {
7064    "input": "http://[0:1:0:1:0:1:0:1]",
7065    "base": "about:blank",
7066    "href": "http://[0:1:0:1:0:1:0:1]/",
7067    "protocol": "http:",
7068    "username": "",
7069    "password": "",
7070    "host": "[0:1:0:1:0:1:0:1]",
7071    "hostname": "[0:1:0:1:0:1:0:1]",
7072    "port": "",
7073    "pathname": "/",
7074    "search": "",
7075    "hash": ""
7076  },
7077  {
7078    "input": "http://[1:0:1:0:1:0:1:0]",
7079    "base": "about:blank",
7080    "href": "http://[1:0:1:0:1:0:1:0]/",
7081    "protocol": "http:",
7082    "username": "",
7083    "password": "",
7084    "host": "[1:0:1:0:1:0:1:0]",
7085    "hostname": "[1:0:1:0:1:0:1:0]",
7086    "port": "",
7087    "pathname": "/",
7088    "search": "",
7089    "hash": ""
7090  },
7091  "Percent-encoded query and fragment",
7092  {
7093    "input": "http://example.org/test?\u0022",
7094    "base": "about:blank",
7095    "href": "http://example.org/test?%22",
7096    "protocol": "http:",
7097    "username": "",
7098    "password": "",
7099    "host": "example.org",
7100    "hostname": "example.org",
7101    "port": "",
7102    "pathname": "/test",
7103    "search": "?%22",
7104    "hash": ""
7105  },
7106  {
7107    "input": "http://example.org/test?\u0023",
7108    "base": "about:blank",
7109    "href": "http://example.org/test?#",
7110    "protocol": "http:",
7111    "username": "",
7112    "password": "",
7113    "host": "example.org",
7114    "hostname": "example.org",
7115    "port": "",
7116    "pathname": "/test",
7117    "search": "",
7118    "hash": ""
7119  },
7120  {
7121    "input": "http://example.org/test?\u003C",
7122    "base": "about:blank",
7123    "href": "http://example.org/test?%3C",
7124    "protocol": "http:",
7125    "username": "",
7126    "password": "",
7127    "host": "example.org",
7128    "hostname": "example.org",
7129    "port": "",
7130    "pathname": "/test",
7131    "search": "?%3C",
7132    "hash": ""
7133  },
7134  {
7135    "input": "http://example.org/test?\u003E",
7136    "base": "about:blank",
7137    "href": "http://example.org/test?%3E",
7138    "protocol": "http:",
7139    "username": "",
7140    "password": "",
7141    "host": "example.org",
7142    "hostname": "example.org",
7143    "port": "",
7144    "pathname": "/test",
7145    "search": "?%3E",
7146    "hash": ""
7147  },
7148  {
7149    "input": "http://example.org/test?\u2323",
7150    "base": "about:blank",
7151    "href": "http://example.org/test?%E2%8C%A3",
7152    "protocol": "http:",
7153    "username": "",
7154    "password": "",
7155    "host": "example.org",
7156    "hostname": "example.org",
7157    "port": "",
7158    "pathname": "/test",
7159    "search": "?%E2%8C%A3",
7160    "hash": ""
7161  },
7162  {
7163    "input": "http://example.org/test?%23%23",
7164    "base": "about:blank",
7165    "href": "http://example.org/test?%23%23",
7166    "protocol": "http:",
7167    "username": "",
7168    "password": "",
7169    "host": "example.org",
7170    "hostname": "example.org",
7171    "port": "",
7172    "pathname": "/test",
7173    "search": "?%23%23",
7174    "hash": ""
7175  },
7176  {
7177    "input": "http://example.org/test?%GH",
7178    "base": "about:blank",
7179    "href": "http://example.org/test?%GH",
7180    "protocol": "http:",
7181    "username": "",
7182    "password": "",
7183    "host": "example.org",
7184    "hostname": "example.org",
7185    "port": "",
7186    "pathname": "/test",
7187    "search": "?%GH",
7188    "hash": ""
7189  },
7190  {
7191    "input": "http://example.org/test?a#%EF",
7192    "base": "about:blank",
7193    "href": "http://example.org/test?a#%EF",
7194    "protocol": "http:",
7195    "username": "",
7196    "password": "",
7197    "host": "example.org",
7198    "hostname": "example.org",
7199    "port": "",
7200    "pathname": "/test",
7201    "search": "?a",
7202    "hash": "#%EF"
7203  },
7204  {
7205    "input": "http://example.org/test?a#%GH",
7206    "base": "about:blank",
7207    "href": "http://example.org/test?a#%GH",
7208    "protocol": "http:",
7209    "username": "",
7210    "password": "",
7211    "host": "example.org",
7212    "hostname": "example.org",
7213    "port": "",
7214    "pathname": "/test",
7215    "search": "?a",
7216    "hash": "#%GH"
7217  },
7218  "URLs that require a non-about:blank base. (Also serve as invalid base tests.)",
7219  {
7220    "input": "a",
7221    "base": "about:blank",
7222    "failure": true,
7223    "inputCanBeRelative": true
7224  },
7225  {
7226    "input": "a/",
7227    "base": "about:blank",
7228    "failure": true,
7229    "inputCanBeRelative": true
7230  },
7231  {
7232    "input": "a//",
7233    "base": "about:blank",
7234    "failure": true,
7235    "inputCanBeRelative": true
7236  },
7237  "Bases that don't fail to parse but fail to be bases",
7238  {
7239    "input": "test-a-colon.html",
7240    "base": "a:",
7241    "failure": true
7242  },
7243  {
7244    "input": "test-a-colon-b.html",
7245    "base": "a:b",
7246    "failure": true
7247  },
7248  "Other base URL tests, that must succeed",
7249  {
7250    "input": "test-a-colon-slash.html",
7251    "base": "a:/",
7252    "href": "a:/test-a-colon-slash.html",
7253    "protocol": "a:",
7254    "username": "",
7255    "password": "",
7256    "host": "",
7257    "hostname": "",
7258    "port": "",
7259    "pathname": "/test-a-colon-slash.html",
7260    "search": "",
7261    "hash": ""
7262  },
7263  {
7264    "input": "test-a-colon-slash-slash.html",
7265    "base": "a://",
7266    "href": "a:///test-a-colon-slash-slash.html",
7267    "protocol": "a:",
7268    "username": "",
7269    "password": "",
7270    "host": "",
7271    "hostname": "",
7272    "port": "",
7273    "pathname": "/test-a-colon-slash-slash.html",
7274    "search": "",
7275    "hash": ""
7276  },
7277  {
7278    "input": "test-a-colon-slash-b.html",
7279    "base": "a:/b",
7280    "href": "a:/test-a-colon-slash-b.html",
7281    "protocol": "a:",
7282    "username": "",
7283    "password": "",
7284    "host": "",
7285    "hostname": "",
7286    "port": "",
7287    "pathname": "/test-a-colon-slash-b.html",
7288    "search": "",
7289    "hash": ""
7290  },
7291  {
7292    "input": "test-a-colon-slash-slash-b.html",
7293    "base": "a://b",
7294    "href": "a://b/test-a-colon-slash-slash-b.html",
7295    "protocol": "a:",
7296    "username": "",
7297    "password": "",
7298    "host": "b",
7299    "hostname": "b",
7300    "port": "",
7301    "pathname": "/test-a-colon-slash-slash-b.html",
7302    "search": "",
7303    "hash": ""
7304  },
7305  "Null code point in fragment",
7306  {
7307    "input": "http://example.org/test?a#b\u0000c",
7308    "base": "about:blank",
7309    "href": "http://example.org/test?a#b%00c",
7310    "protocol": "http:",
7311    "username": "",
7312    "password": "",
7313    "host": "example.org",
7314    "hostname": "example.org",
7315    "port": "",
7316    "pathname": "/test",
7317    "search": "?a",
7318    "hash": "#b%00c"
7319  },
7320  {
7321    "input": "non-spec://example.org/test?a#b\u0000c",
7322    "base": "about:blank",
7323    "href": "non-spec://example.org/test?a#b%00c",
7324    "protocol": "non-spec:",
7325    "username": "",
7326    "password": "",
7327    "host": "example.org",
7328    "hostname": "example.org",
7329    "port": "",
7330    "pathname": "/test",
7331    "search": "?a",
7332    "hash": "#b%00c"
7333  },
7334  {
7335    "input": "non-spec:/test?a#b\u0000c",
7336    "base": "about:blank",
7337    "href": "non-spec:/test?a#b%00c",
7338    "protocol": "non-spec:",
7339    "username": "",
7340    "password": "",
7341    "host": "",
7342    "hostname": "",
7343    "port": "",
7344    "pathname": "/test",
7345    "search": "?a",
7346    "hash": "#b%00c"
7347  },
7348  "First scheme char - not allowed: https://github.com/whatwg/url/issues/464",
7349  {
7350    "input": "10.0.0.7:8080/foo.html",
7351    "base": "file:///some/dir/bar.html",
7352    "href": "file:///some/dir/10.0.0.7:8080/foo.html",
7353    "protocol": "file:",
7354    "username": "",
7355    "password": "",
7356    "host": "",
7357    "hostname": "",
7358    "port": "",
7359    "pathname": "/some/dir/10.0.0.7:8080/foo.html",
7360    "search": "",
7361    "hash": ""
7362  },
7363  "Subsequent scheme chars - not allowed",
7364  {
7365    "input": "a!@$*=/foo.html",
7366    "base": "file:///some/dir/bar.html",
7367    "href": "file:///some/dir/a!@$*=/foo.html",
7368    "protocol": "file:",
7369    "username": "",
7370    "password": "",
7371    "host": "",
7372    "hostname": "",
7373    "port": "",
7374    "pathname": "/some/dir/a!@$*=/foo.html",
7375    "search": "",
7376    "hash": ""
7377  },
7378  "First and subsequent scheme chars - allowed",
7379  {
7380    "input": "a1234567890-+.:foo/bar",
7381    "base": "http://example.com/dir/file",
7382    "href": "a1234567890-+.:foo/bar",
7383    "protocol": "a1234567890-+.:",
7384    "username": "",
7385    "password": "",
7386    "host": "",
7387    "hostname": "",
7388    "port": "",
7389    "pathname": "foo/bar",
7390    "search": "",
7391    "hash": ""
7392  },
7393  "IDNA ignored code points in file URLs hosts",
7394  {
7395    "input": "file://a\u00ADb/p",
7396    "base": "about:blank",
7397    "href": "file://ab/p",
7398    "protocol": "file:",
7399    "username": "",
7400    "password": "",
7401    "host": "ab",
7402    "hostname": "ab",
7403    "port": "",
7404    "pathname": "/p",
7405    "search": "",
7406    "hash": ""
7407  },
7408  {
7409    "input": "file://a%C2%ADb/p",
7410    "base": "about:blank",
7411    "href": "file://ab/p",
7412    "protocol": "file:",
7413    "username": "",
7414    "password": "",
7415    "host": "ab",
7416    "hostname": "ab",
7417    "port": "",
7418    "pathname": "/p",
7419    "search": "",
7420    "hash": ""
7421  },
7422  "Empty host after the domain to ASCII",
7423  {
7424    "input": "file://\u00ad/p",
7425    "base": "about:blank",
7426    "failure": true
7427  },
7428  {
7429    "input": "file://%C2%AD/p",
7430    "base": "about:blank",
7431    "failure": true
7432  },
7433  {
7434    "input": "file://xn--/p",
7435    "base": "about:blank",
7436    "failure": true
7437  },
7438  "https://bugzilla.mozilla.org/show_bug.cgi?id=1647058",
7439  {
7440    "input": "#link",
7441    "base": "https://example.org/##link",
7442    "href": "https://example.org/#link",
7443    "protocol": "https:",
7444    "username": "",
7445    "password": "",
7446    "host": "example.org",
7447    "hostname": "example.org",
7448    "port": "",
7449    "pathname": "/",
7450    "search": "",
7451    "hash": "#link"
7452  },
7453  "UTF-8 percent-encode of C0 control percent-encode set and supersets",
7454  {
7455    "input": "non-special:cannot-be-a-base-url-\u0000\u0001\u001F\u001E\u007E\u007F\u0080",
7456    "base": "about:blank",
7457    "hash": "",
7458    "host": "",
7459    "hostname": "",
7460    "href": "non-special:cannot-be-a-base-url-%00%01%1F%1E~%7F%C2%80",
7461    "origin": "null",
7462    "password": "",
7463    "pathname": "cannot-be-a-base-url-%00%01%1F%1E~%7F%C2%80",
7464    "port": "",
7465    "protocol": "non-special:",
7466    "search": "",
7467    "username": ""
7468  },
7469  {
7470    "input": "https://www.example.com/path{\u007Fpath.html?query'\u007F=query#fragment<\u007Ffragment",
7471    "base": "about:blank",
7472    "hash": "#fragment%3C%7Ffragment",
7473    "host": "www.example.com",
7474    "hostname": "www.example.com",
7475    "href": "https://www.example.com/path%7B%7Fpath.html?query%27%7F=query#fragment%3C%7Ffragment",
7476    "origin": "https://www.example.com",
7477    "password": "",
7478    "pathname": "/path%7B%7Fpath.html",
7479    "port": "",
7480    "protocol": "https:",
7481    "search": "?query%27%7F=query",
7482    "username": ""
7483  },
7484  {
7485    "input": "https://user:pass[\u007F@foo/bar",
7486    "base": "http://example.org",
7487    "hash": "",
7488    "host": "foo",
7489    "hostname": "foo",
7490    "href": "https://user:pass%5B%7F@foo/bar",
7491    "origin": "https://foo",
7492    "password": "pass%5B%7F",
7493    "pathname": "/bar",
7494    "port": "",
7495    "protocol": "https:",
7496    "search": "",
7497    "username": "user"
7498  },
7499  "Tests for the distinct percent-encode sets",
7500  {
7501    "input": "foo:// !\"$%&'()*+,-.;<=>@[\\]^_`{|}~@host/",
7502    "base": "about:blank",
7503    "hash": "",
7504    "host": "host",
7505    "hostname": "host",
7506    "href": "foo://%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~@host/",
7507    "origin": "null",
7508    "password": "",
7509    "pathname": "/",
7510    "port":"",
7511    "protocol": "foo:",
7512    "search": "",
7513    "username": "%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~"
7514  },
7515  {
7516    "input": "wss:// !\"$%&'()*+,-.;<=>@[]^_`{|}~@host/",
7517    "base": "about:blank",
7518    "hash": "",
7519    "host": "host",
7520    "hostname": "host",
7521    "href": "wss://%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~@host/",
7522    "origin": "wss://host",
7523    "password": "",
7524    "pathname": "/",
7525    "port":"",
7526    "protocol": "wss:",
7527    "search": "",
7528    "username": "%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~"
7529  },
7530  {
7531    "input": "foo://joe: !\"$%&'()*+,-.:;<=>@[\\]^_`{|}~@host/",
7532    "base": "about:blank",
7533    "hash": "",
7534    "host": "host",
7535    "hostname": "host",
7536    "href": "foo://joe:%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~@host/",
7537    "origin": "null",
7538    "password": "%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~",
7539    "pathname": "/",
7540    "port":"",
7541    "protocol": "foo:",
7542    "search": "",
7543    "username": "joe"
7544  },
7545  {
7546    "input": "wss://joe: !\"$%&'()*+,-.:;<=>@[]^_`{|}~@host/",
7547    "base": "about:blank",
7548    "hash": "",
7549    "host": "host",
7550    "hostname": "host",
7551    "href": "wss://joe:%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~@host/",
7552    "origin": "wss://host",
7553    "password": "%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~",
7554    "pathname": "/",
7555    "port":"",
7556    "protocol": "wss:",
7557    "search": "",
7558    "username": "joe"
7559  },
7560  {
7561    "input": "foo://!\"$%&'()*+,-.;=_`{}~/",
7562    "base": "about:blank",
7563    "hash": "",
7564    "host": "!\"$%&'()*+,-.;=_`{}~",
7565    "hostname": "!\"$%&'()*+,-.;=_`{}~",
7566    "href":"foo://!\"$%&'()*+,-.;=_`{}~/",
7567    "origin": "null",
7568    "password": "",
7569    "pathname": "/",
7570    "port":"",
7571    "protocol": "foo:",
7572    "search": "",
7573    "username": ""
7574  },
7575  {
7576    "input": "wss://!\"$&'()*+,-.;=_`{}~/",
7577    "base": "about:blank",
7578    "hash": "",
7579    "host": "!\"$&'()*+,-.;=_`{}~",
7580    "hostname": "!\"$&'()*+,-.;=_`{}~",
7581    "href":"wss://!\"$&'()*+,-.;=_`{}~/",
7582    "origin": "wss://!\"$&'()*+,-.;=_`{}~",
7583    "password": "",
7584    "pathname": "/",
7585    "port":"",
7586    "protocol": "wss:",
7587    "search": "",
7588    "username": ""
7589  },
7590  {
7591    "input": "foo://host/ !\"$%&'()*+,-./:;<=>@[\\]^_`{|}~",
7592    "base": "about:blank",
7593    "hash": "",
7594    "host": "host",
7595    "hostname": "host",
7596    "href": "foo://host/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]^_%60%7B|%7D~",
7597    "origin": "null",
7598    "password": "",
7599    "pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]^_%60%7B|%7D~",
7600    "port":"",
7601    "protocol": "foo:",
7602    "search": "",
7603    "username": ""
7604  },
7605  {
7606    "input": "wss://host/ !\"$%&'()*+,-./:;<=>@[\\]^_`{|}~",
7607    "base": "about:blank",
7608    "hash": "",
7609    "host": "host",
7610    "hostname": "host",
7611    "href": "wss://host/%20!%22$%&'()*+,-./:;%3C=%3E@[/]^_%60%7B|%7D~",
7612    "origin": "wss://host",
7613    "password": "",
7614    "pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[/]^_%60%7B|%7D~",
7615    "port":"",
7616    "protocol": "wss:",
7617    "search": "",
7618    "username": ""
7619  },
7620  {
7621    "input": "foo://host/dir/? !\"$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
7622    "base": "about:blank",
7623    "hash": "",
7624    "host": "host",
7625    "hostname": "host",
7626    "href": "foo://host/dir/?%20!%22$%&'()*+,-./:;%3C=%3E?@[\\]^_`{|}~",
7627    "origin": "null",
7628    "password": "",
7629    "pathname": "/dir/",
7630    "port":"",
7631    "protocol": "foo:",
7632    "search": "?%20!%22$%&'()*+,-./:;%3C=%3E?@[\\]^_`{|}~",
7633    "username": ""
7634  },
7635  {
7636    "input": "wss://host/dir/? !\"$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
7637    "base": "about:blank",
7638    "hash": "",
7639    "host": "host",
7640    "hostname": "host",
7641    "href": "wss://host/dir/?%20!%22$%&%27()*+,-./:;%3C=%3E?@[\\]^_`{|}~",
7642    "origin": "wss://host",
7643    "password": "",
7644    "pathname": "/dir/",
7645    "port":"",
7646    "protocol": "wss:",
7647    "search": "?%20!%22$%&%27()*+,-./:;%3C=%3E?@[\\]^_`{|}~",
7648    "username": ""
7649  },
7650  {
7651    "input": "foo://host/dir/# !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
7652    "base": "about:blank",
7653    "hash": "#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~",
7654    "host": "host",
7655    "hostname": "host",
7656    "href": "foo://host/dir/#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~",
7657    "origin": "null",
7658    "password": "",
7659    "pathname": "/dir/",
7660    "port":"",
7661    "protocol": "foo:",
7662    "search": "",
7663    "username": ""
7664  },
7665  {
7666    "input": "wss://host/dir/# !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
7667    "base": "about:blank",
7668    "hash": "#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~",
7669    "host": "host",
7670    "hostname": "host",
7671    "href": "wss://host/dir/#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~",
7672    "origin": "wss://host",
7673    "password": "",
7674    "pathname": "/dir/",
7675    "port":"",
7676    "protocol": "wss:",
7677    "search": "",
7678    "username": ""
7679  },
7680  "Ensure that input schemes are not ignored when resolving non-special URLs",
7681  {
7682    "input": "abc:rootless",
7683    "base": "abc://host/path",
7684    "hash": "",
7685    "host": "",
7686    "hostname": "",
7687    "href":"abc:rootless",
7688    "password": "",
7689    "pathname": "rootless",
7690    "port":"",
7691    "protocol": "abc:",
7692    "search": "",
7693    "username": ""
7694  },
7695  {
7696    "input": "abc:rootless",
7697    "base": "abc:/path",
7698    "hash": "",
7699    "host": "",
7700    "hostname": "",
7701    "href":"abc:rootless",
7702    "password": "",
7703    "pathname": "rootless",
7704    "port":"",
7705    "protocol": "abc:",
7706    "search": "",
7707    "username": ""
7708  },
7709  {
7710    "input": "abc:rootless",
7711    "base": "abc:path",
7712    "hash": "",
7713    "host": "",
7714    "hostname": "",
7715    "href":"abc:rootless",
7716    "password": "",
7717    "pathname": "rootless",
7718    "port":"",
7719    "protocol": "abc:",
7720    "search": "",
7721    "username": ""
7722  },
7723  {
7724    "input": "abc:/rooted",
7725    "base": "abc://host/path",
7726    "hash": "",
7727    "host": "",
7728    "hostname": "",
7729    "href":"abc:/rooted",
7730    "password": "",
7731    "pathname": "/rooted",
7732    "port":"",
7733    "protocol": "abc:",
7734    "search": "",
7735    "username": ""
7736  },
7737  "Empty query and fragment with blank should throw an error",
7738  {
7739    "input": "#",
7740    "base": null,
7741    "failure": true
7742  },
7743  {
7744    "input": "?",
7745    "base": null,
7746    "failure": true
7747  },
7748  "Last component looks like a number, but not valid IPv4",
7749  {
7750    "input": "http://1.2.3.4.5",
7751    "base": "http://other.com/",
7752    "failure": true
7753  },
7754  {
7755    "input": "http://1.2.3.4.5.",
7756    "base": "http://other.com/",
7757    "failure": true
7758  },
7759  {
7760    "input": "http://0..0x300/",
7761    "base": "about:blank",
7762    "failure": true
7763  },
7764  {
7765    "input": "http://0..0x300./",
7766    "base": "about:blank",
7767    "failure": true
7768  },
7769  {
7770    "input": "http://256.256.256.256.256",
7771    "base": "http://other.com/",
7772    "failure": true
7773  },
7774  {
7775    "input": "http://256.256.256.256.256.",
7776    "base": "http://other.com/",
7777    "failure": true
7778  },
7779  {
7780    "input": "http://1.2.3.08",
7781    "base": "about:blank",
7782    "failure": true
7783  },
7784  {
7785    "input": "http://1.2.3.08.",
7786    "base": "about:blank",
7787    "failure": true
7788  },
7789  {
7790    "input": "http://1.2.3.09",
7791    "base": "about:blank",
7792    "failure": true
7793  },
7794  {
7795    "input": "http://09.2.3.4",
7796    "base": "about:blank",
7797    "failure": true
7798  },
7799  {
7800    "input": "http://09.2.3.4.",
7801    "base": "about:blank",
7802    "failure": true
7803  },
7804  {
7805    "input": "http://01.2.3.4.5",
7806    "base": "about:blank",
7807    "failure": true
7808  },
7809  {
7810    "input": "http://01.2.3.4.5.",
7811    "base": "about:blank",
7812    "failure": true
7813  },
7814  {
7815    "input": "http://0x100.2.3.4",
7816    "base": "about:blank",
7817    "failure": true
7818  },
7819  {
7820    "input": "http://0x100.2.3.4.",
7821    "base": "about:blank",
7822    "failure": true
7823  },
7824  {
7825    "input": "http://0x1.2.3.4.5",
7826    "base": "about:blank",
7827    "failure": true
7828  },
7829  {
7830    "input": "http://0x1.2.3.4.5.",
7831    "base": "about:blank",
7832    "failure": true
7833  },
7834  {
7835    "input": "http://foo.1.2.3.4",
7836    "base": "about:blank",
7837    "failure": true
7838  },
7839  {
7840    "input": "http://foo.1.2.3.4.",
7841    "base": "about:blank",
7842    "failure": true
7843  },
7844  {
7845    "input": "http://foo.2.3.4",
7846    "base": "about:blank",
7847    "failure": true
7848  },
7849  {
7850    "input": "http://foo.2.3.4.",
7851    "base": "about:blank",
7852    "failure": true
7853  },
7854  {
7855    "input": "http://foo.09",
7856    "base": "about:blank",
7857    "failure": true
7858  },
7859  {
7860    "input": "http://foo.09.",
7861    "base": "about:blank",
7862    "failure": true
7863  },
7864  {
7865    "input": "http://foo.0x4",
7866    "base": "about:blank",
7867    "failure": true
7868  },
7869  {
7870    "input": "http://foo.0x4.",
7871    "base": "about:blank",
7872    "failure": true
7873  },
7874  {
7875    "input": "http://foo.09..",
7876    "base": "about:blank",
7877    "hash": "",
7878    "host": "foo.09..",
7879    "hostname": "foo.09..",
7880    "href":"http://foo.09../",
7881    "password": "",
7882    "pathname": "/",
7883    "port":"",
7884    "protocol": "http:",
7885    "search": "",
7886    "username": ""
7887  },
7888  {
7889    "input": "http://0999999999999999999/",
7890    "base": "about:blank",
7891    "failure": true
7892  },
7893  {
7894    "input": "http://foo.0x",
7895    "base": "about:blank",
7896    "failure": true
7897  },
7898  {
7899    "input": "http://foo.0XFfFfFfFfFfFfFfFfFfAcE123",
7900    "base": "about:blank",
7901    "failure": true
7902  },
7903  {
7904    "input": "http://��.123/",
7905    "base": "about:blank",
7906    "failure": true
7907  }
7908]
7909