html: drop <isindex> and <command> specific handlings

This commit also adds remaining tests to follow up on golang.org/cl/205617

Change-Id: I8b155f9f605c6a0eb8745c32f5e785f5b4bc1c7e
Reviewed-on: https://go-review.googlesource.com/c/net/+/208937
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
diff --git a/html/const.go b/html/const.go
index a3a918f..73804d3 100644
--- a/html/const.go
+++ b/html/const.go
@@ -52,7 +52,6 @@
 	"iframe":     true,
 	"img":        true,
 	"input":      true,
-	"isindex":    true, // The 'isindex' element has been removed, but keep it for backwards compatibility.
 	"keygen":     true,
 	"li":         true,
 	"link":       true,
diff --git a/html/parse.go b/html/parse.go
index c801a6a..01b0aee 100644
--- a/html/parse.go
+++ b/html/parse.go
@@ -625,7 +625,7 @@
 		switch p.tok.DataAtom {
 		case a.Html:
 			return inBodyIM(p)
-		case a.Base, a.Basefont, a.Bgsound, a.Command, a.Link, a.Meta:
+		case a.Base, a.Basefont, a.Bgsound, a.Link, a.Meta:
 			p.addElement()
 			p.oe.pop()
 			p.acknowledgeSelfClosingTag()
@@ -855,7 +855,7 @@
 				return true
 			}
 			copyAttributes(p.oe[0], p.tok)
-		case a.Base, a.Basefont, a.Bgsound, a.Command, a.Link, a.Meta, a.Noframes, a.Script, a.Style, a.Template, a.Title:
+		case a.Base, a.Basefont, a.Bgsound, a.Link, a.Meta, a.Noframes, a.Script, a.Style, a.Template, a.Title:
 			return inHeadIM(p)
 		case a.Body:
 			if p.oe.contains(a.Template) {
@@ -1014,53 +1014,6 @@
 			p.tok.DataAtom = a.Img
 			p.tok.Data = a.Img.String()
 			return false
-		case a.Isindex:
-			if p.form != nil {
-				// Ignore the token.
-				return true
-			}
-			action := ""
-			prompt := "This is a searchable index. Enter search keywords: "
-			attr := []Attribute{{Key: "name", Val: "isindex"}}
-			for _, t := range p.tok.Attr {
-				switch t.Key {
-				case "action":
-					action = t.Val
-				case "name":
-					// Ignore the attribute.
-				case "prompt":
-					prompt = t.Val
-				default:
-					attr = append(attr, t)
-				}
-			}
-			p.acknowledgeSelfClosingTag()
-			p.popUntil(buttonScope, a.P)
-			p.parseImpliedToken(StartTagToken, a.Form, a.Form.String())
-			if p.form == nil {
-				// NOTE: The 'isindex' element has been removed,
-				// and the 'template' element has not been designed to be
-				// collaborative with the index element.
-				//
-				// Ignore the token.
-				return true
-			}
-			if action != "" {
-				p.form.Attr = []Attribute{{Key: "action", Val: action}}
-			}
-			p.parseImpliedToken(StartTagToken, a.Hr, a.Hr.String())
-			p.parseImpliedToken(StartTagToken, a.Label, a.Label.String())
-			p.addText(prompt)
-			p.addChild(&Node{
-				Type:     ElementNode,
-				DataAtom: a.Input,
-				Data:     a.Input.String(),
-				Attr:     attr,
-			})
-			p.oe.pop()
-			p.parseImpliedToken(EndTagToken, a.Label, a.Label.String())
-			p.parseImpliedToken(StartTagToken, a.Hr, a.Hr.String())
-			p.parseImpliedToken(EndTagToken, a.Form, a.Form.String())
 		case a.Textarea:
 			p.addElement()
 			p.setOriginalIM()
diff --git a/html/render.go b/html/render.go
index d34564f..8bf47ed 100644
--- a/html/render.go
+++ b/html/render.go
@@ -252,20 +252,19 @@
 // Section 12.1.2, "Elements", gives this list of void elements. Void elements
 // are those that can't have any contents.
 var voidElements = map[string]bool{
-	"area":    true,
-	"base":    true,
-	"br":      true,
-	"col":     true,
-	"command": true,
-	"embed":   true,
-	"hr":      true,
-	"img":     true,
-	"input":   true,
-	"keygen":  true,
-	"link":    true,
-	"meta":    true,
-	"param":   true,
-	"source":  true,
-	"track":   true,
-	"wbr":     true,
+	"area":   true,
+	"base":   true,
+	"br":     true,
+	"col":    true,
+	"embed":  true,
+	"hr":     true,
+	"img":    true,
+	"input":  true,
+	"keygen": true,
+	"link":   true,
+	"meta":   true,
+	"param":  true,
+	"source": true,
+	"track":  true,
+	"wbr":    true,
 }
diff --git a/html/testdata/go/template.dat b/html/testdata/go/template.dat
index ceaf022..b923b0f 100644
--- a/html/testdata/go/template.dat
+++ b/html/testdata/go/template.dat
@@ -21,6 +21,8 @@
 |     <template>
 |       content
 |         <tbody>
+|         <isindex>
+|           action="0"
 |   <body>
 
 #data
diff --git a/html/testdata/webkit/isindex.dat b/html/testdata/webkit/isindex.dat
index 88325ff..733f82e 100644
--- a/html/testdata/webkit/isindex.dat
+++ b/html/testdata/webkit/isindex.dat
@@ -1,40 +1,49 @@
 #data
 <isindex>
 #errors
+(1,9): expected-doctype-but-got-start-tag
+(1,9): expected-closing-tag-but-got-eof
 #document
 | <html>
 |   <head>
 |   <body>
-|     <form>
-|       <hr>
-|       <label>
-|         "This is a searchable index. Enter search keywords: "
-|         <input>
-|           name="isindex"
-|       <hr>
+|     <isindex>
 
 #data
 <isindex name="A" action="B" prompt="C" foo="D">
 #errors
+(1,48): expected-doctype-but-got-start-tag
+(1,48): expected-closing-tag-but-got-eof
 #document
 | <html>
 |   <head>
 |   <body>
-|     <form>
+|     <isindex>
 |       action="B"
-|       <hr>
-|       <label>
-|         "C"
-|         <input>
-|           foo="D"
-|           name="isindex"
-|       <hr>
+|       foo="D"
+|       name="A"
+|       prompt="C"
 
 #data
 <form><isindex>
 #errors
+(1,6): expected-doctype-but-got-start-tag
+(1,15): expected-closing-tag-but-got-eof
 #document
 | <html>
 |   <head>
 |   <body>
 |     <form>
+|       <isindex>
+
+#data
+<!doctype html><isindex>x</isindex>x
+#errors
+#document
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <isindex>
+|       "x"
+|     "x"
diff --git a/html/testdata/webkit/tests19.dat b/html/testdata/webkit/tests19.dat
index 2470571..a189777 100644
--- a/html/testdata/webkit/tests19.dat
+++ b/html/testdata/webkit/tests19.dat
@@ -1,6 +1,7 @@
 #data
 <!doctype html><math><mn DefinitionUrl="foo">
 #errors
+(1,45): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -13,6 +14,7 @@
 #data
 <!doctype html><html></p><!--foo-->
 #errors
+(1,25): end-tag-after-implied-root
 #document
 | <!DOCTYPE html>
 | <html>
@@ -23,6 +25,7 @@
 #data
 <!doctype html><head></head></p><!--foo-->
 #errors
+(1,32): unexpected-end-tag
 #document
 | <!DOCTYPE html>
 | <html>
@@ -33,6 +36,7 @@
 #data
 <!doctype html><body><p><pre>
 #errors
+(1,29): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -44,6 +48,7 @@
 #data
 <!doctype html><body><p><listing>
 #errors
+(1,33): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -55,6 +60,7 @@
 #data
 <!doctype html><p><plaintext>
 #errors
+(1,29): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -66,6 +72,7 @@
 #data
 <!doctype html><p><h1>
 #errors
+(1,22): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -75,84 +82,21 @@
 |     <h1>
 
 #data
-<!doctype html><form><isindex>
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <form>
-
-#data
-<!doctype html><isindex action="POST">
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <form>
-|       action="POST"
-|       <hr>
-|       <label>
-|         "This is a searchable index. Enter search keywords: "
-|         <input>
-|           name="isindex"
-|       <hr>
-
-#data
-<!doctype html><isindex prompt="this is isindex">
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <form>
-|       <hr>
-|       <label>
-|         "this is isindex"
-|         <input>
-|           name="isindex"
-|       <hr>
-
-#data
 <!doctype html><isindex type="hidden">
 #errors
+(1,38): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
 |   <head>
 |   <body>
-|     <form>
-|       <hr>
-|       <label>
-|         "This is a searchable index. Enter search keywords: "
-|         <input>
-|           name="isindex"
-|           type="hidden"
-|       <hr>
-
-#data
-<!doctype html><isindex name="foo">
-#errors
-#document
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <form>
-|       <hr>
-|       <label>
-|         "This is a searchable index. Enter search keywords: "
-|         <input>
-|           name="isindex"
-|       <hr>
+|     <isindex>
+|       type="hidden"
 
 #data
 <!doctype html><ruby><p><rp>
 #errors
+(1,28): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -165,6 +109,8 @@
 #data
 <!doctype html><ruby><div><span><rp>
 #errors
+(1,36): XXX-undefined-error
+(1,36): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -178,6 +124,8 @@
 #data
 <!doctype html><ruby><div><p><rp>
 #errors
+(1,33): XXX-undefined-error
+(1,33): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -191,6 +139,7 @@
 #data
 <!doctype html><ruby><p><rt>
 #errors
+(1,28): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -203,6 +152,8 @@
 #data
 <!doctype html><ruby><div><span><rt>
 #errors
+(1,36): XXX-undefined-error
+(1,36): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -216,6 +167,8 @@
 #data
 <!doctype html><ruby><div><p><rt>
 #errors
+(1,33): XXX-undefined-error
+(1,33): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -288,6 +241,7 @@
 #data
 <!doctype html><math/><foo>
 #errors
+(1,27): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -299,6 +253,7 @@
 #data
 <!doctype html><svg/><foo>
 #errors
+(1,26): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -310,6 +265,7 @@
 #data
 <!doctype html><div></body><!--foo-->
 #errors
+(1,27): expected-one-end-tag-but-got-another
 #document
 | <!DOCTYPE html>
 | <html>
@@ -321,6 +277,8 @@
 #data
 <!doctype html><h1><div><h3><span></h1>foo
 #errors
+(1,39): end-tag-too-early
+(1,42): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -335,6 +293,7 @@
 #data
 <!doctype html><p></h3>foo
 #errors
+(1,23): end-tag-too-early
 #document
 | <!DOCTYPE html>
 | <html>
@@ -346,6 +305,7 @@
 #data
 <!doctype html><h3><li>abc</h2>foo
 #errors
+(1,31): end-tag-too-early
 #document
 | <!DOCTYPE html>
 | <html>
@@ -359,6 +319,10 @@
 #data
 <!doctype html><table>abc<!--foo-->
 #errors
+(1,23): foster-parenting-character
+(1,24): foster-parenting-character
+(1,25): foster-parenting-character
+(1,35): eof-in-table
 #document
 | <!DOCTYPE html>
 | <html>
@@ -371,6 +335,7 @@
 #data
 <!doctype html><table>  <!--foo-->
 #errors
+(1,34): eof-in-table
 #document
 | <!DOCTYPE html>
 | <html>
@@ -383,6 +348,10 @@
 #data
 <!doctype html><table> b <!--foo-->
 #errors
+(1,23): foster-parenting-character
+(1,24): foster-parenting-character
+(1,25): foster-parenting-character
+(1,35): eof-in-table
 #document
 | <!DOCTYPE html>
 | <html>
@@ -395,6 +364,7 @@
 #data
 <!doctype html><select><option><option>
 #errors
+(1,39): eof-in-select
 #document
 | <!DOCTYPE html>
 | <html>
@@ -407,6 +377,8 @@
 #data
 <!doctype html><select><option></optgroup>
 #errors
+(1,42): unexpected-end-tag-in-select
+(1,42): eof-in-select
 #document
 | <!DOCTYPE html>
 | <html>
@@ -418,6 +390,8 @@
 #data
 <!doctype html><select><option></optgroup>
 #errors
+(1,42): unexpected-end-tag-in-select
+(1,42): eof-in-select
 #document
 | <!DOCTYPE html>
 | <html>
@@ -427,8 +401,21 @@
 |       <option>
 
 #data
+<!doctype html><dd><optgroup><dd>
+#errors
+#document
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <dd>
+|       <optgroup>
+|     <dd>
+
+#data
 <!doctype html><p><math><mi><p><h1>
 #errors
+(1,35): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -443,6 +430,7 @@
 #data
 <!doctype html><p><math><mo><p><h1>
 #errors
+(1,35): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -457,6 +445,7 @@
 #data
 <!doctype html><p><math><mn><p><h1>
 #errors
+(1,35): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -471,6 +460,7 @@
 #data
 <!doctype html><p><math><ms><p><h1>
 #errors
+(1,35): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -485,6 +475,7 @@
 #data
 <!doctype html><p><math><mtext><p><h1>
 #errors
+(1,38): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -499,6 +490,8 @@
 #data
 <!doctype html><frameset></noframes>
 #errors
+(1,36): unexpected-end-tag-in-frameset
+(1,36): eof-in-frameset
 #document
 | <!DOCTYPE html>
 | <html>
@@ -508,6 +501,7 @@
 #data
 <!doctype html><html c=d><body></html><html a=b>
 #errors
+(1,48): non-html-root
 #document
 | <!DOCTYPE html>
 | <html>
@@ -519,6 +513,7 @@
 #data
 <!doctype html><html c=d><frameset></frameset></html><html a=b>
 #errors
+(1,63): non-html-root
 #document
 | <!DOCTYPE html>
 | <html>
@@ -550,6 +545,9 @@
 #data
 <!doctype html><html><frameset></frameset></html>abc
 #errors
+(1,50): expected-eof-but-got-char
+(1,51): expected-eof-but-got-char
+(1,52): expected-eof-but-got-char
 #document
 | <!DOCTYPE html>
 | <html>
@@ -559,6 +557,7 @@
 #data
 <!doctype html><html><frameset></frameset></html><p>
 #errors
+(1,52): expected-eof-but-got-start-tag
 #document
 | <!DOCTYPE html>
 | <html>
@@ -568,6 +567,7 @@
 #data
 <!doctype html><html><frameset></frameset></html></p>
 #errors
+(1,53): expected-eof-but-got-end-tag
 #document
 | <!DOCTYPE html>
 | <html>
@@ -577,6 +577,8 @@
 #data
 <html><frameset></frameset></html><!doctype html>
 #errors
+(1,6): expected-doctype-but-got-start-tag
+(1,49): unexpected-doctype
 #document
 | <html>
 |   <head>
@@ -585,6 +587,7 @@
 #data
 <!doctype html><body><frameset>
 #errors
+(1,31): unexpected-start-tag
 #document
 | <!DOCTYPE html>
 | <html>
@@ -594,6 +597,8 @@
 #data
 <!doctype html><p><frameset><frame>
 #errors
+(1,28): unexpected-start-tag
+(1,35): eof-in-frameset
 #document
 | <!DOCTYPE html>
 | <html>
@@ -604,6 +609,7 @@
 #data
 <!doctype html><p>a<frameset>
 #errors
+(1,29): unexpected-start-tag
 #document
 | <!DOCTYPE html>
 | <html>
@@ -615,6 +621,8 @@
 #data
 <!doctype html><p> <frameset><frame>
 #errors
+(1,29): unexpected-start-tag
+(1,36): eof-in-frameset
 #document
 | <!DOCTYPE html>
 | <html>
@@ -625,6 +633,8 @@
 #data
 <!doctype html><pre><frameset>
 #errors
+(1,30): unexpected-start-tag
+(1,30): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -635,6 +645,8 @@
 #data
 <!doctype html><listing><frameset>
 #errors
+(1,34): unexpected-start-tag
+(1,34): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -645,6 +657,7 @@
 #data
 <!doctype html><li><frameset>
 #errors
+(1,29): unexpected-start-tag
 #document
 | <!DOCTYPE html>
 | <html>
@@ -655,6 +668,7 @@
 #data
 <!doctype html><dd><frameset>
 #errors
+(1,29): unexpected-start-tag
 #document
 | <!DOCTYPE html>
 | <html>
@@ -665,6 +679,7 @@
 #data
 <!doctype html><dt><frameset>
 #errors
+(1,29): unexpected-start-tag
 #document
 | <!DOCTYPE html>
 | <html>
@@ -675,6 +690,8 @@
 #data
 <!doctype html><button><frameset>
 #errors
+(1,33): unexpected-start-tag
+(1,33): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -685,6 +702,8 @@
 #data
 <!doctype html><applet><frameset>
 #errors
+(1,33): unexpected-start-tag
+(1,33): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -695,6 +714,8 @@
 #data
 <!doctype html><marquee><frameset>
 #errors
+(1,34): unexpected-start-tag
+(1,34): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -705,6 +726,8 @@
 #data
 <!doctype html><object><frameset>
 #errors
+(1,33): unexpected-start-tag
+(1,33): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -715,6 +738,9 @@
 #data
 <!doctype html><table><frameset>
 #errors
+(1,32): unexpected-start-tag-implies-table-voodoo
+(1,32): unexpected-start-tag
+(1,32): eof-in-table
 #document
 | <!DOCTYPE html>
 | <html>
@@ -725,6 +751,7 @@
 #data
 <!doctype html><area><frameset>
 #errors
+(1,31): unexpected-start-tag
 #document
 | <!DOCTYPE html>
 | <html>
@@ -735,6 +762,7 @@
 #data
 <!doctype html><basefont><frameset>
 #errors
+(1,35): eof-in-frameset
 #document
 | <!DOCTYPE html>
 | <html>
@@ -745,6 +773,7 @@
 #data
 <!doctype html><bgsound><frameset>
 #errors
+(1,34): eof-in-frameset
 #document
 | <!DOCTYPE html>
 | <html>
@@ -755,6 +784,7 @@
 #data
 <!doctype html><br><frameset>
 #errors
+(1,29): unexpected-start-tag
 #document
 | <!DOCTYPE html>
 | <html>
@@ -765,6 +795,7 @@
 #data
 <!doctype html><embed><frameset>
 #errors
+(1,32): unexpected-start-tag
 #document
 | <!DOCTYPE html>
 | <html>
@@ -775,6 +806,7 @@
 #data
 <!doctype html><img><frameset>
 #errors
+(1,30): unexpected-start-tag
 #document
 | <!DOCTYPE html>
 | <html>
@@ -785,6 +817,7 @@
 #data
 <!doctype html><input><frameset>
 #errors
+(1,32): unexpected-start-tag
 #document
 | <!DOCTYPE html>
 | <html>
@@ -795,6 +828,7 @@
 #data
 <!doctype html><keygen><frameset>
 #errors
+(1,33): unexpected-start-tag
 #document
 | <!DOCTYPE html>
 | <html>
@@ -805,6 +839,7 @@
 #data
 <!doctype html><wbr><frameset>
 #errors
+(1,30): unexpected-start-tag
 #document
 | <!DOCTYPE html>
 | <html>
@@ -815,6 +850,7 @@
 #data
 <!doctype html><hr><frameset>
 #errors
+(1,29): unexpected-start-tag
 #document
 | <!DOCTYPE html>
 | <html>
@@ -825,6 +861,7 @@
 #data
 <!doctype html><textarea></textarea><frameset>
 #errors
+(1,46): unexpected-start-tag
 #document
 | <!DOCTYPE html>
 | <html>
@@ -835,6 +872,7 @@
 #data
 <!doctype html><xmp></xmp><frameset>
 #errors
+(1,36): unexpected-start-tag
 #document
 | <!DOCTYPE html>
 | <html>
@@ -845,6 +883,7 @@
 #data
 <!doctype html><iframe></iframe><frameset>
 #errors
+(1,42): unexpected-start-tag
 #document
 | <!DOCTYPE html>
 | <html>
@@ -855,6 +894,7 @@
 #data
 <!doctype html><select></select><frameset>
 #errors
+(1,42): unexpected-start-tag
 #document
 | <!DOCTYPE html>
 | <html>
@@ -865,6 +905,8 @@
 #data
 <!doctype html><svg></svg><frameset><frame>
 #errors
+(1,36): unexpected-start-tag
+(1,43): eof-in-frameset
 #document
 | <!DOCTYPE html>
 | <html>
@@ -875,6 +917,8 @@
 #data
 <!doctype html><math></math><frameset><frame>
 #errors
+(1,38): unexpected-start-tag
+(1,45): eof-in-frameset
 #document
 | <!DOCTYPE html>
 | <html>
@@ -885,6 +929,8 @@
 #data
 <!doctype html><svg><foreignObject><div> <frameset><frame>
 #errors
+(1,51): unexpected-start-tag
+(1,58): eof-in-frameset
 #document
 | <!DOCTYPE html>
 | <html>
@@ -895,6 +941,8 @@
 #data
 <!doctype html><svg>a</svg><frameset><frame>
 #errors
+(1,37): unexpected-start-tag
+(1,44): unexpected-start-tag-ignored
 #document
 | <!DOCTYPE html>
 | <html>
@@ -906,6 +954,8 @@
 #data
 <!doctype html><svg> </svg><frameset><frame>
 #errors
+(1,37): unexpected-start-tag
+(1,44): eof-in-frameset
 #document
 | <!DOCTYPE html>
 | <html>
@@ -916,6 +966,9 @@
 #data
 <html>aaa<frameset></frameset>
 #errors
+(1,6): expected-doctype-but-got-start-tag
+(1,19): unexpected-start-tag
+(1,30): unexpected-end-tag
 #document
 | <html>
 |   <head>
@@ -925,6 +978,9 @@
 #data
 <html> a <frameset></frameset>
 #errors
+(1,6): expected-doctype-but-got-start-tag
+(1,19): unexpected-start-tag
+(1,30): unexpected-end-tag
 #document
 | <html>
 |   <head>
@@ -934,6 +990,8 @@
 #data
 <!doctype html><div><frameset>
 #errors
+(1,30): unexpected-start-tag
+(1,30): eof-in-frameset
 #document
 | <!DOCTYPE html>
 | <html>
@@ -943,6 +1001,9 @@
 #data
 <!doctype html><div><body><frameset>
 #errors
+(1,26): unexpected-start-tag
+(1,36): unexpected-start-tag
+(1,36): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -953,6 +1014,8 @@
 #data
 <!doctype html><p><math></p>a
 #errors
+(1,28): unexpected-end-tag
+(1,28): unexpected-end-tag
 #document
 | <!DOCTYPE html>
 | <html>
@@ -965,6 +1028,8 @@
 #data
 <!doctype html><p><math><mn><span></p>a
 #errors
+(1,38): unexpected-end-tag
+(1,39): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -980,6 +1045,9 @@
 #data
 <!doctype html><math></html>
 #errors
+(1,28): unexpected-end-tag
+(1,28): expected-one-end-tag-but-got-another
+(1,28): unexpected-end-tag
 #document
 | <!DOCTYPE html>
 | <html>
@@ -1025,6 +1093,7 @@
 #data
 <!doctype html><html a=b><head></head><html c=d>
 #errors
+(1,48): non-html-root
 #document
 | <!DOCTYPE html>
 | <html>
@@ -1036,6 +1105,7 @@
 #data
 <!doctype html><image/>
 #errors
+(1,23): image-start-tag
 #document
 | <!DOCTYPE html>
 | <html>
@@ -1046,6 +1116,15 @@
 #data
 <!doctype html>a<i>b<table>c<b>d</i>e</b>f
 #errors
+(1,28): foster-parenting-character
+(1,31): foster-parenting-start-tag
+(1,32): foster-parenting-character
+(1,36): foster-parenting-end-tag
+(1,36): adoption-agency-1.3
+(1,37): foster-parenting-character
+(1,41): foster-parenting-end-tag
+(1,42): foster-parenting-character
+(1,42): eof-in-table
 #document
 | <!DOCTYPE html>
 | <html>
@@ -1062,6 +1141,23 @@
 #data
 <!doctype html><table><i>a<b>b<div>c<a>d</i>e</b>f
 #errors
+(1,25): foster-parenting-start-tag
+(1,26): foster-parenting-character
+(1,29): foster-parenting-start-tag
+(1,30): foster-parenting-character
+(1,35): foster-parenting-start-tag
+(1,36): foster-parenting-character
+(1,39): foster-parenting-start-tag
+(1,40): foster-parenting-character
+(1,44): foster-parenting-end-tag
+(1,44): adoption-agency-1.3
+(1,44): adoption-agency-1.3
+(1,45): foster-parenting-character
+(1,49): foster-parenting-end-tag
+(1,49): adoption-agency-1.3
+(1,49): adoption-agency-1.3
+(1,50): foster-parenting-character
+(1,50): eof-in-table
 #document
 | <!DOCTYPE html>
 | <html>
@@ -1087,6 +1183,11 @@
 #data
 <!doctype html><i>a<b>b<div>c<a>d</i>e</b>f
 #errors
+(1,37): adoption-agency-1.3
+(1,37): adoption-agency-1.3
+(1,42): adoption-agency-1.3
+(1,42): adoption-agency-1.3
+(1,43): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -1111,6 +1212,15 @@
 #data
 <!doctype html><table><i>a<b>b<div>c</i>
 #errors
+(1,25): foster-parenting-start-tag
+(1,26): foster-parenting-character
+(1,29): foster-parenting-start-tag
+(1,30): foster-parenting-character
+(1,35): foster-parenting-start-tag
+(1,36): foster-parenting-character
+(1,40): foster-parenting-end-tag
+(1,40): adoption-agency-1.3
+(1,40): eof-in-table
 #document
 | <!DOCTYPE html>
 | <html>
@@ -1129,6 +1239,23 @@
 #data
 <!doctype html><table><i>a<b>b<div>c<a>d</i>e</b>f
 #errors
+(1,25): foster-parenting-start-tag
+(1,26): foster-parenting-character
+(1,29): foster-parenting-start-tag
+(1,30): foster-parenting-character
+(1,35): foster-parenting-start-tag
+(1,36): foster-parenting-character
+(1,39): foster-parenting-start-tag
+(1,40): foster-parenting-character
+(1,44): foster-parenting-end-tag
+(1,44): adoption-agency-1.3
+(1,44): adoption-agency-1.3
+(1,45): foster-parenting-character
+(1,49): foster-parenting-end-tag
+(1,44): adoption-agency-1.3
+(1,44): adoption-agency-1.3
+(1,50): foster-parenting-character
+(1,50): eof-in-table
 #document
 | <!DOCTYPE html>
 | <html>
@@ -1154,6 +1281,17 @@
 #data
 <!doctype html><table><i>a<div>b<tr>c<b>d</i>e
 #errors
+(1,25): foster-parenting-start-tag
+(1,26): foster-parenting-character
+(1,31): foster-parenting-start-tag
+(1,32): foster-parenting-character
+(1,37): foster-parenting-character
+(1,40): foster-parenting-start-tag
+(1,41): foster-parenting-character
+(1,45): foster-parenting-end-tag
+(1,45): adoption-agency-1.3
+(1,46): foster-parenting-character
+(1,46): eof-in-table
 #document
 | <!DOCTYPE html>
 | <html>
@@ -1176,6 +1314,18 @@
 #data
 <!doctype html><table><td><table><i>a<div>b<b>c</i>d
 #errors
+(1,26): unexpected-cell-in-table-body
+(1,36): foster-parenting-start-tag
+(1,37): foster-parenting-character
+(1,42): foster-parenting-start-tag
+(1,43): foster-parenting-character
+(1,46): foster-parenting-start-tag
+(1,47): foster-parenting-character
+(1,51): foster-parenting-end-tag
+(1,51): adoption-agency-1.3
+(1,51): adoption-agency-1.3
+(1,52): foster-parenting-character
+(1,52): eof-in-table
 #document
 | <!DOCTYPE html>
 | <html>
@@ -1219,6 +1369,7 @@
 #data
 <!doctype html><a><b></a><basefont>
 #errors
+(1,25): adoption-agency-1.3
 #document
 | <!DOCTYPE html>
 | <html>
@@ -1231,6 +1382,7 @@
 #data
 <!doctype html><a><b></a><bgsound>
 #errors
+(1,25): adoption-agency-1.3
 #document
 | <!DOCTYPE html>
 | <html>
@@ -1243,6 +1395,7 @@
 #data
 <!doctype html><figcaption><article></figcaption>a
 #errors
+(1,49): end-tag-too-early
 #document
 | <!DOCTYPE html>
 | <html>
@@ -1255,6 +1408,7 @@
 #data
 <!doctype html><summary><article></summary>a
 #errors
+(1,43): end-tag-too-early
 #document
 | <!DOCTYPE html>
 | <html>
@@ -1267,6 +1421,8 @@
 #data
 <!doctype html><p><a><plaintext>b
 #errors
+(1,32): unexpected-end-tag
+(1,33): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -1281,6 +1437,8 @@
 #data
 <!DOCTYPE html><div>a<a></div>b<p>c</p>d
 #errors
+(1,30): end-tag-too-early
+(1,40): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
diff --git a/html/testdata/webkit/tests25.dat b/html/testdata/webkit/tests25.dat
index 00de729..2bbf038 100644
--- a/html/testdata/webkit/tests25.dat
+++ b/html/testdata/webkit/tests25.dat
@@ -1,6 +1,7 @@
 #data
 <!DOCTYPE html><body><foo>A
 #errors
+(1,27): expected-closing-tag-but-got-eof
 #document
 | <!DOCTYPE html>
 | <html>
@@ -67,7 +68,7 @@
 #data
 <!DOCTYPE html><body><col>A
 #errors
-26: Stray start tag “col”.
+(1,26): unexpected-start-tag-ignored
 #document
 | <!DOCTYPE html>
 | <html>
@@ -78,13 +79,14 @@
 #data
 <!DOCTYPE html><body><command>A
 #errors
+eof
 #document
 | <!DOCTYPE html>
 | <html>
 |   <head>
 |   <body>
 |     <command>
-|     "A"
+|       "A"
 
 #data
 <!DOCTYPE html><body><embed>A
@@ -100,7 +102,7 @@
 #data
 <!DOCTYPE html><body><frame>A
 #errors
-26: Stray start tag “frame”.
+(1,28): unexpected-start-tag-ignored
 #document
 | <!DOCTYPE html>
 | <html>
diff --git a/html/testdata/webkit/webkit02.dat b/html/testdata/webkit/webkit02.dat
index 87f685d..0f8efb1 100644
--- a/html/testdata/webkit/webkit02.dat
+++ b/html/testdata/webkit/webkit02.dat
@@ -1,6 +1,8 @@
 #data
 <foo bar=qux/>
 #errors
+(1,14): expected-doctype-but-got-start-tag
+(1,14): expected-closing-tag-but-got-eof
 #document
 | <html>
 |   <head>
@@ -11,6 +13,8 @@
 #data
 <p id="status"><noscript><strong>A</strong></noscript><span>B</span></p>
 #errors
+(1,15): expected-doctype-but-got-start-tag
+#script-on
 #document
 | <html>
 |   <head>
@@ -25,6 +29,7 @@
 #data
 <div><sarcasm><div></div></sarcasm></div>
 #errors
+(1,5): expected-doctype-but-got-start-tag
 #document
 | <html>
 |   <head>
@@ -36,6 +41,8 @@
 #data
 <html><body><img src="" border="0" alt="><div>A</div></body></html>
 #errors
+(1,6): expected-doctype-but-got-start-tag
+(1,67): eof-in-attribute-value-double-quote
 #document
 | <html>
 |   <head>
@@ -44,6 +51,10 @@
 #data
 <table><td></tbody>A
 #errors
+(1,7): expected-doctype-but-got-start-tag
+(1,11): unexpected-cell-in-table-body
+(1,20): foster-parenting-character
+(1,20): eof-in-table
 #document
 | <html>
 |   <head>
@@ -57,6 +68,10 @@
 #data
 <table><td></thead>A
 #errors
+(1,7): expected-doctype-but-got-start-tag
+(1,11): unexpected-cell-in-table-body
+(1,19): XXX-undefined-error
+(1,20): expected-closing-tag-but-got-eof
 #document
 | <html>
 |   <head>
@@ -70,6 +85,10 @@
 #data
 <table><td></tfoot>A
 #errors
+(1,7): expected-doctype-but-got-start-tag
+(1,11): unexpected-cell-in-table-body
+(1,19): XXX-undefined-error
+(1,20): expected-closing-tag-but-got-eof
 #document
 | <html>
 |   <head>
@@ -83,6 +102,10 @@
 #data
 <table><thead><td></tbody>A
 #errors
+(1,7): expected-doctype-but-got-start-tag
+(1,18): unexpected-cell-in-table-body
+(1,26): XXX-undefined-error
+(1,27): expected-closing-tag-but-got-eof
 #document
 | <html>
 |   <head>
@@ -136,21 +159,6 @@
 |     <b>
 
 #data
-<isindex action="x">
-#errors
-#document-fragment
-table
-#document
-| <form>
-|   action="x"
-| <hr>
-| <label>
-|   "This is a searchable index. Enter search keywords: "
-|   <input>
-|     name="isindex"
-| <hr>
-
-#data
 <option><XH<optgroup></optgroup>
 #errors
 #document-fragment