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