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