2 "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/segments.js",
4 "input": "http://example\t.\norg",
5 "base": "http://example.org/foo/bar",
6 "href": "http://example.org/",
7 "origin": "http://example.org",
11 "host": "example.org",
12 "hostname": "example.org",
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",
29 "pathname": "/bar;par",
34 "input": "https://test:@test",
35 "base": "about:blank",
36 "href": "https://test@test/",
37 "origin": "https://test",
49 "input": "https://:@test",
50 "base": "about:blank",
51 "href": "https://test/",
52 "origin": "https://test",
64 "input": "non-special://test:@test/x",
65 "base": "about:blank",
66 "href": "non-special://test@test/x",
68 "protocol": "non-special:",
79 "input": "non-special://:@test/x",
80 "base": "about:blank",
81 "href": "non-special://test/x",
83 "protocol": "non-special:",
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",
101 "host": "example.org",
102 "hostname": "example.org",
104 "pathname": "/foo/foo.com",
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",
116 "host": "example.org",
117 "hostname": "example.org",
119 "pathname": "/foo/:foo.com",
124 "input": " foo.com ",
125 "base": "http://example.org/foo/bar",
126 "href": "http://example.org/foo/foo.com",
127 "origin": "http://example.org",
131 "host": "example.org",
132 "hostname": "example.org",
134 "pathname": "/foo/foo.com",
139 "input": "a:\t foo.com",
140 "base": "http://example.org/foo/bar",
141 "href": "a: foo.com",
149 "pathname": " foo.com",
154 "input": "http://f:21/ b ? d # e ",
155 "base": "http://example.org/foo/bar",
156 "href": "http://f:21/%20b%20?%20d%20# e",
157 "origin": "http://f:21",
164 "pathname": "/%20b%20",
165 "search": "?%20d%20",
169 "input": "lolscheme:x x#x x",
170 "base": "about:blank",
171 "href": "lolscheme:x x#x x",
172 "protocol": "lolscheme:",
183 "input": "http://f:/c",
184 "base": "http://example.org/foo/bar",
185 "href": "http://f/c",
186 "origin": "http://f",
198 "input": "http://f:0/c",
199 "base": "http://example.org/foo/bar",
200 "href": "http://f:0/c",
201 "origin": "http://f:0",
213 "input": "http://f:00000000000000/c",
214 "base": "http://example.org/foo/bar",
215 "href": "http://f:0/c",
216 "origin": "http://f:0",
228 "input": "http://f:00000000000000000000080/c",
229 "base": "http://example.org/foo/bar",
230 "href": "http://f/c",
231 "origin": "http://f",
243 "input": "http://f:b/c",
244 "base": "http://example.org/foo/bar",
248 "input": "http://f: /c",
249 "base": "http://example.org/foo/bar",
253 "input": "http://f:\n/c",
254 "base": "http://example.org/foo/bar",
255 "href": "http://f/c",
256 "origin": "http://f",
268 "input": "http://f:fifty-two/c",
269 "base": "http://example.org/foo/bar",
273 "input": "http://f:999999/c",
274 "base": "http://example.org/foo/bar",
278 "input": "non-special://f:999999/c",
279 "base": "http://example.org/foo/bar",
283 "input": "http://f: 21 / b ? d # e ",
284 "base": "http://example.org/foo/bar",
289 "base": "http://example.org/foo/bar",
290 "href": "http://example.org/foo/bar",
291 "origin": "http://example.org",
295 "host": "example.org",
296 "hostname": "example.org",
298 "pathname": "/foo/bar",
304 "base": "http://example.org/foo/bar",
305 "href": "http://example.org/foo/bar",
306 "origin": "http://example.org",
310 "host": "example.org",
311 "hostname": "example.org",
313 "pathname": "/foo/bar",
318 "input": ":foo.com/",
319 "base": "http://example.org/foo/bar",
320 "href": "http://example.org/foo/:foo.com/",
321 "origin": "http://example.org",
325 "host": "example.org",
326 "hostname": "example.org",
328 "pathname": "/foo/:foo.com/",
333 "input": ":foo.com\\",
334 "base": "http://example.org/foo/bar",
335 "href": "http://example.org/foo/:foo.com/",
336 "origin": "http://example.org",
340 "host": "example.org",
341 "hostname": "example.org",
343 "pathname": "/foo/:foo.com/",
349 "base": "http://example.org/foo/bar",
350 "href": "http://example.org/foo/:",
351 "origin": "http://example.org",
355 "host": "example.org",
356 "hostname": "example.org",
358 "pathname": "/foo/:",
364 "base": "http://example.org/foo/bar",
365 "href": "http://example.org/foo/:a",
366 "origin": "http://example.org",
370 "host": "example.org",
371 "hostname": "example.org",
373 "pathname": "/foo/:a",
379 "base": "http://example.org/foo/bar",
380 "href": "http://example.org/foo/:/",
381 "origin": "http://example.org",
385 "host": "example.org",
386 "hostname": "example.org",
388 "pathname": "/foo/:/",
394 "base": "http://example.org/foo/bar",
395 "href": "http://example.org/foo/:/",
396 "origin": "http://example.org",
400 "host": "example.org",
401 "hostname": "example.org",
403 "pathname": "/foo/:/",
409 "base": "http://example.org/foo/bar",
410 "href": "http://example.org/foo/:#",
411 "origin": "http://example.org",
415 "host": "example.org",
416 "hostname": "example.org",
418 "pathname": "/foo/:",
424 "base": "http://example.org/foo/bar",
425 "href": "http://example.org/foo/bar#",
426 "origin": "http://example.org",
430 "host": "example.org",
431 "hostname": "example.org",
433 "pathname": "/foo/bar",
439 "base": "http://example.org/foo/bar",
440 "href": "http://example.org/foo/bar#/",
441 "origin": "http://example.org",
445 "host": "example.org",
446 "hostname": "example.org",
448 "pathname": "/foo/bar",
454 "base": "http://example.org/foo/bar",
455 "href": "http://example.org/foo/bar#\\",
456 "origin": "http://example.org",
460 "host": "example.org",
461 "hostname": "example.org",
463 "pathname": "/foo/bar",
469 "base": "http://example.org/foo/bar",
470 "href": "http://example.org/foo/bar#;?",
471 "origin": "http://example.org",
475 "host": "example.org",
476 "hostname": "example.org",
478 "pathname": "/foo/bar",
484 "base": "http://example.org/foo/bar",
485 "href": "http://example.org/foo/bar?",
486 "origin": "http://example.org",
490 "host": "example.org",
491 "hostname": "example.org",
493 "pathname": "/foo/bar",
499 "base": "http://example.org/foo/bar",
500 "href": "http://example.org/",
501 "origin": "http://example.org",
505 "host": "example.org",
506 "hostname": "example.org",
514 "base": "http://example.org/foo/bar",
515 "href": "http://example.org/foo/:23",
516 "origin": "http://example.org",
520 "host": "example.org",
521 "hostname": "example.org",
523 "pathname": "/foo/:23",
529 "base": "http://example.org/foo/bar",
530 "href": "http://example.org/:23",
531 "origin": "http://example.org",
535 "host": "example.org",
536 "hostname": "example.org",
544 "base": "http://example.org/foo/bar",
545 "href": "http://example.org/foo/::",
546 "origin": "http://example.org",
550 "host": "example.org",
551 "hostname": "example.org",
553 "pathname": "/foo/::",
559 "base": "http://example.org/foo/bar",
560 "href": "http://example.org/foo/::23",
561 "origin": "http://example.org",
565 "host": "example.org",
566 "hostname": "example.org",
568 "pathname": "/foo/::23",
574 "base": "http://example.org/foo/bar",
588 "input": "http://a:b@c:29/d",
589 "base": "http://example.org/foo/bar",
590 "href": "http://a:b@c:29/d",
591 "origin": "http://c:29",
603 "input": "http::@c:29",
604 "base": "http://example.org/foo/bar",
605 "href": "http://example.org/foo/:@c:29",
606 "origin": "http://example.org",
610 "host": "example.org",
611 "hostname": "example.org",
613 "pathname": "/foo/:@c:29",
618 "input": "http://&a:foo(b]c@d:2/",
619 "base": "http://example.org/foo/bar",
620 "href": "http://&a:foo(b%5Dc@d:2/",
621 "origin": "http://d:2",
624 "password": "foo(b%5Dc",
633 "input": "http://::@c@d:2",
634 "base": "http://example.org/foo/bar",
635 "href": "http://:%3A%40c@d:2/",
636 "origin": "http://d:2",
639 "password": "%3A%40c",
648 "input": "http://foo.com:b@d/",
649 "base": "http://example.org/foo/bar",
650 "href": "http://foo.com:b@d/",
651 "origin": "http://d",
653 "username": "foo.com",
663 "input": "http://foo.com/\\@",
664 "base": "http://example.org/foo/bar",
665 "href": "http://foo.com//@",
666 "origin": "http://foo.com",
671 "hostname": "foo.com",
678 "input": "http:\\\\foo.com\\",
679 "base": "http://example.org/foo/bar",
680 "href": "http://foo.com/",
681 "origin": "http://foo.com",
686 "hostname": "foo.com",
693 "input": "http:\\\\a\\b:c\\d@foo.com\\",
694 "base": "http://example.org/foo/bar",
695 "href": "http://a/b:c/d@foo.com/",
696 "origin": "http://a",
703 "pathname": "/b:c/d@foo.com/",
709 "base": "http://example.org/foo/bar",
723 "input": "foo:/bar.com/",
724 "base": "http://example.org/foo/bar",
725 "href": "foo:/bar.com/",
733 "pathname": "/bar.com/",
738 "input": "foo://///////",
739 "base": "http://example.org/foo/bar",
740 "href": "foo://///////",
748 "pathname": "///////",
753 "input": "foo://///////bar.com/",
754 "base": "http://example.org/foo/bar",
755 "href": "foo://///////bar.com/",
763 "pathname": "///////bar.com/",
768 "input": "foo:////://///",
769 "base": "http://example.org/foo/bar",
770 "href": "foo:////://///",
778 "pathname": "//://///",
784 "base": "http://example.org/foo/bar",
798 "input": "//foo/bar",
799 "base": "http://example.org/foo/bar",
800 "href": "http://foo/bar",
801 "origin": "http://foo",
813 "input": "http://foo/path;a??e#f#g",
814 "base": "http://example.org/foo/bar",
815 "href": "http://foo/path;a??e#f#g",
816 "origin": "http://foo",
823 "pathname": "/path;a",
828 "input": "http://foo/abcd?efgh?ijkl",
829 "base": "http://example.org/foo/bar",
830 "href": "http://foo/abcd?efgh?ijkl",
831 "origin": "http://foo",
839 "search": "?efgh?ijkl",
843 "input": "http://foo/abcd#foo?bar",
844 "base": "http://example.org/foo/bar",
845 "href": "http://foo/abcd#foo?bar",
846 "origin": "http://foo",
858 "input": "[61:24:74]:98",
859 "base": "http://example.org/foo/bar",
860 "href": "http://example.org/foo/[61:24:74]:98",
861 "origin": "http://example.org",
865 "host": "example.org",
866 "hostname": "example.org",
868 "pathname": "/foo/[61:24:74]:98",
873 "input": "http:[61:27]/:foo",
874 "base": "http://example.org/foo/bar",
875 "href": "http://example.org/foo/[61:27]/:foo",
876 "origin": "http://example.org",
880 "host": "example.org",
881 "hostname": "example.org",
883 "pathname": "/foo/[61:27]/:foo",
888 "input": "http://[1::2]:3:4",
889 "base": "http://example.org/foo/bar",
893 "input": "http://2001::1",
894 "base": "http://example.org/foo/bar",
898 "input": "http://2001::1]",
899 "base": "http://example.org/foo/bar",
903 "input": "http://2001::1]:80",
904 "base": "http://example.org/foo/bar",
908 "input": "http://[2001::1]",
909 "base": "http://example.org/foo/bar",
910 "href": "http://[2001::1]/",
911 "origin": "http://[2001::1]",
916 "hostname": "[2001::1]",
923 "input": "http://[::127.0.0.1]",
924 "base": "http://example.org/foo/bar",
925 "href": "http://[::7f00:1]/",
926 "origin": "http://[::7f00:1]",
930 "host": "[::7f00:1]",
931 "hostname": "[::7f00:1]",
938 "input": "http://[0:0:0:0:0:0:13.1.68.3]",
939 "base": "http://example.org/foo/bar",
940 "href": "http://[::d01:4403]/",
941 "origin": "http://[::d01:4403]",
945 "host": "[::d01:4403]",
946 "hostname": "[::d01:4403]",
953 "input": "http://[2001::1]:80",
954 "base": "http://example.org/foo/bar",
955 "href": "http://[2001::1]/",
956 "origin": "http://[2001::1]",
961 "hostname": "[2001::1]",
968 "input": "http:/example.com/",
969 "base": "http://example.org/foo/bar",
970 "href": "http://example.org/example.com/",
971 "origin": "http://example.org",
975 "host": "example.org",
976 "hostname": "example.org",
978 "pathname": "/example.com/",
983 "input": "ftp:/example.com/",
984 "base": "http://example.org/foo/bar",
985 "href": "ftp://example.com/",
986 "origin": "ftp://example.com",
990 "host": "example.com",
991 "hostname": "example.com",
998 "input": "https:/example.com/",
999 "base": "http://example.org/foo/bar",
1000 "href": "https://example.com/",
1001 "origin": "https://example.com",
1002 "protocol": "https:",
1005 "host": "example.com",
1006 "hostname": "example.com",
1013 "input": "madeupscheme:/example.com/",
1014 "base": "http://example.org/foo/bar",
1015 "href": "madeupscheme:/example.com/",
1017 "protocol": "madeupscheme:",
1023 "pathname": "/example.com/",
1028 "input": "file:/example.com/",
1029 "base": "http://example.org/foo/bar",
1030 "href": "file:///example.com/",
1031 "protocol": "file:",
1037 "pathname": "/example.com/",
1042 "input": "file://example:1/",
1043 "base": "about:blank",
1047 "input": "file://example:test/",
1048 "base": "about:blank",
1052 "input": "file://example%/",
1053 "base": "about:blank",
1057 "input": "file://[example]/",
1058 "base": "about:blank",
1062 "input": "ftps:/example.com/",
1063 "base": "http://example.org/foo/bar",
1064 "href": "ftps:/example.com/",
1066 "protocol": "ftps:",
1072 "pathname": "/example.com/",
1077 "input": "gopher:/example.com/",
1078 "base": "http://example.org/foo/bar",
1079 "href": "gopher://example.com/",
1080 "origin": "gopher://example.com",
1081 "protocol": "gopher:",
1084 "host": "example.com",
1085 "hostname": "example.com",
1092 "input": "ws:/example.com/",
1093 "base": "http://example.org/foo/bar",
1094 "href": "ws://example.com/",
1095 "origin": "ws://example.com",
1099 "host": "example.com",
1100 "hostname": "example.com",
1107 "input": "wss:/example.com/",
1108 "base": "http://example.org/foo/bar",
1109 "href": "wss://example.com/",
1110 "origin": "wss://example.com",
1114 "host": "example.com",
1115 "hostname": "example.com",
1122 "input": "data:/example.com/",
1123 "base": "http://example.org/foo/bar",
1124 "href": "data:/example.com/",
1126 "protocol": "data:",
1132 "pathname": "/example.com/",
1137 "input": "javascript:/example.com/",
1138 "base": "http://example.org/foo/bar",
1139 "href": "javascript:/example.com/",
1141 "protocol": "javascript:",
1147 "pathname": "/example.com/",
1152 "input": "mailto:/example.com/",
1153 "base": "http://example.org/foo/bar",
1154 "href": "mailto:/example.com/",
1156 "protocol": "mailto:",
1162 "pathname": "/example.com/",
1167 "input": "http:example.com/",
1168 "base": "http://example.org/foo/bar",
1169 "href": "http://example.org/foo/example.com/",
1170 "origin": "http://example.org",
1171 "protocol": "http:",
1174 "host": "example.org",
1175 "hostname": "example.org",
1177 "pathname": "/foo/example.com/",
1182 "input": "ftp:example.com/",
1183 "base": "http://example.org/foo/bar",
1184 "href": "ftp://example.com/",
1185 "origin": "ftp://example.com",
1189 "host": "example.com",
1190 "hostname": "example.com",
1197 "input": "https:example.com/",
1198 "base": "http://example.org/foo/bar",
1199 "href": "https://example.com/",
1200 "origin": "https://example.com",
1201 "protocol": "https:",
1204 "host": "example.com",
1205 "hostname": "example.com",
1212 "input": "madeupscheme:example.com/",
1213 "base": "http://example.org/foo/bar",
1214 "href": "madeupscheme:example.com/",
1216 "protocol": "madeupscheme:",
1222 "pathname": "example.com/",
1227 "input": "ftps:example.com/",
1228 "base": "http://example.org/foo/bar",
1229 "href": "ftps:example.com/",
1231 "protocol": "ftps:",
1237 "pathname": "example.com/",
1242 "input": "gopher:example.com/",
1243 "base": "http://example.org/foo/bar",
1244 "href": "gopher://example.com/",
1245 "origin": "gopher://example.com",
1246 "protocol": "gopher:",
1249 "host": "example.com",
1250 "hostname": "example.com",
1257 "input": "ws:example.com/",
1258 "base": "http://example.org/foo/bar",
1259 "href": "ws://example.com/",
1260 "origin": "ws://example.com",
1264 "host": "example.com",
1265 "hostname": "example.com",
1272 "input": "wss:example.com/",
1273 "base": "http://example.org/foo/bar",
1274 "href": "wss://example.com/",
1275 "origin": "wss://example.com",
1279 "host": "example.com",
1280 "hostname": "example.com",
1287 "input": "data:example.com/",
1288 "base": "http://example.org/foo/bar",
1289 "href": "data:example.com/",
1291 "protocol": "data:",
1297 "pathname": "example.com/",
1302 "input": "javascript:example.com/",
1303 "base": "http://example.org/foo/bar",
1304 "href": "javascript:example.com/",
1306 "protocol": "javascript:",
1312 "pathname": "example.com/",
1317 "input": "mailto:example.com/",
1318 "base": "http://example.org/foo/bar",
1319 "href": "mailto:example.com/",
1321 "protocol": "mailto:",
1327 "pathname": "example.com/",
1333 "base": "http://example.org/foo/bar",
1334 "href": "http://example.org/a/b/c",
1335 "origin": "http://example.org",
1336 "protocol": "http:",
1339 "host": "example.org",
1340 "hostname": "example.org",
1342 "pathname": "/a/b/c",
1348 "base": "http://example.org/foo/bar",
1349 "href": "http://example.org/a/%20/c",
1350 "origin": "http://example.org",
1351 "protocol": "http:",
1354 "host": "example.org",
1355 "hostname": "example.org",
1357 "pathname": "/a/%20/c",
1363 "base": "http://example.org/foo/bar",
1364 "href": "http://example.org/a%2fc",
1365 "origin": "http://example.org",
1366 "protocol": "http:",
1369 "host": "example.org",
1370 "hostname": "example.org",
1372 "pathname": "/a%2fc",
1377 "input": "/a/%2f/c",
1378 "base": "http://example.org/foo/bar",
1379 "href": "http://example.org/a/%2f/c",
1380 "origin": "http://example.org",
1381 "protocol": "http:",
1384 "host": "example.org",
1385 "hostname": "example.org",
1387 "pathname": "/a/%2f/c",
1393 "base": "http://example.org/foo/bar",
1394 "href": "http://example.org/foo/bar#%CE%B2",
1395 "origin": "http://example.org",
1396 "protocol": "http:",
1399 "host": "example.org",
1400 "hostname": "example.org",
1402 "pathname": "/foo/bar",
1407 "input": "data:text/html,test#test",
1408 "base": "http://example.org/foo/bar",
1409 "href": "data:text/html,test#test",
1411 "protocol": "data:",
1417 "pathname": "text/html,test",
1422 "input": "tel:1234567890",
1423 "base": "http://example.org/foo/bar",
1424 "href": "tel:1234567890",
1432 "pathname": "1234567890",
1436 "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/file.html",
1438 "input": "file:c:\\foo\\bar.html",
1439 "base": "file:///tmp/mock/path",
1440 "href": "file:///c:/foo/bar.html",
1441 "protocol": "file:",
1447 "pathname": "/c:/foo/bar.html",
1452 "input": " File:c|////foo\\bar.html",
1453 "base": "file:///tmp/mock/path",
1454 "href": "file:///c:////foo/bar.html",
1455 "protocol": "file:",
1461 "pathname": "/c:////foo/bar.html",
1466 "input": "C|/foo/bar",
1467 "base": "file:///tmp/mock/path",
1468 "href": "file:///C:/foo/bar",
1469 "protocol": "file:",
1475 "pathname": "/C:/foo/bar",
1480 "input": "/C|\\foo\\bar",
1481 "base": "file:///tmp/mock/path",
1482 "href": "file:///C:/foo/bar",
1483 "protocol": "file:",
1489 "pathname": "/C:/foo/bar",
1494 "input": "//C|/foo/bar",
1495 "base": "file:///tmp/mock/path",
1496 "href": "file:///C:/foo/bar",
1497 "protocol": "file:",
1503 "pathname": "/C:/foo/bar",
1508 "input": "//server/file",
1509 "base": "file:///tmp/mock/path",
1510 "href": "file://server/file",
1511 "protocol": "file:",
1515 "hostname": "server",
1517 "pathname": "/file",
1522 "input": "\\\\server\\file",
1523 "base": "file:///tmp/mock/path",
1524 "href": "file://server/file",
1525 "protocol": "file:",
1529 "hostname": "server",
1531 "pathname": "/file",
1536 "input": "/\\server/file",
1537 "base": "file:///tmp/mock/path",
1538 "href": "file://server/file",
1539 "protocol": "file:",
1543 "hostname": "server",
1545 "pathname": "/file",
1550 "input": "file:///foo/bar.txt",
1551 "base": "file:///tmp/mock/path",
1552 "href": "file:///foo/bar.txt",
1553 "protocol": "file:",
1559 "pathname": "/foo/bar.txt",
1564 "input": "file:///home/me",
1565 "base": "file:///tmp/mock/path",
1566 "href": "file:///home/me",
1567 "protocol": "file:",
1573 "pathname": "/home/me",
1579 "base": "file:///tmp/mock/path",
1581 "protocol": "file:",
1593 "base": "file:///tmp/mock/path",
1595 "protocol": "file:",
1607 "base": "file:///tmp/mock/path",
1608 "href": "file:///test",
1609 "protocol": "file:",
1615 "pathname": "/test",
1620 "input": "file://test",
1621 "base": "file:///tmp/mock/path",
1622 "href": "file://test/",
1623 "protocol": "file:",
1634 "input": "file://localhost",
1635 "base": "file:///tmp/mock/path",
1637 "protocol": "file:",
1648 "input": "file://localhost/",
1649 "base": "file:///tmp/mock/path",
1651 "protocol": "file:",
1662 "input": "file://localhost/test",
1663 "base": "file:///tmp/mock/path",
1664 "href": "file:///test",
1665 "protocol": "file:",
1671 "pathname": "/test",
1677 "base": "file:///tmp/mock/path",
1678 "href": "file:///tmp/mock/test",
1679 "protocol": "file:",
1685 "pathname": "/tmp/mock/test",
1690 "input": "file:test",
1691 "base": "file:///tmp/mock/path",
1692 "href": "file:///tmp/mock/test",
1693 "protocol": "file:",
1699 "pathname": "/tmp/mock/test",
1703 "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/path.js",
1705 "input": "http://example.com/././foo",
1706 "base": "about:blank",
1707 "href": "http://example.com/foo",
1708 "origin": "http://example.com",
1709 "protocol": "http:",
1712 "host": "example.com",
1713 "hostname": "example.com",
1720 "input": "http://example.com/./.foo",
1721 "base": "about:blank",
1722 "href": "http://example.com/.foo",
1723 "origin": "http://example.com",
1724 "protocol": "http:",
1727 "host": "example.com",
1728 "hostname": "example.com",
1730 "pathname": "/.foo",
1735 "input": "http://example.com/foo/.",
1736 "base": "about:blank",
1737 "href": "http://example.com/foo/",
1738 "origin": "http://example.com",
1739 "protocol": "http:",
1742 "host": "example.com",
1743 "hostname": "example.com",
1745 "pathname": "/foo/",
1750 "input": "http://example.com/foo/./",
1751 "base": "about:blank",
1752 "href": "http://example.com/foo/",
1753 "origin": "http://example.com",
1754 "protocol": "http:",
1757 "host": "example.com",
1758 "hostname": "example.com",
1760 "pathname": "/foo/",
1765 "input": "http://example.com/foo/bar/..",
1766 "base": "about:blank",
1767 "href": "http://example.com/foo/",
1768 "origin": "http://example.com",
1769 "protocol": "http:",
1772 "host": "example.com",
1773 "hostname": "example.com",
1775 "pathname": "/foo/",
1780 "input": "http://example.com/foo/bar/../",
1781 "base": "about:blank",
1782 "href": "http://example.com/foo/",
1783 "origin": "http://example.com",
1784 "protocol": "http:",
1787 "host": "example.com",
1788 "hostname": "example.com",
1790 "pathname": "/foo/",
1795 "input": "http://example.com/foo/..bar",
1796 "base": "about:blank",
1797 "href": "http://example.com/foo/..bar",
1798 "origin": "http://example.com",
1799 "protocol": "http:",
1802 "host": "example.com",
1803 "hostname": "example.com",
1805 "pathname": "/foo/..bar",
1810 "input": "http://example.com/foo/bar/../ton",
1811 "base": "about:blank",
1812 "href": "http://example.com/foo/ton",
1813 "origin": "http://example.com",
1814 "protocol": "http:",
1817 "host": "example.com",
1818 "hostname": "example.com",
1820 "pathname": "/foo/ton",
1825 "input": "http://example.com/foo/bar/../ton/../../a",
1826 "base": "about:blank",
1827 "href": "http://example.com/a",
1828 "origin": "http://example.com",
1829 "protocol": "http:",
1832 "host": "example.com",
1833 "hostname": "example.com",
1840 "input": "http://example.com/foo/../../..",
1841 "base": "about:blank",
1842 "href": "http://example.com/",
1843 "origin": "http://example.com",
1844 "protocol": "http:",
1847 "host": "example.com",
1848 "hostname": "example.com",
1855 "input": "http://example.com/foo/../../../ton",
1856 "base": "about:blank",
1857 "href": "http://example.com/ton",
1858 "origin": "http://example.com",
1859 "protocol": "http:",
1862 "host": "example.com",
1863 "hostname": "example.com",
1870 "input": "http://example.com/foo/%2e",
1871 "base": "about:blank",
1872 "href": "http://example.com/foo/",
1873 "origin": "http://example.com",
1874 "protocol": "http:",
1877 "host": "example.com",
1878 "hostname": "example.com",
1880 "pathname": "/foo/",
1885 "input": "http://example.com/foo/%2e%2",
1886 "base": "about:blank",
1887 "href": "http://example.com/foo/%2e%2",
1888 "origin": "http://example.com",
1889 "protocol": "http:",
1892 "host": "example.com",
1893 "hostname": "example.com",
1895 "pathname": "/foo/%2e%2",
1900 "input": "http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar",
1901 "base": "about:blank",
1902 "href": "http://example.com/%2e.bar",
1903 "origin": "http://example.com",
1904 "protocol": "http:",
1907 "host": "example.com",
1908 "hostname": "example.com",
1910 "pathname": "/%2e.bar",
1915 "input": "http://example.com////../..",
1916 "base": "about:blank",
1917 "href": "http://example.com//",
1918 "origin": "http://example.com",
1919 "protocol": "http:",
1922 "host": "example.com",
1923 "hostname": "example.com",
1930 "input": "http://example.com/foo/bar//../..",
1931 "base": "about:blank",
1932 "href": "http://example.com/foo/",
1933 "origin": "http://example.com",
1934 "protocol": "http:",
1937 "host": "example.com",
1938 "hostname": "example.com",
1940 "pathname": "/foo/",
1945 "input": "http://example.com/foo/bar//..",
1946 "base": "about:blank",
1947 "href": "http://example.com/foo/bar/",
1948 "origin": "http://example.com",
1949 "protocol": "http:",
1952 "host": "example.com",
1953 "hostname": "example.com",
1955 "pathname": "/foo/bar/",
1960 "input": "http://example.com/foo",
1961 "base": "about:blank",
1962 "href": "http://example.com/foo",
1963 "origin": "http://example.com",
1964 "protocol": "http:",
1967 "host": "example.com",
1968 "hostname": "example.com",
1975 "input": "http://example.com/%20foo",
1976 "base": "about:blank",
1977 "href": "http://example.com/%20foo",
1978 "origin": "http://example.com",
1979 "protocol": "http:",
1982 "host": "example.com",
1983 "hostname": "example.com",
1985 "pathname": "/%20foo",
1990 "input": "http://example.com/foo%",
1991 "base": "about:blank",
1992 "href": "http://example.com/foo%",
1993 "origin": "http://example.com",
1994 "protocol": "http:",
1997 "host": "example.com",
1998 "hostname": "example.com",
2000 "pathname": "/foo%",
2005 "input": "http://example.com/foo%2",
2006 "base": "about:blank",
2007 "href": "http://example.com/foo%2",
2008 "origin": "http://example.com",
2009 "protocol": "http:",
2012 "host": "example.com",
2013 "hostname": "example.com",
2015 "pathname": "/foo%2",
2020 "input": "http://example.com/foo%2zbar",
2021 "base": "about:blank",
2022 "href": "http://example.com/foo%2zbar",
2023 "origin": "http://example.com",
2024 "protocol": "http:",
2027 "host": "example.com",
2028 "hostname": "example.com",
2030 "pathname": "/foo%2zbar",
2035 "input": "http://example.com/foo%2©zbar",
2036 "base": "about:blank",
2037 "href": "http://example.com/foo%2%C3%82%C2%A9zbar",
2038 "origin": "http://example.com",
2039 "protocol": "http:",
2042 "host": "example.com",
2043 "hostname": "example.com",
2045 "pathname": "/foo%2%C3%82%C2%A9zbar",
2050 "input": "http://example.com/foo%41%7a",
2051 "base": "about:blank",
2052 "href": "http://example.com/foo%41%7a",
2053 "origin": "http://example.com",
2054 "protocol": "http:",
2057 "host": "example.com",
2058 "hostname": "example.com",
2060 "pathname": "/foo%41%7a",
2065 "input": "http://example.com/foo\t\u0091%91",
2066 "base": "about:blank",
2067 "href": "http://example.com/foo%C2%91%91",
2068 "origin": "http://example.com",
2069 "protocol": "http:",
2072 "host": "example.com",
2073 "hostname": "example.com",
2075 "pathname": "/foo%C2%91%91",
2080 "input": "http://example.com/foo%00%51",
2081 "base": "about:blank",
2082 "href": "http://example.com/foo%00%51",
2083 "origin": "http://example.com",
2084 "protocol": "http:",
2087 "host": "example.com",
2088 "hostname": "example.com",
2090 "pathname": "/foo%00%51",
2095 "input": "http://example.com/(%28:%3A%29)",
2096 "base": "about:blank",
2097 "href": "http://example.com/(%28:%3A%29)",
2098 "origin": "http://example.com",
2099 "protocol": "http:",
2102 "host": "example.com",
2103 "hostname": "example.com",
2105 "pathname": "/(%28:%3A%29)",
2110 "input": "http://example.com/%3A%3a%3C%3c",
2111 "base": "about:blank",
2112 "href": "http://example.com/%3A%3a%3C%3c",
2113 "origin": "http://example.com",
2114 "protocol": "http:",
2117 "host": "example.com",
2118 "hostname": "example.com",
2120 "pathname": "/%3A%3a%3C%3c",
2125 "input": "http://example.com/foo\tbar",
2126 "base": "about:blank",
2127 "href": "http://example.com/foobar",
2128 "origin": "http://example.com",
2129 "protocol": "http:",
2132 "host": "example.com",
2133 "hostname": "example.com",
2135 "pathname": "/foobar",
2140 "input": "http://example.com\\\\foo\\\\bar",
2141 "base": "about:blank",
2142 "href": "http://example.com//foo//bar",
2143 "origin": "http://example.com",
2144 "protocol": "http:",
2147 "host": "example.com",
2148 "hostname": "example.com",
2150 "pathname": "//foo//bar",
2155 "input": "http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd",
2156 "base": "about:blank",
2157 "href": "http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd",
2158 "origin": "http://example.com",
2159 "protocol": "http:",
2162 "host": "example.com",
2163 "hostname": "example.com",
2165 "pathname": "/%7Ffp3%3Eju%3Dduvgw%3Dd",
2170 "input": "http://example.com/@asdf%40",
2171 "base": "about:blank",
2172 "href": "http://example.com/@asdf%40",
2173 "origin": "http://example.com",
2174 "protocol": "http:",
2177 "host": "example.com",
2178 "hostname": "example.com",
2180 "pathname": "/@asdf%40",
2185 "input": "http://example.com/你好你好",
2186 "base": "about:blank",
2187 "href": "http://example.com/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD",
2188 "origin": "http://example.com",
2189 "protocol": "http:",
2192 "host": "example.com",
2193 "hostname": "example.com",
2195 "pathname": "/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD",
2200 "input": "http://example.com/‥/foo",
2201 "base": "about:blank",
2202 "href": "http://example.com/%E2%80%A5/foo",
2203 "origin": "http://example.com",
2204 "protocol": "http:",
2207 "host": "example.com",
2208 "hostname": "example.com",
2210 "pathname": "/%E2%80%A5/foo",
2215 "input": "http://example.com//foo",
2216 "base": "about:blank",
2217 "href": "http://example.com/%EF%BB%BF/foo",
2218 "origin": "http://example.com",
2219 "protocol": "http:",
2222 "host": "example.com",
2223 "hostname": "example.com",
2225 "pathname": "/%EF%BB%BF/foo",
2230 "input": "http://example.com//foo//bar",
2231 "base": "about:blank",
2232 "href": "http://example.com/%E2%80%AE/foo/%E2%80%AD/bar",
2233 "origin": "http://example.com",
2234 "protocol": "http:",
2237 "host": "example.com",
2238 "hostname": "example.com",
2240 "pathname": "/%E2%80%AE/foo/%E2%80%AD/bar",
2244 "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/relative.js",
2246 "input": "http://www.google.com/foo?bar=baz#",
2247 "base": "about:blank",
2248 "href": "http://www.google.com/foo?bar=baz#",
2249 "origin": "http://www.google.com",
2250 "protocol": "http:",
2253 "host": "www.google.com",
2254 "hostname": "www.google.com",
2257 "search": "?bar=baz",
2261 "input": "http://www.google.com/foo?bar=baz# »",
2262 "base": "about:blank",
2263 "href": "http://www.google.com/foo?bar=baz# %C2%BB",
2264 "origin": "http://www.google.com",
2265 "protocol": "http:",
2268 "host": "www.google.com",
2269 "hostname": "www.google.com",
2272 "search": "?bar=baz",
2276 "input": "data:test# »",
2277 "base": "about:blank",
2278 "href": "data:test# %C2%BB",
2280 "protocol": "data:",
2291 "input": "http://www.google.com",
2292 "base": "about:blank",
2293 "href": "http://www.google.com/",
2294 "origin": "http://www.google.com",
2295 "protocol": "http:",
2298 "host": "www.google.com",
2299 "hostname": "www.google.com",
2306 "input": "http://192.0x00A80001",
2307 "base": "about:blank",
2308 "href": "http://192.168.0.1/",
2309 "origin": "http://192.168.0.1",
2310 "protocol": "http:",
2313 "host": "192.168.0.1",
2314 "hostname": "192.168.0.1",
2321 "input": "http://www/foo%2Ehtml",
2322 "base": "about:blank",
2323 "href": "http://www/foo%2Ehtml",
2324 "origin": "http://www",
2325 "protocol": "http:",
2331 "pathname": "/foo%2Ehtml",
2336 "input": "http://www/foo/%2E/html",
2337 "base": "about:blank",
2338 "href": "http://www/foo/html",
2339 "origin": "http://www",
2340 "protocol": "http:",
2346 "pathname": "/foo/html",
2351 "input": "http://user:pass@/",
2352 "base": "about:blank",
2356 "input": "http://%25DOMAIN:foobar@foodomain.com/",
2357 "base": "about:blank",
2358 "href": "http://%25DOMAIN:foobar@foodomain.com/",
2359 "origin": "http://foodomain.com",
2360 "protocol": "http:",
2361 "username": "%25DOMAIN",
2362 "password": "foobar",
2363 "host": "foodomain.com",
2364 "hostname": "foodomain.com",
2371 "input": "http:\\\\www.google.com\\foo",
2372 "base": "about:blank",
2373 "href": "http://www.google.com/foo",
2374 "origin": "http://www.google.com",
2375 "protocol": "http:",
2378 "host": "www.google.com",
2379 "hostname": "www.google.com",
2386 "input": "http://foo:80/",
2387 "base": "about:blank",
2388 "href": "http://foo/",
2389 "origin": "http://foo",
2390 "protocol": "http:",
2401 "input": "http://foo:81/",
2402 "base": "about:blank",
2403 "href": "http://foo:81/",
2404 "origin": "http://foo:81",
2405 "protocol": "http:",
2416 "input": "httpa://foo:80/",
2417 "base": "about:blank",
2418 "href": "httpa://foo:80/",
2420 "protocol": "httpa:",
2431 "input": "http://foo:-80/",
2432 "base": "about:blank",
2436 "input": "https://foo:443/",
2437 "base": "about:blank",
2438 "href": "https://foo/",
2439 "origin": "https://foo",
2440 "protocol": "https:",
2451 "input": "https://foo:80/",
2452 "base": "about:blank",
2453 "href": "https://foo:80/",
2454 "origin": "https://foo:80",
2455 "protocol": "https:",
2466 "input": "ftp://foo:21/",
2467 "base": "about:blank",
2468 "href": "ftp://foo/",
2469 "origin": "ftp://foo",
2481 "input": "ftp://foo:80/",
2482 "base": "about:blank",
2483 "href": "ftp://foo:80/",
2484 "origin": "ftp://foo:80",
2496 "input": "gopher://foo:70/",
2497 "base": "about:blank",
2498 "href": "gopher://foo/",
2499 "origin": "gopher://foo",
2500 "protocol": "gopher:",
2511 "input": "gopher://foo:443/",
2512 "base": "about:blank",
2513 "href": "gopher://foo:443/",
2514 "origin": "gopher://foo:443",
2515 "protocol": "gopher:",
2526 "input": "ws://foo:80/",
2527 "base": "about:blank",
2528 "href": "ws://foo/",
2529 "origin": "ws://foo",
2541 "input": "ws://foo:81/",
2542 "base": "about:blank",
2543 "href": "ws://foo:81/",
2544 "origin": "ws://foo:81",
2556 "input": "ws://foo:443/",
2557 "base": "about:blank",
2558 "href": "ws://foo:443/",
2559 "origin": "ws://foo:443",
2571 "input": "ws://foo:815/",
2572 "base": "about:blank",
2573 "href": "ws://foo:815/",
2574 "origin": "ws://foo:815",
2586 "input": "wss://foo:80/",
2587 "base": "about:blank",
2588 "href": "wss://foo:80/",
2589 "origin": "wss://foo:80",
2601 "input": "wss://foo:81/",
2602 "base": "about:blank",
2603 "href": "wss://foo:81/",
2604 "origin": "wss://foo:81",
2616 "input": "wss://foo:443/",
2617 "base": "about:blank",
2618 "href": "wss://foo/",
2619 "origin": "wss://foo",
2631 "input": "wss://foo:815/",
2632 "base": "about:blank",
2633 "href": "wss://foo:815/",
2634 "origin": "wss://foo:815",
2646 "input": "http:/example.com/",
2647 "base": "about:blank",
2648 "href": "http://example.com/",
2649 "origin": "http://example.com",
2650 "protocol": "http:",
2653 "host": "example.com",
2654 "hostname": "example.com",
2661 "input": "ftp:/example.com/",
2662 "base": "about:blank",
2663 "href": "ftp://example.com/",
2664 "origin": "ftp://example.com",
2668 "host": "example.com",
2669 "hostname": "example.com",
2676 "input": "https:/example.com/",
2677 "base": "about:blank",
2678 "href": "https://example.com/",
2679 "origin": "https://example.com",
2680 "protocol": "https:",
2683 "host": "example.com",
2684 "hostname": "example.com",
2691 "input": "madeupscheme:/example.com/",
2692 "base": "about:blank",
2693 "href": "madeupscheme:/example.com/",
2695 "protocol": "madeupscheme:",
2701 "pathname": "/example.com/",
2706 "input": "file:/example.com/",
2707 "base": "about:blank",
2708 "href": "file:///example.com/",
2709 "protocol": "file:",
2715 "pathname": "/example.com/",
2720 "input": "ftps:/example.com/",
2721 "base": "about:blank",
2722 "href": "ftps:/example.com/",
2724 "protocol": "ftps:",
2730 "pathname": "/example.com/",
2735 "input": "gopher:/example.com/",
2736 "base": "about:blank",
2737 "href": "gopher://example.com/",
2738 "origin": "gopher://example.com",
2739 "protocol": "gopher:",
2742 "host": "example.com",
2743 "hostname": "example.com",
2750 "input": "ws:/example.com/",
2751 "base": "about:blank",
2752 "href": "ws://example.com/",
2753 "origin": "ws://example.com",
2757 "host": "example.com",
2758 "hostname": "example.com",
2765 "input": "wss:/example.com/",
2766 "base": "about:blank",
2767 "href": "wss://example.com/",
2768 "origin": "wss://example.com",
2772 "host": "example.com",
2773 "hostname": "example.com",
2780 "input": "data:/example.com/",
2781 "base": "about:blank",
2782 "href": "data:/example.com/",
2784 "protocol": "data:",
2790 "pathname": "/example.com/",
2795 "input": "javascript:/example.com/",
2796 "base": "about:blank",
2797 "href": "javascript:/example.com/",
2799 "protocol": "javascript:",
2805 "pathname": "/example.com/",
2810 "input": "mailto:/example.com/",
2811 "base": "about:blank",
2812 "href": "mailto:/example.com/",
2814 "protocol": "mailto:",
2820 "pathname": "/example.com/",
2825 "input": "http:example.com/",
2826 "base": "about:blank",
2827 "href": "http://example.com/",
2828 "origin": "http://example.com",
2829 "protocol": "http:",
2832 "host": "example.com",
2833 "hostname": "example.com",
2840 "input": "ftp:example.com/",
2841 "base": "about:blank",
2842 "href": "ftp://example.com/",
2843 "origin": "ftp://example.com",
2847 "host": "example.com",
2848 "hostname": "example.com",
2855 "input": "https:example.com/",
2856 "base": "about:blank",
2857 "href": "https://example.com/",
2858 "origin": "https://example.com",
2859 "protocol": "https:",
2862 "host": "example.com",
2863 "hostname": "example.com",
2870 "input": "madeupscheme:example.com/",
2871 "base": "about:blank",
2872 "href": "madeupscheme:example.com/",
2874 "protocol": "madeupscheme:",
2880 "pathname": "example.com/",
2885 "input": "ftps:example.com/",
2886 "base": "about:blank",
2887 "href": "ftps:example.com/",
2889 "protocol": "ftps:",
2895 "pathname": "example.com/",
2900 "input": "gopher:example.com/",
2901 "base": "about:blank",
2902 "href": "gopher://example.com/",
2903 "origin": "gopher://example.com",
2904 "protocol": "gopher:",
2907 "host": "example.com",
2908 "hostname": "example.com",
2915 "input": "ws:example.com/",
2916 "base": "about:blank",
2917 "href": "ws://example.com/",
2918 "origin": "ws://example.com",
2922 "host": "example.com",
2923 "hostname": "example.com",
2930 "input": "wss:example.com/",
2931 "base": "about:blank",
2932 "href": "wss://example.com/",
2933 "origin": "wss://example.com",
2937 "host": "example.com",
2938 "hostname": "example.com",
2945 "input": "data:example.com/",
2946 "base": "about:blank",
2947 "href": "data:example.com/",
2949 "protocol": "data:",
2955 "pathname": "example.com/",
2960 "input": "javascript:example.com/",
2961 "base": "about:blank",
2962 "href": "javascript:example.com/",
2964 "protocol": "javascript:",
2970 "pathname": "example.com/",
2975 "input": "mailto:example.com/",
2976 "base": "about:blank",
2977 "href": "mailto:example.com/",
2979 "protocol": "mailto:",
2985 "pathname": "example.com/",
2989 "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/segments-userinfo-vs-host.html",
2991 "input": "http:@www.example.com",
2992 "base": "about:blank",
2993 "href": "http://www.example.com/",
2994 "origin": "http://www.example.com",
2995 "protocol": "http:",
2998 "host": "www.example.com",
2999 "hostname": "www.example.com",
3006 "input": "http:/@www.example.com",
3007 "base": "about:blank",
3008 "href": "http://www.example.com/",
3009 "origin": "http://www.example.com",
3010 "protocol": "http:",
3013 "host": "www.example.com",
3014 "hostname": "www.example.com",
3021 "input": "http://@www.example.com",
3022 "base": "about:blank",
3023 "href": "http://www.example.com/",
3024 "origin": "http://www.example.com",
3025 "protocol": "http:",
3028 "host": "www.example.com",
3029 "hostname": "www.example.com",
3036 "input": "http:a:b@www.example.com",
3037 "base": "about:blank",
3038 "href": "http://a:b@www.example.com/",
3039 "origin": "http://www.example.com",
3040 "protocol": "http:",
3043 "host": "www.example.com",
3044 "hostname": "www.example.com",
3051 "input": "http:/a:b@www.example.com",
3052 "base": "about:blank",
3053 "href": "http://a:b@www.example.com/",
3054 "origin": "http://www.example.com",
3055 "protocol": "http:",
3058 "host": "www.example.com",
3059 "hostname": "www.example.com",
3066 "input": "http://a:b@www.example.com",
3067 "base": "about:blank",
3068 "href": "http://a:b@www.example.com/",
3069 "origin": "http://www.example.com",
3070 "protocol": "http:",
3073 "host": "www.example.com",
3074 "hostname": "www.example.com",
3081 "input": "http://@pple.com",
3082 "base": "about:blank",
3083 "href": "http://pple.com/",
3084 "origin": "http://pple.com",
3085 "protocol": "http:",
3089 "hostname": "pple.com",
3096 "input": "http::b@www.example.com",
3097 "base": "about:blank",
3098 "href": "http://:b@www.example.com/",
3099 "origin": "http://www.example.com",
3100 "protocol": "http:",
3103 "host": "www.example.com",
3104 "hostname": "www.example.com",
3111 "input": "http:/:b@www.example.com",
3112 "base": "about:blank",
3113 "href": "http://:b@www.example.com/",
3114 "origin": "http://www.example.com",
3115 "protocol": "http:",
3118 "host": "www.example.com",
3119 "hostname": "www.example.com",
3126 "input": "http://:b@www.example.com",
3127 "base": "about:blank",
3128 "href": "http://:b@www.example.com/",
3129 "origin": "http://www.example.com",
3130 "protocol": "http:",
3133 "host": "www.example.com",
3134 "hostname": "www.example.com",
3141 "input": "http:/:@/www.example.com",
3142 "base": "about:blank",
3146 "input": "http://user@/www.example.com",
3147 "base": "about:blank",
3151 "input": "http:@/www.example.com",
3152 "base": "about:blank",
3156 "input": "http:/@/www.example.com",
3157 "base": "about:blank",
3161 "input": "http://@/www.example.com",
3162 "base": "about:blank",
3166 "input": "https:@/www.example.com",
3167 "base": "about:blank",
3171 "input": "http:a:b@/www.example.com",
3172 "base": "about:blank",
3176 "input": "http:/a:b@/www.example.com",
3177 "base": "about:blank",
3181 "input": "http://a:b@/www.example.com",
3182 "base": "about:blank",
3186 "input": "http::@/www.example.com",
3187 "base": "about:blank",
3191 "input": "http:a:@www.example.com",
3192 "base": "about:blank",
3193 "href": "http://a@www.example.com/",
3194 "origin": "http://www.example.com",
3195 "protocol": "http:",
3198 "host": "www.example.com",
3199 "hostname": "www.example.com",
3206 "input": "http:/a:@www.example.com",
3207 "base": "about:blank",
3208 "href": "http://a@www.example.com/",
3209 "origin": "http://www.example.com",
3210 "protocol": "http:",
3213 "host": "www.example.com",
3214 "hostname": "www.example.com",
3221 "input": "http://a:@www.example.com",
3222 "base": "about:blank",
3223 "href": "http://a@www.example.com/",
3224 "origin": "http://www.example.com",
3225 "protocol": "http:",
3228 "host": "www.example.com",
3229 "hostname": "www.example.com",
3236 "input": "http://www.@pple.com",
3237 "base": "about:blank",
3238 "href": "http://www.@pple.com/",
3239 "origin": "http://pple.com",
3240 "protocol": "http:",
3244 "hostname": "pple.com",
3251 "input": "http:@:www.example.com",
3252 "base": "about:blank",
3256 "input": "http:/@:www.example.com",
3257 "base": "about:blank",
3261 "input": "http://@:www.example.com",
3262 "base": "about:blank",
3266 "input": "http://:@www.example.com",
3267 "base": "about:blank",
3268 "href": "http://www.example.com/",
3269 "origin": "http://www.example.com",
3270 "protocol": "http:",
3273 "host": "www.example.com",
3274 "hostname": "www.example.com",
3283 "base": "http://www.example.com/test",
3284 "href": "http://www.example.com/",
3285 "origin": "http://www.example.com",
3286 "protocol": "http:",
3289 "host": "www.example.com",
3290 "hostname": "www.example.com",
3297 "input": "/test.txt",
3298 "base": "http://www.example.com/test",
3299 "href": "http://www.example.com/test.txt",
3300 "origin": "http://www.example.com",
3301 "protocol": "http:",
3304 "host": "www.example.com",
3305 "hostname": "www.example.com",
3307 "pathname": "/test.txt",
3313 "base": "http://www.example.com/test",
3314 "href": "http://www.example.com/",
3315 "origin": "http://www.example.com",
3316 "protocol": "http:",
3319 "host": "www.example.com",
3320 "hostname": "www.example.com",
3328 "base": "http://www.example.com/test",
3329 "href": "http://www.example.com/",
3330 "origin": "http://www.example.com",
3331 "protocol": "http:",
3334 "host": "www.example.com",
3335 "hostname": "www.example.com",
3342 "input": "test.txt",
3343 "base": "http://www.example.com/test",
3344 "href": "http://www.example.com/test.txt",
3345 "origin": "http://www.example.com",
3346 "protocol": "http:",
3349 "host": "www.example.com",
3350 "hostname": "www.example.com",
3352 "pathname": "/test.txt",
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:",
3364 "host": "www.example.com",
3365 "hostname": "www.example.com",
3367 "pathname": "/test.txt",
3372 "input": "../test.txt",
3373 "base": "http://www.example.com/test",
3374 "href": "http://www.example.com/test.txt",
3375 "origin": "http://www.example.com",
3376 "protocol": "http:",
3379 "host": "www.example.com",
3380 "hostname": "www.example.com",
3382 "pathname": "/test.txt",
3387 "input": "../aaa/test.txt",
3388 "base": "http://www.example.com/test",
3389 "href": "http://www.example.com/aaa/test.txt",
3390 "origin": "http://www.example.com",
3391 "protocol": "http:",
3394 "host": "www.example.com",
3395 "hostname": "www.example.com",
3397 "pathname": "/aaa/test.txt",
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:",
3409 "host": "www.example.com",
3410 "hostname": "www.example.com",
3412 "pathname": "/test.txt",
3417 "input": "中/test.txt",
3418 "base": "http://www.example.com/test",
3419 "href": "http://www.example.com/%E4%B8%AD/test.txt",
3420 "origin": "http://www.example.com",
3421 "protocol": "http:",
3424 "host": "www.example.com",
3425 "hostname": "www.example.com",
3427 "pathname": "/%E4%B8%AD/test.txt",
3432 "input": "http://www.example2.com",
3433 "base": "http://www.example.com/test",
3434 "href": "http://www.example2.com/",
3435 "origin": "http://www.example2.com",
3436 "protocol": "http:",
3439 "host": "www.example2.com",
3440 "hostname": "www.example2.com",
3447 "input": "//www.example2.com",
3448 "base": "http://www.example.com/test",
3449 "href": "http://www.example2.com/",
3450 "origin": "http://www.example2.com",
3451 "protocol": "http:",
3454 "host": "www.example2.com",
3455 "hostname": "www.example2.com",
3462 "input": "file:...",
3463 "base": "http://www.example.com/test",
3464 "href": "file:///...",
3465 "protocol": "file:",
3477 "base": "http://www.example.com/test",
3479 "protocol": "file:",
3491 "base": "http://www.example.com/test",
3492 "href": "file:///a",
3493 "protocol": "file:",
3503 "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/host.html",
3504 "Basic canonicalization, uppercase should be converted to lowercase",
3506 "input": "http://ExAmPlE.CoM",
3507 "base": "http://other.com/",
3508 "href": "http://example.com/",
3509 "origin": "http://example.com",
3510 "protocol": "http:",
3513 "host": "example.com",
3514 "hostname": "example.com",
3521 "input": "http://example example.com",
3522 "base": "http://other.com/",
3526 "input": "http://Goo%20 goo%7C|.com",
3527 "base": "http://other.com/",
3531 "input": "http://[]",
3532 "base": "http://other.com/",
3536 "input": "http://[:]",
3537 "base": "http://other.com/",
3540 "U+3000 is mapped to U+0020 (space) which is disallowed",
3542 "input": "http://GOO\u00a0\u3000goo.com",
3543 "base": "http://other.com/",
3546 "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",
3548 "input": "http://GOO\u200b\u2060\ufeffgoo.com",
3549 "base": "http://other.com/",
3550 "href": "http://googoo.com/",
3551 "origin": "http://googoo.com",
3552 "protocol": "http:",
3555 "host": "googoo.com",
3556 "hostname": "googoo.com",
3562 "Leading and trailing C0 control or space",
3564 "input": "\u0000\u001b\u0004\u0012 http://example.com/\u001f \u000d ",
3565 "base": "about:blank",
3566 "href": "http://example.com/",
3567 "origin": "http://example.com",
3568 "protocol": "http:",
3571 "host": "example.com",
3572 "hostname": "example.com",
3578 "Ideographic full stop (full-width period for Chinese, etc.) should be treated as a dot. U+3002 is mapped to U+002E (dot)",
3580 "input": "http://www.foo。bar.com",
3581 "base": "http://other.com/",
3582 "href": "http://www.foo.bar.com/",
3583 "origin": "http://www.foo.bar.com",
3584 "protocol": "http:",
3587 "host": "www.foo.bar.com",
3588 "hostname": "www.foo.bar.com",
3594 "Invalid unicode characters should fail... U+FDD0 is disallowed; %ef%b7%90 is U+FDD0",
3596 "input": "http://\ufdd0zyx.com",
3597 "base": "http://other.com/",
3600 "This is the same as previous but escaped",
3602 "input": "http://%ef%b7%90zyx.com",
3603 "base": "http://other.com/",
3608 "input": "https://\ufffd",
3609 "base": "about:blank",
3613 "input": "https://%EF%BF%BD",
3614 "base": "about:blank",
3618 "input": "https://x/\ufffd?\ufffd#\ufffd",
3619 "base": "about:blank",
3620 "href": "https://x/%EF%BF%BD?%EF%BF%BD#%EF%BF%BD",
3621 "origin": "https://x",
3622 "protocol": "https:",
3628 "pathname": "/%EF%BF%BD",
3629 "search": "?%EF%BF%BD",
3630 "hash": "#%EF%BF%BD"
3632 "Test name prepping, fullwidth input should be converted to ASCII and NOT IDN-ized. This is 'Go' in fullwidth UTF-8/UTF-16.",
3634 "input": "http://Go.com",
3635 "base": "http://other.com/",
3636 "href": "http://go.com/",
3637 "origin": "http://go.com",
3638 "protocol": "http:",
3642 "hostname": "go.com",
3648 "URL spec forbids the following. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24257",
3650 "input": "http://%41.com",
3651 "base": "http://other.com/",
3655 "input": "http://%ef%bc%85%ef%bc%94%ef%bc%91.com",
3656 "base": "http://other.com/",
3659 "...%00 in fullwidth should fail (also as escaped UTF-8 input)",
3661 "input": "http://%00.com",
3662 "base": "http://other.com/",
3666 "input": "http://%ef%bc%85%ef%bc%90%ef%bc%90.com",
3667 "base": "http://other.com/",
3670 "Basic IDN support, UTF-8 and UTF-16 input should be converted to IDN",
3672 "input": "http://你好你好",
3673 "base": "http://other.com/",
3674 "href": "http://xn--6qqa088eba/",
3675 "origin": "http://xn--6qqa088eba",
3676 "protocol": "http:",
3679 "host": "xn--6qqa088eba",
3680 "hostname": "xn--6qqa088eba",
3687 "input": "https://faß.ExAmPlE/",
3688 "base": "about:blank",
3689 "href": "https://xn--fa-hia.example/",
3690 "origin": "https://xn--fa-hia.example",
3691 "protocol": "https:",
3694 "host": "xn--fa-hia.example",
3695 "hostname": "xn--fa-hia.example",
3702 "input": "sc://faß.ExAmPlE/",
3703 "base": "about:blank",
3704 "href": "sc://fa%C3%9F.ExAmPlE/",
3709 "host": "fa%C3%9F.ExAmPlE",
3710 "hostname": "fa%C3%9F.ExAmPlE",
3716 "Invalid escaped characters should fail and the percents should be escaped. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24191",
3718 "input": "http://%zz%66%a.com",
3719 "base": "http://other.com/",
3722 "If we get an invalid character that has been escaped.",
3724 "input": "http://%25",
3725 "base": "http://other.com/",
3729 "input": "http://hello%00",
3730 "base": "http://other.com/",
3733 "Escaped numbers should be treated like IP addresses if they are.",
3735 "input": "http://%30%78%63%30%2e%30%32%35%30.01",
3736 "base": "http://other.com/",
3737 "href": "http://192.168.0.1/",
3738 "origin": "http://192.168.0.1",
3739 "protocol": "http:",
3742 "host": "192.168.0.1",
3743 "hostname": "192.168.0.1",
3750 "input": "http://%30%78%63%30%2e%30%32%35%30.01%2e",
3751 "base": "http://other.com/",
3752 "href": "http://192.168.0.1/",
3753 "origin": "http://192.168.0.1",
3754 "protocol": "http:",
3757 "host": "192.168.0.1",
3758 "hostname": "192.168.0.1",
3765 "input": "http://192.168.0.257",
3766 "base": "http://other.com/",
3769 "Invalid escaping in hosts causes failure",
3771 "input": "http://%3g%78%63%30%2e%30%32%35%30%2E.01",
3772 "base": "http://other.com/",
3775 "A space in a host causes failure",
3777 "input": "http://192.168.0.1 hello",
3778 "base": "http://other.com/",
3782 "input": "https://x x:12",
3783 "base": "about:blank",
3786 "Fullwidth and escaped UTF-8 fullwidth should still be treated as IP",
3788 "input": "http://0Xc0.0250.01",
3789 "base": "http://other.com/",
3790 "href": "http://192.168.0.1/",
3791 "origin": "http://192.168.0.1",
3792 "protocol": "http:",
3795 "host": "192.168.0.1",
3796 "hostname": "192.168.0.1",
3802 "Domains with empty labels",
3804 "input": "http://./",
3805 "base": "about:blank",
3806 "href": "http://./",
3807 "origin": "http://.",
3808 "protocol": "http:",
3819 "input": "http://../",
3820 "base": "about:blank",
3821 "href": "http://../",
3822 "origin": "http://..",
3823 "protocol": "http:",
3834 "input": "http://0..0x300/",
3835 "base": "about:blank",
3836 "href": "http://0..0x300/",
3837 "origin": "http://0..0x300",
3838 "protocol": "http:",
3842 "hostname": "0..0x300",
3850 "input": "http://[www.google.com]/",
3851 "base": "about:blank",
3855 "input": "http://[google.com]",
3856 "base": "http://other.com/",
3860 "input": "http://[::1.2.3.4x]",
3861 "base": "http://other.com/",
3865 "input": "http://[::1.2.3.]",
3866 "base": "http://other.com/",
3870 "input": "http://[::1.2.]",
3871 "base": "http://other.com/",
3875 "input": "http://[::1.]",
3876 "base": "http://other.com/",
3881 "input": "http://foo:💩@example.com/bar",
3882 "base": "http://other.com/",
3883 "href": "http://foo:%F0%9F%92%A9@example.com/bar",
3884 "origin": "http://example.com",
3885 "protocol": "http:",
3887 "password": "%F0%9F%92%A9",
3888 "host": "example.com",
3889 "hostname": "example.com",
3895 "# resolving a fragment against any scheme succeeds",
3898 "base": "test:test",
3899 "href": "test:test#",
3901 "protocol": "test:",
3913 "base": "mailto:x@x.com",
3914 "href": "mailto:x@x.com#x",
3916 "protocol": "mailto:",
3922 "pathname": "x@x.com",
3931 "protocol": "data:",
3943 "base": "about:blank",
3944 "href": "about:blank#x",
3946 "protocol": "about:",
3952 "pathname": "blank",
3958 "base": "test:test?test",
3959 "href": "test:test?test#",
3961 "protocol": "test:",
3971 "# multiple @ in authority state",
3973 "input": "https://@test@test@example:800/",
3974 "base": "http://doesnotmatter/",
3975 "href": "https://%40test%40test@example:800/",
3976 "origin": "https://example:800",
3977 "protocol": "https:",
3978 "username": "%40test%40test",
3980 "host": "example:800",
3981 "hostname": "example",
3988 "input": "https://@@@example",
3989 "base": "http://doesnotmatter/",
3990 "href": "https://%40%40@example/",
3991 "origin": "https://example",
3992 "protocol": "https:",
3993 "username": "%40%40",
3996 "hostname": "example",
4002 "non-az-09 characters",
4004 "input": "http://`{}:`{}@h/`{}?`{}",
4005 "base": "http://doesnotmatter/",
4006 "href": "http://%60%7B%7D:%60%7B%7D@h/%60%7B%7D?`{}",
4007 "origin": "http://h",
4008 "protocol": "http:",
4009 "username": "%60%7B%7D",
4010 "password": "%60%7B%7D",
4014 "pathname": "/%60%7B%7D",
4018 "# Credentials in base",
4020 "input": "/some/path",
4021 "base": "http://user@example.org/smth",
4022 "href": "http://user@example.org/some/path",
4023 "origin": "http://example.org",
4024 "protocol": "http:",
4027 "host": "example.org",
4028 "hostname": "example.org",
4030 "pathname": "/some/path",
4036 "base": "http://user:pass@example.org:21/smth",
4037 "href": "http://user:pass@example.org:21/smth",
4038 "origin": "http://example.org:21",
4039 "protocol": "http:",
4042 "host": "example.org:21",
4043 "hostname": "example.org",
4045 "pathname": "/smth",
4050 "input": "/some/path",
4051 "base": "http://user:pass@example.org:21/smth",
4052 "href": "http://user:pass@example.org:21/some/path",
4053 "origin": "http://example.org:21",
4054 "protocol": "http:",
4057 "host": "example.org:21",
4058 "hostname": "example.org",
4060 "pathname": "/some/path",
4064 "# a set of tests designed by zcorpan for relative URLs with unknown schemes",
4077 "base": "sc:/pa/pa",
4086 "pathname": "/pa/i",
4092 "base": "sc://ho/pa",
4093 "href": "sc://ho/i",
4107 "base": "sc:///pa/pa",
4108 "href": "sc:///pa/i",
4116 "pathname": "/pa/i",
4132 "base": "sc:/pa/pa",
4147 "base": "sc://ho/pa",
4148 "href": "sc://ho/i",
4162 "base": "sc:///pa/pa",
4187 "base": "sc:/pa/pa",
4202 "base": "sc://ho/pa",
4203 "href": "sc://ho/i",
4217 "base": "sc:///pa/pa",
4242 "base": "sc:/pa/pa",
4243 "href": "sc:/pa/pa?i",
4251 "pathname": "/pa/pa",
4257 "base": "sc://ho/pa",
4258 "href": "sc://ho/pa?i",
4272 "base": "sc:///pa/pa",
4273 "href": "sc:///pa/pa?i",
4281 "pathname": "/pa/pa",
4303 "href": "sc:sd/sd#i",
4311 "pathname": "sd/sd",
4317 "base": "sc:/pa/pa",
4318 "href": "sc:/pa/pa#i",
4326 "pathname": "/pa/pa",
4332 "base": "sc://ho/pa",
4333 "href": "sc://ho/pa#i",
4347 "base": "sc:///pa/pa",
4348 "href": "sc:///pa/pa#i",
4356 "pathname": "/pa/pa",
4360 "# make sure that relative URL logic works on known typically non-relative schemes too",
4362 "input": "about:/../",
4363 "base": "about:blank",
4366 "protocol": "about:",
4377 "input": "data:/../",
4378 "base": "about:blank",
4381 "protocol": "data:",
4392 "input": "javascript:/../",
4393 "base": "about:blank",
4394 "href": "javascript:/",
4396 "protocol": "javascript:",
4407 "input": "mailto:/../",
4408 "base": "about:blank",
4411 "protocol": "mailto:",
4421 "# unknown schemes and their hosts",
4423 "input": "sc://ñ.test/",
4424 "base": "about:blank",
4425 "href": "sc://%C3%B1.test/",
4430 "host": "%C3%B1.test",
4431 "hostname": "%C3%B1.test",
4438 "input": "sc://\u001F!\"$&'()*+,-.;<=>^_`{|}~/",
4439 "base": "about:blank",
4440 "href": "sc://%1F!\"$&'()*+,-.;<=>^_`{|}~/",
4445 "host": "%1F!\"$&'()*+,-.;<=>^_`{|}~",
4446 "hostname": "%1F!\"$&'()*+,-.;<=>^_`{|}~",
4453 "input": "sc://\u0000/",
4454 "base": "about:blank",
4459 "base": "about:blank",
4464 "base": "about:blank",
4478 "base": "about:blank",
4482 "input": "sc://\\/",
4483 "base": "about:blank",
4488 "base": "about:blank",
4494 "href": "sc://%C3%B1/x",
4500 "hostname": "%C3%B1",
4506 "# unknown schemes and backslashes",
4508 "input": "sc:\\../",
4509 "base": "about:blank",
4518 "pathname": "\\../",
4522 "# unknown scheme with path looking like a password",
4524 "input": "sc::a@example.net",
4525 "base": "about:blank",
4526 "href": "sc::a@example.net",
4534 "pathname": ":a@example.net",
4538 "# unknown scheme with bogus percent-encoding",
4540 "input": "wow:%NBD",
4541 "base": "about:blank",
4556 "base": "about:blank",
4569 "# Hosts and percent-encoding",
4571 "input": "ftp://example.com%80/",
4572 "base": "about:blank",
4576 "input": "ftp://example.com%A0/",
4577 "base": "about:blank",
4581 "input": "https://example.com%80/",
4582 "base": "about:blank",
4586 "input": "https://example.com%A0/",
4587 "base": "about:blank",
4591 "input": "ftp://%e2%98%83",
4592 "base": "about:blank",
4593 "href": "ftp://xn--n3h/",
4594 "origin": "ftp://xn--n3h",
4599 "hostname": "xn--n3h",
4606 "input": "https://%e2%98%83",
4607 "base": "about:blank",
4608 "href": "https://xn--n3h/",
4609 "origin": "https://xn--n3h",
4610 "protocol": "https:",
4614 "hostname": "xn--n3h",
4620 "# tests from jsdom/whatwg-url designed for code coverage",
4622 "input": "http://127.0.0.1:10100/relative_import.html",
4623 "base": "about:blank",
4624 "href": "http://127.0.0.1:10100/relative_import.html",
4625 "origin": "http://127.0.0.1:10100",
4626 "protocol": "http:",
4629 "host": "127.0.0.1:10100",
4630 "hostname": "127.0.0.1",
4632 "pathname": "/relative_import.html",
4637 "input": "http://facebook.com/?foo=%7B%22abc%22",
4638 "base": "about:blank",
4639 "href": "http://facebook.com/?foo=%7B%22abc%22",
4640 "origin": "http://facebook.com",
4641 "protocol": "http:",
4644 "host": "facebook.com",
4645 "hostname": "facebook.com",
4648 "search": "?foo=%7B%22abc%22",
4652 "input": "https://localhost:3000/jqueryui@1.2.3",
4653 "base": "about:blank",
4654 "href": "https://localhost:3000/jqueryui@1.2.3",
4655 "origin": "https://localhost:3000",
4656 "protocol": "https:",
4659 "host": "localhost:3000",
4660 "hostname": "localhost",
4662 "pathname": "/jqueryui@1.2.3",
4668 "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",
4669 "base": "about:blank",
4670 "href": "http://host:9000/path?query#frag",
4671 "origin": "http://host:9000",
4672 "protocol": "http:",
4675 "host": "host:9000",
4678 "pathname": "/path",
4682 "# Stringification of URL.searchParams",
4684 "input": "?a=b&c=d",
4685 "base": "http://example.org/foo/bar",
4686 "href": "http://example.org/foo/bar?a=b&c=d",
4687 "origin": "http://example.org",
4688 "protocol": "http:",
4691 "host": "example.org",
4692 "hostname": "example.org",
4694 "pathname": "/foo/bar",
4695 "search": "?a=b&c=d",
4696 "searchParams": "a=b&c=d",
4700 "input": "??a=b&c=d",
4701 "base": "http://example.org/foo/bar",
4702 "href": "http://example.org/foo/bar??a=b&c=d",
4703 "origin": "http://example.org",
4704 "protocol": "http:",
4707 "host": "example.org",
4708 "hostname": "example.org",
4710 "pathname": "/foo/bar",
4711 "search": "??a=b&c=d",
4712 "searchParams": "%3Fa=b&c=d",
4718 "base": "http://example.org/foo/bar",
4719 "href": "http://example.org/foo/bar",
4720 "origin": "http://example.org",
4721 "protocol": "http:",
4724 "host": "example.org",
4725 "hostname": "example.org",
4727 "pathname": "/foo/bar",
4734 "base": "https://example.org/foo/bar",
4739 "base": "https://example.org/foo/bar",
4753 "# Percent encoding of fragments",
4755 "input": "http://foo.bar/baz?qux#foo\bbar",
4756 "base": "about:blank",
4757 "href": "http://foo.bar/baz?qux#foo%08bar",
4758 "origin": "http://foo.bar",
4759 "protocol": "http:",
4763 "hostname": "foo.bar",
4767 "searchParams": "qux=",
4768 "hash": "#foo%08bar"
4770 "# IPv4 parsing (via https://github.com/nodejs/node/pull/10317)",
4772 "input": "http://192.168.257",
4773 "base": "http://other.com/",
4774 "href": "http://192.168.1.1/",
4775 "origin": "http://192.168.1.1",
4776 "protocol": "http:",
4779 "host": "192.168.1.1",
4780 "hostname": "192.168.1.1",
4787 "input": "http://192.168.257.com",
4788 "base": "http://other.com/",
4789 "href": "http://192.168.257.com/",
4790 "origin": "http://192.168.257.com",
4791 "protocol": "http:",
4794 "host": "192.168.257.com",
4795 "hostname": "192.168.257.com",
4802 "input": "http://256",
4803 "base": "http://other.com/",
4804 "href": "http://0.0.1.0/",
4805 "origin": "http://0.0.1.0",
4806 "protocol": "http:",
4810 "hostname": "0.0.1.0",
4817 "input": "http://256.com",
4818 "base": "http://other.com/",
4819 "href": "http://256.com/",
4820 "origin": "http://256.com",
4821 "protocol": "http:",
4825 "hostname": "256.com",
4832 "input": "http://999999999",
4833 "base": "http://other.com/",
4834 "href": "http://59.154.201.255/",
4835 "origin": "http://59.154.201.255",
4836 "protocol": "http:",
4839 "host": "59.154.201.255",
4840 "hostname": "59.154.201.255",
4847 "input": "http://999999999.com",
4848 "base": "http://other.com/",
4849 "href": "http://999999999.com/",
4850 "origin": "http://999999999.com",
4851 "protocol": "http:",
4854 "host": "999999999.com",
4855 "hostname": "999999999.com",
4862 "input": "http://10000000000",
4863 "base": "http://other.com/",
4867 "input": "http://10000000000.com",
4868 "base": "http://other.com/",
4869 "href": "http://10000000000.com/",
4870 "origin": "http://10000000000.com",
4871 "protocol": "http:",
4874 "host": "10000000000.com",
4875 "hostname": "10000000000.com",
4882 "input": "http://4294967295",
4883 "base": "http://other.com/",
4884 "href": "http://255.255.255.255/",
4885 "origin": "http://255.255.255.255",
4886 "protocol": "http:",
4889 "host": "255.255.255.255",
4890 "hostname": "255.255.255.255",
4897 "input": "http://4294967296",
4898 "base": "http://other.com/",
4902 "input": "http://0xffffffff",
4903 "base": "http://other.com/",
4904 "href": "http://255.255.255.255/",
4905 "origin": "http://255.255.255.255",
4906 "protocol": "http:",
4909 "host": "255.255.255.255",
4910 "hostname": "255.255.255.255",
4917 "input": "http://0xffffffff1",
4918 "base": "http://other.com/",
4922 "input": "http://256.256.256.256",
4923 "base": "http://other.com/",
4927 "input": "http://256.256.256.256.256",
4928 "base": "http://other.com/",
4929 "href": "http://256.256.256.256.256/",
4930 "origin": "http://256.256.256.256.256",
4931 "protocol": "http:",
4934 "host": "256.256.256.256.256",
4935 "hostname": "256.256.256.256.256",
4942 "input": "https://0x.0x.0",
4943 "base": "about:blank",
4944 "href": "https://0.0.0.0/",
4945 "origin": "https://0.0.0.0",
4946 "protocol": "https:",
4950 "hostname": "0.0.0.0",
4956 "More IPv4 parsing (via https://github.com/jsdom/whatwg-url/issues/92)",
4958 "input": "https://256.0.0.1/test",
4959 "base": "about:blank",
4962 "# file URLs containing percent-encoded Windows drive letters (shouldn't work)",
4964 "input": "file:///C%3A/",
4965 "base": "about:blank",
4966 "href": "file:///C%3A/",
4967 "protocol": "file:",
4973 "pathname": "/C%3A/",
4978 "input": "file:///C%7C/",
4979 "base": "about:blank",
4980 "href": "file:///C%7C/",
4981 "protocol": "file:",
4987 "pathname": "/C%7C/",
4991 "# file URLs relative to other file URLs (via https://github.com/jsdom/whatwg-url/pull/60)",
4993 "input": "pix/submit.gif",
4994 "base": "file:///C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/anchor.html",
4995 "href": "file:///C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/pix/submit.gif",
4996 "protocol": "file:",
5002 "pathname": "/C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/pix/submit.gif",
5008 "base": "file:///C:/",
5009 "href": "file:///C:/",
5010 "protocol": "file:",
5024 "protocol": "file:",
5034 "# More file URL tests by zcorpan and annevk",
5037 "base": "file:///C:/a/b",
5038 "href": "file:///C:/",
5039 "protocol": "file:",
5051 "base": "file:///C:/a/b",
5052 "href": "file:///d:",
5053 "protocol": "file:",
5065 "base": "file:///C:/a/b",
5066 "href": "file:///d:/",
5067 "protocol": "file:",
5079 "base": "file:///ab:/",
5081 "protocol": "file:",
5093 "base": "file:///1:/",
5095 "protocol": "file:",
5107 "base": "file:///test?test#test",
5108 "href": "file:///test?test",
5109 "protocol": "file:",
5115 "pathname": "/test",
5121 "base": "file:///test?test#test",
5122 "href": "file:///test?test",
5123 "protocol": "file:",
5129 "pathname": "/test",
5135 "base": "file:///test?test#test",
5136 "href": "file:///test?x",
5137 "protocol": "file:",
5143 "pathname": "/test",
5149 "base": "file:///test?test#test",
5150 "href": "file:///test?x",
5151 "protocol": "file:",
5157 "pathname": "/test",
5163 "base": "file:///test?test#test",
5164 "href": "file:///test?test#x",
5165 "protocol": "file:",
5171 "pathname": "/test",
5177 "base": "file:///test?test#test",
5178 "href": "file:///test?test#x",
5179 "protocol": "file:",
5185 "pathname": "/test",
5189 "# File URLs and many (back)slashes",
5191 "input": "file:///localhost//cat",
5192 "base": "about:blank",
5193 "href": "file:///localhost//cat",
5194 "protocol": "file:",
5200 "pathname": "/localhost//cat",
5206 "base": "file://lion/",
5207 "href": "file:///pig",
5208 "protocol": "file:",
5220 "base": "file://ape/",
5222 "protocol": "file:",
5232 "# Windows drive letter handling with the 'file:' base URL",
5235 "base": "file://host/dir/file",
5236 "href": "file:///C:#",
5237 "protocol": "file:",
5249 "base": "file://host/dir/file",
5250 "href": "file:///C:?",
5251 "protocol": "file:",
5263 "base": "file://host/dir/file",
5264 "href": "file:///C:/",
5265 "protocol": "file:",
5277 "base": "file://host/dir/file",
5278 "href": "file:///C:/",
5279 "protocol": "file:",
5291 "base": "file://host/dir/file",
5292 "href": "file:///C:/",
5293 "protocol": "file:",
5305 "base": "file://host/dir/file",
5306 "href": "file://host/dir/C",
5307 "protocol": "file:",
5313 "pathname": "/dir/C",
5319 "base": "file://host/dir/file",
5320 "href": "file://host/dir/C|a",
5321 "protocol": "file:",
5327 "pathname": "/dir/C|a",
5331 "# Windows drive letter quirk in the file slash state",
5333 "input": "/c:/foo/bar",
5334 "base": "file://host/path",
5335 "href": "file:///c:/foo/bar",
5336 "protocol": "file:",
5342 "pathname": "/c:/foo/bar",
5346 "# Windows drive letter quirk (no host)",
5348 "input": "file:/C|/",
5349 "base": "about:blank",
5350 "href": "file:///C:/",
5351 "protocol": "file:",
5362 "input": "file://C|/",
5363 "base": "about:blank",
5364 "href": "file:///C:/",
5365 "protocol": "file:",
5375 "# Windows drive letter quirk with not empty host",
5377 "input": "file://example.net/C:/",
5378 "base": "about:blank",
5379 "href": "file:///C:/",
5380 "protocol": "file:",
5391 "input": "file://1.2.3.4/C:/",
5392 "base": "about:blank",
5393 "href": "file:///C:/",
5394 "protocol": "file:",
5405 "input": "file://[1::8]/C:/",
5406 "base": "about:blank",
5407 "href": "file:///C:/",
5408 "protocol": "file:",
5418 "# file URLs without base URL by Rimas Misevičius",
5421 "base": "about:blank",
5423 "protocol": "file:",
5434 "input": "file:?q=v",
5435 "base": "about:blank",
5436 "href": "file:///?q=v",
5437 "protocol": "file:",
5448 "input": "file:#frag",
5449 "base": "about:blank",
5450 "href": "file:///#frag",
5451 "protocol": "file:",
5463 "input": "http://[1:0::]",
5464 "base": "http://example.net/",
5465 "href": "http://[1::]/",
5466 "origin": "http://[1::]",
5467 "protocol": "http:",
5471 "hostname": "[1::]",
5478 "input": "http://[0:1:2:3:4:5:6:7:8]",
5479 "base": "http://example.net/",
5483 "input": "https://[0::0::0]",
5484 "base": "about:blank",
5488 "input": "https://[0:.0]",
5489 "base": "about:blank",
5493 "input": "https://[0:0:]",
5494 "base": "about:blank",
5498 "input": "https://[0:1:2:3:4:5:6:7.0.0.0.1]",
5499 "base": "about:blank",
5503 "input": "https://[0:1.00.0.0.0]",
5504 "base": "about:blank",
5508 "input": "https://[0:1.290.0.0.0]",
5509 "base": "about:blank",
5513 "input": "https://[0:1.23.23]",
5514 "base": "about:blank",
5519 "input": "http://?",
5520 "base": "about:blank",
5524 "input": "http://#",
5525 "base": "about:blank",
5528 "Port overflow (2^32 + 81)",
5530 "input": "http://f:4294967377/c",
5531 "base": "http://example.org/",
5534 "Port overflow (2^64 + 81)",
5536 "input": "http://f:18446744073709551697/c",
5537 "base": "http://example.org/",
5540 "Port overflow (2^128 + 81)",
5542 "input": "http://f:340282366920938463463374607431768211537/c",
5543 "base": "http://example.org/",
5546 "# Non-special-URL path tests",
5562 "input": "tftp://foobar.com/someconfig;mode=netascii",
5563 "base": "about:blank",
5564 "href": "tftp://foobar.com/someconfig;mode=netascii",
5566 "protocol": "tftp:",
5569 "host": "foobar.com",
5570 "hostname": "foobar.com",
5572 "pathname": "/someconfig;mode=netascii",
5577 "input": "telnet://user:pass@foobar.com:23/",
5578 "base": "about:blank",
5579 "href": "telnet://user:pass@foobar.com:23/",
5581 "protocol": "telnet:",
5584 "host": "foobar.com:23",
5585 "hostname": "foobar.com",
5592 "input": "ut2004://10.10.10.10:7777/Index.ut2",
5593 "base": "about:blank",
5594 "href": "ut2004://10.10.10.10:7777/Index.ut2",
5596 "protocol": "ut2004:",
5599 "host": "10.10.10.10:7777",
5600 "hostname": "10.10.10.10",
5602 "pathname": "/Index.ut2",
5607 "input": "redis://foo:bar@somehost:6379/0?baz=bam&qux=baz",
5608 "base": "about:blank",
5609 "href": "redis://foo:bar@somehost:6379/0?baz=bam&qux=baz",
5611 "protocol": "redis:",
5614 "host": "somehost:6379",
5615 "hostname": "somehost",
5618 "search": "?baz=bam&qux=baz",
5622 "input": "rsync://foo@host:911/sup",
5623 "base": "about:blank",
5624 "href": "rsync://foo@host:911/sup",
5626 "protocol": "rsync:",
5637 "input": "git://github.com/foo/bar.git",
5638 "base": "about:blank",
5639 "href": "git://github.com/foo/bar.git",
5644 "host": "github.com",
5645 "hostname": "github.com",
5647 "pathname": "/foo/bar.git",
5652 "input": "irc://myserver.com:6999/channel?passwd",
5653 "base": "about:blank",
5654 "href": "irc://myserver.com:6999/channel?passwd",
5659 "host": "myserver.com:6999",
5660 "hostname": "myserver.com",
5662 "pathname": "/channel",
5663 "search": "?passwd",
5667 "input": "dns://fw.example.org:9999/foo.bar.org?type=TXT",
5668 "base": "about:blank",
5669 "href": "dns://fw.example.org:9999/foo.bar.org?type=TXT",
5674 "host": "fw.example.org:9999",
5675 "hostname": "fw.example.org",
5677 "pathname": "/foo.bar.org",
5678 "search": "?type=TXT",
5682 "input": "ldap://localhost:389/ou=People,o=JNDITutorial",
5683 "base": "about:blank",
5684 "href": "ldap://localhost:389/ou=People,o=JNDITutorial",
5686 "protocol": "ldap:",
5689 "host": "localhost:389",
5690 "hostname": "localhost",
5692 "pathname": "/ou=People,o=JNDITutorial",
5697 "input": "git+https://github.com/foo/bar",
5698 "base": "about:blank",
5699 "href": "git+https://github.com/foo/bar",
5701 "protocol": "git+https:",
5704 "host": "github.com",
5705 "hostname": "github.com",
5707 "pathname": "/foo/bar",
5712 "input": "urn:ietf:rfc:2648",
5713 "base": "about:blank",
5714 "href": "urn:ietf:rfc:2648",
5722 "pathname": "ietf:rfc:2648",
5727 "input": "tag:joe@example.org,2001:foo/bar",
5728 "base": "about:blank",
5729 "href": "tag:joe@example.org,2001:foo/bar",
5737 "pathname": "joe@example.org,2001:foo/bar",
5741 "# percent encoded hosts in non-special-URLs",
5743 "input": "non-special://%E2%80%A0/",
5744 "base": "about:blank",
5745 "href": "non-special://%E2%80%A0/",
5746 "protocol": "non-special:",
5749 "host": "%E2%80%A0",
5750 "hostname": "%E2%80%A0",
5757 "input": "non-special://H%4fSt/path",
5758 "base": "about:blank",
5759 "href": "non-special://H%4fSt/path",
5760 "protocol": "non-special:",
5764 "hostname": "H%4fSt",
5766 "pathname": "/path",
5770 "# IPv6 in non-special-URLs",
5772 "input": "non-special://[1:2:0:0:5:0:0:0]/",
5773 "base": "about:blank",
5774 "href": "non-special://[1:2:0:0:5::]/",
5775 "protocol": "non-special:",
5778 "host": "[1:2:0:0:5::]",
5779 "hostname": "[1:2:0:0:5::]",
5786 "input": "non-special://[1:2:0:0:0:0:0:3]/",
5787 "base": "about:blank",
5788 "href": "non-special://[1:2::3]/",
5789 "protocol": "non-special:",
5793 "hostname": "[1:2::3]",
5800 "input": "non-special://[1:2::3]:80/",
5801 "base": "about:blank",
5802 "href": "non-special://[1:2::3]:80/",
5803 "protocol": "non-special:",
5806 "host": "[1:2::3]:80",
5807 "hostname": "[1:2::3]",
5814 "input": "non-special://[:80/",
5815 "base": "about:blank",
5819 "input": "blob:https://example.com:443/",
5820 "base": "about:blank",
5821 "href": "blob:https://example.com:443/",
5822 "protocol": "blob:",
5828 "pathname": "https://example.com:443/",
5833 "input": "blob:d3958f5c-0777-0845-9dcf-2cb28783acaf",
5834 "base": "about:blank",
5835 "href": "blob:d3958f5c-0777-0845-9dcf-2cb28783acaf",
5836 "protocol": "blob:",
5842 "pathname": "d3958f5c-0777-0845-9dcf-2cb28783acaf",
5846 "Invalid IPv4 radix digits",
5848 "input": "http://0177.0.0.0189",
5849 "base": "about:blank",
5850 "href": "http://0177.0.0.0189/",
5851 "protocol": "http:",
5854 "host": "0177.0.0.0189",
5855 "hostname": "0177.0.0.0189",
5862 "input": "http://0x7f.0.0.0x7g",
5863 "base": "about:blank",
5864 "href": "http://0x7f.0.0.0x7g/",
5865 "protocol": "http:",
5868 "host": "0x7f.0.0.0x7g",
5869 "hostname": "0x7f.0.0.0x7g",
5876 "input": "http://0X7F.0.0.0X7G",
5877 "base": "about:blank",
5878 "href": "http://0x7f.0.0.0x7g/",
5879 "protocol": "http:",
5882 "host": "0x7f.0.0.0x7g",
5883 "hostname": "0x7f.0.0.0x7g",
5889 "Invalid IPv4 portion of IPv6 address",
5891 "input": "http://[::127.0.0.0.1]",
5892 "base": "about:blank",
5895 "Uncompressed IPv6 addresses with 0",
5897 "input": "http://[0:1:0:1:0:1:0:1]",
5898 "base": "about:blank",
5899 "href": "http://[0:1:0:1:0:1:0:1]/",
5900 "protocol": "http:",
5903 "host": "[0:1:0:1:0:1:0:1]",
5904 "hostname": "[0:1:0:1:0:1:0:1]",
5911 "input": "http://[1:0:1:0:1:0:1:0]",
5912 "base": "about:blank",
5913 "href": "http://[1:0:1:0:1:0:1:0]/",
5914 "protocol": "http:",
5917 "host": "[1:0:1:0:1:0:1:0]",
5918 "hostname": "[1:0:1:0:1:0:1:0]",
5924 "Percent-encoded query and fragment",
5926 "input": "http://example.org/test?\u0022",
5927 "base": "about:blank",
5928 "href": "http://example.org/test?%22",
5929 "protocol": "http:",
5932 "host": "example.org",
5933 "hostname": "example.org",
5935 "pathname": "/test",
5940 "input": "http://example.org/test?\u0023",
5941 "base": "about:blank",
5942 "href": "http://example.org/test?#",
5943 "protocol": "http:",
5946 "host": "example.org",
5947 "hostname": "example.org",
5949 "pathname": "/test",
5954 "input": "http://example.org/test?\u003C",
5955 "base": "about:blank",
5956 "href": "http://example.org/test?%3C",
5957 "protocol": "http:",
5960 "host": "example.org",
5961 "hostname": "example.org",
5963 "pathname": "/test",
5968 "input": "http://example.org/test?\u003E",
5969 "base": "about:blank",
5970 "href": "http://example.org/test?%3E",
5971 "protocol": "http:",
5974 "host": "example.org",
5975 "hostname": "example.org",
5977 "pathname": "/test",
5982 "input": "http://example.org/test?\u2323",
5983 "base": "about:blank",
5984 "href": "http://example.org/test?%E2%8C%A3",
5985 "protocol": "http:",
5988 "host": "example.org",
5989 "hostname": "example.org",
5991 "pathname": "/test",
5992 "search": "?%E2%8C%A3",
5996 "input": "http://example.org/test?%23%23",
5997 "base": "about:blank",
5998 "href": "http://example.org/test?%23%23",
5999 "protocol": "http:",
6002 "host": "example.org",
6003 "hostname": "example.org",
6005 "pathname": "/test",
6006 "search": "?%23%23",
6010 "input": "http://example.org/test?%GH",
6011 "base": "about:blank",
6012 "href": "http://example.org/test?%GH",
6013 "protocol": "http:",
6016 "host": "example.org",
6017 "hostname": "example.org",
6019 "pathname": "/test",
6024 "input": "http://example.org/test?a#%EF",
6025 "base": "about:blank",
6026 "href": "http://example.org/test?a#%EF",
6027 "protocol": "http:",
6030 "host": "example.org",
6031 "hostname": "example.org",
6033 "pathname": "/test",
6038 "input": "http://example.org/test?a#%GH",
6039 "base": "about:blank",
6040 "href": "http://example.org/test?a#%GH",
6041 "protocol": "http:",
6044 "host": "example.org",
6045 "hostname": "example.org",
6047 "pathname": "/test",
6053 "input": "test-a.html",
6058 "input": "test-a-slash.html",
6063 "input": "test-a-slash-slash.html",
6068 "input": "test-a-colon.html",
6073 "input": "test-a-colon-slash.html",
6075 "href": "a:/test-a-colon-slash.html",
6082 "pathname": "/test-a-colon-slash.html",
6087 "input": "test-a-colon-slash-slash.html",
6089 "href": "a:///test-a-colon-slash-slash.html",
6096 "pathname": "/test-a-colon-slash-slash.html",
6101 "input": "test-a-colon-b.html",
6106 "input": "test-a-colon-slash-b.html",
6108 "href": "a:/test-a-colon-slash-b.html",
6115 "pathname": "/test-a-colon-slash-b.html",
6120 "input": "test-a-colon-slash-slash-b.html",
6122 "href": "a://b/test-a-colon-slash-slash-b.html",
6129 "pathname": "/test-a-colon-slash-slash-b.html",
6133 "Null code point in fragment",
6135 "input": "http://example.org/test?a#b\u0000c",
6136 "base": "about:blank",
6137 "href": "http://example.org/test?a#bc",
6138 "protocol": "http:",
6141 "host": "example.org",
6142 "hostname": "example.org",
6144 "pathname": "/test",