• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2    "tests": [
3        {
4            "description": "<!DOCTYPE html><p><b><i><u></p> <p>X",
5            "input": "<!DOCTYPE html><p><b><i><u></p> <p>X",
6            "output": [
7                [
8                    "DOCTYPE",
9                    "html",
10                    null,
11                    null,
12                    true
13                ],
14                [
15                    "StartTag",
16                    "p",
17                    {}
18                ],
19                [
20                    "StartTag",
21                    "b",
22                    {}
23                ],
24                [
25                    "StartTag",
26                    "i",
27                    {}
28                ],
29                [
30                    "StartTag",
31                    "u",
32                    {}
33                ],
34                [
35                    "EndTag",
36                    "p"
37                ],
38                [
39                    "Character",
40                    " "
41                ],
42                [
43                    "StartTag",
44                    "p",
45                    {}
46                ],
47                [
48                    "Character",
49                    "X"
50                ]
51            ]
52        },
53        {
54            "description": "<p><b><i><u></p>\\r\\n<p>X",
55            "input": "<p><b><i><u></p>\r\n<p>X",
56            "output": [
57                [
58                    "StartTag",
59                    "p",
60                    {}
61                ],
62                [
63                    "StartTag",
64                    "b",
65                    {}
66                ],
67                [
68                    "StartTag",
69                    "i",
70                    {}
71                ],
72                [
73                    "StartTag",
74                    "u",
75                    {}
76                ],
77                [
78                    "EndTag",
79                    "p"
80                ],
81                [
82                    "Character",
83                    "\n"
84                ],
85                [
86                    "StartTag",
87                    "p",
88                    {}
89                ],
90                [
91                    "Character",
92                    "X"
93                ]
94            ]
95        },
96        {
97            "description": "<!doctype html></html> <head>",
98            "input": "<!doctype html></html> <head>",
99            "output": [
100                [
101                    "DOCTYPE",
102                    "html",
103                    null,
104                    null,
105                    true
106                ],
107                [
108                    "EndTag",
109                    "html"
110                ],
111                [
112                    "Character",
113                    " "
114                ],
115                [
116                    "StartTag",
117                    "head",
118                    {}
119                ]
120            ]
121        },
122        {
123            "description": "<!doctype html></body><meta>",
124            "input": "<!doctype html></body><meta>",
125            "output": [
126                [
127                    "DOCTYPE",
128                    "html",
129                    null,
130                    null,
131                    true
132                ],
133                [
134                    "EndTag",
135                    "body"
136                ],
137                [
138                    "StartTag",
139                    "meta",
140                    {}
141                ]
142            ]
143        },
144        {
145            "description": "<html></html><!-- foo -->",
146            "input": "<html></html><!-- foo -->",
147            "output": [
148                [
149                    "StartTag",
150                    "html",
151                    {}
152                ],
153                [
154                    "EndTag",
155                    "html"
156                ],
157                [
158                    "Comment",
159                    " foo "
160                ]
161            ]
162        },
163        {
164            "description": "<!doctype html></body><title>X</title>",
165            "input": "<!doctype html></body><title>X</title>",
166            "output": [
167                [
168                    "DOCTYPE",
169                    "html",
170                    null,
171                    null,
172                    true
173                ],
174                [
175                    "EndTag",
176                    "body"
177                ],
178                [
179                    "StartTag",
180                    "title",
181                    {}
182                ],
183                [
184                    "Character",
185                    "X"
186                ],
187                [
188                    "EndTag",
189                    "title"
190                ]
191            ]
192        },
193        {
194            "description": "<!doctype html><table> X<meta></table>",
195            "input": "<!doctype html><table> X<meta></table>",
196            "output": [
197                [
198                    "DOCTYPE",
199                    "html",
200                    null,
201                    null,
202                    true
203                ],
204                [
205                    "StartTag",
206                    "table",
207                    {}
208                ],
209                [
210                    "Character",
211                    " X"
212                ],
213                [
214                    "StartTag",
215                    "meta",
216                    {}
217                ],
218                [
219                    "EndTag",
220                    "table"
221                ]
222            ]
223        },
224        {
225            "description": "<!doctype html><table> x</table>",
226            "input": "<!doctype html><table> x</table>",
227            "output": [
228                [
229                    "DOCTYPE",
230                    "html",
231                    null,
232                    null,
233                    true
234                ],
235                [
236                    "StartTag",
237                    "table",
238                    {}
239                ],
240                [
241                    "Character",
242                    " x"
243                ],
244                [
245                    "EndTag",
246                    "table"
247                ]
248            ]
249        },
250        {
251            "description": "<!doctype html><table> x </table>",
252            "input": "<!doctype html><table> x </table>",
253            "output": [
254                [
255                    "DOCTYPE",
256                    "html",
257                    null,
258                    null,
259                    true
260                ],
261                [
262                    "StartTag",
263                    "table",
264                    {}
265                ],
266                [
267                    "Character",
268                    " x "
269                ],
270                [
271                    "EndTag",
272                    "table"
273                ]
274            ]
275        },
276        {
277            "description": "<!doctype html><table><tr> x</table>",
278            "input": "<!doctype html><table><tr> x</table>",
279            "output": [
280                [
281                    "DOCTYPE",
282                    "html",
283                    null,
284                    null,
285                    true
286                ],
287                [
288                    "StartTag",
289                    "table",
290                    {}
291                ],
292                [
293                    "StartTag",
294                    "tr",
295                    {}
296                ],
297                [
298                    "Character",
299                    " x"
300                ],
301                [
302                    "EndTag",
303                    "table"
304                ]
305            ]
306        },
307        {
308            "description": "<!doctype html><table>X<style> <tr>x </style> </table>",
309            "input": "<!doctype html><table>X<style> <tr>x </style> </table>",
310            "output": [
311                [
312                    "DOCTYPE",
313                    "html",
314                    null,
315                    null,
316                    true
317                ],
318                [
319                    "StartTag",
320                    "table",
321                    {}
322                ],
323                [
324                    "Character",
325                    "X"
326                ],
327                [
328                    "StartTag",
329                    "style",
330                    {}
331                ],
332                [
333                    "Character",
334                    " <tr>x "
335                ],
336                [
337                    "EndTag",
338                    "style"
339                ],
340                [
341                    "Character",
342                    " "
343                ],
344                [
345                    "EndTag",
346                    "table"
347                ]
348            ]
349        },
350        {
351            "description": "<!doctype html><div><table><a>foo</a> <tr><td>bar</td> </tr></table></div>",
352            "input": "<!doctype html><div><table><a>foo</a> <tr><td>bar</td> </tr></table></div>",
353            "output": [
354                [
355                    "DOCTYPE",
356                    "html",
357                    null,
358                    null,
359                    true
360                ],
361                [
362                    "StartTag",
363                    "div",
364                    {}
365                ],
366                [
367                    "StartTag",
368                    "table",
369                    {}
370                ],
371                [
372                    "StartTag",
373                    "a",
374                    {}
375                ],
376                [
377                    "Character",
378                    "foo"
379                ],
380                [
381                    "EndTag",
382                    "a"
383                ],
384                [
385                    "Character",
386                    " "
387                ],
388                [
389                    "StartTag",
390                    "tr",
391                    {}
392                ],
393                [
394                    "StartTag",
395                    "td",
396                    {}
397                ],
398                [
399                    "Character",
400                    "bar"
401                ],
402                [
403                    "EndTag",
404                    "td"
405                ],
406                [
407                    "Character",
408                    " "
409                ],
410                [
411                    "EndTag",
412                    "tr"
413                ],
414                [
415                    "EndTag",
416                    "table"
417                ],
418                [
419                    "EndTag",
420                    "div"
421                ]
422            ]
423        },
424        {
425            "description": "<frame></frame></frame><frameset><frame><frameset><frame></frameset><noframes></frameset><noframes>",
426            "input": "<frame></frame></frame><frameset><frame><frameset><frame></frameset><noframes></frameset><noframes>",
427            "output": [
428                [
429                    "StartTag",
430                    "frame",
431                    {}
432                ],
433                [
434                    "EndTag",
435                    "frame"
436                ],
437                [
438                    "EndTag",
439                    "frame"
440                ],
441                [
442                    "StartTag",
443                    "frameset",
444                    {}
445                ],
446                [
447                    "StartTag",
448                    "frame",
449                    {}
450                ],
451                [
452                    "StartTag",
453                    "frameset",
454                    {}
455                ],
456                [
457                    "StartTag",
458                    "frame",
459                    {}
460                ],
461                [
462                    "EndTag",
463                    "frameset"
464                ],
465                [
466                    "StartTag",
467                    "noframes",
468                    {}
469                ],
470                [
471                    "Character",
472                    "</frameset><noframes>"
473                ]
474            ]
475        },
476        {
477            "description": "<!DOCTYPE html><object></html>",
478            "input": "<!DOCTYPE html><object></html>",
479            "output": [
480                [
481                    "DOCTYPE",
482                    "html",
483                    null,
484                    null,
485                    true
486                ],
487                [
488                    "StartTag",
489                    "object",
490                    {}
491                ],
492                [
493                    "EndTag",
494                    "html"
495                ]
496            ]
497        }
498    ]
499}