• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2    "tests": [
3        {
4            "fragmentContext": null,
5            "description": "<plaintext></plaintext>",
6            "input": "<plaintext></plaintext>",
7            "output": [
8                [
9                    "StartTag",
10                    "plaintext",
11                    {}
12                ],
13                [
14                    "Character",
15                    "</plaintext>"
16                ]
17            ]
18        },
19        {
20            "fragmentContext": null,
21            "description": "<!doctype html><plaintext></plaintext>",
22            "input": "<!doctype html><plaintext></plaintext>",
23            "output": [
24                [
25                    "DOCTYPE",
26                    "html",
27                    null,
28                    null,
29                    true
30                ],
31                [
32                    "StartTag",
33                    "plaintext",
34                    {}
35                ],
36                [
37                    "Character",
38                    "</plaintext>"
39                ]
40            ]
41        },
42        {
43            "fragmentContext": null,
44            "description": "<!doctype html><html><plaintext></plaintext>",
45            "input": "<!doctype html><html><plaintext></plaintext>",
46            "output": [
47                [
48                    "DOCTYPE",
49                    "html",
50                    null,
51                    null,
52                    true
53                ],
54                [
55                    "StartTag",
56                    "html",
57                    {}
58                ],
59                [
60                    "StartTag",
61                    "plaintext",
62                    {}
63                ],
64                [
65                    "Character",
66                    "</plaintext>"
67                ]
68            ]
69        },
70        {
71            "fragmentContext": null,
72            "description": "<!doctype html><head><plaintext></plaintext>",
73            "input": "<!doctype html><head><plaintext></plaintext>",
74            "output": [
75                [
76                    "DOCTYPE",
77                    "html",
78                    null,
79                    null,
80                    true
81                ],
82                [
83                    "StartTag",
84                    "head",
85                    {}
86                ],
87                [
88                    "StartTag",
89                    "plaintext",
90                    {}
91                ],
92                [
93                    "Character",
94                    "</plaintext>"
95                ]
96            ]
97        },
98        {
99            "fragmentContext": null,
100            "description": "<!doctype html><html><noscript><plaintext></plaintext>",
101            "input": "<!doctype html><html><noscript><plaintext></plaintext>",
102            "output": [
103                [
104                    "DOCTYPE",
105                    "html",
106                    null,
107                    null,
108                    true
109                ],
110                [
111                    "StartTag",
112                    "html",
113                    {}
114                ],
115                [
116                    "StartTag",
117                    "noscript",
118                    {}
119                ],
120                [
121                    "Character",
122                    "<plaintext></plaintext>"
123                ]
124            ]
125        },
126        {
127            "fragmentContext": null,
128            "description": "<!doctype html></head><plaintext></plaintext>",
129            "input": "<!doctype html></head><plaintext></plaintext>",
130            "output": [
131                [
132                    "DOCTYPE",
133                    "html",
134                    null,
135                    null,
136                    true
137                ],
138                [
139                    "EndTag",
140                    "head"
141                ],
142                [
143                    "StartTag",
144                    "plaintext",
145                    {}
146                ],
147                [
148                    "Character",
149                    "</plaintext>"
150                ]
151            ]
152        },
153        {
154            "fragmentContext": null,
155            "description": "<!doctype html><body><plaintext></plaintext>",
156            "input": "<!doctype html><body><plaintext></plaintext>",
157            "output": [
158                [
159                    "DOCTYPE",
160                    "html",
161                    null,
162                    null,
163                    true
164                ],
165                [
166                    "StartTag",
167                    "body",
168                    {}
169                ],
170                [
171                    "StartTag",
172                    "plaintext",
173                    {}
174                ],
175                [
176                    "Character",
177                    "</plaintext>"
178                ]
179            ]
180        },
181        {
182            "fragmentContext": null,
183            "description": "<!doctype html><table><plaintext></plaintext>",
184            "input": "<!doctype html><table><plaintext></plaintext>",
185            "output": [
186                [
187                    "DOCTYPE",
188                    "html",
189                    null,
190                    null,
191                    true
192                ],
193                [
194                    "StartTag",
195                    "table",
196                    {}
197                ],
198                [
199                    "StartTag",
200                    "plaintext",
201                    {}
202                ],
203                [
204                    "Character",
205                    "</plaintext>"
206                ]
207            ]
208        },
209        {
210            "fragmentContext": null,
211            "description": "<!doctype html><table><tbody><plaintext></plaintext>",
212            "input": "<!doctype html><table><tbody><plaintext></plaintext>",
213            "output": [
214                [
215                    "DOCTYPE",
216                    "html",
217                    null,
218                    null,
219                    true
220                ],
221                [
222                    "StartTag",
223                    "table",
224                    {}
225                ],
226                [
227                    "StartTag",
228                    "tbody",
229                    {}
230                ],
231                [
232                    "StartTag",
233                    "plaintext",
234                    {}
235                ],
236                [
237                    "Character",
238                    "</plaintext>"
239                ]
240            ]
241        },
242        {
243            "fragmentContext": null,
244            "description": "<!doctype html><table><tbody><tr><plaintext></plaintext>",
245            "input": "<!doctype html><table><tbody><tr><plaintext></plaintext>",
246            "output": [
247                [
248                    "DOCTYPE",
249                    "html",
250                    null,
251                    null,
252                    true
253                ],
254                [
255                    "StartTag",
256                    "table",
257                    {}
258                ],
259                [
260                    "StartTag",
261                    "tbody",
262                    {}
263                ],
264                [
265                    "StartTag",
266                    "tr",
267                    {}
268                ],
269                [
270                    "StartTag",
271                    "plaintext",
272                    {}
273                ],
274                [
275                    "Character",
276                    "</plaintext>"
277                ]
278            ]
279        },
280        {
281            "fragmentContext": null,
282            "description": "<!doctype html><table><td><plaintext></plaintext>",
283            "input": "<!doctype html><table><td><plaintext></plaintext>",
284            "output": [
285                [
286                    "DOCTYPE",
287                    "html",
288                    null,
289                    null,
290                    true
291                ],
292                [
293                    "StartTag",
294                    "table",
295                    {}
296                ],
297                [
298                    "StartTag",
299                    "td",
300                    {}
301                ],
302                [
303                    "StartTag",
304                    "plaintext",
305                    {}
306                ],
307                [
308                    "Character",
309                    "</plaintext>"
310                ]
311            ]
312        },
313        {
314            "fragmentContext": null,
315            "description": "<!doctype html><table><caption><plaintext></plaintext>",
316            "input": "<!doctype html><table><caption><plaintext></plaintext>",
317            "output": [
318                [
319                    "DOCTYPE",
320                    "html",
321                    null,
322                    null,
323                    true
324                ],
325                [
326                    "StartTag",
327                    "table",
328                    {}
329                ],
330                [
331                    "StartTag",
332                    "caption",
333                    {}
334                ],
335                [
336                    "StartTag",
337                    "plaintext",
338                    {}
339                ],
340                [
341                    "Character",
342                    "</plaintext>"
343                ]
344            ]
345        },
346        {
347            "fragmentContext": null,
348            "description": "<!doctype html><table><colgroup><plaintext></plaintext>",
349            "input": "<!doctype html><table><colgroup><plaintext></plaintext>",
350            "output": [
351                [
352                    "DOCTYPE",
353                    "html",
354                    null,
355                    null,
356                    true
357                ],
358                [
359                    "StartTag",
360                    "table",
361                    {}
362                ],
363                [
364                    "StartTag",
365                    "colgroup",
366                    {}
367                ],
368                [
369                    "StartTag",
370                    "plaintext",
371                    {}
372                ],
373                [
374                    "Character",
375                    "</plaintext>"
376                ]
377            ]
378        },
379        {
380            "fragmentContext": null,
381            "description": "<!doctype html><template><plaintext>a</template>b",
382            "input": "<!doctype html><template><plaintext>a</template>b",
383            "output": [
384                [
385                    "DOCTYPE",
386                    "html",
387                    null,
388                    null,
389                    true
390                ],
391                [
392                    "StartTag",
393                    "template",
394                    {}
395                ],
396                [
397                    "StartTag",
398                    "plaintext",
399                    {}
400                ],
401                [
402                    "Character",
403                    "a</template>b"
404                ]
405            ]
406        },
407        {
408            "fragmentContext": null,
409            "description": "<!doctype html><body></body><plaintext></plaintext>",
410            "input": "<!doctype html><body></body><plaintext></plaintext>",
411            "output": [
412                [
413                    "DOCTYPE",
414                    "html",
415                    null,
416                    null,
417                    true
418                ],
419                [
420                    "StartTag",
421                    "body",
422                    {}
423                ],
424                [
425                    "EndTag",
426                    "body"
427                ],
428                [
429                    "StartTag",
430                    "plaintext",
431                    {}
432                ],
433                [
434                    "Character",
435                    "</plaintext>"
436                ]
437            ]
438        },
439        {
440            "fragmentContext": null,
441            "description": "<!doctype html><body></body></html><plaintext></plaintext>",
442            "input": "<!doctype html><body></body></html><plaintext></plaintext>",
443            "output": [
444                [
445                    "DOCTYPE",
446                    "html",
447                    null,
448                    null,
449                    true
450                ],
451                [
452                    "StartTag",
453                    "body",
454                    {}
455                ],
456                [
457                    "EndTag",
458                    "body"
459                ],
460                [
461                    "EndTag",
462                    "html"
463                ],
464                [
465                    "StartTag",
466                    "plaintext",
467                    {}
468                ],
469                [
470                    "Character",
471                    "</plaintext>"
472                ]
473            ]
474        },
475        {
476            "fragmentContext": null,
477            "description": "<!doctype html><svg><plaintext>a</plaintext>b",
478            "input": "<!doctype html><svg><plaintext>a</plaintext>b",
479            "output": [
480                [
481                    "DOCTYPE",
482                    "html",
483                    null,
484                    null,
485                    true
486                ],
487                [
488                    "StartTag",
489                    "svg",
490                    {}
491                ],
492                [
493                    "StartTag",
494                    "plaintext",
495                    {}
496                ],
497                [
498                    "Character",
499                    "a"
500                ],
501                [
502                    "EndTag",
503                    "plaintext"
504                ],
505                [
506                    "Character",
507                    "b"
508                ]
509            ]
510        },
511        {
512            "fragmentContext": null,
513            "description": "<!doctype html><svg><title><plaintext>a</plaintext>b",
514            "input": "<!doctype html><svg><title><plaintext>a</plaintext>b",
515            "output": [
516                [
517                    "DOCTYPE",
518                    "html",
519                    null,
520                    null,
521                    true
522                ],
523                [
524                    "StartTag",
525                    "svg",
526                    {}
527                ],
528                [
529                    "StartTag",
530                    "title",
531                    {}
532                ],
533                [
534                    "StartTag",
535                    "plaintext",
536                    {}
537                ],
538                [
539                    "Character",
540                    "a</plaintext>b"
541                ]
542            ]
543        },
544        {
545            "fragmentContext": null,
546            "description": "<!doctype html><table><tr><style></script></style>abc",
547            "input": "<!doctype html><table><tr><style></script></style>abc",
548            "output": [
549                [
550                    "DOCTYPE",
551                    "html",
552                    null,
553                    null,
554                    true
555                ],
556                [
557                    "StartTag",
558                    "table",
559                    {}
560                ],
561                [
562                    "StartTag",
563                    "tr",
564                    {}
565                ],
566                [
567                    "StartTag",
568                    "style",
569                    {}
570                ],
571                [
572                    "Character",
573                    "</script>"
574                ],
575                [
576                    "EndTag",
577                    "style"
578                ],
579                [
580                    "Character",
581                    "abc"
582                ]
583            ]
584        },
585        {
586            "fragmentContext": null,
587            "description": "<!doctype html><table><tr><script></style></script>abc",
588            "input": "<!doctype html><table><tr><script></style></script>abc",
589            "output": [
590                [
591                    "DOCTYPE",
592                    "html",
593                    null,
594                    null,
595                    true
596                ],
597                [
598                    "StartTag",
599                    "table",
600                    {}
601                ],
602                [
603                    "StartTag",
604                    "tr",
605                    {}
606                ],
607                [
608                    "StartTag",
609                    "script",
610                    {}
611                ],
612                [
613                    "Character",
614                    "</style>"
615                ],
616                [
617                    "EndTag",
618                    "script"
619                ],
620                [
621                    "Character",
622                    "abc"
623                ]
624            ]
625        },
626        {
627            "fragmentContext": null,
628            "description": "<!doctype html><table><caption><style></script></style>abc",
629            "input": "<!doctype html><table><caption><style></script></style>abc",
630            "output": [
631                [
632                    "DOCTYPE",
633                    "html",
634                    null,
635                    null,
636                    true
637                ],
638                [
639                    "StartTag",
640                    "table",
641                    {}
642                ],
643                [
644                    "StartTag",
645                    "caption",
646                    {}
647                ],
648                [
649                    "StartTag",
650                    "style",
651                    {}
652                ],
653                [
654                    "Character",
655                    "</script>"
656                ],
657                [
658                    "EndTag",
659                    "style"
660                ],
661                [
662                    "Character",
663                    "abc"
664                ]
665            ]
666        },
667        {
668            "fragmentContext": null,
669            "description": "<!doctype html><table><td><style></script></style>abc",
670            "input": "<!doctype html><table><td><style></script></style>abc",
671            "output": [
672                [
673                    "DOCTYPE",
674                    "html",
675                    null,
676                    null,
677                    true
678                ],
679                [
680                    "StartTag",
681                    "table",
682                    {}
683                ],
684                [
685                    "StartTag",
686                    "td",
687                    {}
688                ],
689                [
690                    "StartTag",
691                    "style",
692                    {}
693                ],
694                [
695                    "Character",
696                    "</script>"
697                ],
698                [
699                    "EndTag",
700                    "style"
701                ],
702                [
703                    "Character",
704                    "abc"
705                ]
706            ]
707        },
708        {
709            "fragmentContext": null,
710            "description": "<!doctype html><select><script></style></script>abc",
711            "input": "<!doctype html><select><script></style></script>abc",
712            "output": [
713                [
714                    "DOCTYPE",
715                    "html",
716                    null,
717                    null,
718                    true
719                ],
720                [
721                    "StartTag",
722                    "select",
723                    {}
724                ],
725                [
726                    "StartTag",
727                    "script",
728                    {}
729                ],
730                [
731                    "Character",
732                    "</style>"
733                ],
734                [
735                    "EndTag",
736                    "script"
737                ],
738                [
739                    "Character",
740                    "abc"
741                ]
742            ]
743        },
744        {
745            "fragmentContext": null,
746            "description": "<!doctype html><table><select><script></style></script>abc",
747            "input": "<!doctype html><table><select><script></style></script>abc",
748            "output": [
749                [
750                    "DOCTYPE",
751                    "html",
752                    null,
753                    null,
754                    true
755                ],
756                [
757                    "StartTag",
758                    "table",
759                    {}
760                ],
761                [
762                    "StartTag",
763                    "select",
764                    {}
765                ],
766                [
767                    "StartTag",
768                    "script",
769                    {}
770                ],
771                [
772                    "Character",
773                    "</style>"
774                ],
775                [
776                    "EndTag",
777                    "script"
778                ],
779                [
780                    "Character",
781                    "abc"
782                ]
783            ]
784        },
785        {
786            "fragmentContext": null,
787            "description": "<!doctype html><table><tr><select><script></style></script>abc",
788            "input": "<!doctype html><table><tr><select><script></style></script>abc",
789            "output": [
790                [
791                    "DOCTYPE",
792                    "html",
793                    null,
794                    null,
795                    true
796                ],
797                [
798                    "StartTag",
799                    "table",
800                    {}
801                ],
802                [
803                    "StartTag",
804                    "tr",
805                    {}
806                ],
807                [
808                    "StartTag",
809                    "select",
810                    {}
811                ],
812                [
813                    "StartTag",
814                    "script",
815                    {}
816                ],
817                [
818                    "Character",
819                    "</style>"
820                ],
821                [
822                    "EndTag",
823                    "script"
824                ],
825                [
826                    "Character",
827                    "abc"
828                ]
829            ]
830        },
831        {
832            "fragmentContext": null,
833            "description": "<!doctype html><frameset></frameset><noframes>abc",
834            "input": "<!doctype html><frameset></frameset><noframes>abc",
835            "output": [
836                [
837                    "DOCTYPE",
838                    "html",
839                    null,
840                    null,
841                    true
842                ],
843                [
844                    "StartTag",
845                    "frameset",
846                    {}
847                ],
848                [
849                    "EndTag",
850                    "frameset"
851                ],
852                [
853                    "StartTag",
854                    "noframes",
855                    {}
856                ],
857                [
858                    "Character",
859                    "abc"
860                ]
861            ]
862        },
863        {
864            "fragmentContext": null,
865            "description": "<!doctype html><frameset></frameset><noframes>abc</noframes><!--abc-->",
866            "input": "<!doctype html><frameset></frameset><noframes>abc</noframes><!--abc-->",
867            "output": [
868                [
869                    "DOCTYPE",
870                    "html",
871                    null,
872                    null,
873                    true
874                ],
875                [
876                    "StartTag",
877                    "frameset",
878                    {}
879                ],
880                [
881                    "EndTag",
882                    "frameset"
883                ],
884                [
885                    "StartTag",
886                    "noframes",
887                    {}
888                ],
889                [
890                    "Character",
891                    "abc"
892                ],
893                [
894                    "EndTag",
895                    "noframes"
896                ],
897                [
898                    "Comment",
899                    "abc"
900                ]
901            ]
902        },
903        {
904            "fragmentContext": null,
905            "description": "<!doctype html><frameset></frameset></html><noframes>abc",
906            "input": "<!doctype html><frameset></frameset></html><noframes>abc",
907            "output": [
908                [
909                    "DOCTYPE",
910                    "html",
911                    null,
912                    null,
913                    true
914                ],
915                [
916                    "StartTag",
917                    "frameset",
918                    {}
919                ],
920                [
921                    "EndTag",
922                    "frameset"
923                ],
924                [
925                    "EndTag",
926                    "html"
927                ],
928                [
929                    "StartTag",
930                    "noframes",
931                    {}
932                ],
933                [
934                    "Character",
935                    "abc"
936                ]
937            ]
938        },
939        {
940            "fragmentContext": null,
941            "description": "<!doctype html><frameset></frameset></html><noframes>abc</noframes><!--abc-->",
942            "input": "<!doctype html><frameset></frameset></html><noframes>abc</noframes><!--abc-->",
943            "output": [
944                [
945                    "DOCTYPE",
946                    "html",
947                    null,
948                    null,
949                    true
950                ],
951                [
952                    "StartTag",
953                    "frameset",
954                    {}
955                ],
956                [
957                    "EndTag",
958                    "frameset"
959                ],
960                [
961                    "EndTag",
962                    "html"
963                ],
964                [
965                    "StartTag",
966                    "noframes",
967                    {}
968                ],
969                [
970                    "Character",
971                    "abc"
972                ],
973                [
974                    "EndTag",
975                    "noframes"
976                ],
977                [
978                    "Comment",
979                    "abc"
980                ]
981            ]
982        },
983        {
984            "fragmentContext": null,
985            "description": "<!doctype html><table><tr></tbody><tfoot>",
986            "input": "<!doctype html><table><tr></tbody><tfoot>",
987            "output": [
988                [
989                    "DOCTYPE",
990                    "html",
991                    null,
992                    null,
993                    true
994                ],
995                [
996                    "StartTag",
997                    "table",
998                    {}
999                ],
1000                [
1001                    "StartTag",
1002                    "tr",
1003                    {}
1004                ],
1005                [
1006                    "EndTag",
1007                    "tbody"
1008                ],
1009                [
1010                    "StartTag",
1011                    "tfoot",
1012                    {}
1013                ]
1014            ]
1015        },
1016        {
1017            "fragmentContext": null,
1018            "description": "<!doctype html><table><td><svg></svg>abc<td>",
1019            "input": "<!doctype html><table><td><svg></svg>abc<td>",
1020            "output": [
1021                [
1022                    "DOCTYPE",
1023                    "html",
1024                    null,
1025                    null,
1026                    true
1027                ],
1028                [
1029                    "StartTag",
1030                    "table",
1031                    {}
1032                ],
1033                [
1034                    "StartTag",
1035                    "td",
1036                    {}
1037                ],
1038                [
1039                    "StartTag",
1040                    "svg",
1041                    {}
1042                ],
1043                [
1044                    "EndTag",
1045                    "svg"
1046                ],
1047                [
1048                    "Character",
1049                    "abc"
1050                ],
1051                [
1052                    "StartTag",
1053                    "td",
1054                    {}
1055                ]
1056            ]
1057        }
1058    ]
1059}