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