1{ 2 "tests": [ 3 { 4 "fragmentContext": null, 5 "description": "Test", 6 "input": "Test", 7 "output": [ 8 [ 9 "Character", 10 "Test" 11 ] 12 ] 13 }, 14 { 15 "fragmentContext": null, 16 "description": "<div></div>", 17 "input": "<div></div>", 18 "output": [ 19 [ 20 "StartTag", 21 "div", 22 {} 23 ], 24 [ 25 "EndTag", 26 "div" 27 ] 28 ] 29 }, 30 { 31 "fragmentContext": null, 32 "description": "<div>Test</div>", 33 "input": "<div>Test</div>", 34 "output": [ 35 [ 36 "StartTag", 37 "div", 38 {} 39 ], 40 [ 41 "Character", 42 "Test" 43 ], 44 [ 45 "EndTag", 46 "div" 47 ] 48 ] 49 }, 50 { 51 "fragmentContext": null, 52 "description": "<di", 53 "input": "<di", 54 "output": [] 55 }, 56 { 57 "fragmentContext": null, 58 "description": "<div>Hello</div>\\n<script>\\nconsole.log(\"PASS\");\\n</script>\\n<div>Bye</div>", 59 "input": "<div>Hello</div>\n<script>\nconsole.log(\"PASS\");\n</script>\n<div>Bye</div>", 60 "output": [ 61 [ 62 "StartTag", 63 "div", 64 {} 65 ], 66 [ 67 "Character", 68 "Hello" 69 ], 70 [ 71 "EndTag", 72 "div" 73 ], 74 [ 75 "Character", 76 "\n" 77 ], 78 [ 79 "StartTag", 80 "script", 81 {} 82 ], 83 [ 84 "Character", 85 "\nconsole.log(\"PASS\");\n" 86 ], 87 [ 88 "EndTag", 89 "script" 90 ], 91 [ 92 "Character", 93 "\n" 94 ], 95 [ 96 "StartTag", 97 "div", 98 {} 99 ], 100 [ 101 "Character", 102 "Bye" 103 ], 104 [ 105 "EndTag", 106 "div" 107 ] 108 ] 109 }, 110 { 111 "fragmentContext": null, 112 "description": "<div foo=\"bar\">Hello</div>", 113 "input": "<div foo=\"bar\">Hello</div>", 114 "output": [ 115 [ 116 "StartTag", 117 "div", 118 { 119 "foo": "bar" 120 } 121 ], 122 [ 123 "Character", 124 "Hello" 125 ], 126 [ 127 "EndTag", 128 "div" 129 ] 130 ] 131 }, 132 { 133 "fragmentContext": null, 134 "description": "<div>Hello</div>\\n<script>\\nconsole.log(\"FOO<span>BAR</span>BAZ\");\\n</script>\\n<div>Bye</div>", 135 "input": "<div>Hello</div>\n<script>\nconsole.log(\"FOO<span>BAR</span>BAZ\");\n</script>\n<div>Bye</div>", 136 "output": [ 137 [ 138 "StartTag", 139 "div", 140 {} 141 ], 142 [ 143 "Character", 144 "Hello" 145 ], 146 [ 147 "EndTag", 148 "div" 149 ], 150 [ 151 "Character", 152 "\n" 153 ], 154 [ 155 "StartTag", 156 "script", 157 {} 158 ], 159 [ 160 "Character", 161 "\nconsole.log(\"FOO<span>BAR</span>BAZ\");\n" 162 ], 163 [ 164 "EndTag", 165 "script" 166 ], 167 [ 168 "Character", 169 "\n" 170 ], 171 [ 172 "StartTag", 173 "div", 174 {} 175 ], 176 [ 177 "Character", 178 "Bye" 179 ], 180 [ 181 "EndTag", 182 "div" 183 ] 184 ] 185 }, 186 { 187 "fragmentContext": null, 188 "description": "<foo bar=\"baz\"></foo><potato quack=\"duck\"></potato>", 189 "input": "<foo bar=\"baz\"></foo><potato quack=\"duck\"></potato>", 190 "output": [ 191 [ 192 "StartTag", 193 "foo", 194 { 195 "bar": "baz" 196 } 197 ], 198 [ 199 "EndTag", 200 "foo" 201 ], 202 [ 203 "StartTag", 204 "potato", 205 { 206 "quack": "duck" 207 } 208 ], 209 [ 210 "EndTag", 211 "potato" 212 ] 213 ] 214 }, 215 { 216 "fragmentContext": null, 217 "description": "<foo bar=\"baz\"><potato quack=\"duck\"></potato></foo>", 218 "input": "<foo bar=\"baz\"><potato quack=\"duck\"></potato></foo>", 219 "output": [ 220 [ 221 "StartTag", 222 "foo", 223 { 224 "bar": "baz" 225 } 226 ], 227 [ 228 "StartTag", 229 "potato", 230 { 231 "quack": "duck" 232 } 233 ], 234 [ 235 "EndTag", 236 "potato" 237 ], 238 [ 239 "EndTag", 240 "foo" 241 ] 242 ] 243 }, 244 { 245 "fragmentContext": null, 246 "description": "<foo></foo bar=\"baz\"><potato></potato quack=\"duck\">", 247 "input": "<foo></foo bar=\"baz\"><potato></potato quack=\"duck\">", 248 "output": [ 249 [ 250 "StartTag", 251 "foo", 252 {} 253 ], 254 [ 255 "EndTag", 256 "foo" 257 ], 258 [ 259 "StartTag", 260 "potato", 261 {} 262 ], 263 [ 264 "EndTag", 265 "potato" 266 ] 267 ] 268 }, 269 { 270 "fragmentContext": null, 271 "description": "</ tttt>", 272 "input": "</ tttt>", 273 "output": [ 274 [ 275 "Comment", 276 " tttt" 277 ] 278 ] 279 }, 280 { 281 "fragmentContext": null, 282 "description": "<div FOO ><img><img></div>", 283 "input": "<div FOO ><img><img></div>", 284 "output": [ 285 [ 286 "StartTag", 287 "div", 288 { 289 "foo": "" 290 } 291 ], 292 [ 293 "StartTag", 294 "img", 295 {} 296 ], 297 [ 298 "StartTag", 299 "img", 300 {} 301 ], 302 [ 303 "EndTag", 304 "div" 305 ] 306 ] 307 }, 308 { 309 "fragmentContext": null, 310 "description": "<p>Test</p<p>Test2</p>", 311 "input": "<p>Test</p<p>Test2</p>", 312 "output": [ 313 [ 314 "StartTag", 315 "p", 316 {} 317 ], 318 [ 319 "Character", 320 "Test" 321 ], 322 [ 323 "EndTag", 324 "p<p" 325 ], 326 [ 327 "Character", 328 "Test2" 329 ], 330 [ 331 "EndTag", 332 "p" 333 ] 334 ] 335 }, 336 { 337 "fragmentContext": null, 338 "description": "<rdar://problem/6869687>", 339 "input": "<rdar://problem/6869687>", 340 "output": [ 341 [ 342 "StartTag", 343 "rdar:", 344 { 345 "6869687": "", 346 "problem": "" 347 } 348 ] 349 ] 350 }, 351 { 352 "fragmentContext": null, 353 "description": "<A>test< /A>", 354 "input": "<A>test< /A>", 355 "output": [ 356 [ 357 "StartTag", 358 "a", 359 {} 360 ], 361 [ 362 "Character", 363 "test< /A>" 364 ] 365 ] 366 }, 367 { 368 "fragmentContext": null, 369 "description": "<", 370 "input": "<", 371 "output": [ 372 [ 373 "Character", 374 "<" 375 ] 376 ] 377 }, 378 { 379 "fragmentContext": null, 380 "description": "<body foo='bar'><body foo='baz' yo='mama'>", 381 "input": "<body foo='bar'><body foo='baz' yo='mama'>", 382 "output": [ 383 [ 384 "StartTag", 385 "body", 386 { 387 "foo": "bar" 388 } 389 ], 390 [ 391 "StartTag", 392 "body", 393 { 394 "foo": "baz", 395 "yo": "mama" 396 } 397 ] 398 ] 399 }, 400 { 401 "fragmentContext": null, 402 "description": "<body></br foo=\"bar\"></body>", 403 "input": "<body></br foo=\"bar\"></body>", 404 "output": [ 405 [ 406 "StartTag", 407 "body", 408 {} 409 ], 410 [ 411 "EndTag", 412 "br" 413 ], 414 [ 415 "EndTag", 416 "body" 417 ] 418 ] 419 }, 420 { 421 "fragmentContext": null, 422 "description": "<bdy><br foo=\"bar\"></body>", 423 "input": "<bdy><br foo=\"bar\"></body>", 424 "output": [ 425 [ 426 "StartTag", 427 "bdy", 428 {} 429 ], 430 [ 431 "StartTag", 432 "br", 433 { 434 "foo": "bar" 435 } 436 ], 437 [ 438 "EndTag", 439 "body" 440 ] 441 ] 442 }, 443 { 444 "fragmentContext": null, 445 "description": "<body></body></br foo=\"bar\">", 446 "input": "<body></body></br foo=\"bar\">", 447 "output": [ 448 [ 449 "StartTag", 450 "body", 451 {} 452 ], 453 [ 454 "EndTag", 455 "body" 456 ], 457 [ 458 "EndTag", 459 "br" 460 ] 461 ] 462 }, 463 { 464 "fragmentContext": null, 465 "description": "<bdy></body><br foo=\"bar\">", 466 "input": "<bdy></body><br foo=\"bar\">", 467 "output": [ 468 [ 469 "StartTag", 470 "bdy", 471 {} 472 ], 473 [ 474 "EndTag", 475 "body" 476 ], 477 [ 478 "StartTag", 479 "br", 480 { 481 "foo": "bar" 482 } 483 ] 484 ] 485 }, 486 { 487 "fragmentContext": null, 488 "description": "<html><body></body></html><!-- Hi there -->", 489 "input": "<html><body></body></html><!-- Hi there -->", 490 "output": [ 491 [ 492 "StartTag", 493 "html", 494 {} 495 ], 496 [ 497 "StartTag", 498 "body", 499 {} 500 ], 501 [ 502 "EndTag", 503 "body" 504 ], 505 [ 506 "EndTag", 507 "html" 508 ], 509 [ 510 "Comment", 511 " Hi there " 512 ] 513 ] 514 }, 515 { 516 "fragmentContext": null, 517 "description": "<html><body></body></html><!-- Comment A --><!-- Comment B --><!-- Comment C --><!-- Comment D --><!-- Comment E -->", 518 "input": "<html><body></body></html><!-- Comment A --><!-- Comment B --><!-- Comment C --><!-- Comment D --><!-- Comment E -->", 519 "output": [ 520 [ 521 "StartTag", 522 "html", 523 {} 524 ], 525 [ 526 "StartTag", 527 "body", 528 {} 529 ], 530 [ 531 "EndTag", 532 "body" 533 ], 534 [ 535 "EndTag", 536 "html" 537 ], 538 [ 539 "Comment", 540 " Comment A " 541 ], 542 [ 543 "Comment", 544 " Comment B " 545 ], 546 [ 547 "Comment", 548 " Comment C " 549 ], 550 [ 551 "Comment", 552 " Comment D " 553 ], 554 [ 555 "Comment", 556 " Comment E " 557 ] 558 ] 559 }, 560 { 561 "fragmentContext": null, 562 "description": "<html><body></body></html>x<!-- Hi there -->", 563 "input": "<html><body></body></html>x<!-- Hi there -->", 564 "output": [ 565 [ 566 "StartTag", 567 "html", 568 {} 569 ], 570 [ 571 "StartTag", 572 "body", 573 {} 574 ], 575 [ 576 "EndTag", 577 "body" 578 ], 579 [ 580 "EndTag", 581 "html" 582 ], 583 [ 584 "Character", 585 "x" 586 ], 587 [ 588 "Comment", 589 " Hi there " 590 ] 591 ] 592 }, 593 { 594 "fragmentContext": null, 595 "description": "<html><body></body></html>x<!-- Hi there --></html><!-- Again -->", 596 "input": "<html><body></body></html>x<!-- Hi there --></html><!-- Again -->", 597 "output": [ 598 [ 599 "StartTag", 600 "html", 601 {} 602 ], 603 [ 604 "StartTag", 605 "body", 606 {} 607 ], 608 [ 609 "EndTag", 610 "body" 611 ], 612 [ 613 "EndTag", 614 "html" 615 ], 616 [ 617 "Character", 618 "x" 619 ], 620 [ 621 "Comment", 622 " Hi there " 623 ], 624 [ 625 "EndTag", 626 "html" 627 ], 628 [ 629 "Comment", 630 " Again " 631 ] 632 ] 633 }, 634 { 635 "fragmentContext": null, 636 "description": "<html><body></body></html>x<!-- Hi there --></body></html><!-- Again -->", 637 "input": "<html><body></body></html>x<!-- Hi there --></body></html><!-- Again -->", 638 "output": [ 639 [ 640 "StartTag", 641 "html", 642 {} 643 ], 644 [ 645 "StartTag", 646 "body", 647 {} 648 ], 649 [ 650 "EndTag", 651 "body" 652 ], 653 [ 654 "EndTag", 655 "html" 656 ], 657 [ 658 "Character", 659 "x" 660 ], 661 [ 662 "Comment", 663 " Hi there " 664 ], 665 [ 666 "EndTag", 667 "body" 668 ], 669 [ 670 "EndTag", 671 "html" 672 ], 673 [ 674 "Comment", 675 " Again " 676 ] 677 ] 678 }, 679 { 680 "fragmentContext": null, 681 "description": "<html><body><ruby><div><rp>xx</rp></div></ruby></body></html>", 682 "input": "<html><body><ruby><div><rp>xx</rp></div></ruby></body></html>", 683 "output": [ 684 [ 685 "StartTag", 686 "html", 687 {} 688 ], 689 [ 690 "StartTag", 691 "body", 692 {} 693 ], 694 [ 695 "StartTag", 696 "ruby", 697 {} 698 ], 699 [ 700 "StartTag", 701 "div", 702 {} 703 ], 704 [ 705 "StartTag", 706 "rp", 707 {} 708 ], 709 [ 710 "Character", 711 "xx" 712 ], 713 [ 714 "EndTag", 715 "rp" 716 ], 717 [ 718 "EndTag", 719 "div" 720 ], 721 [ 722 "EndTag", 723 "ruby" 724 ], 725 [ 726 "EndTag", 727 "body" 728 ], 729 [ 730 "EndTag", 731 "html" 732 ] 733 ] 734 }, 735 { 736 "fragmentContext": null, 737 "description": "<html><body><ruby><div><rt>xx</rt></div></ruby></body></html>", 738 "input": "<html><body><ruby><div><rt>xx</rt></div></ruby></body></html>", 739 "output": [ 740 [ 741 "StartTag", 742 "html", 743 {} 744 ], 745 [ 746 "StartTag", 747 "body", 748 {} 749 ], 750 [ 751 "StartTag", 752 "ruby", 753 {} 754 ], 755 [ 756 "StartTag", 757 "div", 758 {} 759 ], 760 [ 761 "StartTag", 762 "rt", 763 {} 764 ], 765 [ 766 "Character", 767 "xx" 768 ], 769 [ 770 "EndTag", 771 "rt" 772 ], 773 [ 774 "EndTag", 775 "div" 776 ], 777 [ 778 "EndTag", 779 "ruby" 780 ], 781 [ 782 "EndTag", 783 "body" 784 ], 785 [ 786 "EndTag", 787 "html" 788 ] 789 ] 790 }, 791 { 792 "fragmentContext": null, 793 "description": "<html><frameset><!--1--><noframes>A</noframes><!--2--></frameset><!--3--><noframes>B</noframes><!--4--></html><!--5--><noframes>C</noframes><!--6-->", 794 "input": "<html><frameset><!--1--><noframes>A</noframes><!--2--></frameset><!--3--><noframes>B</noframes><!--4--></html><!--5--><noframes>C</noframes><!--6-->", 795 "output": [ 796 [ 797 "StartTag", 798 "html", 799 {} 800 ], 801 [ 802 "StartTag", 803 "frameset", 804 {} 805 ], 806 [ 807 "Comment", 808 "1" 809 ], 810 [ 811 "StartTag", 812 "noframes", 813 {} 814 ], 815 [ 816 "Character", 817 "A" 818 ], 819 [ 820 "EndTag", 821 "noframes" 822 ], 823 [ 824 "Comment", 825 "2" 826 ], 827 [ 828 "EndTag", 829 "frameset" 830 ], 831 [ 832 "Comment", 833 "3" 834 ], 835 [ 836 "StartTag", 837 "noframes", 838 {} 839 ], 840 [ 841 "Character", 842 "B" 843 ], 844 [ 845 "EndTag", 846 "noframes" 847 ], 848 [ 849 "Comment", 850 "4" 851 ], 852 [ 853 "EndTag", 854 "html" 855 ], 856 [ 857 "Comment", 858 "5" 859 ], 860 [ 861 "StartTag", 862 "noframes", 863 {} 864 ], 865 [ 866 "Character", 867 "C" 868 ], 869 [ 870 "EndTag", 871 "noframes" 872 ], 873 [ 874 "Comment", 875 "6" 876 ] 877 ] 878 }, 879 { 880 "fragmentContext": null, 881 "description": "<select><option>A<select><option>B<select><option>C<select><option>D<select><option>E<select><option>F<select><option>G<select>", 882 "input": "<select><option>A<select><option>B<select><option>C<select><option>D<select><option>E<select><option>F<select><option>G<select>", 883 "output": [ 884 [ 885 "StartTag", 886 "select", 887 {} 888 ], 889 [ 890 "StartTag", 891 "option", 892 {} 893 ], 894 [ 895 "Character", 896 "A" 897 ], 898 [ 899 "StartTag", 900 "select", 901 {} 902 ], 903 [ 904 "StartTag", 905 "option", 906 {} 907 ], 908 [ 909 "Character", 910 "B" 911 ], 912 [ 913 "StartTag", 914 "select", 915 {} 916 ], 917 [ 918 "StartTag", 919 "option", 920 {} 921 ], 922 [ 923 "Character", 924 "C" 925 ], 926 [ 927 "StartTag", 928 "select", 929 {} 930 ], 931 [ 932 "StartTag", 933 "option", 934 {} 935 ], 936 [ 937 "Character", 938 "D" 939 ], 940 [ 941 "StartTag", 942 "select", 943 {} 944 ], 945 [ 946 "StartTag", 947 "option", 948 {} 949 ], 950 [ 951 "Character", 952 "E" 953 ], 954 [ 955 "StartTag", 956 "select", 957 {} 958 ], 959 [ 960 "StartTag", 961 "option", 962 {} 963 ], 964 [ 965 "Character", 966 "F" 967 ], 968 [ 969 "StartTag", 970 "select", 971 {} 972 ], 973 [ 974 "StartTag", 975 "option", 976 {} 977 ], 978 [ 979 "Character", 980 "G" 981 ], 982 [ 983 "StartTag", 984 "select", 985 {} 986 ] 987 ] 988 }, 989 { 990 "fragmentContext": null, 991 "description": "<dd><dd><dt><dt><dd><li><li>", 992 "input": "<dd><dd><dt><dt><dd><li><li>", 993 "output": [ 994 [ 995 "StartTag", 996 "dd", 997 {} 998 ], 999 [ 1000 "StartTag", 1001 "dd", 1002 {} 1003 ], 1004 [ 1005 "StartTag", 1006 "dt", 1007 {} 1008 ], 1009 [ 1010 "StartTag", 1011 "dt", 1012 {} 1013 ], 1014 [ 1015 "StartTag", 1016 "dd", 1017 {} 1018 ], 1019 [ 1020 "StartTag", 1021 "li", 1022 {} 1023 ], 1024 [ 1025 "StartTag", 1026 "li", 1027 {} 1028 ] 1029 ] 1030 }, 1031 { 1032 "fragmentContext": null, 1033 "description": "<div><b></div><div><nobr>a<nobr>", 1034 "input": "<div><b></div><div><nobr>a<nobr>", 1035 "output": [ 1036 [ 1037 "StartTag", 1038 "div", 1039 {} 1040 ], 1041 [ 1042 "StartTag", 1043 "b", 1044 {} 1045 ], 1046 [ 1047 "EndTag", 1048 "div" 1049 ], 1050 [ 1051 "StartTag", 1052 "div", 1053 {} 1054 ], 1055 [ 1056 "StartTag", 1057 "nobr", 1058 {} 1059 ], 1060 [ 1061 "Character", 1062 "a" 1063 ], 1064 [ 1065 "StartTag", 1066 "nobr", 1067 {} 1068 ] 1069 ] 1070 }, 1071 { 1072 "fragmentContext": null, 1073 "description": "<head></head>\\n<body></body>", 1074 "input": "<head></head>\n<body></body>", 1075 "output": [ 1076 [ 1077 "StartTag", 1078 "head", 1079 {} 1080 ], 1081 [ 1082 "EndTag", 1083 "head" 1084 ], 1085 [ 1086 "Character", 1087 "\n" 1088 ], 1089 [ 1090 "StartTag", 1091 "body", 1092 {} 1093 ], 1094 [ 1095 "EndTag", 1096 "body" 1097 ] 1098 ] 1099 }, 1100 { 1101 "fragmentContext": null, 1102 "description": "<head></head> <style></style>ddd", 1103 "input": "<head></head> <style></style>ddd", 1104 "output": [ 1105 [ 1106 "StartTag", 1107 "head", 1108 {} 1109 ], 1110 [ 1111 "EndTag", 1112 "head" 1113 ], 1114 [ 1115 "Character", 1116 " " 1117 ], 1118 [ 1119 "StartTag", 1120 "style", 1121 {} 1122 ], 1123 [ 1124 "EndTag", 1125 "style" 1126 ], 1127 [ 1128 "Character", 1129 "ddd" 1130 ] 1131 ] 1132 }, 1133 { 1134 "fragmentContext": null, 1135 "description": "<kbd><table></kbd><col><select><tr>", 1136 "input": "<kbd><table></kbd><col><select><tr>", 1137 "output": [ 1138 [ 1139 "StartTag", 1140 "kbd", 1141 {} 1142 ], 1143 [ 1144 "StartTag", 1145 "table", 1146 {} 1147 ], 1148 [ 1149 "EndTag", 1150 "kbd" 1151 ], 1152 [ 1153 "StartTag", 1154 "col", 1155 {} 1156 ], 1157 [ 1158 "StartTag", 1159 "select", 1160 {} 1161 ], 1162 [ 1163 "StartTag", 1164 "tr", 1165 {} 1166 ] 1167 ] 1168 }, 1169 { 1170 "fragmentContext": null, 1171 "description": "<kbd><table></kbd><col><select><tr></table><div>", 1172 "input": "<kbd><table></kbd><col><select><tr></table><div>", 1173 "output": [ 1174 [ 1175 "StartTag", 1176 "kbd", 1177 {} 1178 ], 1179 [ 1180 "StartTag", 1181 "table", 1182 {} 1183 ], 1184 [ 1185 "EndTag", 1186 "kbd" 1187 ], 1188 [ 1189 "StartTag", 1190 "col", 1191 {} 1192 ], 1193 [ 1194 "StartTag", 1195 "select", 1196 {} 1197 ], 1198 [ 1199 "StartTag", 1200 "tr", 1201 {} 1202 ], 1203 [ 1204 "EndTag", 1205 "table" 1206 ], 1207 [ 1208 "StartTag", 1209 "div", 1210 {} 1211 ] 1212 ] 1213 }, 1214 { 1215 "fragmentContext": null, 1216 "description": "<a><li><style></style><title></title></a>", 1217 "input": "<a><li><style></style><title></title></a>", 1218 "output": [ 1219 [ 1220 "StartTag", 1221 "a", 1222 {} 1223 ], 1224 [ 1225 "StartTag", 1226 "li", 1227 {} 1228 ], 1229 [ 1230 "StartTag", 1231 "style", 1232 {} 1233 ], 1234 [ 1235 "EndTag", 1236 "style" 1237 ], 1238 [ 1239 "StartTag", 1240 "title", 1241 {} 1242 ], 1243 [ 1244 "EndTag", 1245 "title" 1246 ], 1247 [ 1248 "EndTag", 1249 "a" 1250 ] 1251 ] 1252 }, 1253 { 1254 "fragmentContext": null, 1255 "description": "<font></p><p><meta><title></title></font>", 1256 "input": "<font></p><p><meta><title></title></font>", 1257 "output": [ 1258 [ 1259 "StartTag", 1260 "font", 1261 {} 1262 ], 1263 [ 1264 "EndTag", 1265 "p" 1266 ], 1267 [ 1268 "StartTag", 1269 "p", 1270 {} 1271 ], 1272 [ 1273 "StartTag", 1274 "meta", 1275 {} 1276 ], 1277 [ 1278 "StartTag", 1279 "title", 1280 {} 1281 ], 1282 [ 1283 "EndTag", 1284 "title" 1285 ], 1286 [ 1287 "EndTag", 1288 "font" 1289 ] 1290 ] 1291 }, 1292 { 1293 "fragmentContext": null, 1294 "description": "<a><center><title></title><a>", 1295 "input": "<a><center><title></title><a>", 1296 "output": [ 1297 [ 1298 "StartTag", 1299 "a", 1300 {} 1301 ], 1302 [ 1303 "StartTag", 1304 "center", 1305 {} 1306 ], 1307 [ 1308 "StartTag", 1309 "title", 1310 {} 1311 ], 1312 [ 1313 "EndTag", 1314 "title" 1315 ], 1316 [ 1317 "StartTag", 1318 "a", 1319 {} 1320 ] 1321 ] 1322 }, 1323 { 1324 "fragmentContext": null, 1325 "description": "<svg><title><div>", 1326 "input": "<svg><title><div>", 1327 "output": [ 1328 [ 1329 "StartTag", 1330 "svg", 1331 {} 1332 ], 1333 [ 1334 "StartTag", 1335 "title", 1336 {} 1337 ], 1338 [ 1339 "StartTag", 1340 "div", 1341 {} 1342 ] 1343 ] 1344 }, 1345 { 1346 "fragmentContext": null, 1347 "description": "<svg><title><rect><div>", 1348 "input": "<svg><title><rect><div>", 1349 "output": [ 1350 [ 1351 "StartTag", 1352 "svg", 1353 {} 1354 ], 1355 [ 1356 "StartTag", 1357 "title", 1358 {} 1359 ], 1360 [ 1361 "StartTag", 1362 "rect", 1363 {} 1364 ], 1365 [ 1366 "StartTag", 1367 "div", 1368 {} 1369 ] 1370 ] 1371 }, 1372 { 1373 "fragmentContext": null, 1374 "description": "<svg><title><svg><div>", 1375 "input": "<svg><title><svg><div>", 1376 "output": [ 1377 [ 1378 "StartTag", 1379 "svg", 1380 {} 1381 ], 1382 [ 1383 "StartTag", 1384 "title", 1385 {} 1386 ], 1387 [ 1388 "StartTag", 1389 "svg", 1390 {} 1391 ], 1392 [ 1393 "StartTag", 1394 "div", 1395 {} 1396 ] 1397 ] 1398 }, 1399 { 1400 "fragmentContext": null, 1401 "description": "<img <=\"\" FAIL>", 1402 "input": "<img <=\"\" FAIL>", 1403 "output": [ 1404 [ 1405 "StartTag", 1406 "img", 1407 { 1408 "<": "", 1409 "fail": "" 1410 } 1411 ] 1412 ] 1413 }, 1414 { 1415 "fragmentContext": null, 1416 "description": "<ul><li><div id='foo'/>A</li><li>B<div>C</div></li></ul>", 1417 "input": "<ul><li><div id='foo'/>A</li><li>B<div>C</div></li></ul>", 1418 "output": [ 1419 [ 1420 "StartTag", 1421 "ul", 1422 {} 1423 ], 1424 [ 1425 "StartTag", 1426 "li", 1427 {} 1428 ], 1429 [ 1430 "StartTag", 1431 "div", 1432 { 1433 "id": "foo" 1434 }, 1435 true 1436 ], 1437 [ 1438 "Character", 1439 "A" 1440 ], 1441 [ 1442 "EndTag", 1443 "li" 1444 ], 1445 [ 1446 "StartTag", 1447 "li", 1448 {} 1449 ], 1450 [ 1451 "Character", 1452 "B" 1453 ], 1454 [ 1455 "StartTag", 1456 "div", 1457 {} 1458 ], 1459 [ 1460 "Character", 1461 "C" 1462 ], 1463 [ 1464 "EndTag", 1465 "div" 1466 ], 1467 [ 1468 "EndTag", 1469 "li" 1470 ], 1471 [ 1472 "EndTag", 1473 "ul" 1474 ] 1475 ] 1476 }, 1477 { 1478 "fragmentContext": null, 1479 "description": "<svg><em><desc></em>", 1480 "input": "<svg><em><desc></em>", 1481 "output": [ 1482 [ 1483 "StartTag", 1484 "svg", 1485 {} 1486 ], 1487 [ 1488 "StartTag", 1489 "em", 1490 {} 1491 ], 1492 [ 1493 "StartTag", 1494 "desc", 1495 {} 1496 ], 1497 [ 1498 "EndTag", 1499 "em" 1500 ] 1501 ] 1502 }, 1503 { 1504 "fragmentContext": null, 1505 "description": "<table><tr><td><svg><desc><td></desc><circle>", 1506 "input": "<table><tr><td><svg><desc><td></desc><circle>", 1507 "output": [ 1508 [ 1509 "StartTag", 1510 "table", 1511 {} 1512 ], 1513 [ 1514 "StartTag", 1515 "tr", 1516 {} 1517 ], 1518 [ 1519 "StartTag", 1520 "td", 1521 {} 1522 ], 1523 [ 1524 "StartTag", 1525 "svg", 1526 {} 1527 ], 1528 [ 1529 "StartTag", 1530 "desc", 1531 {} 1532 ], 1533 [ 1534 "StartTag", 1535 "td", 1536 {} 1537 ], 1538 [ 1539 "EndTag", 1540 "desc" 1541 ], 1542 [ 1543 "StartTag", 1544 "circle", 1545 {} 1546 ] 1547 ] 1548 }, 1549 { 1550 "fragmentContext": null, 1551 "description": "<svg><tfoot></mi><td>", 1552 "input": "<svg><tfoot></mi><td>", 1553 "output": [ 1554 [ 1555 "StartTag", 1556 "svg", 1557 {} 1558 ], 1559 [ 1560 "StartTag", 1561 "tfoot", 1562 {} 1563 ], 1564 [ 1565 "EndTag", 1566 "mi" 1567 ], 1568 [ 1569 "StartTag", 1570 "td", 1571 {} 1572 ] 1573 ] 1574 }, 1575 { 1576 "fragmentContext": null, 1577 "description": "<math><mrow><mrow><mn>1</mn></mrow><mi>a</mi></mrow></math>", 1578 "input": "<math><mrow><mrow><mn>1</mn></mrow><mi>a</mi></mrow></math>", 1579 "output": [ 1580 [ 1581 "StartTag", 1582 "math", 1583 {} 1584 ], 1585 [ 1586 "StartTag", 1587 "mrow", 1588 {} 1589 ], 1590 [ 1591 "StartTag", 1592 "mrow", 1593 {} 1594 ], 1595 [ 1596 "StartTag", 1597 "mn", 1598 {} 1599 ], 1600 [ 1601 "Character", 1602 "1" 1603 ], 1604 [ 1605 "EndTag", 1606 "mn" 1607 ], 1608 [ 1609 "EndTag", 1610 "mrow" 1611 ], 1612 [ 1613 "StartTag", 1614 "mi", 1615 {} 1616 ], 1617 [ 1618 "Character", 1619 "a" 1620 ], 1621 [ 1622 "EndTag", 1623 "mi" 1624 ], 1625 [ 1626 "EndTag", 1627 "mrow" 1628 ], 1629 [ 1630 "EndTag", 1631 "math" 1632 ] 1633 ] 1634 }, 1635 { 1636 "fragmentContext": null, 1637 "description": "<!doctype html><input type=\"hidden\"><frameset>", 1638 "input": "<!doctype html><input type=\"hidden\"><frameset>", 1639 "output": [ 1640 [ 1641 "DOCTYPE", 1642 "html", 1643 null, 1644 null, 1645 true 1646 ], 1647 [ 1648 "StartTag", 1649 "input", 1650 { 1651 "type": "hidden" 1652 } 1653 ], 1654 [ 1655 "StartTag", 1656 "frameset", 1657 {} 1658 ] 1659 ] 1660 }, 1661 { 1662 "fragmentContext": null, 1663 "description": "<!doctype html><input type=\"button\"><frameset>", 1664 "input": "<!doctype html><input type=\"button\"><frameset>", 1665 "output": [ 1666 [ 1667 "DOCTYPE", 1668 "html", 1669 null, 1670 null, 1671 true 1672 ], 1673 [ 1674 "StartTag", 1675 "input", 1676 { 1677 "type": "button" 1678 } 1679 ], 1680 [ 1681 "StartTag", 1682 "frameset", 1683 {} 1684 ] 1685 ] 1686 } 1687 ] 1688}