summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-03-10 13:05:06 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-03-10 13:05:06 +0000
commit81619b1337f5ddfdb8c8a8d77c10d752a349b3f7 (patch)
tree84538be7bb1f155c7a23fa435952392aa384752e /test
parentb5c7452b78896deedc117e3c8d1a9875f13ddcc4 (diff)
downloadlibhubbub-81619b1337f5ddfdb8c8a8d77c10d752a349b3f7.tar.gz
libhubbub-81619b1337f5ddfdb8c8a8d77c10d752a349b3f7.tar.bz2
Sync treebuilder tests with html5lib
svn path=/trunk/hubbub/; revision=6757
Diffstat (limited to 'test')
-rw-r--r--test/data/tree-construction/tests1.dat299
-rw-r--r--test/data/tree-construction/tests2.dat18
-rw-r--r--test/data/tree-construction/tests3.dat1
-rw-r--r--test/data/tree-construction/tests4.dat1
-rw-r--r--test/data/tree-construction/tests6.dat38
-rw-r--r--test/data/tree-construction/tests7.dat71
-rw-r--r--test/data/tree-construction/tests8.dat72
-rw-r--r--test/data/tree-construction/tests9.dat128
8 files changed, 344 insertions, 284 deletions
diff --git a/test/data/tree-construction/tests1.dat b/test/data/tree-construction/tests1.dat
index c9f627b..db78aee 100644
--- a/test/data/tree-construction/tests1.dat
+++ b/test/data/tree-construction/tests1.dat
@@ -113,6 +113,8 @@ Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE.
<html><head></body></html>
#errors
Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE.
+Line: 1 Col: 19 Unexpected end tag (body).
+Line: 1 Col: 26 Unexpected end tag (html).
#document
| <html>
| <head>
@@ -149,6 +151,7 @@ Line: 1 Col: 6 Unexpected start tag (body). Expected DOCTYPE.
<head></html>
#errors
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
+Line: 1 Col: 13 Unexpected end tag (html). Ignored.
#document
| <html>
| <head>
@@ -167,6 +170,7 @@ Line: 1 Col: 7 Unexpected end tag (head). Expected DOCTYPE.
</body>
#errors
Line: 1 Col: 7 Unexpected end tag (body). Expected DOCTYPE.
+Line: 1 Col: 7 Unexpected end tag (body) after the (implied) root element.
#document
| <html>
| <head>
@@ -176,6 +180,7 @@ Line: 1 Col: 7 Unexpected end tag (body). Expected DOCTYPE.
</html>
#errors
Line: 1 Col: 7 Unexpected end tag (html). Expected DOCTYPE.
+Line: 1 Col: 7 Unexpected end tag (html) after the (implied) root element.
#document
| <html>
| <head>
@@ -222,32 +227,25 @@ Line: 1 Col: 30 Expected closing tag. Unexpected end of file.
#data
<h1>Hello<h2>World
#errors
-Line: 1 Col: 4 Unexpected start tag (h1). Expected DOCTYPE.
-Line: 1 Col: 18 Expected closing tag. Unexpected end of file.
+4: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”.
+13: Heading cannot be a child of another heading.
+18: End of file seen and there were open elements.
#document
| <html>
| <head>
| <body>
| <h1>
| "Hello"
-| <h2>
-| "World"
+| <h2>
+| "World"
#data
<a><p>X<a>Y</a>Z</p></a>
#errors
-<<<<<<< .mine
-3: missing document type declaration
-10: a element start tag implying a element end tag
-10: first AAA hit
-10: mismatched a element end tag (misnested tags)
-24: mismatched a element end tag (no matching start tag)
-=======
Line: 1 Col: 3 Unexpected start tag (a). Expected DOCTYPE.
Line: 1 Col: 10 Unexpected start tag (a) implies end tag (a).
Line: 1 Col: 10 End tag (a) violates step 1, paragraph 3 of the adoption agency algorithm.
Line: 1 Col: 24 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm.
->>>>>>> .r1092
#document
| <html>
| <head>
@@ -341,12 +339,12 @@ Line: 1 Col: 11 Unexpected end tag (p). Ignored.
#data
<select><b><option><select><option></b></select>X
#errors
-8: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”.
-11: Stray “b” start tag.
-27: “select” start tag where end tag expected.
-39: No element “b” to close.
-48: Stray end tag “select”.
-49: End of file seen and there were open elements.
+Line: 1 Col: 8 Unexpected start tag (select). Expected DOCTYPE.
+Line: 1 Col: 11 Unexpected start tag token (b) in the select phase. Ignored.
+Line: 1 Col: 27 Unexpected select start tag in the select phase treated as select end tag.
+Line: 1 Col: 39 End tag (b) violates step 1, paragraph 1 of the adoption agency algorithm.
+Line: 1 Col: 48 Unexpected end tag (select). Ignored.
+Line: 1 Col: 49 Expected closing tag. Unexpected end of file.
#document
| <html>
| <head>
@@ -366,6 +364,7 @@ Line: 1 Col: 40 Got table cell end tag (td) while required end tags are missing.
Line: 1 Col: 43 Unexpected start tag (a) in table context caused voodoo mode.
Line: 1 Col: 43 Unexpected start tag (a) implies end tag (a).
Line: 1 Col: 43 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm.
+Line: 1 Col: 51 Unexpected implied end tag (a) in the table phase.
Line: 1 Col: 63 Unexpected start tag (a) implies end tag (a).
Line: 1 Col: 64 Expected closing tag. Unexpected end of file.
#document
@@ -415,9 +414,11 @@ Line: 1 Col: 16 Expected closing tag. Unexpected end of file.
Line: 1 Col: 7 Unexpected '-' after '--' found in comment.
Line: 1 Col: 14 Unexpected start tag (font). Expected DOCTYPE.
Line: 1 Col: 38 Unexpected non-space characters in table context caused voodoo mode.
+Line: 1 Col: 41 Unexpected start tag (b) in table context caused voodoo mode.
+Line: 1 Col: 48 Unexpected implied end tag (b) in the table phase.
Line: 1 Col: 48 Unexpected table cell start tag (th) in the table body phase.
Line: 1 Col: 63 Got table cell end tag (th) while required end tags are missing.
-Line: 1 Col: 71 Expected closing tag. Unexpected end of file.
+Line: 1 Col: 71 Unexpected end of file. Expected table content.
#document
| <!-- - -->
| <html>
@@ -459,8 +460,8 @@ Line: 1 Col: 61 Unexpected end tag (li). Missing end tag (body).
#data
<!DOCTYPE html>A<option>B<optgroup>C<select>D</option>E
#errors
-54: Stray end tag “option”
-55: End of file seen and there were open elements.
+Line: 1 Col: 54 Unexpected end tag (option) in the select phase. Ignored.
+Line: 1 Col: 55 Expected closing tag. Unexpected end of file.
#document
| <!DOCTYPE html>
| <html>
@@ -469,10 +470,10 @@ Line: 1 Col: 61 Unexpected end tag (li). Missing end tag (body).
| "A"
| <option>
| "B"
-| <optgroup>
-| "C"
-| <select>
-| "DE"
+| <optgroup>
+| "C"
+| <select>
+| "DE"
#data
<
@@ -1128,7 +1129,10 @@ Line: 1 Col: 15 Unexpected start tag (a). Expected DOCTYPE.
Line: 1 Col: 39 Unexpected start tag (a) in table context caused voodoo mode.
Line: 1 Col: 39 Unexpected start tag (a) implies end tag (a).
Line: 1 Col: 39 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm.
+Line: 1 Col: 45 Unexpected implied end tag (a) in the table phase.
+Line: 1 Col: 68 Unexpected implied end tag (a) in the table phase.
Line: 1 Col: 71 Expected closing tag. Unexpected end of file.
+
#document
| <html>
| <head>
@@ -1178,7 +1182,9 @@ Line: 1 Col: 71 Expected closing tag. Unexpected end of file.
#errors
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
Line: 1 Col: 22 Unexpected start tag (a) in table context caused voodoo mode.
+Line: 1 Col: 29 Unexpected implied end tag (a) in the table phase.
Line: 1 Col: 54 Got table cell end tag (td) while required end tags are missing.
+Line: 1 Col: 68 Unexpected implied end tag (a) in the table phase.
Line: 1 Col: 71 Expected closing tag. Unexpected end of file.
#document
| <html>
@@ -1366,9 +1372,8 @@ Line: 1 Col: 35 Expected closing tag. Unexpected end of file.
#data
<head></p><meta><p>
#errors
-6: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”.
-10: Stray end tag “p”.
-16: “meta” element outside “head”.
+Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
+Line: 1 Col: 10 Unexpected end tag (p). Ignored.
#document
| <html>
| <head>
@@ -1379,9 +1384,8 @@ Line: 1 Col: 35 Expected closing tag. Unexpected end of file.
#data
<head></html><meta><p>
#errors
-6: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”.
-13: Stray end tag “html”.
-19: “meta” element outside “head”.
+Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
+Line: 1 Col: 13 Unexpected end tag (html). Ignored.
#document
| <html>
| <head>
@@ -1429,14 +1433,15 @@ Line: 1 Col: 29 Expected closing tag. Unexpected end of file.
#data
<h1><h2>
#errors
-Line: 1 Col: 4 Unexpected start tag (h1). Expected DOCTYPE.
-Line: 1 Col: 8 Expected closing tag. Unexpected end of file.
+4: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”.
+8: Heading cannot be a child of another heading.
+8: End of file seen and there were open elements.
#document
| <html>
| <head>
| <body>
| <h1>
-| <h2>
+| <h2>
#data
<a><p><a></a></p></a>
@@ -1516,12 +1521,12 @@ Line: 1 Col: 11 Unexpected end tag (p). Ignored.
#data
<select><b><option><select><option></b></select>
#errors
-8: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”.
-11: Stray “b” start tag.
-27: “select” start tag where end tag expected.
-39: No element “b” to close.
-48: Stray end tag “select”.
-48: End of file seen and there were open elements.
+Line: 1 Col: 8 Unexpected start tag (select). Expected DOCTYPE.
+Line: 1 Col: 11 Unexpected start tag token (b) in the select phase. Ignored.
+Line: 1 Col: 27 Unexpected select start tag in the select phase treated as select end tag.
+Line: 1 Col: 39 End tag (b) violates step 1, paragraph 1 of the adoption agency algorithm.
+Line: 1 Col: 48 Unexpected end tag (select). Ignored.
+Line: 1 Col: 48 Expected closing tag. Unexpected end of file.
#document
| <html>
| <head>
@@ -1550,6 +1555,7 @@ Line: 1 Col: 40 Got table cell end tag (td) while required end tags are missing.
Line: 1 Col: 43 Unexpected start tag (a) in table context caused voodoo mode.
Line: 1 Col: 43 Unexpected start tag (a) implies end tag (a).
Line: 1 Col: 43 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm.
+Line: 1 Col: 51 Unexpected implied end tag (a) in the table phase.
Line: 1 Col: 54 Unexpected start tag (a) implies end tag (a).
Line: 1 Col: 54 End tag (a) violates step 1, paragraph 2 of the adoption agency algorithm.
Line: 1 Col: 54 Expected closing tag. Unexpected end of file.
@@ -1629,11 +1635,11 @@ Line: 1 Col: 105 Expected closing tag. Unexpected end of file.
#data
<h1><table><td><h3></table><h3></h1>
#errors
-Line: 1 Col: 4 Unexpected start tag (h1). Expected DOCTYPE.
-Line: 1 Col: 15 Unexpected table cell start tag (td) in the table body phase.
-Line: 1 Col: 27 Got table cell end tag (td) while required end tags are missing.
-Line: 1 Col: 36 End tag (h1) seen too early. Expected other end tag.
-Line: 1 Col: 36 Expected closing tag. Unexpected end of file.
+4: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”.
+15: “td” start tag in table body.
+27: Unclosed elements.
+31: Heading cannot be a child of another heading.
+36: End tag “h1” seen but there were unclosed elements.
#document
| <html>
| <head>
@@ -1644,7 +1650,7 @@ Line: 1 Col: 36 Expected closing tag. Unexpected end of file.
| <tr>
| <td>
| <h3>
-| <h3>
+| <h3>
#data
<table><colgroup><col><colgroup><col><col><col><colgroup><col><col><thead><tr><td></table>
@@ -1719,95 +1725,96 @@ Line: 1 Col: 80 Unexpected start tag colgroup. Ignored.
#data
</strong></b></em></i></u></strike></s></blink></tt></pre></big></small></font></select></h1></h2></h3></h4></h5></h6></body></br></a></img></title></span></style></script></table></th></td></tr></frame></area></link></param></hr></input></col></base></meta></basefont></bgsound></embed></spacer></p></dd></dt></caption></colgroup></tbody></tfoot></thead></address></blockquote></center></dir></div></dl></fieldset></listing></menu></ol></ul></li></nobr></wbr></form></button></marquee></object></html></frameset></head></iframe></image></isindex></noembed></noframes></noscript></optgroup></option></plaintext></textarea>
#errors
-9: End tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”.
-9: Stray end tag “strong”.
-13: Stray end tag “b”.
-18: Stray end tag “em”.
-22: Stray end tag “i”.
-26: Stray end tag “u”.
-35: Stray end tag “strike”.
-39: Stray end tag “s”.
-47: Stray end tag “blink”.
-52: Stray end tag “tt”.
-58: Stray end tag “pre”.
-64: Stray end tag “big”.
-72: Stray end tag “small”.
-79: Stray end tag “font”.
-88: Stray end tag “select”.
-93: Stray end tag “h1”.
-98: Stray end tag “h2”.
-103: Stray end tag “h3”.
-108: Stray end tag “h4”.
-113: Stray end tag “h5”.
-118: Stray end tag “h6”.
-125: Stray end tag “body”.
-130: Stray end tag “br”.
-134: Stray end tag “a”.
-140: Stray end tag “img”.
-148: Stray end tag “title”.
-155: Stray end tag “span”.
-163: Stray end tag “style”.
-172: Stray end tag “script”.
-180: Stray end tag “table”.
-185: Stray end tag “th”.
-190: Stray end tag “td”.
-195: Stray end tag “tr”.
-203: Stray end tag “frame”.
-210: Stray end tag “area”.
-217: Stray end tag “link”.
-225: Stray end tag “param”.
-230: Stray end tag “hr”.
-238: Stray end tag “input”.
-244: Stray end tag “col”.
-251: Stray end tag “base”.
-258: Stray end tag “meta”.
-269: Stray end tag “basefont”.
-279: Stray end tag “bgsound”.
-287: Stray end tag “embed”.
-296: Stray end tag “spacer”.
-300: Stray end tag “p”.
-305: Stray end tag “dd”.
-310: Stray end tag “dt”.
-320: Stray end tag “caption”.
-331: Stray end tag “colgroup”.
-339: Stray end tag “tbody”.
-347: Stray end tag “tfoot”.
-355: Stray end tag “thead”.
-365: Stray end tag “address”.
-378: Stray end tag “blockquote”.
-387: Stray end tag “center”.
-393: Stray end tag “dir”.
-399: Stray end tag “div”.
-404: Stray end tag “dl”.
-415: Stray end tag “fieldset”.
-425: Stray end tag “listing”.
-432: Stray end tag “menu”.
-437: Stray end tag “ol”.
-442: Stray end tag “ul”.
-447: Stray end tag “li”.
-454: Stray end tag “nobr”.
-460: Stray end tag “wbr”.
-467: Stray end tag “form”.
-476: Stray end tag “button”.
-486: Stray end tag “marquee”.
-495: Stray end tag “object”.
-502: Stray end tag “html”.
-513: Stray end tag “frameset”.
-520: Stray end tag “head”.
-529: Stray end tag “iframe”.
-537: Stray end tag “image”.
-547: Stray end tag “isindex”.
-557: Stray end tag “noembed”.
-568: Stray end tag “noframes”.
-579: Stray end tag “noscript”.
-590: Stray end tag “optgroup”.
-599: Stray end tag “option”.
-611: Stray end tag “plaintext”.
-622: Stray end tag “textarea”.
+Line: 1 Col: 9 Unexpected end tag (strong). Expected DOCTYPE.
+Line: 1 Col: 9 Unexpected end tag (strong) after the (implied) root element.
+Line: 1 Col: 13 Unexpected end tag (b) after the (implied) root element.
+Line: 1 Col: 18 Unexpected end tag (em) after the (implied) root element.
+Line: 1 Col: 22 Unexpected end tag (i) after the (implied) root element.
+Line: 1 Col: 26 Unexpected end tag (u) after the (implied) root element.
+Line: 1 Col: 35 Unexpected end tag (strike) after the (implied) root element.
+Line: 1 Col: 39 Unexpected end tag (s) after the (implied) root element.
+Line: 1 Col: 47 Unexpected end tag (blink) after the (implied) root element.
+Line: 1 Col: 52 Unexpected end tag (tt) after the (implied) root element.
+Line: 1 Col: 58 Unexpected end tag (pre) after the (implied) root element.
+Line: 1 Col: 64 Unexpected end tag (big) after the (implied) root element.
+Line: 1 Col: 72 Unexpected end tag (small) after the (implied) root element.
+Line: 1 Col: 79 Unexpected end tag (font) after the (implied) root element.
+Line: 1 Col: 88 Unexpected end tag (select) after the (implied) root element.
+Line: 1 Col: 93 Unexpected end tag (h1) after the (implied) root element.
+Line: 1 Col: 98 Unexpected end tag (h2) after the (implied) root element.
+Line: 1 Col: 103 Unexpected end tag (h3) after the (implied) root element.
+Line: 1 Col: 108 Unexpected end tag (h4) after the (implied) root element.
+Line: 1 Col: 113 Unexpected end tag (h5) after the (implied) root element.
+Line: 1 Col: 118 Unexpected end tag (h6) after the (implied) root element.
+Line: 1 Col: 125 Unexpected end tag (body) after the (implied) root element.
+Line: 1 Col: 130 Unexpected end tag (br). Treated as br element.
+Line: 1 Col: 134 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm.
+Line: 1 Col: 140 This element (img) has no end tag.
+Line: 1 Col: 148 Unexpected end tag (title). Ignored.
+Line: 1 Col: 155 Unexpected end tag (span). Ignored.
+Line: 1 Col: 163 Unexpected end tag (style). Ignored.
+Line: 1 Col: 172 Unexpected end tag (script). Ignored.
+Line: 1 Col: 180 Unexpected end tag (table). Ignored.
+Line: 1 Col: 185 Unexpected end tag (th). Ignored.
+Line: 1 Col: 190 Unexpected end tag (td). Ignored.
+Line: 1 Col: 195 Unexpected end tag (tr). Ignored.
+Line: 1 Col: 203 This element (frame) has no end tag.
+Line: 1 Col: 210 This element (area) has no end tag.
+Line: 1 Col: 217 Unexpected end tag (link). Ignored.
+Line: 1 Col: 225 This element (param) has no end tag.
+Line: 1 Col: 230 This element (hr) has no end tag.
+Line: 1 Col: 238 This element (input) has no end tag.
+Line: 1 Col: 244 Unexpected end tag (col). Ignored.
+Line: 1 Col: 251 Unexpected end tag (base). Ignored.
+Line: 1 Col: 258 Unexpected end tag (meta). Ignored.
+Line: 1 Col: 269 This element (basefont) has no end tag.
+Line: 1 Col: 279 This element (bgsound) has no end tag.
+Line: 1 Col: 287 This element (embed) has no end tag.
+Line: 1 Col: 296 This element (spacer) has no end tag.
+Line: 1 Col: 300 Unexpected end tag (p). Ignored.
+Line: 1 Col: 305 End tag (dd) seen too early. Expected other end tag.
+Line: 1 Col: 310 End tag (dt) seen too early. Expected other end tag.
+Line: 1 Col: 320 Unexpected end tag (caption). Ignored.
+Line: 1 Col: 331 Unexpected end tag (colgroup). Ignored.
+Line: 1 Col: 339 Unexpected end tag (tbody). Ignored.
+Line: 1 Col: 347 Unexpected end tag (tfoot). Ignored.
+Line: 1 Col: 355 Unexpected end tag (thead). Ignored.
+Line: 1 Col: 365 End tag (address) seen too early. Expected other end tag.
+Line: 1 Col: 378 End tag (blockquote) seen too early. Expected other end tag.
+Line: 1 Col: 387 End tag (center) seen too early. Expected other end tag.
+Line: 1 Col: 393 Unexpected end tag (dir). Ignored.
+Line: 1 Col: 399 End tag (div) seen too early. Expected other end tag.
+Line: 1 Col: 404 End tag (dl) seen too early. Expected other end tag.
+Line: 1 Col: 415 End tag (fieldset) seen too early. Expected other end tag.
+Line: 1 Col: 425 End tag (listing) seen too early. Expected other end tag.
+Line: 1 Col: 432 End tag (menu) seen too early. Expected other end tag.
+Line: 1 Col: 437 End tag (ol) seen too early. Expected other end tag.
+Line: 1 Col: 442 End tag (ul) seen too early. Expected other end tag.
+Line: 1 Col: 447 End tag (li) seen too early. Expected other end tag.
+Line: 1 Col: 454 End tag (nobr) violates step 1, paragraph 1 of the adoption agency algorithm.
+Line: 1 Col: 460 This element (wbr) has no end tag.
+Line: 1 Col: 476 End tag (button) seen too early. Expected other end tag.
+Line: 1 Col: 486 End tag (marquee) seen too early. Expected other end tag.
+Line: 1 Col: 495 End tag (object) seen too early. Expected other end tag.
+Line: 1 Col: 513 Unexpected end tag (). Ignored.
+Line: 1 Col: 513 Unexpected end tag (frameset). Ignored.
+Line: 1 Col: 520 Unexpected end tag (head). Ignored.
+Line: 1 Col: 529 Unexpected end tag (iframe). Ignored.
+Line: 1 Col: 537 This element (image) has no end tag.
+Line: 1 Col: 547 This element (isindex) has no end tag.
+Line: 1 Col: 557 Unexpected end tag (noembed). Ignored.
+Line: 1 Col: 568 Unexpected end tag (noframes). Ignored.
+Line: 1 Col: 579 Unexpected end tag (noscript). Ignored.
+Line: 1 Col: 590 Unexpected end tag (optgroup). Ignored.
+Line: 1 Col: 599 Unexpected end tag (option). Ignored.
+Line: 1 Col: 611 Unexpected end tag (plaintext). Ignored.
+Line: 1 Col: 622 Unexpected end tag (textarea). Ignored.
#document
| <html>
| <head>
| <body>
+| <br>
+| <p>
#data
<table><tr></strong></b></em></i></u></strike></s></blink></tt></pre></big></small></font></select></h1></h2></h3></h4></h5></h6></body></br></a></img></title></span></style></script></table></th></td></tr></frame></area></link></param></hr></input></col></base></meta></basefont></bgsound></embed></spacer></p></dd></dt></caption></colgroup></tbody></tfoot></thead></address></blockquote></center></dir></div></dl></fieldset></listing></menu></ol></ul></li></nobr></wbr></form></button></marquee></object></html></frameset></head></iframe></image></isindex></noembed></noframes></noscript></optgroup></option></plaintext></textarea>
@@ -1815,32 +1822,58 @@ Line: 1 Col: 80 Unexpected start tag colgroup. Ignored.
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
Line: 1 Col: 20 Unexpected end tag (strong) in table context caused voodoo mode.
Line: 1 Col: 20 End tag (strong) violates step 1, paragraph 1 of the adoption agency algorithm.
+Line: 1 Col: 24 Unexpected end tag (b) in table context caused voodoo mode.
Line: 1 Col: 24 End tag (b) violates step 1, paragraph 1 of the adoption agency algorithm.
+Line: 1 Col: 29 Unexpected end tag (em) in table context caused voodoo mode.
Line: 1 Col: 29 End tag (em) violates step 1, paragraph 1 of the adoption agency algorithm.
+Line: 1 Col: 33 Unexpected end tag (i) in table context caused voodoo mode.
Line: 1 Col: 33 End tag (i) violates step 1, paragraph 1 of the adoption agency algorithm.
+Line: 1 Col: 37 Unexpected end tag (u) in table context caused voodoo mode.
Line: 1 Col: 37 End tag (u) violates step 1, paragraph 1 of the adoption agency algorithm.
+Line: 1 Col: 46 Unexpected end tag (strike) in table context caused voodoo mode.
Line: 1 Col: 46 End tag (strike) violates step 1, paragraph 1 of the adoption agency algorithm.
+Line: 1 Col: 50 Unexpected end tag (s) in table context caused voodoo mode.
Line: 1 Col: 50 End tag (s) violates step 1, paragraph 1 of the adoption agency algorithm.
+Line: 1 Col: 58 Unexpected end tag (blink) in table context caused voodoo mode.
Line: 1 Col: 58 Unexpected end tag (blink). Ignored.
+Line: 1 Col: 63 Unexpected end tag (tt) in table context caused voodoo mode.
Line: 1 Col: 63 End tag (tt) violates step 1, paragraph 1 of the adoption agency algorithm.
+Line: 1 Col: 69 Unexpected end tag (pre) in table context caused voodoo mode.
Line: 1 Col: 69 End tag (pre) seen too early. Expected other end tag.
+Line: 1 Col: 75 Unexpected end tag (big) in table context caused voodoo mode.
Line: 1 Col: 75 End tag (big) violates step 1, paragraph 1 of the adoption agency algorithm.
+Line: 1 Col: 83 Unexpected end tag (small) in table context caused voodoo mode.
Line: 1 Col: 83 End tag (small) violates step 1, paragraph 1 of the adoption agency algorithm.
+Line: 1 Col: 90 Unexpected end tag (font) in table context caused voodoo mode.
Line: 1 Col: 90 End tag (font) violates step 1, paragraph 1 of the adoption agency algorithm.
+Line: 1 Col: 99 Unexpected end tag (select) in table context caused voodoo mode.
Line: 1 Col: 99 Unexpected end tag (select). Ignored.
+Line: 1 Col: 104 Unexpected end tag (h1) in table context caused voodoo mode.
Line: 1 Col: 104 End tag (h1) seen too early. Expected other end tag.
+Line: 1 Col: 109 Unexpected end tag (h2) in table context caused voodoo mode.
Line: 1 Col: 109 End tag (h2) seen too early. Expected other end tag.
+Line: 1 Col: 114 Unexpected end tag (h3) in table context caused voodoo mode.
Line: 1 Col: 114 End tag (h3) seen too early. Expected other end tag.
+Line: 1 Col: 119 Unexpected end tag (h4) in table context caused voodoo mode.
Line: 1 Col: 119 End tag (h4) seen too early. Expected other end tag.
+Line: 1 Col: 124 Unexpected end tag (h5) in table context caused voodoo mode.
Line: 1 Col: 124 End tag (h5) seen too early. Expected other end tag.
+Line: 1 Col: 129 Unexpected end tag (h6) in table context caused voodoo mode.
Line: 1 Col: 129 End tag (h6) seen too early. Expected other end tag.
Line: 1 Col: 136 Unexpected end tag (body) in the table row phase. Ignored.
+Line: 1 Col: 141 Unexpected end tag (br) in table context caused voodoo mode.
Line: 1 Col: 141 Unexpected end tag (br). Treated as br element.
+Line: 1 Col: 145 Unexpected end tag (a) in table context caused voodoo mode.
Line: 1 Col: 145 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm.
+Line: 1 Col: 151 Unexpected end tag (img) in table context caused voodoo mode.
Line: 1 Col: 151 This element (img) has no end tag.
+Line: 1 Col: 159 Unexpected end tag (title) in table context caused voodoo mode.
Line: 1 Col: 159 Unexpected end tag (title). Ignored.
+Line: 1 Col: 166 Unexpected end tag (span) in table context caused voodoo mode.
Line: 1 Col: 166 Unexpected end tag (span). Ignored.
+Line: 1 Col: 174 Unexpected end tag (style) in table context caused voodoo mode.
Line: 1 Col: 174 Unexpected end tag (style). Ignored.
+Line: 1 Col: 183 Unexpected end tag (script) in table context caused voodoo mode.
Line: 1 Col: 183 Unexpected end tag (script). Ignored.
Line: 1 Col: 196 Unexpected end tag (th). Ignored.
Line: 1 Col: 201 Unexpected end tag (td). Ignored.
@@ -1880,12 +1913,10 @@ Line: 1 Col: 453 End tag (ul) seen too early. Expected other end tag.
Line: 1 Col: 458 End tag (li) seen too early. Expected other end tag.
Line: 1 Col: 465 End tag (nobr) violates step 1, paragraph 1 of the adoption agency algorithm.
Line: 1 Col: 471 This element (wbr) has no end tag.
-Line: 1 Col: 478 End tag (form) seen too early. Ignored.
Line: 1 Col: 487 End tag (button) seen too early. Expected other end tag.
Line: 1 Col: 497 End tag (marquee) seen too early. Expected other end tag.
Line: 1 Col: 506 End tag (object) seen too early. Expected other end tag.
-Line: 1 Col: 524 Unexpected end tag (frameset). Expected end of file.
-Line: 1 Col: 524 Unexpected end tag token (frameset) in the after body phase.
+Line: 1 Col: 524 Unexpected end tag (). Ignored.
Line: 1 Col: 524 Unexpected end tag (frameset). Ignored.
Line: 1 Col: 531 Unexpected end tag (head). Ignored.
Line: 1 Col: 540 Unexpected end tag (iframe). Ignored.
diff --git a/test/data/tree-construction/tests2.dat b/test/data/tree-construction/tests2.dat
index 34b0745..eb9b444 100644
--- a/test/data/tree-construction/tests2.dat
+++ b/test/data/tree-construction/tests2.dat
@@ -129,7 +129,7 @@ Line: 1 Col: 11 Unexpected end of file. Expected end tag (script).
#errors
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
Line: 1 Col: 18 Unexpected start tag (plaintext) in table context caused voodoo mode.
-Line: 1 Col: 22 Expected closing tag. Unexpected end of file.
+Line: 1 Col: 22 Unexpected end of file. Expected table content.
#document
| <html>
| <head>
@@ -154,7 +154,7 @@ Line: 1 Col: 23 Expected closing tag. Unexpected end of file.
<!DOCTYPE html><table><tr>TEST
#errors
Line: 1 Col: 30 Unexpected non-space characters in table context caused voodoo mode.
-Line: 1 Col: 30 Expected closing tag. Unexpected end of file.
+Line: 1 Col: 30 Unexpected end of file. Expected table content.
#document
| <!DOCTYPE html>
| <html>
@@ -454,8 +454,8 @@ Line: 1 Col: 41 Expected closing tag. Unexpected end of file.
#data
<!DOCTYPE html><select><optgroup><option></optgroup><option><select><option>
#errors
-68: select start tag where end tag expected.
-76: End of file seen and there were open elements.
+Line: 1 Col: 68 Unexpected select start tag in the select phase treated as select end tag.
+Line: 1 Col: 76 Expected closing tag. Unexpected end of file.
#document
| <!DOCTYPE html>
| <html>
@@ -693,7 +693,6 @@ Line: 1 Col: 32 html needs to be the first start tag.
#data
<!DOCTYPE html>X</html>X
#errors
-Line: 1 Col: 24 Unexpected non-space characters. Expected end of file.
Line: 1 Col: 24 Unexpected non-space characters in the after body phase.
#document
| <!DOCTYPE html>
@@ -715,8 +714,7 @@ Line: 1 Col: 24 Unexpected non-space characters in the after body phase.
#data
<!DOCTYPE html>X</html><p>X
#errors
-Line: 1 Col: 26 Unexpected start tag (p). Expected end of file.
-Line: 1 Col: 26 Unexpected start tag token (p) in the after body phase.
+Line: 1 Col: 26 Unexpected start tag ().
#document
| <!DOCTYPE html>
| <html>
@@ -729,7 +727,7 @@ Line: 1 Col: 26 Unexpected start tag token (p) in the after body phase.
#data
<!DOCTYPE html>X<p/x/y/z>
#errors
-Line: 1 Col: 19 Solidus (/) incorrectly placed in tag.
+Line: 1 Col: 19 Expected a > after the /.
Line: 1 Col: 21 Solidus (/) incorrectly placed in tag.
Line: 1 Col: 23 Solidus (/) incorrectly placed in tag.
#document
@@ -772,11 +770,11 @@ Line: 1 Col: 34 Unexpected end tag (p). Ignored.
#data
<!DOCTYPE <!DOCTYPE HTML>><!--<!--x-->-->
#errors
-Line: 1 Col: 20 Expected space or '>'. Got 'H'
+Line: 1 Col: 20 Expected space or '>'. Got ''
Line: 1 Col: 25 Erroneous DOCTYPE.
Line: 1 Col: 35 Unexpected character in comment found.
#document
-| <!DOCTYPE <!DOCTYPE>
+| <!DOCTYPE <!doctype>
| <html>
| <head>
| <body>
diff --git a/test/data/tree-construction/tests3.dat b/test/data/tree-construction/tests3.dat
index 0716c93..a958293 100644
--- a/test/data/tree-construction/tests3.dat
+++ b/test/data/tree-construction/tests3.dat
@@ -25,7 +25,6 @@ Line: 1 Col: 21 Unexpected start tag (script) that can be in head. Moved.
#errors
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
Line: 1 Col: 28 Unexpected start tag (style) that can be in head. Moved.
-Line: 1 Col: 52 Unexpected start tag (script) that can be in head. Moved.
#document
| <html>
| <head>
diff --git a/test/data/tree-construction/tests4.dat b/test/data/tree-construction/tests4.dat
index 0a6174c..3c50632 100644
--- a/test/data/tree-construction/tests4.dat
+++ b/test/data/tree-construction/tests4.dat
@@ -41,6 +41,7 @@ plaintext
#data
setting html's innerHTML
#errors
+Line: 1 Col: 24 Unexpected EOF in inner html mode.
#document-fragment
html
#document
diff --git a/test/data/tree-construction/tests6.dat b/test/data/tree-construction/tests6.dat
index 0a7d7ca..d10256f 100644
--- a/test/data/tree-construction/tests6.dat
+++ b/test/data/tree-construction/tests6.dat
@@ -12,8 +12,7 @@ Line: 1 Col: 29 Unexpected start tag head. Ignored.
#data
<!doctype html></html> <head>
#errors
-22: Stray end tag html.
-29: Stray start tag head.
+Line: 1 Col: 22 Unexpected end tag (html) after the (implied) root element.
#document
| <!DOCTYPE html>
| <html>
@@ -23,8 +22,7 @@ Line: 1 Col: 29 Unexpected start tag head. Ignored.
#data
<!doctype html></body><meta>
#errors
-22: Stray end tag body.
-28: meta element outside head.
+Line: 1 Col: 22 Unexpected end tag (body) after the (implied) root element.
#document
| <!DOCTYPE html>
| <html>
@@ -35,8 +33,8 @@ Line: 1 Col: 29 Unexpected start tag head. Ignored.
#data
<!doctype html><form><div></form><div>
#errors
-Line: 1 Col: 33 End tag (form) seen too early. Ignored.
-Line: 1 Col: 38 Expected closing tag. Unexpected end of file.
+33: End tag form seen but there were unclosed elements.
+38: End of file seen and there were open elements.
#document
| <!DOCTYPE html>
| <html>
@@ -44,7 +42,7 @@ Line: 1 Col: 38 Expected closing tag. Unexpected end of file.
| <body>
| <form>
| <div>
-| <div>
+| <div>
#data
<!doctype html><title>&amp;</title>
@@ -254,7 +252,7 @@ caption
#errors
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
Line: 1 Col: 31 Unexpected end tag (caption). Missing end tag (div).
-Line: 1 Col: 31 Expected closing tag. Unexpected end of file.
+Line: 1 Col: 31 Unexpected end of file. Expected table content.
#document
| <html>
| <head>
@@ -359,7 +357,7 @@ td
#errors
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
Line: 1 Col: 20 Unexpected non-space characters in table context caused voodoo mode.
-Line: 1 Col: 20 Expected closing tag. Unexpected end of file.
+Line: 1 Col: 20 Unexpected end of file. Expected table content.
#document
| <html>
| <head>
@@ -436,7 +434,7 @@ body
#errors
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
Line: 1 Col: 16 Unexpected start tag (div) in table context caused voodoo mode.
-Line: 1 Col: 16 Expected closing tag. Unexpected end of file.
+Line: 1 Col: 16 Unexpected end of file. Expected table content.
#document
| <html>
| <head>
@@ -503,7 +501,7 @@ tbody
#errors
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
Line: 1 Col: 22 Unexpected end tag (thead) in the table body phase. Ignored.
-Line: 1 Col: 22 Expected closing tag. Unexpected end of file.
+Line: 1 Col: 22 Unexpected end of file. Expected table content.
#document
| <html>
| <head>
@@ -533,7 +531,7 @@ Line: 1 Col: 55 Unexpected end tag (html) in the table body phase. Ignored.
Line: 1 Col: 60 Unexpected end tag (td) in the table body phase. Ignored.
Line: 1 Col: 65 Unexpected end tag (th) in the table body phase. Ignored.
Line: 1 Col: 70 Unexpected end tag (tr) in the table body phase. Ignored.
-Line: 1 Col: 70 Expected closing tag. Unexpected end of file.
+Line: 1 Col: 70 Unexpected end of file. Expected table content.
#document
| <html>
| <head>
@@ -547,7 +545,7 @@ Line: 1 Col: 70 Expected closing tag. Unexpected end of file.
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
Line: 1 Col: 20 Unexpected end tag (div) in table context caused voodoo mode.
Line: 1 Col: 20 End tag (div) seen too early. Expected other end tag.
-Line: 1 Col: 20 Expected closing tag. Unexpected end of file.
+Line: 1 Col: 20 Unexpected end of file. Expected table content.
#document
| <html>
| <head>
@@ -560,7 +558,7 @@ Line: 1 Col: 20 Expected closing tag. Unexpected end of file.
#errors
Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
Line: 1 Col: 14 Unexpected start tag (table) implies end tag (table).
-Line: 1 Col: 14 Expected closing tag. Unexpected end of file.
+Line: 1 Col: 14 Unexpected end of file. Expected table content.
#document
| <html>
| <head>
@@ -583,7 +581,7 @@ Line: 1 Col: 69 Unexpected end tag (tfoot). Ignored.
Line: 1 Col: 74 Unexpected end tag (th). Ignored.
Line: 1 Col: 82 Unexpected end tag (thead). Ignored.
Line: 1 Col: 87 Unexpected end tag (tr). Ignored.
-Line: 1 Col: 87 Expected closing tag. Unexpected end of file.
+Line: 1 Col: 87 Unexpected end of file. Expected table content.
#document
| <html>
| <head>
@@ -594,7 +592,7 @@ Line: 1 Col: 87 Expected closing tag. Unexpected end of file.
</table><tr>
#errors
Line: 1 Col: 8 Unexpected end tag (table). Ignored.
-Line: 1 Col: 12 Expected closing tag. Unexpected end of file.
+Line: 1 Col: 12 Unexpected end of file. Expected table content.
#document-fragment
table
#document
@@ -604,8 +602,8 @@ table
#data
<html></html><!-- foo -->
#errors
-6: Start tag seen without seeing a doctype first. Expected <!DOCTYPE html>.
-13: Stray end tag html.
+Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE.
+Line: 1 Col: 13 Unexpected end tag (html) after the (implied) root element.
#document
| <html>
| <!-- foo -->
@@ -616,6 +614,7 @@ table
<body></body></html>
#errors
Line: 1 Col: 20 Unexpected html end tag in inner html mode.
+Line: 1 Col: 20 Unexpected EOF in inner html mode.
#document-fragment
html
#document
@@ -635,7 +634,8 @@ Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE.
#data
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"><html></html>
#errors
-doctype-error
+Line: 1 Col: 50 Erroneous DOCTYPE.
+Line: 1 Col: 63 Unexpected end tag (html) after the (implied) root element.
#document
| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "">
| <html>
diff --git a/test/data/tree-construction/tests7.dat b/test/data/tree-construction/tests7.dat
index be0b9a5..d80b618 100644
--- a/test/data/tree-construction/tests7.dat
+++ b/test/data/tree-construction/tests7.dat
@@ -12,7 +12,8 @@
#data
<!doctype html><table><title>X</title></table>
#errors
-xxx
+Line: 1 Col: 29 Unexpected start tag (title) in table context caused voodoo mode.
+Line: 1 Col: 38 Unexpected end tag (title) in table context caused voodoo mode.
#document
| <!DOCTYPE html>
| <html>
@@ -25,7 +26,7 @@ xxx
#data
<!doctype html><head></head><title>X</title>
#errors
-element-belongs-in-da-head
+Line: 1 Col: 35 Unexpected start tag (title) that can be in head. Moved.
#document
| <!DOCTYPE html>
| <html>
@@ -37,7 +38,7 @@ element-belongs-in-da-head
#data
<!doctype html></head><title>X</title>
#errors
-element-belongs-in-da-head
+Line: 1 Col: 29 Unexpected start tag (title) that can be in head. Moved.
#document
| <!DOCTYPE html>
| <html>
@@ -49,8 +50,7 @@ element-belongs-in-da-head
#data
<!doctype html></body><title>X</title>
#errors
-22: Stray end tag body.
-29: title element outside head.
+Line: 1 Col: 22 Unexpected end tag (body) after the (implied) root element.
#document
| <!DOCTYPE html>
| <html>
@@ -62,7 +62,7 @@ element-belongs-in-da-head
#data
<!doctype html><table><meta></table>
#errors
-meta-in-table
+Line: 1 Col: 28 Unexpected start tag (meta) in table context caused voodoo mode.
#document
| <!DOCTYPE html>
| <html>
@@ -74,7 +74,8 @@ meta-in-table
#data
<!doctype html><table> X<meta></table>
#errors
-characters-in-table
+Line: 1 Col: 24 Unexpected non-space characters in table context caused voodoo mode.
+Line: 1 Col: 30 Unexpected start tag (meta) in table context caused voodoo mode.
#document
| <!DOCTYPE html>
| <html>
@@ -88,8 +89,8 @@ characters-in-table
#data
<!doctype html><table>X<tr><td><table> <meta></table></table>
#errors
-characters-in-table
-meta-in-table
+Line: 1 Col: 23 Unexpected non-space characters in table context caused voodoo mode.
+Line: 1 Col: 45 Unexpected start tag (meta) in table context caused voodoo mode.
#document
| <!DOCTYPE html>
| <html>
@@ -125,7 +126,7 @@ meta-in-table
#data
<!doctype html><table> x</table>
#errors
-node-in-table
+Line: 1 Col: 24 Unexpected non-space characters in table context caused voodoo mode.
#document
| <!DOCTYPE html>
| <html>
@@ -138,7 +139,7 @@ node-in-table
#data
<!doctype html><table> x </table>
#errors
-node-in-table
+Line: 1 Col: 25 Unexpected non-space characters in table context caused voodoo mode.
#document
| <!DOCTYPE html>
| <html>
@@ -151,7 +152,7 @@ node-in-table
#data
<!doctype html><table><tr> x</table>
#errors
-node-in-table-row
+Line: 1 Col: 28 Unexpected non-space characters in table context caused voodoo mode.
#document
| <!DOCTYPE html>
| <html>
@@ -166,6 +167,7 @@ node-in-table-row
#data
<!doctype html><table><style> <tr>x </style> </table>
#errors
+Line: 1 Col: 44 Unexpected end tag (style) in table context caused voodoo mode.
#document
| <!DOCTYPE html>
| <html>
@@ -179,6 +181,7 @@ node-in-table-row
#data
<!doctype html><table><TBODY><script> <tr>x </script> </table>
#errors
+Line: 1 Col: 53 Unexpected end tag (script) in table context caused voodoo mode.
#document
| <!DOCTYPE html>
| <html>
@@ -193,7 +196,9 @@ node-in-table-row
#data
<!doctype html><table>X<style> <tr>x </style> </table>
#errors
-xxxx
+Line: 1 Col: 23 Unexpected non-space characters in table context caused voodoo mode.
+Line: 1 Col: 30 Unexpected start tag (style) in table context caused voodoo mode.
+Line: 1 Col: 45 Unexpected end tag (style) in table context caused voodoo mode.
#document
| <!DOCTYPE html>
| <html>
@@ -233,7 +238,7 @@ X</listing>
#data
<!doctype html><select><input>X
#errors
-input-in-select
+Line: 1 Col: 30 Unexpected input start tag in the select phase.
#document
| <!DOCTYPE html>
| <html>
@@ -246,7 +251,7 @@ input-in-select
#data
<!doctype html><select><select>X
#errors
-select-in-select
+Line: 1 Col: 31 Unexpected select start tag in the select phase treated as select end tag.
#document
| <!DOCTYPE html>
| <html>
@@ -258,7 +263,7 @@ select-in-select
#data
<!doctype html><table><input type=hidDEN></table>
#errors
-input-in-table
+Line: 1 Col: 41 Unexpected input with type hidden in table context.
#document
| <!DOCTYPE html>
| <html>
@@ -271,7 +276,8 @@ input-in-table
#data
<!doctype html><table>X<input type=hidDEN></table>
#errors
-input-in-table
+Line: 1 Col: 23 Unexpected non-space characters in table context caused voodoo mode.
+Line: 1 Col: 42 Unexpected start tag (input) in table context caused voodoo mode.
#document
| <!DOCTYPE html>
| <html>
@@ -285,7 +291,7 @@ input-in-table
#data
<!doctype html><table> <input type=hidDEN></table>
#errors
-input-in-table
+Line: 1 Col: 43 Unexpected input with type hidden in table context.
#document
| <!DOCTYPE html>
| <html>
@@ -299,7 +305,7 @@ input-in-table
#data
<!doctype html><table> <input type='hidDEN'></table>
#errors
-input-in-table
+Line: 1 Col: 45 Unexpected input with type hidden in table context.
#document
| <!DOCTYPE html>
| <html>
@@ -313,7 +319,8 @@ input-in-table
#data
<!doctype html><table><input type=" hidden"><input type=hidDEN></table>
#errors
-input-in-table
+Line: 1 Col: 44 Unexpected start tag (input) in table context caused voodoo mode.
+Line: 1 Col: 63 Unexpected start tag (input) in table context caused voodoo mode.
#document
| <!DOCTYPE html>
| <html>
@@ -328,9 +335,9 @@ input-in-table
#data
<!doctype html><table><select>X<tr>
#errors
-select-in-table
-unexpected-tr-in-select-in-table
-eof
+Line: 1 Col: 30 Unexpected start tag (select) in table context caused voodoo mode.
+Line: 1 Col: 35 Unexpected table element start tag (trs) in the select in table phase.
+Line: 1 Col: 35 Unexpected end of file. Expected table content.
#document
| <!DOCTYPE html>
| <html>
@@ -356,8 +363,9 @@ eof
#data
<!DOCTYPE hTmL><html></html>
#errors
+Line: 1 Col: 28 Unexpected end tag (html) after the (implied) root element.
#document
-| <!DOCTYPE hTmL>
+| <!DOCTYPE html>
| <html>
| <head>
| <body>
@@ -365,8 +373,9 @@ eof
#data
<!DOCTYPE HTML><html></html>
#errors
+Line: 1 Col: 28 Unexpected end tag (html) after the (implied) root element.
#document
-| <!DOCTYPE HTML>
+| <!DOCTYPE html>
| <html>
| <head>
| <body>
@@ -374,7 +383,8 @@ eof
#data
<body>X</body></body>
#errors
-21: Saw an end tag after body had been closed.
+Line: 1 Col: 21 Unexpected end tag token (body) in the after body phase.
+Line: 1 Col: 21 Unexpected EOF in inner html mode.
#document-fragment
html
#document
@@ -385,7 +395,8 @@ html
#data
<!doctype html><div><table><a>foo</a> <tr><td>bar</td> </tr></table></div>
#errors
-unexpected-start-tag-implies-table-voodoo
+Line: 1 Col: 30 Unexpected start tag (a) in table context caused voodoo mode.
+Line: 1 Col: 37 Unexpected end tag (a) in table context caused voodoo mode.
#document
| <!DOCTYPE html>
| <html>
@@ -404,9 +415,9 @@ unexpected-start-tag-implies-table-voodoo
#data
<div><p>a</x> b
#errors
-5: Start tag seen without seeing a doctype first. Expected <!DOCTYPE html>.
-13: Stray end tag x.
-15: End of file seen and there were open elements.
+Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
+Line: 1 Col: 13 Unexpected end tag (x). Ignored.
+Line: 1 Col: 15 Expected closing tag. Unexpected end of file.
#document
| <html>
| <head>
diff --git a/test/data/tree-construction/tests8.dat b/test/data/tree-construction/tests8.dat
index 7520b42..90e6c91 100644
--- a/test/data/tree-construction/tests8.dat
+++ b/test/data/tree-construction/tests8.dat
@@ -3,9 +3,9 @@
<div></div>
</span>x
#errors
-missing doctype
-unexpected </span>
-unclosed <div>
+Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
+Line: 3 Col: 7 Unexpected end tag (span). Ignored.
+Line: 3 Col: 8 Expected closing tag. Unexpected end of file.
#document
| <html>
| <head>
@@ -21,9 +21,9 @@ x"
<div>x<div></div>
</span>x
#errors
-missing doctype
-unexpected </span>
-unclosed <div>
+Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
+Line: 2 Col: 7 Unexpected end tag (span). Ignored.
+Line: 2 Col: 8 Expected closing tag. Unexpected end of file.
#document
| <html>
| <head>
@@ -37,9 +37,9 @@ x"
#data
<div>x<div></div>x</span>x
#errors
-missing doctype
-unexpected </span>
-unclosed <div>
+Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
+Line: 1 Col: 25 Unexpected end tag (span). Ignored.
+Line: 1 Col: 26 Expected closing tag. Unexpected end of file.
#document
| <html>
| <head>
@@ -52,9 +52,9 @@ unclosed <div>
#data
<div>x<div></div>y</span>z
#errors
-missing doctype
-unexpected </span>
-unclosed <div>
+Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE.
+Line: 1 Col: 25 Unexpected end tag (span). Ignored.
+Line: 1 Col: 26 Expected closing tag. Unexpected end of file.
#document
| <html>
| <head>
@@ -67,10 +67,13 @@ unclosed <div>
#data
<table><div>x<div></div>x</span>x
#errors
-missing doctype
-table voodoo
-unexpected </span>
-unclosed <div>
+Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE.
+Line: 1 Col: 12 Unexpected start tag (div) in table context caused voodoo mode.
+Line: 1 Col: 18 Unexpected start tag (div) in table context caused voodoo mode.
+Line: 1 Col: 24 Unexpected end tag (div) in table context caused voodoo mode.
+Line: 1 Col: 32 Unexpected end tag (span) in table context caused voodoo mode.
+Line: 1 Col: 32 Unexpected end tag (span). Ignored.
+Line: 1 Col: 33 Unexpected end of file. Expected table content.
#document
| <html>
| <head>
@@ -84,9 +87,9 @@ unclosed <div>
#data
x<table>x
#errors
-missing doctype
-table voodoo
-unclosed <table>
+Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE.
+Line: 1 Col: 9 Unexpected non-space characters in table context caused voodoo mode.
+Line: 1 Col: 9 Unexpected end of file. Expected table content.
#document
| <html>
| <head>
@@ -97,10 +100,10 @@ unclosed <table>
#data
x<table><table>x
#errors
-missing doctype
-unexpected <table>
-table voodoo
-unclosed <table>
+Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE.
+Line: 1 Col: 15 Unexpected start tag (table) implies end tag (table).
+Line: 1 Col: 16 Unexpected non-space characters in table context caused voodoo mode.
+Line: 1 Col: 16 Unexpected end of file. Expected table content.
#document
| <html>
| <head>
@@ -113,9 +116,9 @@ unclosed <table>
#data
<b>a<div></div><div></b>y
#errors
-missing doctype
-adoption agency
-unclosed <div>
+Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE.
+Line: 1 Col: 24 End tag (b) violates step 1, paragraph 3 of the adoption agency algorithm.
+Line: 1 Col: 25 Expected closing tag. Unexpected end of file.
#document
| <html>
| <head>
@@ -126,3 +129,20 @@ unclosed <div>
| <div>
| <b>
| "y"
+
+#data
+<a><div><p></a>
+#errors
+Line: 1 Col: 3 Unexpected start tag (a). Expected DOCTYPE.
+Line: 1 Col: 15 End tag (a) violates step 1, paragraph 3 of the adoption agency algorithm.
+Line: 1 Col: 15 End tag (a) violates step 1, paragraph 3 of the adoption agency algorithm.
+Line: 1 Col: 15 Expected closing tag. Unexpected end of file.
+#document
+| <html>
+| <head>
+| <body>
+| <a>
+| <div>
+| <a>
+| <p>
+| <a>
diff --git a/test/data/tree-construction/tests9.dat b/test/data/tree-construction/tests9.dat
index de621b4..3bc87b9 100644
--- a/test/data/tree-construction/tests9.dat
+++ b/test/data/tree-construction/tests9.dat
@@ -21,8 +21,8 @@
#data
<!DOCTYPE html><body><select><math></math></select>
#errors
-35: Stray “math” start tag.
-42: Stray end tag “math”
+Line: 1 Col: 35 Unexpected start tag token (math) in the select phase. Ignored.
+Line: 1 Col: 42 Unexpected end tag (math) in the select phase. Ignored.
#document
| <!DOCTYPE html>
| <html>
@@ -33,8 +33,8 @@
#data
<!DOCTYPE html><body><select><option><math></math></option></select>
#errors
-43: Stray “math” start tag.
-50: Stray end tag “math”
+Line: 1 Col: 43 Unexpected start tag token (math) in the select phase. Ignored.
+Line: 1 Col: 50 Unexpected end tag (math) in the select phase. Ignored.
#document
| <!DOCTYPE html>
| <html>
@@ -46,8 +46,8 @@
#data
<!DOCTYPE html><body><table><math></math></table>
#errors
-34: Start tag “math” seen in “table”.
-41: Stray end tag “math”.
+Line: 1 Col: 34 Unexpected start tag (math) in table context caused voodoo mode.
+Line: 1 Col: 41 Unexpected end tag (math) in table context caused voodoo mode.
#document
| <!DOCTYPE html>
| <html>
@@ -59,9 +59,9 @@
#data
<!DOCTYPE html><body><table><math><mi>foo</mi></math></table>
#errors
-34: Start tag “math” seen in “table”.
-46: Stray end tag “mi”.
-53: Stray end tag “math”.
+Line: 1 Col: 34 Unexpected start tag (math) in table context caused voodoo mode.
+Line: 1 Col: 46 Unexpected end tag (mi) in table context caused voodoo mode.
+Line: 1 Col: 53 Unexpected end tag (math) in table context caused voodoo mode.
#document
| <!DOCTYPE html>
| <html>
@@ -75,10 +75,10 @@
#data
<!DOCTYPE html><body><table><math><mi>foo</mi><mi>bar</mi></math></table>
#errors
-34: Start tag “math” seen in “table”.
-46: Stray end tag “mi”.
-58: Stray end tag “mi”.
-65: Stray end tag “math”.
+Line: 1 Col: 34 Unexpected start tag (math) in table context caused voodoo mode.
+Line: 1 Col: 46 Unexpected end tag (mi) in table context caused voodoo mode.
+Line: 1 Col: 58 Unexpected end tag (mi) in table context caused voodoo mode.
+Line: 1 Col: 65 Unexpected end tag (math) in table context caused voodoo mode.
#document
| <!DOCTYPE html>
| <html>
@@ -94,10 +94,10 @@
#data
<!DOCTYPE html><body><table><tbody><math><mi>foo</mi><mi>bar</mi></math></tbody></table>
#errors
-41: Start tag “math” seen in “table”.
-53: Stray end tag “mi”.
-65: Stray end tag “mi”.
-72: Stray end tag “math”.
+Line: 1 Col: 41 Unexpected start tag (math) in table context caused voodoo mode.
+Line: 1 Col: 53 Unexpected end tag (mi) in table context caused voodoo mode.
+Line: 1 Col: 65 Unexpected end tag (mi) in table context caused voodoo mode.
+Line: 1 Col: 72 Unexpected end tag (math) in table context caused voodoo mode.
#document
| <!DOCTYPE html>
| <html>
@@ -114,10 +114,10 @@
#data
<!DOCTYPE html><body><table><tbody><tr><math><mi>foo</mi><mi>bar</mi></math></tr></tbody></table>
#errors
-45: Start tag “math” seen in “table”.
-57: Stray end tag “mi”.
-69: Stray end tag “mi”.
-76: Stray end tag “math”.
+Line: 1 Col: 45 Unexpected start tag (math) in table context caused voodoo mode.
+Line: 1 Col: 57 Unexpected end tag (mi) in table context caused voodoo mode.
+Line: 1 Col: 69 Unexpected end tag (mi) in table context caused voodoo mode.
+Line: 1 Col: 76 Unexpected end tag (math) in table context caused voodoo mode.
#document
| <!DOCTYPE html>
| <html>
@@ -191,8 +191,8 @@
#data
<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux
#errors
-70: HTML start tag “p” in a foreign namespace context.
-81: “table” closed but “caption” was still open.
+Line: 1 Col: 70 HTML start tag "p" in a foreign namespace context.
+Line: 1 Col: 81 Unexpected end table tag in caption. Generates implied end caption.
#document
| <!DOCTYPE html>
| <html>
@@ -213,8 +213,8 @@
#data
<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi>baz</table><p>quux
#errors
-78: “table” closed but “caption” was still open.
-78: Unclosed elements on stack.
+Line: 1 Col: 78 Unexpected end table tag in caption. Generates implied end caption.
+Line: 1 Col: 78 Unexpected end tag (caption). Missing end tag (math).
#document
| <!DOCTYPE html>
| <html>
@@ -234,11 +234,11 @@
#data
<!DOCTYPE html><body><table><colgroup><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux
#errors
-44: Start tag “math” seen in “table”.
-56: Stray end tag “mi”.
-68: Stray end tag “mi”.
-71: HTML start tag “p” in a foreign namespace context.
-71: Start tag “p” seen in “table”.
+Line: 1 Col: 44 Unexpected start tag (math) in table context caused voodoo mode.
+Line: 1 Col: 56 Unexpected end tag (mi) in table context caused voodoo mode.
+Line: 1 Col: 68 Unexpected end tag (mi) in table context caused voodoo mode.
+Line: 1 Col: 71 HTML start tag "p" in a foreign namespace context.
+Line: 1 Col: 71 Unexpected start tag (p) in table context caused voodoo mode.
#document
| <!DOCTYPE html>
| <html>
@@ -259,13 +259,13 @@
#data
<!DOCTYPE html><body><table><tr><td><select><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux
#errors
-50: Stray “math” start tag.
-54: Stray “mi” start tag.
-62: Stray end tag “mi”
-66: Stray “mi” start tag.
-74: Stray end tag “mi”
-77: Stray “p” start tag.
-88: “table” end tag with “select” open.
+Line: 1 Col: 50 Unexpected start tag token (math) in the select phase. Ignored.
+Line: 1 Col: 54 Unexpected start tag token (mi) in the select phase. Ignored.
+Line: 1 Col: 62 Unexpected end tag (mi) in the select phase. Ignored.
+Line: 1 Col: 66 Unexpected start tag token (mi) in the select phase. Ignored.
+Line: 1 Col: 74 Unexpected end tag (mi) in the select phase. Ignored.
+Line: 1 Col: 77 Unexpected start tag token (p) in the select phase. Ignored.
+Line: 1 Col: 88 Unexpected table element end tag (tables) in the select in table phase.
#document
| <!DOCTYPE html>
| <html>
@@ -283,14 +283,14 @@
#data
<!DOCTYPE html><body><table><select><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux
#errors
-36: Start tag “select” seen in “table”.
-42: Stray “math” start tag.
-46: Stray “mi” start tag.
-54: Stray end tag “mi”
-58: Stray “mi” start tag.
-66: Stray end tag “mi”
-69: Stray “p” start tag.
-80: “table” end tag with “select” open.
+Line: 1 Col: 36 Unexpected start tag (select) in table context caused voodoo mode.
+Line: 1 Col: 42 Unexpected start tag token (math) in the select phase. Ignored.
+Line: 1 Col: 46 Unexpected start tag token (mi) in the select phase. Ignored.
+Line: 1 Col: 54 Unexpected end tag (mi) in the select phase. Ignored.
+Line: 1 Col: 58 Unexpected start tag token (mi) in the select phase. Ignored.
+Line: 1 Col: 66 Unexpected end tag (mi) in the select phase. Ignored.
+Line: 1 Col: 69 Unexpected start tag token (p) in the select phase. Ignored.
+Line: 1 Col: 80 Unexpected table element end tag (tables) in the select in table phase.
#document
| <!DOCTYPE html>
| <html>
@@ -305,8 +305,8 @@
#data
<!DOCTYPE html><body></body></html><math><mi>foo</mi><mi>bar</mi><p>baz
#errors
-41: Stray “math” start tag.
-68: HTML start tag “p” in a foreign namespace context.
+Line: 1 Col: 41 Unexpected start tag ().
+Line: 1 Col: 68 HTML start tag "p" in a foreign namespace context.
#document
| <!DOCTYPE html>
| <html>
@@ -323,8 +323,8 @@
#data
<!DOCTYPE html><body></body><math><mi>foo</mi><mi>bar</mi><p>baz
#errors
-34: Stray “math” start tag.
-61: HTML start tag “p” in a foreign namespace context.
+Line: 1 Col: 34 Unexpected start tag token (math) in the after body phase.
+Line: 1 Col: 61 HTML start tag "p" in a foreign namespace context.
#document
| <!DOCTYPE html>
| <html>
@@ -341,14 +341,14 @@
#data
<!DOCTYPE html><frameset><math><mi></mi><mi></mi><p><span>
#errors
-31: Stray “math” start tag.
-35: Stray “mi” start tag.
-40: Stray end tag “mi”
-44: Stray “mi” start tag.
-49: Stray end tag “mi”
-52: Stray “p” start tag.
-58: Stray “span” start tag.
-58: End of file seen and there were open elements.
+Line: 1 Col: 31 Unexpected start tag token (math) in the frameset phase. Ignored.
+Line: 1 Col: 35 Unexpected start tag token (mi) in the frameset phase. Ignored.
+Line: 1 Col: 40 Unexpected end tag token (mi) in the frameset phase. Ignored.
+Line: 1 Col: 44 Unexpected start tag token (mi) in the frameset phase. Ignored.
+Line: 1 Col: 49 Unexpected end tag token (mi) in the frameset phase. Ignored.
+Line: 1 Col: 52 Unexpected start tag token (p) in the frameset phase. Ignored.
+Line: 1 Col: 58 Unexpected start tag token (span) in the frameset phase. Ignored.
+Line: 1 Col: 58 Expected closing tag. Unexpected end of file.
#document
| <!DOCTYPE html>
| <html>
@@ -358,13 +358,13 @@
#data
<!DOCTYPE html><frameset></frameset><math><mi></mi><mi></mi><p><span>
#errors
-42: Stray “math” start tag.
-46: Stray “mi” start tag.
-51: Stray end tag “mi”
-55: Stray “mi” start tag.
-60: Stray end tag “mi”
-63: Stray “p” start tag.
-69: Stray “span” start tag.
+Line: 1 Col: 42 Unexpected start tag (math) in the after frameset phase. Ignored.
+Line: 1 Col: 46 Unexpected start tag (mi) in the after frameset phase. Ignored.
+Line: 1 Col: 51 Unexpected end tag (mi) in the after frameset phase. Ignored.
+Line: 1 Col: 55 Unexpected start tag (mi) in the after frameset phase. Ignored.
+Line: 1 Col: 60 Unexpected end tag (mi) in the after frameset phase. Ignored.
+Line: 1 Col: 63 Unexpected start tag (p) in the after frameset phase. Ignored.
+Line: 1 Col: 69 Unexpected start tag (span) in the after frameset phase. Ignored.
#document
| <!DOCTYPE html>
| <html>