1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests2.dat Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,770 @@ 1.4 +#data 1.5 +<!DOCTYPE html>Test 1.6 +#errors 1.7 +#document 1.8 +| <!DOCTYPE html> 1.9 +| <html> 1.10 +| <head> 1.11 +| <body> 1.12 +| "Test" 1.13 + 1.14 +#data 1.15 +<textarea>test</div>test 1.16 +#errors 1.17 +(1,10): expected-doctype-but-got-start-tag 1.18 +(1,24): expected-closing-tag-but-got-eof 1.19 +#document 1.20 +| <html> 1.21 +| <head> 1.22 +| <body> 1.23 +| <textarea> 1.24 +| "test</div>test" 1.25 + 1.26 +#data 1.27 +<table><td> 1.28 +#errors 1.29 +(1,7): expected-doctype-but-got-start-tag 1.30 +(1,11): unexpected-cell-in-table-body 1.31 +(1,11): expected-closing-tag-but-got-eof 1.32 +#document 1.33 +| <html> 1.34 +| <head> 1.35 +| <body> 1.36 +| <table> 1.37 +| <tbody> 1.38 +| <tr> 1.39 +| <td> 1.40 + 1.41 +#data 1.42 +<table><td>test</tbody></table> 1.43 +#errors 1.44 +(1,7): expected-doctype-but-got-start-tag 1.45 +(1,11): unexpected-cell-in-table-body 1.46 +#document 1.47 +| <html> 1.48 +| <head> 1.49 +| <body> 1.50 +| <table> 1.51 +| <tbody> 1.52 +| <tr> 1.53 +| <td> 1.54 +| "test" 1.55 + 1.56 +#data 1.57 +<frame>test 1.58 +#errors 1.59 +(1,7): expected-doctype-but-got-start-tag 1.60 +(1,7): unexpected-start-tag-ignored 1.61 +#document 1.62 +| <html> 1.63 +| <head> 1.64 +| <body> 1.65 +| "test" 1.66 + 1.67 +#data 1.68 +<!DOCTYPE html><frameset>test 1.69 +#errors 1.70 +(1,29): unexpected-char-in-frameset 1.71 +(1,29): unexpected-char-in-frameset 1.72 +(1,29): unexpected-char-in-frameset 1.73 +(1,29): unexpected-char-in-frameset 1.74 +(1,29): eof-in-frameset 1.75 +#document 1.76 +| <!DOCTYPE html> 1.77 +| <html> 1.78 +| <head> 1.79 +| <frameset> 1.80 + 1.81 +#data 1.82 +<!DOCTYPE html><frameset><!DOCTYPE html> 1.83 +#errors 1.84 +(1,40): unexpected-doctype 1.85 +(1,40): eof-in-frameset 1.86 +#document 1.87 +| <!DOCTYPE html> 1.88 +| <html> 1.89 +| <head> 1.90 +| <frameset> 1.91 + 1.92 +#data 1.93 +<!DOCTYPE html><font><p><b>test</font> 1.94 +#errors 1.95 +(1,38): adoption-agency-1.3 1.96 +(1,38): adoption-agency-1.3 1.97 +#document 1.98 +| <!DOCTYPE html> 1.99 +| <html> 1.100 +| <head> 1.101 +| <body> 1.102 +| <font> 1.103 +| <p> 1.104 +| <font> 1.105 +| <b> 1.106 +| "test" 1.107 + 1.108 +#data 1.109 +<!DOCTYPE html><dt><div><dd> 1.110 +#errors 1.111 +(1,28): end-tag-too-early 1.112 +#document 1.113 +| <!DOCTYPE html> 1.114 +| <html> 1.115 +| <head> 1.116 +| <body> 1.117 +| <dt> 1.118 +| <div> 1.119 +| <dd> 1.120 + 1.121 +#data 1.122 +<script></x 1.123 +#errors 1.124 +(1,8): expected-doctype-but-got-start-tag 1.125 +(1,11): expected-named-closing-tag-but-got-eof 1.126 +#document 1.127 +| <html> 1.128 +| <head> 1.129 +| <script> 1.130 +| "</x" 1.131 +| <body> 1.132 + 1.133 +#data 1.134 +<table><plaintext><td> 1.135 +#errors 1.136 +(1,7): expected-doctype-but-got-start-tag 1.137 +(1,18): unexpected-start-tag-implies-table-voodoo 1.138 +(1,22): foster-parenting-character-in-table 1.139 +(1,22): foster-parenting-character-in-table 1.140 +(1,22): foster-parenting-character-in-table 1.141 +(1,22): foster-parenting-character-in-table 1.142 +(1,22): eof-in-table 1.143 +#document 1.144 +| <html> 1.145 +| <head> 1.146 +| <body> 1.147 +| <plaintext> 1.148 +| "<td>" 1.149 +| <table> 1.150 + 1.151 +#data 1.152 +<plaintext></plaintext> 1.153 +#errors 1.154 +(1,11): expected-doctype-but-got-start-tag 1.155 +(1,23): expected-closing-tag-but-got-eof 1.156 +#document 1.157 +| <html> 1.158 +| <head> 1.159 +| <body> 1.160 +| <plaintext> 1.161 +| "</plaintext>" 1.162 + 1.163 +#data 1.164 +<!DOCTYPE html><table><tr>TEST 1.165 +#errors 1.166 +(1,30): foster-parenting-character-in-table 1.167 +(1,30): foster-parenting-character-in-table 1.168 +(1,30): foster-parenting-character-in-table 1.169 +(1,30): foster-parenting-character-in-table 1.170 +(1,30): eof-in-table 1.171 +#document 1.172 +| <!DOCTYPE html> 1.173 +| <html> 1.174 +| <head> 1.175 +| <body> 1.176 +| "TEST" 1.177 +| <table> 1.178 +| <tbody> 1.179 +| <tr> 1.180 + 1.181 +#data 1.182 +<!DOCTYPE html><body t1=1><body t2=2><body t3=3 t4=4> 1.183 +#errors 1.184 +(1,37): unexpected-start-tag 1.185 +(1,53): unexpected-start-tag 1.186 +#document 1.187 +| <!DOCTYPE html> 1.188 +| <html> 1.189 +| <head> 1.190 +| <body> 1.191 +| t1="1" 1.192 +| t2="2" 1.193 +| t3="3" 1.194 +| t4="4" 1.195 + 1.196 +#data 1.197 +</b test 1.198 +#errors 1.199 +(1,8): eof-in-attribute-name 1.200 +(1,8): expected-doctype-but-got-eof 1.201 +#document 1.202 +| <html> 1.203 +| <head> 1.204 +| <body> 1.205 + 1.206 +#data 1.207 +<!DOCTYPE html></b test<b &=&>X 1.208 +#errors 1.209 +(1,24): invalid-character-in-attribute-name 1.210 +(1,32): named-entity-without-semicolon 1.211 +(1,33): attributes-in-end-tag 1.212 +(1,33): unexpected-end-tag-before-html 1.213 +#document 1.214 +| <!DOCTYPE html> 1.215 +| <html> 1.216 +| <head> 1.217 +| <body> 1.218 +| "X" 1.219 + 1.220 +#data 1.221 +<!doctypehtml><scrIPt type=text/x-foobar;baz>X</SCRipt 1.222 +#errors 1.223 +(1,9): need-space-after-doctype 1.224 +(1,54): expected-named-closing-tag-but-got-eof 1.225 +#document 1.226 +| <!DOCTYPE html> 1.227 +| <html> 1.228 +| <head> 1.229 +| <script> 1.230 +| type="text/x-foobar;baz" 1.231 +| "X</SCRipt" 1.232 +| <body> 1.233 + 1.234 +#data 1.235 +& 1.236 +#errors 1.237 +(1,1): expected-doctype-but-got-chars 1.238 +#document 1.239 +| <html> 1.240 +| <head> 1.241 +| <body> 1.242 +| "&" 1.243 + 1.244 +#data 1.245 +&# 1.246 +#errors 1.247 +(1,2): expected-numeric-entity 1.248 +(1,2): expected-doctype-but-got-chars 1.249 +#document 1.250 +| <html> 1.251 +| <head> 1.252 +| <body> 1.253 +| "&#" 1.254 + 1.255 +#data 1.256 +&#X 1.257 +#errors 1.258 +(1,3): expected-numeric-entity 1.259 +(1,3): expected-doctype-but-got-chars 1.260 +#document 1.261 +| <html> 1.262 +| <head> 1.263 +| <body> 1.264 +| "&#X" 1.265 + 1.266 +#data 1.267 +&#x 1.268 +#errors 1.269 +(1,3): expected-numeric-entity 1.270 +(1,3): expected-doctype-but-got-chars 1.271 +#document 1.272 +| <html> 1.273 +| <head> 1.274 +| <body> 1.275 +| "&#x" 1.276 + 1.277 +#data 1.278 +- 1.279 +#errors 1.280 +(1,4): numeric-entity-without-semicolon 1.281 +(1,4): expected-doctype-but-got-chars 1.282 +#document 1.283 +| <html> 1.284 +| <head> 1.285 +| <body> 1.286 +| "-" 1.287 + 1.288 +#data 1.289 +&x-test 1.290 +#errors 1.291 +(1,2): expected-doctype-but-got-chars 1.292 +#document 1.293 +| <html> 1.294 +| <head> 1.295 +| <body> 1.296 +| "&x-test" 1.297 + 1.298 +#data 1.299 +<!doctypehtml><p><li> 1.300 +#errors 1.301 +(1,9): need-space-after-doctype 1.302 +#document 1.303 +| <!DOCTYPE html> 1.304 +| <html> 1.305 +| <head> 1.306 +| <body> 1.307 +| <p> 1.308 +| <li> 1.309 + 1.310 +#data 1.311 +<!doctypehtml><p><dt> 1.312 +#errors 1.313 +(1,9): need-space-after-doctype 1.314 +#document 1.315 +| <!DOCTYPE html> 1.316 +| <html> 1.317 +| <head> 1.318 +| <body> 1.319 +| <p> 1.320 +| <dt> 1.321 + 1.322 +#data 1.323 +<!doctypehtml><p><dd> 1.324 +#errors 1.325 +(1,9): need-space-after-doctype 1.326 +#document 1.327 +| <!DOCTYPE html> 1.328 +| <html> 1.329 +| <head> 1.330 +| <body> 1.331 +| <p> 1.332 +| <dd> 1.333 + 1.334 +#data 1.335 +<!doctypehtml><p><form> 1.336 +#errors 1.337 +(1,9): need-space-after-doctype 1.338 +(1,23): expected-closing-tag-but-got-eof 1.339 +#document 1.340 +| <!DOCTYPE html> 1.341 +| <html> 1.342 +| <head> 1.343 +| <body> 1.344 +| <p> 1.345 +| <form> 1.346 + 1.347 +#data 1.348 +<!DOCTYPE html><p></P>X 1.349 +#errors 1.350 +#document 1.351 +| <!DOCTYPE html> 1.352 +| <html> 1.353 +| <head> 1.354 +| <body> 1.355 +| <p> 1.356 +| "X" 1.357 + 1.358 +#data 1.359 +& 1.360 +#errors 1.361 +(1,4): named-entity-without-semicolon 1.362 +(1,4): expected-doctype-but-got-chars 1.363 +#document 1.364 +| <html> 1.365 +| <head> 1.366 +| <body> 1.367 +| "&" 1.368 + 1.369 +#data 1.370 +&AMp; 1.371 +#errors 1.372 +(1,3): expected-named-entity 1.373 +(1,3): expected-doctype-but-got-chars 1.374 +#document 1.375 +| <html> 1.376 +| <head> 1.377 +| <body> 1.378 +| "&AMp;" 1.379 + 1.380 +#data 1.381 +<!DOCTYPE html><html><head></head><body><thisISasillyTESTelementNameToMakeSureCrazyTagNamesArePARSEDcorrectLY> 1.382 +#errors 1.383 +(1,110): expected-closing-tag-but-got-eof 1.384 +#document 1.385 +| <!DOCTYPE html> 1.386 +| <html> 1.387 +| <head> 1.388 +| <body> 1.389 +| <thisisasillytestelementnametomakesurecrazytagnamesareparsedcorrectly> 1.390 + 1.391 +#data 1.392 +<!DOCTYPE html>X</body>X 1.393 +#errors 1.394 +(1,24): unexpected-char-after-body 1.395 +#document 1.396 +| <!DOCTYPE html> 1.397 +| <html> 1.398 +| <head> 1.399 +| <body> 1.400 +| "XX" 1.401 + 1.402 +#data 1.403 +<!DOCTYPE html><!-- X 1.404 +#errors 1.405 +(1,21): eof-in-comment 1.406 +#document 1.407 +| <!DOCTYPE html> 1.408 +| <!-- X --> 1.409 +| <html> 1.410 +| <head> 1.411 +| <body> 1.412 + 1.413 +#data 1.414 +<!DOCTYPE html><table><caption>test TEST</caption><td>test 1.415 +#errors 1.416 +(1,54): unexpected-cell-in-table-body 1.417 +(1,58): expected-closing-tag-but-got-eof 1.418 +#document 1.419 +| <!DOCTYPE html> 1.420 +| <html> 1.421 +| <head> 1.422 +| <body> 1.423 +| <table> 1.424 +| <caption> 1.425 +| "test TEST" 1.426 +| <tbody> 1.427 +| <tr> 1.428 +| <td> 1.429 +| "test" 1.430 + 1.431 +#data 1.432 +<!DOCTYPE html><select><option><optgroup> 1.433 +#errors 1.434 +(1,41): eof-in-select 1.435 +#document 1.436 +| <!DOCTYPE html> 1.437 +| <html> 1.438 +| <head> 1.439 +| <body> 1.440 +| <select> 1.441 +| <option> 1.442 +| <optgroup> 1.443 + 1.444 +#data 1.445 +<!DOCTYPE html><select><optgroup><option></optgroup><option><select><option> 1.446 +#errors 1.447 +(1,68): unexpected-select-in-select 1.448 +(1,76): expected-closing-tag-but-got-eof 1.449 +#document 1.450 +| <!DOCTYPE html> 1.451 +| <html> 1.452 +| <head> 1.453 +| <body> 1.454 +| <select> 1.455 +| <optgroup> 1.456 +| <option> 1.457 +| <option> 1.458 +| <option> 1.459 + 1.460 +#data 1.461 +<!DOCTYPE html><select><optgroup><option><optgroup> 1.462 +#errors 1.463 +(1,51): eof-in-select 1.464 +#document 1.465 +| <!DOCTYPE html> 1.466 +| <html> 1.467 +| <head> 1.468 +| <body> 1.469 +| <select> 1.470 +| <optgroup> 1.471 +| <option> 1.472 +| <optgroup> 1.473 + 1.474 +#data 1.475 +<!DOCTYPE html><datalist><option>foo</datalist>bar 1.476 +#errors 1.477 +#document 1.478 +| <!DOCTYPE html> 1.479 +| <html> 1.480 +| <head> 1.481 +| <body> 1.482 +| <datalist> 1.483 +| <option> 1.484 +| "foo" 1.485 +| "bar" 1.486 + 1.487 +#data 1.488 +<!DOCTYPE html><font><input><input></font> 1.489 +#errors 1.490 +#document 1.491 +| <!DOCTYPE html> 1.492 +| <html> 1.493 +| <head> 1.494 +| <body> 1.495 +| <font> 1.496 +| <input> 1.497 +| <input> 1.498 + 1.499 +#data 1.500 +<!DOCTYPE html><!-- XXX - XXX --> 1.501 +#errors 1.502 +#document 1.503 +| <!DOCTYPE html> 1.504 +| <!-- XXX - XXX --> 1.505 +| <html> 1.506 +| <head> 1.507 +| <body> 1.508 + 1.509 +#data 1.510 +<!DOCTYPE html><!-- XXX - XXX 1.511 +#errors 1.512 +(1,29): eof-in-comment 1.513 +#document 1.514 +| <!DOCTYPE html> 1.515 +| <!-- XXX - XXX --> 1.516 +| <html> 1.517 +| <head> 1.518 +| <body> 1.519 + 1.520 +#data 1.521 +<!DOCTYPE html><!-- XXX - XXX - XXX --> 1.522 +#errors 1.523 +#document 1.524 +| <!DOCTYPE html> 1.525 +| <!-- XXX - XXX - XXX --> 1.526 +| <html> 1.527 +| <head> 1.528 +| <body> 1.529 + 1.530 +#data 1.531 +<isindex test=x name=x> 1.532 +#errors 1.533 +(1,23): expected-doctype-but-got-start-tag 1.534 +(1,23): deprecated-tag 1.535 +#document 1.536 +| <html> 1.537 +| <head> 1.538 +| <body> 1.539 +| <form> 1.540 +| <hr> 1.541 +| <label> 1.542 +| "This is a searchable index. Enter search keywords: " 1.543 +| <input> 1.544 +| name="isindex" 1.545 +| test="x" 1.546 +| <hr> 1.547 + 1.548 +#data 1.549 +test 1.550 +test 1.551 +#errors 1.552 +(2,4): expected-doctype-but-got-chars 1.553 +#document 1.554 +| <html> 1.555 +| <head> 1.556 +| <body> 1.557 +| "test 1.558 +test" 1.559 + 1.560 +#data 1.561 +<!DOCTYPE html><body><title>test</body></title> 1.562 +#errors 1.563 +#document 1.564 +| <!DOCTYPE html> 1.565 +| <html> 1.566 +| <head> 1.567 +| <body> 1.568 +| <title> 1.569 +| "test</body>" 1.570 + 1.571 +#data 1.572 +<!DOCTYPE html><body><title>X</title><meta name=z><link rel=foo><style> 1.573 +x { content:"</style" } </style> 1.574 +#errors 1.575 +#document 1.576 +| <!DOCTYPE html> 1.577 +| <html> 1.578 +| <head> 1.579 +| <body> 1.580 +| <title> 1.581 +| "X" 1.582 +| <meta> 1.583 +| name="z" 1.584 +| <link> 1.585 +| rel="foo" 1.586 +| <style> 1.587 +| " 1.588 +x { content:"</style" } " 1.589 + 1.590 +#data 1.591 +<!DOCTYPE html><select><optgroup></optgroup></select> 1.592 +#errors 1.593 +#document 1.594 +| <!DOCTYPE html> 1.595 +| <html> 1.596 +| <head> 1.597 +| <body> 1.598 +| <select> 1.599 +| <optgroup> 1.600 + 1.601 +#data 1.602 + 1.603 + 1.604 +#errors 1.605 +(2,1): expected-doctype-but-got-eof 1.606 +#document 1.607 +| <html> 1.608 +| <head> 1.609 +| <body> 1.610 + 1.611 +#data 1.612 +<!DOCTYPE html> <html> 1.613 +#errors 1.614 +#document 1.615 +| <!DOCTYPE html> 1.616 +| <html> 1.617 +| <head> 1.618 +| <body> 1.619 + 1.620 +#data 1.621 +<!DOCTYPE html><script> 1.622 +</script> <title>x</title> </head> 1.623 +#errors 1.624 +#document 1.625 +| <!DOCTYPE html> 1.626 +| <html> 1.627 +| <head> 1.628 +| <script> 1.629 +| " 1.630 +" 1.631 +| " " 1.632 +| <title> 1.633 +| "x" 1.634 +| " " 1.635 +| <body> 1.636 + 1.637 +#data 1.638 +<!DOCTYPE html><html><body><html id=x> 1.639 +#errors 1.640 +(1,38): non-html-root 1.641 +#document 1.642 +| <!DOCTYPE html> 1.643 +| <html> 1.644 +| id="x" 1.645 +| <head> 1.646 +| <body> 1.647 + 1.648 +#data 1.649 +<!DOCTYPE html>X</body><html id="x"> 1.650 +#errors 1.651 +(1,36): non-html-root 1.652 +#document 1.653 +| <!DOCTYPE html> 1.654 +| <html> 1.655 +| id="x" 1.656 +| <head> 1.657 +| <body> 1.658 +| "X" 1.659 + 1.660 +#data 1.661 +<!DOCTYPE html><head><html id=x> 1.662 +#errors 1.663 +(1,32): non-html-root 1.664 +#document 1.665 +| <!DOCTYPE html> 1.666 +| <html> 1.667 +| id="x" 1.668 +| <head> 1.669 +| <body> 1.670 + 1.671 +#data 1.672 +<!DOCTYPE html>X</html>X 1.673 +#errors 1.674 +(1,24): expected-eof-but-got-char 1.675 +#document 1.676 +| <!DOCTYPE html> 1.677 +| <html> 1.678 +| <head> 1.679 +| <body> 1.680 +| "XX" 1.681 + 1.682 +#data 1.683 +<!DOCTYPE html>X</html> 1.684 +#errors 1.685 +#document 1.686 +| <!DOCTYPE html> 1.687 +| <html> 1.688 +| <head> 1.689 +| <body> 1.690 +| "X " 1.691 + 1.692 +#data 1.693 +<!DOCTYPE html>X</html><p>X 1.694 +#errors 1.695 +(1,26): expected-eof-but-got-start-tag 1.696 +#document 1.697 +| <!DOCTYPE html> 1.698 +| <html> 1.699 +| <head> 1.700 +| <body> 1.701 +| "X" 1.702 +| <p> 1.703 +| "X" 1.704 + 1.705 +#data 1.706 +<!DOCTYPE html>X<p/x/y/z> 1.707 +#errors 1.708 +(1,19): unexpected-character-after-solidus-in-tag 1.709 +(1,21): unexpected-character-after-solidus-in-tag 1.710 +(1,23): unexpected-character-after-solidus-in-tag 1.711 +#document 1.712 +| <!DOCTYPE html> 1.713 +| <html> 1.714 +| <head> 1.715 +| <body> 1.716 +| "X" 1.717 +| <p> 1.718 +| x="" 1.719 +| y="" 1.720 +| z="" 1.721 + 1.722 +#data 1.723 +<!DOCTYPE html><!--x-- 1.724 +#errors 1.725 +(1,22): eof-in-comment-double-dash 1.726 +#document 1.727 +| <!DOCTYPE html> 1.728 +| <!-- x --> 1.729 +| <html> 1.730 +| <head> 1.731 +| <body> 1.732 + 1.733 +#data 1.734 +<!DOCTYPE html><table><tr><td></p></table> 1.735 +#errors 1.736 +(1,34): unexpected-end-tag 1.737 +#document 1.738 +| <!DOCTYPE html> 1.739 +| <html> 1.740 +| <head> 1.741 +| <body> 1.742 +| <table> 1.743 +| <tbody> 1.744 +| <tr> 1.745 +| <td> 1.746 +| <p> 1.747 + 1.748 +#data 1.749 +<!DOCTYPE <!DOCTYPE HTML>><!--<!--x-->--> 1.750 +#errors 1.751 +(1,20): expected-space-or-right-bracket-in-doctype 1.752 +(1,25): unknown-doctype 1.753 +(1,35): unexpected-char-in-comment 1.754 +#document 1.755 +| <!DOCTYPE <!doctype> 1.756 +| <html> 1.757 +| <head> 1.758 +| <body> 1.759 +| ">" 1.760 +| <!-- <!--x --> 1.761 +| "-->" 1.762 + 1.763 +#data 1.764 +<!doctype html><div><form></form><div></div></div> 1.765 +#errors 1.766 +#document 1.767 +| <!DOCTYPE html> 1.768 +| <html> 1.769 +| <head> 1.770 +| <body> 1.771 +| <div> 1.772 +| <form> 1.773 +| <div>