1{ 2 "tests": [ 3 { 4 "description": "<!doctype html><plaintext></plaintext>", 5 "input": "<!doctype html><plaintext></plaintext>", 6 "output": [ 7 [ 8 "DOCTYPE", 9 "html", 10 null, 11 null, 12 true 13 ], 14 [ 15 "StartTag", 16 "plaintext", 17 {} 18 ], 19 [ 20 "Character", 21 "</plaintext>" 22 ] 23 ] 24 }, 25 { 26 "description": "<!doctype html><table><plaintext></plaintext>", 27 "input": "<!doctype html><table><plaintext></plaintext>", 28 "output": [ 29 [ 30 "DOCTYPE", 31 "html", 32 null, 33 null, 34 true 35 ], 36 [ 37 "StartTag", 38 "table", 39 {} 40 ], 41 [ 42 "StartTag", 43 "plaintext", 44 {} 45 ], 46 [ 47 "Character", 48 "</plaintext>" 49 ] 50 ] 51 }, 52 { 53 "description": "<!doctype html><table><tbody><plaintext></plaintext>", 54 "input": "<!doctype html><table><tbody><plaintext></plaintext>", 55 "output": [ 56 [ 57 "DOCTYPE", 58 "html", 59 null, 60 null, 61 true 62 ], 63 [ 64 "StartTag", 65 "table", 66 {} 67 ], 68 [ 69 "StartTag", 70 "tbody", 71 {} 72 ], 73 [ 74 "StartTag", 75 "plaintext", 76 {} 77 ], 78 [ 79 "Character", 80 "</plaintext>" 81 ] 82 ] 83 }, 84 { 85 "description": "<!doctype html><table><tbody><tr><plaintext></plaintext>", 86 "input": "<!doctype html><table><tbody><tr><plaintext></plaintext>", 87 "output": [ 88 [ 89 "DOCTYPE", 90 "html", 91 null, 92 null, 93 true 94 ], 95 [ 96 "StartTag", 97 "table", 98 {} 99 ], 100 [ 101 "StartTag", 102 "tbody", 103 {} 104 ], 105 [ 106 "StartTag", 107 "tr", 108 {} 109 ], 110 [ 111 "StartTag", 112 "plaintext", 113 {} 114 ], 115 [ 116 "Character", 117 "</plaintext>" 118 ] 119 ] 120 }, 121 { 122 "description": "<!doctype html><table><td><plaintext></plaintext>", 123 "input": "<!doctype html><table><td><plaintext></plaintext>", 124 "output": [ 125 [ 126 "DOCTYPE", 127 "html", 128 null, 129 null, 130 true 131 ], 132 [ 133 "StartTag", 134 "table", 135 {} 136 ], 137 [ 138 "StartTag", 139 "td", 140 {} 141 ], 142 [ 143 "StartTag", 144 "plaintext", 145 {} 146 ], 147 [ 148 "Character", 149 "</plaintext>" 150 ] 151 ] 152 }, 153 { 154 "description": "<!doctype html><table><caption><plaintext></plaintext>", 155 "input": "<!doctype html><table><caption><plaintext></plaintext>", 156 "output": [ 157 [ 158 "DOCTYPE", 159 "html", 160 null, 161 null, 162 true 163 ], 164 [ 165 "StartTag", 166 "table", 167 {} 168 ], 169 [ 170 "StartTag", 171 "caption", 172 {} 173 ], 174 [ 175 "StartTag", 176 "plaintext", 177 {} 178 ], 179 [ 180 "Character", 181 "</plaintext>" 182 ] 183 ] 184 }, 185 { 186 "description": "<!doctype html><table><tr><style></script></style>abc", 187 "input": "<!doctype html><table><tr><style></script></style>abc", 188 "output": [ 189 [ 190 "DOCTYPE", 191 "html", 192 null, 193 null, 194 true 195 ], 196 [ 197 "StartTag", 198 "table", 199 {} 200 ], 201 [ 202 "StartTag", 203 "tr", 204 {} 205 ], 206 [ 207 "StartTag", 208 "style", 209 {} 210 ], 211 [ 212 "Character", 213 "</script>" 214 ], 215 [ 216 "EndTag", 217 "style" 218 ], 219 [ 220 "Character", 221 "abc" 222 ] 223 ] 224 }, 225 { 226 "description": "<!doctype html><table><tr><script></style></script>abc", 227 "input": "<!doctype html><table><tr><script></style></script>abc", 228 "output": [ 229 [ 230 "DOCTYPE", 231 "html", 232 null, 233 null, 234 true 235 ], 236 [ 237 "StartTag", 238 "table", 239 {} 240 ], 241 [ 242 "StartTag", 243 "tr", 244 {} 245 ], 246 [ 247 "StartTag", 248 "script", 249 {} 250 ], 251 [ 252 "Character", 253 "</style>" 254 ], 255 [ 256 "EndTag", 257 "script" 258 ], 259 [ 260 "Character", 261 "abc" 262 ] 263 ] 264 }, 265 { 266 "description": "<!doctype html><table><caption><style></script></style>abc", 267 "input": "<!doctype html><table><caption><style></script></style>abc", 268 "output": [ 269 [ 270 "DOCTYPE", 271 "html", 272 null, 273 null, 274 true 275 ], 276 [ 277 "StartTag", 278 "table", 279 {} 280 ], 281 [ 282 "StartTag", 283 "caption", 284 {} 285 ], 286 [ 287 "StartTag", 288 "style", 289 {} 290 ], 291 [ 292 "Character", 293 "</script>" 294 ], 295 [ 296 "EndTag", 297 "style" 298 ], 299 [ 300 "Character", 301 "abc" 302 ] 303 ] 304 }, 305 { 306 "description": "<!doctype html><table><td><style></script></style>abc", 307 "input": "<!doctype html><table><td><style></script></style>abc", 308 "output": [ 309 [ 310 "DOCTYPE", 311 "html", 312 null, 313 null, 314 true 315 ], 316 [ 317 "StartTag", 318 "table", 319 {} 320 ], 321 [ 322 "StartTag", 323 "td", 324 {} 325 ], 326 [ 327 "StartTag", 328 "style", 329 {} 330 ], 331 [ 332 "Character", 333 "</script>" 334 ], 335 [ 336 "EndTag", 337 "style" 338 ], 339 [ 340 "Character", 341 "abc" 342 ] 343 ] 344 }, 345 { 346 "description": "<!doctype html><select><script></style></script>abc", 347 "input": "<!doctype html><select><script></style></script>abc", 348 "output": [ 349 [ 350 "DOCTYPE", 351 "html", 352 null, 353 null, 354 true 355 ], 356 [ 357 "StartTag", 358 "select", 359 {} 360 ], 361 [ 362 "StartTag", 363 "script", 364 {} 365 ], 366 [ 367 "Character", 368 "</style>" 369 ], 370 [ 371 "EndTag", 372 "script" 373 ], 374 [ 375 "Character", 376 "abc" 377 ] 378 ] 379 }, 380 { 381 "description": "<!doctype html><table><select><script></style></script>abc", 382 "input": "<!doctype html><table><select><script></style></script>abc", 383 "output": [ 384 [ 385 "DOCTYPE", 386 "html", 387 null, 388 null, 389 true 390 ], 391 [ 392 "StartTag", 393 "table", 394 {} 395 ], 396 [ 397 "StartTag", 398 "select", 399 {} 400 ], 401 [ 402 "StartTag", 403 "script", 404 {} 405 ], 406 [ 407 "Character", 408 "</style>" 409 ], 410 [ 411 "EndTag", 412 "script" 413 ], 414 [ 415 "Character", 416 "abc" 417 ] 418 ] 419 }, 420 { 421 "description": "<!doctype html><table><tr><select><script></style></script>abc", 422 "input": "<!doctype html><table><tr><select><script></style></script>abc", 423 "output": [ 424 [ 425 "DOCTYPE", 426 "html", 427 null, 428 null, 429 true 430 ], 431 [ 432 "StartTag", 433 "table", 434 {} 435 ], 436 [ 437 "StartTag", 438 "tr", 439 {} 440 ], 441 [ 442 "StartTag", 443 "select", 444 {} 445 ], 446 [ 447 "StartTag", 448 "script", 449 {} 450 ], 451 [ 452 "Character", 453 "</style>" 454 ], 455 [ 456 "EndTag", 457 "script" 458 ], 459 [ 460 "Character", 461 "abc" 462 ] 463 ] 464 }, 465 { 466 "description": "<!doctype html><frameset></frameset><noframes>abc", 467 "input": "<!doctype html><frameset></frameset><noframes>abc", 468 "output": [ 469 [ 470 "DOCTYPE", 471 "html", 472 null, 473 null, 474 true 475 ], 476 [ 477 "StartTag", 478 "frameset", 479 {} 480 ], 481 [ 482 "EndTag", 483 "frameset" 484 ], 485 [ 486 "StartTag", 487 "noframes", 488 {} 489 ], 490 [ 491 "Character", 492 "abc" 493 ] 494 ] 495 }, 496 { 497 "description": "<!doctype html><frameset></frameset><noframes>abc</noframes><!--abc-->", 498 "input": "<!doctype html><frameset></frameset><noframes>abc</noframes><!--abc-->", 499 "output": [ 500 [ 501 "DOCTYPE", 502 "html", 503 null, 504 null, 505 true 506 ], 507 [ 508 "StartTag", 509 "frameset", 510 {} 511 ], 512 [ 513 "EndTag", 514 "frameset" 515 ], 516 [ 517 "StartTag", 518 "noframes", 519 {} 520 ], 521 [ 522 "Character", 523 "abc" 524 ], 525 [ 526 "EndTag", 527 "noframes" 528 ], 529 [ 530 "Comment", 531 "abc" 532 ] 533 ] 534 }, 535 { 536 "description": "<!doctype html><frameset></frameset></html><noframes>abc", 537 "input": "<!doctype html><frameset></frameset></html><noframes>abc", 538 "output": [ 539 [ 540 "DOCTYPE", 541 "html", 542 null, 543 null, 544 true 545 ], 546 [ 547 "StartTag", 548 "frameset", 549 {} 550 ], 551 [ 552 "EndTag", 553 "frameset" 554 ], 555 [ 556 "EndTag", 557 "html" 558 ], 559 [ 560 "StartTag", 561 "noframes", 562 {} 563 ], 564 [ 565 "Character", 566 "abc" 567 ] 568 ] 569 }, 570 { 571 "description": "<!doctype html><frameset></frameset></html><noframes>abc</noframes><!--abc-->", 572 "input": "<!doctype html><frameset></frameset></html><noframes>abc</noframes><!--abc-->", 573 "output": [ 574 [ 575 "DOCTYPE", 576 "html", 577 null, 578 null, 579 true 580 ], 581 [ 582 "StartTag", 583 "frameset", 584 {} 585 ], 586 [ 587 "EndTag", 588 "frameset" 589 ], 590 [ 591 "EndTag", 592 "html" 593 ], 594 [ 595 "StartTag", 596 "noframes", 597 {} 598 ], 599 [ 600 "Character", 601 "abc" 602 ], 603 [ 604 "EndTag", 605 "noframes" 606 ], 607 [ 608 "Comment", 609 "abc" 610 ] 611 ] 612 }, 613 { 614 "description": "<!doctype html><table><tr></tbody><tfoot>", 615 "input": "<!doctype html><table><tr></tbody><tfoot>", 616 "output": [ 617 [ 618 "DOCTYPE", 619 "html", 620 null, 621 null, 622 true 623 ], 624 [ 625 "StartTag", 626 "table", 627 {} 628 ], 629 [ 630 "StartTag", 631 "tr", 632 {} 633 ], 634 [ 635 "EndTag", 636 "tbody" 637 ], 638 [ 639 "StartTag", 640 "tfoot", 641 {} 642 ] 643 ] 644 }, 645 { 646 "description": "<!doctype html><table><td><svg></svg>abc<td>", 647 "input": "<!doctype html><table><td><svg></svg>abc<td>", 648 "output": [ 649 [ 650 "DOCTYPE", 651 "html", 652 null, 653 null, 654 true 655 ], 656 [ 657 "StartTag", 658 "table", 659 {} 660 ], 661 [ 662 "StartTag", 663 "td", 664 {} 665 ], 666 [ 667 "StartTag", 668 "svg", 669 {} 670 ], 671 [ 672 "EndTag", 673 "svg" 674 ], 675 [ 676 "Character", 677 "abc" 678 ], 679 [ 680 "StartTag", 681 "td", 682 {} 683 ] 684 ] 685 } 686 ] 687}