JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
several bugfixes
[peach-html5-editor.git] / test.coffee
1 # Copyright (c) 2006-2015 Jason Woofenden, James Graham, Geoffrey Sneddon, and
2 # other contributors
3 #
4 # The values in the following data structure were extracted from the project at
5 # https://github.com/html5lib/html5lib-tests which has the following notice:
6 #
7 # Copyright (c) 2006-2013 James Graham, Geoffrey Sneddon, and
8 # other contributors
9 #
10 # Permission is hereby granted, free of charge, to any person obtaining
11 # a copy of this software and associated documentation files (the
12 # "Software"), to deal in the Software without restriction, including
13 # without limitation the rights to use, copy, modify, merge, publish,
14 # distribute, sublicense, and/or sell copies of the Software, and to
15 # permit persons to whom the Software is furnished to do so, subject to
16 # the following conditions:
17 #
18 # The above copyright notice and this permission notice shall be
19 # included in all copies or substantial portions of the Software.
20 #
21 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 #
29 # The rest of this file was written by Jason Woofenden in 2015, and is released
30 # under the terms of the CC0 license:
31 # http://creativecommons.org/publicdomain/zero/1.0/ and into the public domain
32
33 tests = [
34         {
35                 name: "adoption01.dat #1"
36                 html: "<a><p></a></p>"
37                 errors: 2
38                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|     <p>\n|       <a>\n"
39         }, {
40                 name: "adoption01.dat #2"
41                 html: "<a>1<p>2</a>3</p>"
42                 errors: 2
43                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       \"1\"\n|     <p>\n|       <a>\n|         \"2\"\n|       \"3\"\n"
44         }, {
45                 name: "adoption01.dat #3"
46                 html: "<a>1<button>2</a>3</button>"
47                 errors: 2
48                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       \"1\"\n|     <button>\n|       <a>\n|         \"2\"\n|       \"3\"\n"
49         }, {
50                 name: "adoption01.dat #4"
51                 html: "<a>1<b>2</a>3</b>"
52                 errors: 2
53                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       \"1\"\n|       <b>\n|         \"2\"\n|     <b>\n|       \"3\"\n"
54         }, {
55                 name: "adoption01.dat #5"
56                 html: "<a>1<div>2<div>3</a>4</div>5</div>"
57                 errors: 3
58                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       \"1\"\n|     <div>\n|       <a>\n|         \"2\"\n|       <div>\n|         <a>\n|           \"3\"\n|         \"4\"\n|       \"5\"\n"
59         }, {
60                 name: "adoption01.dat #6"
61                 html: "<table><a>1<p>2</a>3</p>"
62                 errors: 10
63                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       \"1\"\n|     <p>\n|       <a>\n|         \"2\"\n|       \"3\"\n|     <table>\n"
64         }, {
65                 name: "adoption01.dat #7"
66                 html: "<b><b><a><p></a>"
67                 errors: 3
68                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <b>\n|         <a>\n|         <p>\n|           <a>\n"
69         }, {
70                 name: "adoption01.dat #8"
71                 html: "<b><a><b><p></a>"
72                 errors: 3
73                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <a>\n|         <b>\n|       <b>\n|         <p>\n|           <a>\n"
74         }, {
75                 name: "adoption01.dat #9"
76                 html: "<a><b><b><p></a>"
77                 errors: 3
78                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       <b>\n|         <b>\n|     <b>\n|       <b>\n|         <p>\n|           <a>\n"
79         }, {
80                 name: "adoption01.dat #10"
81                 html: "<p>1<s id=\"A\">2<b id=\"B\">3</p>4</s>5</b>"
82                 errors: 3
83                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       \"1\"\n|       <s>\n|         id=\"A\"\n|         \"2\"\n|         <b>\n|           id=\"B\"\n|           \"3\"\n|     <s>\n|       id=\"A\"\n|       <b>\n|         id=\"B\"\n|         \"4\"\n|     <b>\n|       id=\"B\"\n|       \"5\"\n"
84         }, {
85                 name: "adoption01.dat #11"
86                 html: "<table><a>1<td>2</td>3</table>"
87                 errors: 5
88                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       \"1\"\n|     <a>\n|       \"3\"\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             \"2\"\n"
89         }, {
90                 name: "adoption01.dat #12"
91                 html: "<table>A<td>B</td>C</table>"
92                 errors: 4
93                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"AC\"\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             \"B\"\n"
94         }, {
95                 name: "adoption01.dat #13"
96                 html: "<a><svg><tr><input></a>"
97                 errors: 3
98                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       <svg svg>\n|         <svg tr>\n|           <svg input>\n"
99         }, {
100                 name: "adoption01.dat #14"
101                 html: "<div><a><b><div><div><div><div><div><div><div><div><div><div></a>"
102                 errors: 10
103                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <a>\n|         <b>\n|       <b>\n|         <div>\n|           <a>\n|           <div>\n|             <a>\n|             <div>\n|               <a>\n|               <div>\n|                 <a>\n|                 <div>\n|                   <a>\n|                   <div>\n|                     <a>\n|                     <div>\n|                       <a>\n|                       <div>\n|                         <a>\n|                           <div>\n|                             <div>\n"
104         }, {
105                 name: "adoption01.dat #15"
106                 html: "<div><a><b><u><i><code><div></a>"
107                 errors: 3
108                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <a>\n|         <b>\n|           <u>\n|             <i>\n|               <code>\n|       <u>\n|         <i>\n|           <code>\n|             <div>\n|               <a>\n"
109         }, {
110                 name: "adoption01.dat #16"
111                 html: "<b><b><b><b>x</b></b></b></b>y"
112                 errors: 1
113                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <b>\n|         <b>\n|           <b>\n|             \"x\"\n|     \"y\"\n"
114         }, {
115                 name: "adoption01.dat #17"
116                 html: "<p><b><b><b><b><p>x"
117                 errors: 3
118                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <b>\n|         <b>\n|           <b>\n|             <b>\n|     <p>\n|       <b>\n|         <b>\n|           <b>\n|             \"x\"\n"
119         }, {
120                 name: "adoption02.dat #1"
121                 html: "<b>1<i>2<p>3</b>4"
122                 errors: 3
123                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       \"1\"\n|       <i>\n|         \"2\"\n|     <i>\n|       <p>\n|         <b>\n|           \"3\"\n|         \"4\"\n"
124         }, {
125                 name: "adoption02.dat #2"
126                 html: "<a><div><style></style><address><a>"
127                 errors: 5
128                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|     <div>\n|       <a>\n|         <style>\n|       <address>\n|         <a>\n|         <a>\n"
129         }, {
130                 name: "comments01.dat #1"
131                 html: "FOO<!-- BAR -->BAZ"
132                 errors: 1
133                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <!--  BAR  -->\n|     \"BAZ\"\n"
134         }, {
135                 name: "comments01.dat #2"
136                 html: "FOO<!-- BAR --!>BAZ"
137                 errors: 2
138                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <!--  BAR  -->\n|     \"BAZ\"\n"
139         }, {
140                 name: "comments01.dat #3"
141                 html: "FOO<!-- BAR --   >BAZ"
142                 errors: 3
143                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <!--  BAR --   >BAZ -->\n"
144         }, {
145                 name: "comments01.dat #4"
146                 html: "FOO<!-- BAR -- <QUX> -- MUX -->BAZ"
147                 errors: 3
148                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <!--  BAR -- <QUX> -- MUX  -->\n|     \"BAZ\"\n"
149         }, {
150                 name: "comments01.dat #5"
151                 html: "FOO<!-- BAR -- <QUX> -- MUX --!>BAZ"
152                 errors: 4
153                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <!--  BAR -- <QUX> -- MUX  -->\n|     \"BAZ\"\n"
154         }, {
155                 name: "comments01.dat #6"
156                 html: "FOO<!-- BAR -- <QUX> -- MUX -- >BAZ"
157                 errors: 5
158                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <!--  BAR -- <QUX> -- MUX -- >BAZ -->\n"
159         }, {
160                 name: "comments01.dat #7"
161                 html: "FOO<!---->BAZ"
162                 errors: 1
163                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <!--  -->\n|     \"BAZ\"\n"
164         }, {
165                 name: "comments01.dat #8"
166                 html: "FOO<!--->BAZ"
167                 errors: 2
168                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <!--  -->\n|     \"BAZ\"\n"
169         }, {
170                 name: "comments01.dat #9"
171                 html: "FOO<!-->BAZ"
172                 errors: 2
173                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <!--  -->\n|     \"BAZ\"\n"
174         }, {
175                 name: "comments01.dat #10"
176                 html: "<?xml version=\"1.0\">Hi"
177                 errors: 2
178                 expected: "| <!-- ?xml version=\"1.0\" -->\n| <html>\n|   <head>\n|   <body>\n|     \"Hi\"\n"
179         }, {
180                 name: "comments01.dat #11"
181                 html: "<?xml version=\"1.0\">"
182                 errors: 2
183                 expected: "| <!-- ?xml version=\"1.0\" -->\n| <html>\n|   <head>\n|   <body>\n"
184         }, {
185                 name: "comments01.dat #12"
186                 html: "<?xml version"
187                 errors: 2
188                 expected: "| <!-- ?xml version -->\n| <html>\n|   <head>\n|   <body>\n"
189         }, {
190                 name: "comments01.dat #13"
191                 html: "FOO<!----->BAZ"
192                 errors: 2
193                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <!-- - -->\n|     \"BAZ\"\n"
194         }, {
195                 name: "comments01.dat #14"
196                 html: "<html><!-- comment --><title>Comment before head</title>"
197                 errors: 1
198                 expected: "| <html>\n|   <!--  comment  -->\n|   <head>\n|     <title>\n|       \"Comment before head\"\n|   <body>\n"
199         }, {
200                 name: "doctype01.dat #1"
201                 html: "<!DOCTYPE html>Hello"
202                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
203         }, {
204                 name: "doctype01.dat #2"
205                 html: "<!dOctYpE HtMl>Hello"
206                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
207         }, {
208                 name: "doctype01.dat #3"
209                 html: "<!DOCTYPEhtml>Hello"
210                 errors: 1
211                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
212         }, {
213                 name: "doctype01.dat #4"
214                 html: "<!DOCTYPE>Hello"
215                 errors: 3
216                 expected: "| <!DOCTYPE >\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
217         }, {
218                 name: "doctype01.dat #5"
219                 html: "<!DOCTYPE >Hello"
220                 errors: 2
221                 expected: "| <!DOCTYPE >\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
222         }, {
223                 name: "doctype01.dat #6"
224                 html: "<!DOCTYPE potato>Hello"
225                 errors: 1
226                 expected: "| <!DOCTYPE potato>\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
227         }, {
228                 name: "doctype01.dat #7"
229                 html: "<!DOCTYPE potato >Hello"
230                 errors: 1
231                 expected: "| <!DOCTYPE potato>\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
232         }, {
233                 name: "doctype01.dat #8"
234                 html: "<!DOCTYPE potato taco>Hello"
235                 errors: 2
236                 expected: "| <!DOCTYPE potato>\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
237         }, {
238                 name: "doctype01.dat #9"
239                 html: "<!DOCTYPE potato taco \"ddd>Hello"
240                 errors: 2
241                 expected: "| <!DOCTYPE potato>\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
242         }, {
243                 name: "doctype01.dat #10"
244                 html: "<!DOCTYPE potato sYstEM>Hello"
245                 errors: 2
246                 expected: "| <!DOCTYPE potato>\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
247         }, {
248                 name: "doctype01.dat #11"
249                 html: "<!DOCTYPE potato sYstEM    >Hello"
250                 errors: 2
251                 expected: "| <!DOCTYPE potato>\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
252         }, {
253                 name: "doctype01.dat #12"
254                 html: "<!DOCTYPE   potato       sYstEM  ggg>Hello"
255                 errors: 2
256                 expected: "| <!DOCTYPE potato>\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
257         }, {
258                 name: "doctype01.dat #13"
259                 html: "<!DOCTYPE potato SYSTEM taco  >Hello"
260                 errors: 2
261                 expected: "| <!DOCTYPE potato>\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
262         }, {
263                 name: "doctype01.dat #14"
264                 html: "<!DOCTYPE potato SYSTEM 'taco\"'>Hello"
265                 errors: 1
266                 expected: "| <!DOCTYPE potato \"\" \"taco\"\">\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
267         }, {
268                 name: "doctype01.dat #15"
269                 html: "<!DOCTYPE potato SYSTEM \"taco\">Hello"
270                 errors: 1
271                 expected: "| <!DOCTYPE potato \"\" \"taco\">\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
272         }, {
273                 name: "doctype01.dat #16"
274                 html: "<!DOCTYPE potato SYSTEM \"tai'co\">Hello"
275                 errors: 1
276                 expected: "| <!DOCTYPE potato \"\" \"tai'co\">\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
277         }, {
278                 name: "doctype01.dat #17"
279                 html: "<!DOCTYPE potato SYSTEMtaco \"ddd\">Hello"
280                 errors: 2
281                 expected: "| <!DOCTYPE potato>\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
282         }, {
283                 name: "doctype01.dat #18"
284                 html: "<!DOCTYPE potato grass SYSTEM taco>Hello"
285                 errors: 2
286                 expected: "| <!DOCTYPE potato>\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
287         }, {
288                 name: "doctype01.dat #19"
289                 html: "<!DOCTYPE potato pUbLIc>Hello"
290                 errors: 2
291                 expected: "| <!DOCTYPE potato>\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
292         }, {
293                 name: "doctype01.dat #20"
294                 html: "<!DOCTYPE potato pUbLIc >Hello"
295                 errors: 2
296                 expected: "| <!DOCTYPE potato>\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
297         }, {
298                 name: "doctype01.dat #21"
299                 html: "<!DOCTYPE potato pUbLIcgoof>Hello"
300                 errors: 2
301                 expected: "| <!DOCTYPE potato>\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
302         }, {
303                 name: "doctype01.dat #22"
304                 html: "<!DOCTYPE potato PUBLIC goof>Hello"
305                 errors: 2
306                 expected: "| <!DOCTYPE potato>\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
307         }, {
308                 name: "doctype01.dat #23"
309                 html: "<!DOCTYPE potato PUBLIC \"go'of\">Hello"
310                 errors: 1
311                 expected: "| <!DOCTYPE potato \"go'of\" \"\">\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
312         }, {
313                 name: "doctype01.dat #24"
314                 html: "<!DOCTYPE potato PUBLIC 'go'of'>Hello"
315                 errors: 2
316                 expected: "| <!DOCTYPE potato \"go\" \"\">\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
317         }, {
318                 name: "doctype01.dat #25"
319                 html: "<!DOCTYPE potato PUBLIC 'go:hh   of' >Hello"
320                 errors: 1
321                 expected: "| <!DOCTYPE potato \"go:hh   of\" \"\">\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
322         }, {
323                 name: "doctype01.dat #26"
324                 html: "<!DOCTYPE potato PUBLIC \"W3C-//dfdf\" SYSTEM ggg>Hello"
325                 errors: 2
326                 expected: "| <!DOCTYPE potato \"W3C-//dfdf\" \"\">\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
327         }, {
328                 name: "doctype01.dat #27"
329                 html: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"\n   \"http://www.w3.org/TR/html4/strict.dtd\">Hello"
330                 expected: "| <!DOCTYPE html \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
331         }, {
332                 name: "doctype01.dat #28"
333                 html: "<!DOCTYPE ...>Hello"
334                 errors: 1
335                 expected: "| <!DOCTYPE ...>\n| <html>\n|   <head>\n|   <body>\n|     \"Hello\"\n"
336         }, {
337                 name: "doctype01.dat #29"
338                 html: "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"
339                 errors: 1
340                 expected: "| <!DOCTYPE html \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n| <html>\n|   <head>\n|   <body>\n"
341         }, {
342                 name: "doctype01.dat #30"
343                 html: "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\"\n\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">"
344                 errors: 1
345                 expected: "| <!DOCTYPE html \"-//W3C//DTD XHTML 1.0 Frameset//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">\n| <html>\n|   <head>\n|   <body>\n"
346         }, {
347                 name: "doctype01.dat #31"
348                 html: "<!DOCTYPE root-element [SYSTEM OR PUBLIC FPI] \"uri\" [ \n<!-- internal declarations -->\n]>"
349                 errors: 2
350                 expected: "| <!DOCTYPE root-element>\n| <html>\n|   <head>\n|   <body>\n|     \"]>\"\n"
351         }, {
352                 name: "doctype01.dat #32"
353                 html: "<!DOCTYPE html PUBLIC\n  \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"\n    \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">"
354                 errors: 1
355                 expected: "| <!DOCTYPE html \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">\n| <html>\n|   <head>\n|   <body>\n"
356         }, {
357                 name: "doctype01.dat #33"
358                 html: "<!DOCTYPE HTML SYSTEM \"http://www.w3.org/DTD/HTML4-strict.dtd\"><body><b>Mine!</b></body>"
359                 errors: 1
360                 expected: "| <!DOCTYPE html \"\" \"http://www.w3.org/DTD/HTML4-strict.dtd\">\n| <html>\n|   <head>\n|   <body>\n|     <b>\n|       \"Mine!\"\n"
361         }, {
362                 name: "doctype01.dat #34"
363                 html: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"\"http://www.w3.org/TR/html4/strict.dtd\">"
364                 errors: 1
365                 expected: "| <!DOCTYPE html \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n| <html>\n|   <head>\n|   <body>\n"
366         }, {
367                 name: "doctype01.dat #35"
368                 html: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"'http://www.w3.org/TR/html4/strict.dtd'>"
369                 errors: 1
370                 expected: "| <!DOCTYPE html \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n| <html>\n|   <head>\n|   <body>\n"
371         }, {
372                 name: "doctype01.dat #36"
373                 html: "<!DOCTYPE HTML PUBLIC\"-//W3C//DTD HTML 4.01//EN\"'http://www.w3.org/TR/html4/strict.dtd'>"
374                 errors: 2
375                 expected: "| <!DOCTYPE html \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n| <html>\n|   <head>\n|   <body>\n"
376         }, {
377                 name: "doctype01.dat #37"
378                 html: "<!DOCTYPE HTML PUBLIC'-//W3C//DTD HTML 4.01//EN''http://www.w3.org/TR/html4/strict.dtd'>"
379                 errors: 2
380                 expected: "| <!DOCTYPE html \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n| <html>\n|   <head>\n|   <body>\n"
381         }, {
382                 name: "domjs-unsafe.dat #1"
383                 html: "<svg><![CDATA[foo\nbar]]>"
384                 errors: 2
385                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"foo\nbar\"\n"
386         }, {
387                 name: "domjs-unsafe.dat #2"
388                 html: "<svg><![CDATA[foo\rbar]]>"
389                 errors: 2
390                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"foo\nbar\"\n"
391         }, {
392                 name: "domjs-unsafe.dat #3"
393                 html: "<svg><![CDATA[foo\r\nbar]]>"
394                 errors: 2
395                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"foo\nbar\"\n"
396         }, {
397                 name: "domjs-unsafe.dat #4"
398                 html: "<script>a='\u0000'</script>"
399                 errors: 2
400                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"a='�'\"\n|   <body>\n"
401         }, {
402                 name: "domjs-unsafe.dat #5"
403                 html: "<script type=\"data\"><!--\u0000</script>"
404                 errors: 2
405                 expected: "| <html>\n|   <head>\n|     <script>\n|       type=\"data\"\n|       \"<!--�\"\n|   <body>\n"
406         }, {
407                 name: "domjs-unsafe.dat #6"
408                 html: "<script type=\"data\"><!--foo\u0000</script>"
409                 errors: 2
410                 expected: "| <html>\n|   <head>\n|     <script>\n|       type=\"data\"\n|       \"<!--foo�\"\n|   <body>\n"
411         }, {
412                 name: "domjs-unsafe.dat #7"
413                 html: "<script type=\"data\"><!-- foo-\u0000</script>"
414                 errors: 2
415                 expected: "| <html>\n|   <head>\n|     <script>\n|       type=\"data\"\n|       \"<!-- foo-�\"\n|   <body>\n"
416         }, {
417                 name: "domjs-unsafe.dat #8"
418                 html: "<script type=\"data\"><!-- foo--\u0000</script>"
419                 errors: 2
420                 expected: "| <html>\n|   <head>\n|     <script>\n|       type=\"data\"\n|       \"<!-- foo--�\"\n|   <body>\n"
421         }, {
422                 name: "domjs-unsafe.dat #9"
423                 html: "<script type=\"data\"><!-- foo-"
424                 errors: 3
425                 expected: "| <html>\n|   <head>\n|     <script>\n|       type=\"data\"\n|       \"<!-- foo-\"\n|   <body>\n"
426         }, {
427                 name: "domjs-unsafe.dat #10"
428                 html: "<script type=\"data\"><!-- foo-<</script>"
429                 errors: 1
430                 expected: "| <html>\n|   <head>\n|     <script>\n|       type=\"data\"\n|       \"<!-- foo-<\"\n|   <body>\n"
431         }, {
432                 name: "domjs-unsafe.dat #11"
433                 html: "<script type=\"data\"><!-- foo-<S"
434                 errors: 3
435                 expected: "| <html>\n|   <head>\n|     <script>\n|       type=\"data\"\n|       \"<!-- foo-<S\"\n|   <body>\n"
436         }, {
437                 name: "domjs-unsafe.dat #12"
438                 html: "<script type=\"data\"><!-- foo-</SCRIPT>"
439                 errors: 1
440                 expected: "| <html>\n|   <head>\n|     <script>\n|       type=\"data\"\n|       \"<!-- foo-\"\n|   <body>\n"
441         }, {
442                 name: "domjs-unsafe.dat #13"
443                 html: "<script type=\"data\"><!--<p></script>"
444                 errors: 1
445                 expected: "| <html>\n|   <head>\n|     <script>\n|       type=\"data\"\n|       \"<!--<p>\"\n|   <body>\n"
446         }, {
447                 name: "domjs-unsafe.dat #14"
448                 html: "<script type=\"data\"><!--<script></script></script>"
449                 errors: 1
450                 expected: "| <html>\n|   <head>\n|     <script>\n|       type=\"data\"\n|       \"<!--<script></script>\"\n|   <body>\n"
451         }, {
452                 name: "domjs-unsafe.dat #15"
453                 html: "<script type=\"data\"><!--<script>\u0000</script></script>"
454                 errors: 2
455                 expected: "| <html>\n|   <head>\n|     <script>\n|       type=\"data\"\n|       \"<!--<script>�</script>\"\n|   <body>\n"
456         }, {
457                 name: "domjs-unsafe.dat #16"
458                 html: "<script type=\"data\"><!--<script>-\u0000</script></script>"
459                 errors: 2
460                 expected: "| <html>\n|   <head>\n|     <script>\n|       type=\"data\"\n|       \"<!--<script>-�</script>\"\n|   <body>\n"
461         }, {
462                 name: "domjs-unsafe.dat #17"
463                 html: "<script type=\"data\"><!--<script>--\u0000</script></script>"
464                 errors: 2
465                 expected: "| <html>\n|   <head>\n|     <script>\n|       type=\"data\"\n|       \"<!--<script>--�</script>\"\n|   <body>\n"
466         }, {
467                 name: "domjs-unsafe.dat #18"
468                 html: "<script type=\"data\"><!--<script>---</script></script>"
469                 errors: 1
470                 expected: "| <html>\n|   <head>\n|     <script>\n|       type=\"data\"\n|       \"<!--<script>---</script>\"\n|   <body>\n"
471         }, {
472                 name: "domjs-unsafe.dat #19"
473                 html: "<script type=\"data\"><!--<script></scrip></SCRIPT></script>"
474                 errors: 1
475                 expected: "| <html>\n|   <head>\n|     <script>\n|       type=\"data\"\n|       \"<!--<script></scrip></SCRIPT>\"\n|   <body>\n"
476         }, {
477                 name: "domjs-unsafe.dat #20"
478                 html: "<script type=\"data\"><!--<script></scrip </SCRIPT></script>"
479                 errors: 1
480                 expected: "| <html>\n|   <head>\n|     <script>\n|       type=\"data\"\n|       \"<!--<script></scrip </SCRIPT>\"\n|   <body>\n"
481         }, {
482                 name: "domjs-unsafe.dat #21"
483                 html: "<script type=\"data\"><!--<script></scrip/</SCRIPT></script>"
484                 errors: 1
485                 expected: "| <html>\n|   <head>\n|     <script>\n|       type=\"data\"\n|       \"<!--<script></scrip/</SCRIPT>\"\n|   <body>\n"
486         }, {
487                 name: "domjs-unsafe.dat #22"
488                 html: "<script type=\"data\"></scrip/></script>"
489                 errors: 1
490                 expected: "| <html>\n|   <head>\n|     <script>\n|       type=\"data\"\n|       \"</scrip/>\"\n|   <body>\n"
491         }, {
492                 name: "domjs-unsafe.dat #23"
493                 html: "<script type=\"data\"></scrip ></script>"
494                 errors: 1
495                 expected: "| <html>\n|   <head>\n|     <script>\n|       type=\"data\"\n|       \"</scrip >\"\n|   <body>\n"
496         }, {
497                 name: "domjs-unsafe.dat #24"
498                 html: "<script type=\"data\"><!--</scrip></script>"
499                 errors: 1
500                 expected: "| <html>\n|   <head>\n|     <script>\n|       type=\"data\"\n|       \"<!--</scrip>\"\n|   <body>\n"
501         }, {
502                 name: "domjs-unsafe.dat #25"
503                 html: "<script type=\"data\"><!--</scrip </script>"
504                 errors: 1
505                 expected: "| <html>\n|   <head>\n|     <script>\n|       type=\"data\"\n|       \"<!--</scrip \"\n|   <body>\n"
506         }, {
507                 name: "domjs-unsafe.dat #26"
508                 html: "<script type=\"data\"><!--</scrip/</script>"
509                 errors: 1
510                 expected: "| <html>\n|   <head>\n|     <script>\n|       type=\"data\"\n|       \"<!--</scrip/\"\n|   <body>\n"
511         }, {
512                 name: "domjs-unsafe.dat #27"
513                 html: "<!DOCTYPE html><!DOCTYPE html>"
514                 errors: 1
515                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
516         }, {
517                 name: "domjs-unsafe.dat #28"
518                 html: "<html><!DOCTYPE html>"
519                 errors: 2
520                 expected: "| <html>\n|   <head>\n|   <body>\n"
521         }, {
522                 name: "domjs-unsafe.dat #29"
523                 html: "<html><head><!DOCTYPE html></head>"
524                 errors: 2
525                 expected: "| <html>\n|   <head>\n|   <body>\n"
526         }, {
527                 name: "domjs-unsafe.dat #30"
528                 html: "<html><head></head><!DOCTYPE html>"
529                 errors: 2
530                 expected: "| <html>\n|   <head>\n|   <body>\n"
531         }, {
532                 name: "domjs-unsafe.dat #31"
533                 html: "<body></body><!DOCTYPE html>"
534                 errors: 2
535                 expected: "| <html>\n|   <head>\n|   <body>\n"
536         }, {
537                 name: "domjs-unsafe.dat #32"
538                 html: "<table><!DOCTYPE html></table>"
539                 errors: 2
540                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n"
541         }, {
542                 name: "domjs-unsafe.dat #33"
543                 html: "<select><!DOCTYPE html></select>"
544                 errors: 2
545                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n"
546         }, {
547                 name: "domjs-unsafe.dat #34"
548                 html: "<table><colgroup><!DOCTYPE html></colgroup></table>"
549                 errors: 2
550                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <colgroup>\n"
551         }, {
552                 name: "domjs-unsafe.dat #35"
553                 html: "<table><colgroup><!--test--></colgroup></table>"
554                 errors: 1
555                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <colgroup>\n|         <!-- test -->\n"
556         }, {
557                 name: "domjs-unsafe.dat #36"
558                 html: "<table><colgroup><html></colgroup></table>"
559                 errors: 2
560                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <colgroup>\n"
561         }, {
562                 name: "domjs-unsafe.dat #37"
563                 html: "<table><colgroup> foo</colgroup></table>"
564                 errors: 5
565                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"foo\"\n|     <table>\n|       <colgroup>\n|         \" \"\n"
566         }, {
567                 name: "domjs-unsafe.dat #38"
568                 html: "<select><!--test--></select>"
569                 errors: 1
570                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <!-- test -->\n"
571         }, {
572                 name: "domjs-unsafe.dat #39"
573                 html: "<select><html></select>"
574                 errors: 2
575                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n"
576         }, {
577                 name: "domjs-unsafe.dat #40"
578                 html: "<frameset><html></frameset>"
579                 errors: 2
580                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
581         }, {
582                 name: "domjs-unsafe.dat #41"
583                 html: "<frameset></frameset><html>"
584                 errors: 2
585                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
586         }, {
587                 name: "domjs-unsafe.dat #42"
588                 html: "<frameset></frameset><!DOCTYPE html>"
589                 errors: 2
590                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
591         }, {
592                 name: "domjs-unsafe.dat #43"
593                 html: "<html><body></body></html><!DOCTYPE html>"
594                 errors: 2
595                 expected: "| <html>\n|   <head>\n|   <body>\n"
596         }, {
597                 name: "domjs-unsafe.dat #44"
598                 html: "<svg><!DOCTYPE html></svg>"
599                 errors: 2
600                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n"
601         }, {
602                 name: "domjs-unsafe.dat #45"
603                 html: "<svg><font></font></svg>"
604                 errors: 1
605                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg font>\n"
606         }, {
607                 name: "domjs-unsafe.dat #46"
608                 html: "<svg><font id=foo></font></svg>"
609                 errors: 1
610                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg font>\n|         id=\"foo\"\n"
611         }, {
612                 name: "domjs-unsafe.dat #47"
613                 html: "<svg><font size=4></font></svg>"
614                 errors: 3
615                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|     <font>\n|       size=\"4\"\n"
616         }, {
617                 name: "domjs-unsafe.dat #48"
618                 html: "<svg><font color=red></font></svg>"
619                 errors: 3
620                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|     <font>\n|       color=\"red\"\n"
621         }, {
622                 name: "domjs-unsafe.dat #49"
623                 html: "<svg><font font=sans></font></svg>"
624                 errors: 1
625                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg font>\n|         font=\"sans\"\n"
626         }, {
627                 name: "entities01.dat #1"
628                 html: "FOO&gt;BAR"
629                 errors: 1
630                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO>BAR\"\n"
631         }, {
632                 name: "entities01.dat #2"
633                 html: "FOO&gtBAR"
634                 errors: 2
635                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO>BAR\"\n"
636         }, {
637                 name: "entities01.dat #3"
638                 html: "FOO&gt BAR"
639                 errors: 2
640                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO> BAR\"\n"
641         }, {
642                 name: "entities01.dat #4"
643                 html: "FOO&gt;;;BAR"
644                 errors: 1
645                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO>;;BAR\"\n"
646         }, {
647                 name: "entities01.dat #5"
648                 html: "I'm &notit; I tell you"
649                 errors: 2
650                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"I'm ¬it; I tell you\"\n"
651         }, {
652                 name: "entities01.dat #6"
653                 html: "I'm &notin; I tell you"
654                 errors: 1
655                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"I'm ∉ I tell you\"\n"
656         }, {
657                 name: "entities01.dat #7"
658                 html: "FOO& BAR"
659                 errors: 1
660                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO& BAR\"\n"
661         }, {
662                 name: "entities01.dat #8"
663                 html: "FOO&<BAR>"
664                 errors: 2
665                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO&\"\n|     <bar>\n"
666         }, {
667                 name: "entities01.dat #9"
668                 html: "FOO&&&&gt;BAR"
669                 errors: 1
670                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO&&&>BAR\"\n"
671         }, {
672                 name: "entities01.dat #10"
673                 html: "FOO&#41;BAR"
674                 errors: 1
675                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO)BAR\"\n"
676         }, {
677                 name: "entities01.dat #11"
678                 html: "FOO&#x41;BAR"
679                 errors: 1
680                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOOABAR\"\n"
681         }, {
682                 name: "entities01.dat #12"
683                 html: "FOO&#X41;BAR"
684                 errors: 1
685                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOOABAR\"\n"
686         }, {
687                 name: "entities01.dat #13"
688                 html: "FOO&#BAR"
689                 errors: 2
690                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO&#BAR\"\n"
691         }, {
692                 name: "entities01.dat #14"
693                 html: "FOO&#ZOO"
694                 errors: 2
695                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO&#ZOO\"\n"
696         }, {
697                 name: "entities01.dat #15"
698                 html: "FOO&#xBAR"
699                 errors: 2
700                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOOºR\"\n"
701         }, {
702                 name: "entities01.dat #16"
703                 html: "FOO&#xZOO"
704                 errors: 2
705                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO&#xZOO\"\n"
706         }, {
707                 name: "entities01.dat #17"
708                 html: "FOO&#XZOO"
709                 errors: 2
710                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO&#XZOO\"\n"
711         }, {
712                 name: "entities01.dat #18"
713                 html: "FOO&#41BAR"
714                 errors: 2
715                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO)BAR\"\n"
716         }, {
717                 name: "entities01.dat #19"
718                 html: "FOO&#x41BAR"
719                 errors: 2
720                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO䆺R\"\n"
721         }, {
722                 name: "entities01.dat #20"
723                 html: "FOO&#x41ZOO"
724                 errors: 2
725                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOOAZOO\"\n"
726         }, {
727                 name: "entities01.dat #21"
728                 html: "FOO&#x0000;ZOO"
729                 errors: 2
730                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO�ZOO\"\n"
731         }, {
732                 name: "entities01.dat #22"
733                 html: "FOO&#x0078;ZOO"
734                 errors: 1
735                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOOxZOO\"\n"
736         }, {
737                 name: "entities01.dat #23"
738                 html: "FOO&#x0079;ZOO"
739                 errors: 1
740                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOOyZOO\"\n"
741         }, {
742                 name: "entities01.dat #24"
743                 html: "FOO&#x0080;ZOO"
744                 errors: 2
745                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO€ZOO\"\n"
746         }, {
747                 name: "entities01.dat #25"
748                 html: "FOO&#x0081;ZOO"
749                 errors: 2
750                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\81ZOO\"\n"
751         }, {
752                 name: "entities01.dat #26"
753                 html: "FOO&#x0082;ZOO"
754                 errors: 2
755                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO‚ZOO\"\n"
756         }, {
757                 name: "entities01.dat #27"
758                 html: "FOO&#x0083;ZOO"
759                 errors: 2
760                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOOƒZOO\"\n"
761         }, {
762                 name: "entities01.dat #28"
763                 html: "FOO&#x0084;ZOO"
764                 errors: 2
765                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO„ZOO\"\n"
766         }, {
767                 name: "entities01.dat #29"
768                 html: "FOO&#x0085;ZOO"
769                 errors: 2
770                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO…ZOO\"\n"
771         }, {
772                 name: "entities01.dat #30"
773                 html: "FOO&#x0086;ZOO"
774                 errors: 2
775                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO†ZOO\"\n"
776         }, {
777                 name: "entities01.dat #31"
778                 html: "FOO&#x0087;ZOO"
779                 errors: 2
780                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO‡ZOO\"\n"
781         }, {
782                 name: "entities01.dat #32"
783                 html: "FOO&#x0088;ZOO"
784                 errors: 2
785                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOOˆZOO\"\n"
786         }, {
787                 name: "entities01.dat #33"
788                 html: "FOO&#x0089;ZOO"
789                 errors: 2
790                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO‰ZOO\"\n"
791         }, {
792                 name: "entities01.dat #34"
793                 html: "FOO&#x008A;ZOO"
794                 errors: 2
795                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOOŠZOO\"\n"
796         }, {
797                 name: "entities01.dat #35"
798                 html: "FOO&#x008B;ZOO"
799                 errors: 2
800                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO‹ZOO\"\n"
801         }, {
802                 name: "entities01.dat #36"
803                 html: "FOO&#x008C;ZOO"
804                 errors: 2
805                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOOŒZOO\"\n"
806         }, {
807                 name: "entities01.dat #37"
808                 html: "FOO&#x008D;ZOO"
809                 errors: 2
810                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\8dZOO\"\n"
811         }, {
812                 name: "entities01.dat #38"
813                 html: "FOO&#x008E;ZOO"
814                 errors: 2
815                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOOŽZOO\"\n"
816         }, {
817                 name: "entities01.dat #39"
818                 html: "FOO&#x008F;ZOO"
819                 errors: 2
820                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\8fZOO\"\n"
821         }, {
822                 name: "entities01.dat #40"
823                 html: "FOO&#x0090;ZOO"
824                 errors: 2
825                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\90ZOO\"\n"
826         }, {
827                 name: "entities01.dat #41"
828                 html: "FOO&#x0091;ZOO"
829                 errors: 2
830                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO‘ZOO\"\n"
831         }, {
832                 name: "entities01.dat #42"
833                 html: "FOO&#x0092;ZOO"
834                 errors: 2
835                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO’ZOO\"\n"
836         }, {
837                 name: "entities01.dat #43"
838                 html: "FOO&#x0093;ZOO"
839                 errors: 2
840                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO“ZOO\"\n"
841         }, {
842                 name: "entities01.dat #44"
843                 html: "FOO&#x0094;ZOO"
844                 errors: 2
845                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO”ZOO\"\n"
846         }, {
847                 name: "entities01.dat #45"
848                 html: "FOO&#x0095;ZOO"
849                 errors: 2
850                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO•ZOO\"\n"
851         }, {
852                 name: "entities01.dat #46"
853                 html: "FOO&#x0096;ZOO"
854                 errors: 2
855                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO–ZOO\"\n"
856         }, {
857                 name: "entities01.dat #47"
858                 html: "FOO&#x0097;ZOO"
859                 errors: 2
860                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO—ZOO\"\n"
861         }, {
862                 name: "entities01.dat #48"
863                 html: "FOO&#x0098;ZOO"
864                 errors: 2
865                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO˜ZOO\"\n"
866         }, {
867                 name: "entities01.dat #49"
868                 html: "FOO&#x0099;ZOO"
869                 errors: 2
870                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO™ZOO\"\n"
871         }, {
872                 name: "entities01.dat #50"
873                 html: "FOO&#x009A;ZOO"
874                 errors: 2
875                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOOšZOO\"\n"
876         }, {
877                 name: "entities01.dat #51"
878                 html: "FOO&#x009B;ZOO"
879                 errors: 2
880                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO›ZOO\"\n"
881         }, {
882                 name: "entities01.dat #52"
883                 html: "FOO&#x009C;ZOO"
884                 errors: 2
885                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOOœZOO\"\n"
886         }, {
887                 name: "entities01.dat #53"
888                 html: "FOO&#x009D;ZOO"
889                 errors: 2
890                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\9dZOO\"\n"
891         }, {
892                 name: "entities01.dat #54"
893                 html: "FOO&#x009E;ZOO"
894                 errors: 2
895                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOOžZOO\"\n"
896         }, {
897                 name: "entities01.dat #55"
898                 html: "FOO&#x009F;ZOO"
899                 errors: 2
900                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOOŸZOO\"\n"
901         }, {
902                 name: "entities01.dat #56"
903                 html: "FOO&#x00A0;ZOO"
904                 errors: 1
905                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO ZOO\"\n"
906         }, {
907                 name: "entities01.dat #57"
908                 html: "FOO&#xD7FF;ZOO"
909                 errors: 1
910                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO퟿ZOO\"\n"
911         }, {
912                 name: "entities01.dat #58"
913                 html: "FOO&#xD800;ZOO"
914                 errors: 2
915                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO�ZOO\"\n"
916         }, {
917                 name: "entities01.dat #59"
918                 html: "FOO&#xD801;ZOO"
919                 errors: 2
920                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO�ZOO\"\n"
921         }, {
922                 name: "entities01.dat #60"
923                 html: "FOO&#xDFFE;ZOO"
924                 errors: 2
925                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO�ZOO\"\n"
926         }, {
927                 name: "entities01.dat #61"
928                 html: "FOO&#xDFFF;ZOO"
929                 errors: 2
930                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO�ZOO\"\n"
931         }, {
932                 name: "entities01.dat #62"
933                 html: "FOO&#xE000;ZOO"
934                 errors: 1
935                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOOZOO\"\n"
936         }, {
937                 name: "entities01.dat #63"
938                 html: "FOO&#x10FFFE;ZOO"
939                 errors: 2
940                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO􏿾ZOO\"\n"
941         }, {
942                 name: "entities01.dat #64"
943                 html: "FOO&#x1087D4;ZOO"
944                 errors: 1
945                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO􈟔ZOO\"\n"
946         }, {
947                 name: "entities01.dat #65"
948                 html: "FOO&#x10FFFF;ZOO"
949                 errors: 2
950                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO􏿿ZOO\"\n"
951         }, {
952                 name: "entities01.dat #66"
953                 html: "FOO&#x110000;ZOO"
954                 errors: 2
955                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO�ZOO\"\n"
956         }, {
957                 name: "entities01.dat #67"
958                 html: "FOO&#xFFFFFF;ZOO"
959                 errors: 2
960                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO�ZOO\"\n"
961         }, {
962                 name: "entities01.dat #68"
963                 html: "FOO&#11111111111"
964                 errors: 3
965                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO�\"\n"
966         }, {
967                 name: "entities01.dat #69"
968                 html: "FOO&#1111111111"
969                 errors: 3
970                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO�\"\n"
971         }, {
972                 name: "entities01.dat #70"
973                 html: "FOO&#111111111111"
974                 errors: 3
975                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO�\"\n"
976         }, {
977                 name: "entities01.dat #71"
978                 html: "FOO&#11111111111ZOO"
979                 errors: 2
980                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO�ZOO\"\n"
981         }, {
982                 name: "entities01.dat #72"
983                 html: "FOO&#1111111111ZOO"
984                 errors: 2
985                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO�ZOO\"\n"
986         }, {
987                 name: "entities01.dat #73"
988                 html: "FOO&#111111111111ZOO"
989                 errors: 2
990                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO�ZOO\"\n"
991         }, {
992                 name: "entities02.dat #1"
993                 html: "<div bar=\"ZZ&gt;YY\"></div>"
994                 errors: 1
995                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       bar=\"ZZ>YY\"\n"
996         }, {
997                 name: "entities02.dat #2"
998                 html: "<div bar=\"ZZ&\"></div>"
999                 errors: 1
1000                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       bar=\"ZZ&\"\n"
1001         }, {
1002                 name: "entities02.dat #3"
1003                 html: "<div bar='ZZ&'></div>"
1004                 errors: 1
1005                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       bar=\"ZZ&\"\n"
1006         }, {
1007                 name: "entities02.dat #4"
1008                 html: "<div bar=ZZ&></div>"
1009                 errors: 1
1010                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       bar=\"ZZ&\"\n"
1011         }, {
1012                 name: "entities02.dat #5"
1013                 html: "<div bar=\"ZZ&gt=YY\"></div>"
1014                 errors: 2
1015                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       bar=\"ZZ&gt=YY\"\n"
1016         }, {
1017                 name: "entities02.dat #6"
1018                 html: "<div bar=\"ZZ&gt0YY\"></div>"
1019                 errors: 1
1020                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       bar=\"ZZ&gt0YY\"\n"
1021         }, {
1022                 name: "entities02.dat #7"
1023                 html: "<div bar=\"ZZ&gt9YY\"></div>"
1024                 errors: 1
1025                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       bar=\"ZZ&gt9YY\"\n"
1026         }, {
1027                 name: "entities02.dat #8"
1028                 html: "<div bar=\"ZZ&gtaYY\"></div>"
1029                 errors: 1
1030                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       bar=\"ZZ&gtaYY\"\n"
1031         }, {
1032                 name: "entities02.dat #9"
1033                 html: "<div bar=\"ZZ&gtZYY\"></div>"
1034                 errors: 1
1035                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       bar=\"ZZ&gtZYY\"\n"
1036         }, {
1037                 name: "entities02.dat #10"
1038                 html: "<div bar=\"ZZ&gt YY\"></div>"
1039                 errors: 2
1040                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       bar=\"ZZ> YY\"\n"
1041         }, {
1042                 name: "entities02.dat #11"
1043                 html: "<div bar=\"ZZ&gt\"></div>"
1044                 errors: 2
1045                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       bar=\"ZZ>\"\n"
1046         }, {
1047                 name: "entities02.dat #12"
1048                 html: "<div bar='ZZ&gt'></div>"
1049                 errors: 2
1050                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       bar=\"ZZ>\"\n"
1051         }, {
1052                 name: "entities02.dat #13"
1053                 html: "<div bar=ZZ&gt></div>"
1054                 errors: 2
1055                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       bar=\"ZZ>\"\n"
1056         }, {
1057                 name: "entities02.dat #14"
1058                 html: "<div bar=\"ZZ&pound_id=23\"></div>"
1059                 errors: 2
1060                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       bar=\"ZZ£_id=23\"\n"
1061         }, {
1062                 name: "entities02.dat #15"
1063                 html: "<div bar=\"ZZ&prod_id=23\"></div>"
1064                 errors: 1
1065                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       bar=\"ZZ&prod_id=23\"\n"
1066         }, {
1067                 name: "entities02.dat #16"
1068                 html: "<div bar=\"ZZ&pound;_id=23\"></div>"
1069                 errors: 1
1070                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       bar=\"ZZ£_id=23\"\n"
1071         }, {
1072                 name: "entities02.dat #17"
1073                 html: "<div bar=\"ZZ&prod;_id=23\"></div>"
1074                 errors: 1
1075                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       bar=\"ZZ∏_id=23\"\n"
1076         }, {
1077                 name: "entities02.dat #18"
1078                 html: "<div bar=\"ZZ&pound=23\"></div>"
1079                 errors: 2
1080                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       bar=\"ZZ&pound=23\"\n"
1081         }, {
1082                 name: "entities02.dat #19"
1083                 html: "<div bar=\"ZZ&prod=23\"></div>"
1084                 errors: 1
1085                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       bar=\"ZZ&prod=23\"\n"
1086         }, {
1087                 name: "entities02.dat #20"
1088                 html: "<div>ZZ&pound_id=23</div>"
1089                 errors: 2
1090                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"ZZ£_id=23\"\n"
1091         }, {
1092                 name: "entities02.dat #21"
1093                 html: "<div>ZZ&prod_id=23</div>"
1094                 errors: 1
1095                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"ZZ&prod_id=23\"\n"
1096         }, {
1097                 name: "entities02.dat #22"
1098                 html: "<div>ZZ&pound;_id=23</div>"
1099                 errors: 1
1100                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"ZZ£_id=23\"\n"
1101         }, {
1102                 name: "entities02.dat #23"
1103                 html: "<div>ZZ&prod;_id=23</div>"
1104                 errors: 1
1105                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"ZZ∏_id=23\"\n"
1106         }, {
1107                 name: "entities02.dat #24"
1108                 html: "<div>ZZ&pound=23</div>"
1109                 errors: 2
1110                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"ZZ£=23\"\n"
1111         }, {
1112                 name: "entities02.dat #25"
1113                 html: "<div>ZZ&prod=23</div>"
1114                 errors: 1
1115                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"ZZ&prod=23\"\n"
1116         }, {
1117                 name: "entities02.dat #26"
1118                 html: "<div>ZZ&AElig=</div>"
1119                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"ZZÆ=\"\n"
1120         }, {
1121                 name: "foreign-fragment.dat #1"
1122                 html: "<nobr>X"
1123                 errors: 3
1124                 fragment: "svg path"
1125                 expected: "| <svg nobr>\n|   \"X\"\n"
1126         }, {
1127                 name: "foreign-fragment.dat #2"
1128                 html: "<font color></font>X"
1129                 errors: 1
1130                 fragment: "svg path"
1131                 expected: "| <svg font>\n|   color=\"\"\n| \"X\"\n"
1132         }, {
1133                 name: "foreign-fragment.dat #3"
1134                 html: "<font></font>X"
1135                 fragment: "svg path"
1136                 expected: "| <svg font>\n| \"X\"\n"
1137         }, {
1138                 name: "foreign-fragment.dat #4"
1139                 html: "<g></path>X"
1140                 errors: 3
1141                 fragment: "svg path"
1142                 expected: "| <svg g>\n|   \"X\"\n"
1143         }, {
1144                 name: "foreign-fragment.dat #5"
1145                 html: "</path>X"
1146                 errors: 1
1147                 fragment: "svg path"
1148                 expected: "| \"X\"\n"
1149         }, {
1150                 name: "foreign-fragment.dat #6"
1151                 html: "</foreignObject>X"
1152                 errors: 1
1153                 fragment: "svg foreignObject"
1154                 expected: "| \"X\"\n"
1155         }, {
1156                 name: "foreign-fragment.dat #7"
1157                 html: "</desc>X"
1158                 errors: 1
1159                 fragment: "svg desc"
1160                 expected: "| \"X\"\n"
1161         }, {
1162                 name: "foreign-fragment.dat #8"
1163                 html: "</title>X"
1164                 errors: 1
1165                 fragment: "svg title"
1166                 expected: "| \"X\"\n"
1167         }, {
1168                 name: "foreign-fragment.dat #9"
1169                 html: "</svg>X"
1170                 errors: 1
1171                 fragment: "svg svg"
1172                 expected: "| \"X\"\n"
1173         }, {
1174                 name: "foreign-fragment.dat #10"
1175                 html: "</mfenced>X"
1176                 errors: 1
1177                 fragment: "math mfenced"
1178                 expected: "| \"X\"\n"
1179         }, {
1180                 name: "foreign-fragment.dat #11"
1181                 html: "</malignmark>X"
1182                 errors: 1
1183                 fragment: "math malignmark"
1184                 expected: "| \"X\"\n"
1185         }, {
1186                 name: "foreign-fragment.dat #12"
1187                 html: "</math>X"
1188                 errors: 1
1189                 fragment: "math math"
1190                 expected: "| \"X\"\n"
1191         }, {
1192                 name: "foreign-fragment.dat #13"
1193                 html: "</annotation-xml>X"
1194                 errors: 1
1195                 fragment: "math annotation-xml"
1196                 expected: "| \"X\"\n"
1197         }, {
1198                 name: "foreign-fragment.dat #14"
1199                 html: "</mtext>X"
1200                 errors: 1
1201                 fragment: "math mtext"
1202                 expected: "| \"X\"\n"
1203         }, {
1204                 name: "foreign-fragment.dat #15"
1205                 html: "</mi>X"
1206                 errors: 1
1207                 fragment: "math mi"
1208                 expected: "| \"X\"\n"
1209         }, {
1210                 name: "foreign-fragment.dat #16"
1211                 html: "</mo>X"
1212                 errors: 1
1213                 fragment: "math mo"
1214                 expected: "| \"X\"\n"
1215         }, {
1216                 name: "foreign-fragment.dat #17"
1217                 html: "</mn>X"
1218                 errors: 1
1219                 fragment: "math mn"
1220                 expected: "| \"X\"\n"
1221         }, {
1222                 name: "foreign-fragment.dat #18"
1223                 html: "</ms>X"
1224                 errors: 1
1225                 fragment: "math ms"
1226                 expected: "| \"X\"\n"
1227         }, {
1228                 name: "foreign-fragment.dat #19"
1229                 html: "<b></b><mglyph/><i></i><malignmark/><u></u><ms/>X"
1230                 errors: 3
1231                 fragment: "math ms"
1232                 expected: "| <b>\n| <math mglyph>\n| <i>\n| <math malignmark>\n| <u>\n| <ms>\n|   \"X\"\n"
1233         }, {
1234                 name: "foreign-fragment.dat #20"
1235                 html: "<malignmark></malignmark>"
1236                 fragment: "math ms"
1237                 expected: "| <math malignmark>\n"
1238         }, {
1239                 name: "foreign-fragment.dat #21"
1240                 html: "<div></div>"
1241                 fragment: "math ms"
1242                 expected: "| <div>\n"
1243         }, {
1244                 name: "foreign-fragment.dat #22"
1245                 html: "<figure></figure>"
1246                 fragment: "math ms"
1247                 expected: "| <figure>\n"
1248         }, {
1249                 name: "foreign-fragment.dat #23"
1250                 html: "<b></b><mglyph/><i></i><malignmark/><u></u><mn/>X"
1251                 errors: 3
1252                 fragment: "math mn"
1253                 expected: "| <b>\n| <math mglyph>\n| <i>\n| <math malignmark>\n| <u>\n| <mn>\n|   \"X\"\n"
1254         }, {
1255                 name: "foreign-fragment.dat #24"
1256                 html: "<malignmark></malignmark>"
1257                 fragment: "math mn"
1258                 expected: "| <math malignmark>\n"
1259         }, {
1260                 name: "foreign-fragment.dat #25"
1261                 html: "<div></div>"
1262                 fragment: "math mn"
1263                 expected: "| <div>\n"
1264         }, {
1265                 name: "foreign-fragment.dat #26"
1266                 html: "<figure></figure>"
1267                 fragment: "math mn"
1268                 expected: "| <figure>\n"
1269         }, {
1270                 name: "foreign-fragment.dat #27"
1271                 html: "<b></b><mglyph/><i></i><malignmark/><u></u><mo/>X"
1272                 errors: 3
1273                 fragment: "math mo"
1274                 expected: "| <b>\n| <math mglyph>\n| <i>\n| <math malignmark>\n| <u>\n| <mo>\n|   \"X\"\n"
1275         }, {
1276                 name: "foreign-fragment.dat #28"
1277                 html: "<malignmark></malignmark>"
1278                 fragment: "math mo"
1279                 expected: "| <math malignmark>\n"
1280         }, {
1281                 name: "foreign-fragment.dat #29"
1282                 html: "<div></div>"
1283                 fragment: "math mo"
1284                 expected: "| <div>\n"
1285         }, {
1286                 name: "foreign-fragment.dat #30"
1287                 html: "<figure></figure>"
1288                 fragment: "math mo"
1289                 expected: "| <figure>\n"
1290         }, {
1291                 name: "foreign-fragment.dat #31"
1292                 html: "<b></b><mglyph/><i></i><malignmark/><u></u><mi/>X"
1293                 errors: 3
1294                 fragment: "math mi"
1295                 expected: "| <b>\n| <math mglyph>\n| <i>\n| <math malignmark>\n| <u>\n| <mi>\n|   \"X\"\n"
1296         }, {
1297                 name: "foreign-fragment.dat #32"
1298                 html: "<malignmark></malignmark>"
1299                 fragment: "math mi"
1300                 expected: "| <math malignmark>\n"
1301         }, {
1302                 name: "foreign-fragment.dat #33"
1303                 html: "<div></div>"
1304                 fragment: "math mi"
1305                 expected: "| <div>\n"
1306         }, {
1307                 name: "foreign-fragment.dat #34"
1308                 html: "<figure></figure>"
1309                 fragment: "math mi"
1310                 expected: "| <figure>\n"
1311         }, {
1312                 name: "foreign-fragment.dat #35"
1313                 html: "<b></b><mglyph/><i></i><malignmark/><u></u><mtext/>X"
1314                 errors: 3
1315                 fragment: "math mtext"
1316                 expected: "| <b>\n| <math mglyph>\n| <i>\n| <math malignmark>\n| <u>\n| <mtext>\n|   \"X\"\n"
1317         }, {
1318                 name: "foreign-fragment.dat #36"
1319                 html: "<malignmark></malignmark>"
1320                 fragment: "math mtext"
1321                 expected: "| <math malignmark>\n"
1322         }, {
1323                 name: "foreign-fragment.dat #37"
1324                 html: "<div></div>"
1325                 fragment: "math mtext"
1326                 expected: "| <div>\n"
1327         }, {
1328                 name: "foreign-fragment.dat #38"
1329                 html: "<figure></figure>"
1330                 fragment: "math mtext"
1331                 expected: "| <figure>\n"
1332         }, {
1333                 name: "foreign-fragment.dat #39"
1334                 html: "<div></div>"
1335                 errors: 1
1336                 fragment: "math annotation-xml"
1337                 expected: "| <math div>\n"
1338         }, {
1339                 name: "foreign-fragment.dat #40"
1340                 html: "<figure></figure>"
1341                 fragment: "math annotation-xml"
1342                 expected: "| <math figure>\n"
1343         }, {
1344                 name: "foreign-fragment.dat #41"
1345                 html: "<div></div>"
1346                 errors: 1
1347                 fragment: "math math"
1348                 expected: "| <math div>\n"
1349         }, {
1350                 name: "foreign-fragment.dat #42"
1351                 html: "<figure></figure>"
1352                 fragment: "math math"
1353                 expected: "| <math figure>\n"
1354         }, {
1355                 name: "foreign-fragment.dat #43"
1356                 html: "<div></div>"
1357                 fragment: "svg foreignObject"
1358                 expected: "| <div>\n"
1359         }, {
1360                 name: "foreign-fragment.dat #44"
1361                 html: "<figure></figure>"
1362                 fragment: "svg foreignObject"
1363                 expected: "| <figure>\n"
1364         }, {
1365                 name: "foreign-fragment.dat #45"
1366                 html: "<div></div>"
1367                 fragment: "svg title"
1368                 expected: "| <div>\n"
1369         }, {
1370                 name: "foreign-fragment.dat #46"
1371                 html: "<figure></figure>"
1372                 fragment: "svg title"
1373                 expected: "| <figure>\n"
1374         }, {
1375                 name: "foreign-fragment.dat #47"
1376                 html: "<figure></figure>"
1377                 fragment: "svg desc"
1378                 expected: "| <figure>\n"
1379         }, {
1380                 name: "foreign-fragment.dat #48"
1381                 html: "<div><h1>X</h1></div>"
1382                 errors: 2
1383                 fragment: "svg svg"
1384                 expected: "| <svg div>\n|   <svg h1>\n|     \"X\"\n"
1385         }, {
1386                 name: "foreign-fragment.dat #49"
1387                 html: "<div></div>"
1388                 errors: 1
1389                 fragment: "svg svg"
1390                 expected: "| <svg div>\n"
1391         }, {
1392                 name: "foreign-fragment.dat #50"
1393                 html: "<div></div>"
1394                 fragment: "svg desc"
1395                 expected: "| <div>\n"
1396         }, {
1397                 name: "foreign-fragment.dat #51"
1398                 html: "<figure></figure>"
1399                 fragment: "svg desc"
1400                 expected: "| <figure>\n"
1401         }, {
1402                 name: "foreign-fragment.dat #52"
1403                 html: "<plaintext><foo>"
1404                 errors: 2
1405                 fragment: "svg desc"
1406                 expected: "| <plaintext>\n|   \"<foo>\"\n"
1407         }, {
1408                 name: "foreign-fragment.dat #53"
1409                 html: "<frameset>X"
1410                 errors: 1
1411                 fragment: "svg desc"
1412                 expected: "| \"X\"\n"
1413         }, {
1414                 name: "foreign-fragment.dat #54"
1415                 html: "<head>X"
1416                 errors: 1
1417                 fragment: "svg desc"
1418                 expected: "| \"X\"\n"
1419         }, {
1420                 name: "foreign-fragment.dat #55"
1421                 html: "<body>X"
1422                 errors: 1
1423                 fragment: "svg desc"
1424                 expected: "| \"X\"\n"
1425         }, {
1426                 name: "foreign-fragment.dat #56"
1427                 html: "<html>X"
1428                 errors: 1
1429                 fragment: "svg desc"
1430                 expected: "| \"X\"\n"
1431         }, {
1432                 name: "foreign-fragment.dat #57"
1433                 html: "<html class=\"foo\">X"
1434                 errors: 1
1435                 fragment: "svg desc"
1436                 expected: "| \"X\"\n"
1437         }, {
1438                 name: "foreign-fragment.dat #58"
1439                 html: "<body class=\"foo\">X"
1440                 errors: 1
1441                 fragment: "svg desc"
1442                 expected: "| \"X\"\n"
1443         }, {
1444                 name: "html5test-com.dat #1"
1445                 html: "<div<div>"
1446                 errors: 2
1447                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div<div>\n"
1448         }, {
1449                 name: "html5test-com.dat #2"
1450                 html: "<div foo<bar=''>"
1451                 errors: 3
1452                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       foo<bar=\"\"\n"
1453         }, {
1454                 name: "html5test-com.dat #3"
1455                 html: "<div foo=`bar`>"
1456                 errors: 4
1457                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       foo=\"`bar`\"\n"
1458         }, {
1459                 name: "html5test-com.dat #4"
1460                 html: "<div \\\"foo=''>"
1461                 errors: 3
1462                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \\\"foo=\"\"\n"
1463         }, {
1464                 name: "html5test-com.dat #5"
1465                 html: "<a href='\\nbar'></a>"
1466                 errors: 1
1467                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       href=\"\\nbar\"\n"
1468         }, {
1469                 name: "html5test-com.dat #6"
1470                 html: "<!DOCTYPE html>"
1471                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
1472         }, {
1473                 name: "html5test-com.dat #7"
1474                 html: "&lang;&rang;"
1475                 errors: 1
1476                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"⟨⟩\"\n"
1477         }, {
1478                 name: "html5test-com.dat #8"
1479                 html: "&apos;"
1480                 errors: 1
1481                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"'\"\n"
1482         }, {
1483                 name: "html5test-com.dat #9"
1484                 html: "&ImaginaryI;"
1485                 errors: 1
1486                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"ⅈ\"\n"
1487         }, {
1488                 name: "html5test-com.dat #10"
1489                 html: "&Kopf;"
1490                 errors: 1
1491                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"𝕂\"\n"
1492         }, {
1493                 name: "html5test-com.dat #11"
1494                 html: "&notinva;"
1495                 errors: 1
1496                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"∉\"\n"
1497         }, {
1498                 name: "html5test-com.dat #12"
1499                 html: "<?import namespace=\"foo\" implementation=\"#bar\">"
1500                 errors: 2
1501                 expected: "| <!-- ?import namespace=\"foo\" implementation=\"#bar\" -->\n| <html>\n|   <head>\n|   <body>\n"
1502         }, {
1503                 name: "html5test-com.dat #13"
1504                 html: "<!--foo--bar-->"
1505                 errors: 2
1506                 expected: "| <!-- foo--bar -->\n| <html>\n|   <head>\n|   <body>\n"
1507         }, {
1508                 name: "html5test-com.dat #14"
1509                 html: "<![CDATA[x]]>"
1510                 errors: 2
1511                 expected: "| <!-- [CDATA[x]] -->\n| <html>\n|   <head>\n|   <body>\n"
1512         }, {
1513                 name: "html5test-com.dat #15"
1514                 html: "<textarea><!--</textarea>--></textarea>"
1515                 errors: 2
1516                 expected: "| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"<!--\"\n|     \"-->\"\n"
1517         }, {
1518                 name: "html5test-com.dat #16"
1519                 html: "<textarea><!--</textarea>-->"
1520                 errors: 1
1521                 expected: "| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"<!--\"\n|     \"-->\"\n"
1522         }, {
1523                 name: "html5test-com.dat #17"
1524                 html: "<style><!--</style>--></style>"
1525                 errors: 2
1526                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--\"\n|   <body>\n|     \"-->\"\n"
1527         }, {
1528                 name: "html5test-com.dat #18"
1529                 html: "<style><!--</style>-->"
1530                 errors: 1
1531                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--\"\n|   <body>\n|     \"-->\"\n"
1532         }, {
1533                 name: "html5test-com.dat #19"
1534                 html: "<ul><li>A </li> <li>B</li></ul>"
1535                 errors: 1
1536                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ul>\n|       <li>\n|         \"A \"\n|       \" \"\n|       <li>\n|         \"B\"\n"
1537         }, {
1538                 name: "html5test-com.dat #20"
1539                 html: "<table><form><input type=hidden><input></form><div></div></table>"
1540                 errors: 8
1541                 expected: "| <html>\n|   <head>\n|   <body>\n|     <input>\n|     <div>\n|     <table>\n|       <form>\n|       <input>\n|         type=\"hidden\"\n"
1542         }, {
1543                 name: "html5test-com.dat #21"
1544                 html: "<i>A<b>B<p></i>C</b>D"
1545                 errors: 3
1546                 expected: "| <html>\n|   <head>\n|   <body>\n|     <i>\n|       \"A\"\n|       <b>\n|         \"B\"\n|     <b>\n|     <p>\n|       <b>\n|         <i>\n|         \"C\"\n|       \"D\"\n"
1547         }, {
1548                 name: "html5test-com.dat #22"
1549                 html: "<div></div>"
1550                 errors: 1
1551                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n"
1552         }, {
1553                 name: "html5test-com.dat #23"
1554                 html: "<svg></svg>"
1555                 errors: 1
1556                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n"
1557         }, {
1558                 name: "html5test-com.dat #24"
1559                 html: "<math></math>"
1560                 errors: 1
1561                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n"
1562         }, {
1563                 name: "inbody01.dat #1"
1564                 html: "<button>1</foo>"
1565                 errors: 3
1566                 expected: "| <html>\n|   <head>\n|   <body>\n|     <button>\n|       \"1\"\n"
1567         }, {
1568                 name: "inbody01.dat #2"
1569                 html: "<foo>1<p>2</foo>"
1570                 errors: 3
1571                 expected: "| <html>\n|   <head>\n|   <body>\n|     <foo>\n|       \"1\"\n|       <p>\n|         \"2\"\n"
1572         }, {
1573                 name: "inbody01.dat #3"
1574                 html: "<dd>1</foo>"
1575                 errors: 2
1576                 expected: "| <html>\n|   <head>\n|   <body>\n|     <dd>\n|       \"1\"\n"
1577         }, {
1578                 name: "inbody01.dat #4"
1579                 html: "<foo>1<dd>2</foo>"
1580                 errors: 3
1581                 expected: "| <html>\n|   <head>\n|   <body>\n|     <foo>\n|       \"1\"\n|       <dd>\n|         \"2\"\n"
1582         }, {
1583                 name: "isindex.dat #1"
1584                 html: "<isindex>"
1585                 errors: 2
1586                 expected: "| <html>\n|   <head>\n|   <body>\n|     <form>\n|       <hr>\n|       <label>\n|         \"This is a searchable index. Enter search keywords: \"\n|         <input>\n|           name=\"isindex\"\n|       <hr>\n"
1587         }, {
1588                 name: "isindex.dat #2"
1589                 html: "<isindex name=\"A\" action=\"B\" prompt=\"C\" foo=\"D\">"
1590                 errors: 2
1591                 expected: "| <html>\n|   <head>\n|   <body>\n|     <form>\n|       action=\"B\"\n|       <hr>\n|       <label>\n|         \"C\"\n|         <input>\n|           foo=\"D\"\n|           name=\"isindex\"\n|       <hr>\n"
1592         }, {
1593                 name: "isindex.dat #3"
1594                 html: "<form><isindex>"
1595                 errors: 3
1596                 expected: "| <html>\n|   <head>\n|   <body>\n|     <form>\n"
1597         }, {
1598                 name: "main-element.dat #1"
1599                 html: "<!doctype html><p>foo<main>bar<p>baz"
1600                 errors: 1
1601                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       \"foo\"\n|     <main>\n|       \"bar\"\n|       <p>\n|         \"baz\"\n"
1602         }, {
1603                 name: "main-element.dat #2"
1604                 html: "<!doctype html><main><p>foo</main>bar"
1605                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <main>\n|       <p>\n|         \"foo\"\n|     \"bar\"\n"
1606         }, {
1607                 name: "main-element.dat #3"
1608                 html: "<!DOCTYPE html>xxx<svg><x><g><a><main><b>"
1609                 errors: 2
1610                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"xxx\"\n|     <svg svg>\n|       <svg x>\n|         <svg g>\n|           <svg a>\n|     <main>\n|       <b>\n"
1611         }, {
1612                 name: "math.dat #1"
1613                 html: "<math><tr><td><mo><tr>"
1614                 fragment: "td"
1615                 expected: "| <math math>\n|   <math tr>\n|     <math td>\n|       <math mo>\n"
1616         }, {
1617                 name: "math.dat #2"
1618                 html: "<math><tr><td><mo><tr>"
1619                 fragment: "tr"
1620                 expected: "| <math math>\n|   <math tr>\n|     <math td>\n|       <math mo>\n"
1621         }, {
1622                 name: "math.dat #3"
1623                 html: "<math><thead><mo><tbody>"
1624                 fragment: "thead"
1625                 expected: "| <math math>\n|   <math thead>\n|     <math mo>\n"
1626         }, {
1627                 name: "math.dat #4"
1628                 html: "<math><tfoot><mo><tbody>"
1629                 fragment: "tfoot"
1630                 expected: "| <math math>\n|   <math tfoot>\n|     <math mo>\n"
1631         }, {
1632                 name: "math.dat #5"
1633                 html: "<math><tbody><mo><tfoot>"
1634                 fragment: "tbody"
1635                 expected: "| <math math>\n|   <math tbody>\n|     <math mo>\n"
1636         }, {
1637                 name: "math.dat #6"
1638                 html: "<math><tbody><mo></table>"
1639                 fragment: "tbody"
1640                 expected: "| <math math>\n|   <math tbody>\n|     <math mo>\n"
1641         }, {
1642                 name: "math.dat #7"
1643                 html: "<math><thead><mo></table>"
1644                 fragment: "tbody"
1645                 expected: "| <math math>\n|   <math thead>\n|     <math mo>\n"
1646         }, {
1647                 name: "math.dat #8"
1648                 html: "<math><tfoot><mo></table>"
1649                 fragment: "tbody"
1650                 expected: "| <math math>\n|   <math tfoot>\n|     <math mo>\n"
1651         }, {
1652                 name: "namespace-sensitivity.dat #1"
1653                 html: "<body><table><tr><td><svg><td><foreignObject><span></td>Foo"
1654                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"Foo\"\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <svg svg>\n|               <svg td>\n|                 <svg foreignObject>\n|                   <span>\n"
1655         }, {
1656                 name: "pending-spec-changes.dat #1"
1657                 html: "<input type=\"hidden\"><frameset>"
1658                 errors: 3
1659                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
1660         }, {
1661                 name: "pending-spec-changes.dat #2"
1662                 html: "<!DOCTYPE html><table><caption><svg>foo</table>bar"
1663                 errors: 2
1664                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <svg svg>\n|           \"foo\"\n|     \"bar\"\n"
1665         }, {
1666                 name: "pending-spec-changes.dat #3"
1667                 html: "<table><tr><td><svg><desc><td></desc><circle>"
1668                 errors: 4
1669                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <svg svg>\n|               <svg desc>\n|           <td>\n|             <circle>\n"
1670         }, {
1671                 name: "pending-spec-changes-plain-text-unsafe.dat #1"
1672                 html: "<body><table>\u0000filler\u0000text\u0000"
1673                 errors: 18
1674                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"fillertext\"\n|     <table>\n"
1675         }, {
1676                 name: "plain-text-unsafe.dat #1"
1677                 html: "FOO&#x000D;ZOO"
1678                 errors: 2
1679                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\rZOO\"\n"
1680         }, {
1681                 name: "plain-text-unsafe.dat #2"
1682                 html: "<html>\u0000<frameset></frameset>"
1683                 errors: 4
1684                 #orig: expected: "| <html>\n|   <head>\n|   <frameset>\n"
1685                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"\ufffd\"\n"
1686         }, {
1687                 name: "plain-text-unsafe.dat #3"
1688                 html: "<html> \u0000 <frameset></frameset>"
1689                 errors: 4
1690                 # orig: expected: "| <html>\n|   <head>\n|   <frameset>\n"
1691                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"\ufffd \"\n"
1692         }, {
1693                 name: "plain-text-unsafe.dat #4"
1694                 html: "<html>a\u0000a<frameset></frameset>"
1695                 errors: 5
1696                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"aa\"\n"
1697         }, {
1698                 name: "plain-text-unsafe.dat #5"
1699                 html: "<html>\u0000\u0000<frameset></frameset>"
1700                 errors: 6
1701                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
1702         }, {
1703                 name: "plain-text-unsafe.dat #6"
1704                 html: "<html>\u0000\n <frameset></frameset>"
1705                 errors: 4
1706                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
1707         }, {
1708                 name: "plain-text-unsafe.dat #7"
1709                 html: "<html><select>\u0000"
1710                 errors: 4
1711                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n"
1712         }, {
1713                 name: "plain-text-unsafe.dat #8"
1714                 html: "\u0000"
1715                 errors: 3
1716                 expected: "| <html>\n|   <head>\n|   <body>\n"
1717         }, {
1718                 name: "plain-text-unsafe.dat #9"
1719                 html: "<body>\u0000"
1720                 errors: 3
1721                 expected: "| <html>\n|   <head>\n|   <body>\n"
1722         }, {
1723                 name: "plain-text-unsafe.dat #10"
1724                 html: "<plaintext>\u0000filler\u0000text\u0000"
1725                 errors: 5
1726                 expected: "| <html>\n|   <head>\n|   <body>\n|     <plaintext>\n|       \"�filler�text�\"\n"
1727         }, {
1728                 name: "plain-text-unsafe.dat #11"
1729                 html: "<svg><![CDATA[\u0000filler\u0000text\u0000]]>"
1730                 errors: 5
1731                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"�filler�text�\"\n"
1732         }, {
1733                 name: "plain-text-unsafe.dat #12"
1734                 html: "<body><!\u0000>"
1735                 errors: 2
1736                 expected: "| <html>\n|   <head>\n|   <body>\n|     <!-- � -->\n"
1737         }, {
1738                 name: "plain-text-unsafe.dat #13"
1739                 html: "<body><!\u0000filler\u0000text>"
1740                 errors: 2
1741                 expected: "| <html>\n|   <head>\n|   <body>\n|     <!-- �filler�text -->\n"
1742         }, {
1743                 name: "plain-text-unsafe.dat #14"
1744                 html: "<body><svg><foreignObject>\u0000filler\u0000text"
1745                 errors: 6
1746                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg foreignObject>\n|         \"fillertext\"\n"
1747         }, {
1748                 name: "plain-text-unsafe.dat #15"
1749                 html: "<svg>\u0000filler\u0000text"
1750                 errors: 6
1751                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"�filler�text\"\n"
1752         }, {
1753                 name: "plain-text-unsafe.dat #16"
1754                 html: "<svg>\u0000<frameset>"
1755                 errors: 4
1756                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"�\"\n|       <svg frameset>\n"
1757         }, {
1758                 name: "plain-text-unsafe.dat #17"
1759                 html: "<svg>\u0000 <frameset>"
1760                 errors: 4
1761                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"� \"\n|       <svg frameset>\n"
1762         }, {
1763                 name: "plain-text-unsafe.dat #18"
1764                 html: "<svg>\u0000a<frameset>"
1765                 errors: 4
1766                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"�a\"\n|       <svg frameset>\n"
1767         }, {
1768                 name: "plain-text-unsafe.dat #19"
1769                 html: "<svg>\u0000</svg><frameset>"
1770                 errors: 5
1771                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
1772         }, {
1773                 name: "plain-text-unsafe.dat #20"
1774                 html: "<svg>\u0000 </svg><frameset>"
1775                 errors: 5
1776                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
1777         }, {
1778                 name: "plain-text-unsafe.dat #21"
1779                 html: "<svg>\u0000a</svg><frameset>"
1780                 errors: 4
1781                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"�a\"\n"
1782         }, {
1783                 name: "plain-text-unsafe.dat #22"
1784                 html: "<svg><path></path></svg><frameset>"
1785                 errors: 3
1786                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
1787         }, {
1788                 name: "plain-text-unsafe.dat #23"
1789                 html: "<svg><p><frameset>"
1790                 errors: 4
1791                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
1792         }, {
1793                 name: "plain-text-unsafe.dat #24"
1794                 html: "<!DOCTYPE html><pre>\r\n\r\nA</pre>"
1795                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"\nA\"\n"
1796         }, {
1797                 name: "plain-text-unsafe.dat #25"
1798                 html: "<!DOCTYPE html><pre>\r\rA</pre>"
1799                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"\nA\"\n"
1800         }, {
1801                 name: "plain-text-unsafe.dat #26"
1802                 html: "<!DOCTYPE html><pre>\rA</pre>"
1803                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"A\"\n"
1804         }, {
1805                 name: "plain-text-unsafe.dat #27"
1806                 html: "<!DOCTYPE html><table><tr><td><math><mtext>\u0000a"
1807                 errors: 3
1808                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <math math>\n|               <math mtext>\n|                 \"a\"\n"
1809         }, {
1810                 name: "plain-text-unsafe.dat #28"
1811                 html: "<!DOCTYPE html><table><tr><td><svg><foreignObject>\u0000a"
1812                 errors: 3
1813                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <svg svg>\n|               <svg foreignObject>\n|                 \"a\"\n"
1814         }, {
1815                 name: "plain-text-unsafe.dat #29"
1816                 html: "<!DOCTYPE html><math><mi>a\u0000b"
1817                 errors: 3
1818                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mi>\n|         \"ab\"\n"
1819         }, {
1820                 name: "plain-text-unsafe.dat #30"
1821                 html: "<!DOCTYPE html><math><mo>a\u0000b"
1822                 errors: 3
1823                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mo>\n|         \"ab\"\n"
1824         }, {
1825                 name: "plain-text-unsafe.dat #31"
1826                 html: "<!DOCTYPE html><math><mn>a\u0000b"
1827                 errors: 3
1828                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mn>\n|         \"ab\"\n"
1829         }, {
1830                 name: "plain-text-unsafe.dat #32"
1831                 html: "<!DOCTYPE html><math><ms>a\u0000b"
1832                 errors: 3
1833                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math ms>\n|         \"ab\"\n"
1834         }, {
1835                 name: "plain-text-unsafe.dat #33"
1836                 html: "<!DOCTYPE html><math><mtext>a\u0000b"
1837                 errors: 3
1838                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mtext>\n|         \"ab\"\n"
1839         }, {
1840                 name: "ruby.dat #1"
1841                 html: "<html><ruby>a<rb>b<rb></ruby></html>"
1842                 errors: 1
1843                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rb>\n|         \"b\"\n|       <rb>\n"
1844         }, {
1845                 name: "ruby.dat #2"
1846                 html: "<html><ruby>a<rb>b<rt></ruby></html>"
1847                 errors: 1
1848                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rb>\n|         \"b\"\n|       <rt>\n"
1849         }, {
1850                 name: "ruby.dat #3"
1851                 html: "<html><ruby>a<rb>b<rtc></ruby></html>"
1852                 errors: 1
1853                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rb>\n|         \"b\"\n|       <rtc>\n"
1854         }, {
1855                 name: "ruby.dat #4"
1856                 html: "<html><ruby>a<rb>b<rp></ruby></html>"
1857                 errors: 1
1858                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rb>\n|         \"b\"\n|       <rp>\n"
1859         }, {
1860                 name: "ruby.dat #5"
1861                 html: "<html><ruby>a<rb>b<span></ruby></html>"
1862                 errors: 1
1863                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rb>\n|         \"b\"\n|         <span>\n"
1864         }, {
1865                 name: "ruby.dat #6"
1866                 html: "<html><ruby>a<rt>b<rb></ruby></html>"
1867                 errors: 1
1868                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rt>\n|         \"b\"\n|       <rb>\n"
1869         }, {
1870                 name: "ruby.dat #7"
1871                 html: "<html><ruby>a<rt>b<rt></ruby></html>"
1872                 errors: 1
1873                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rt>\n|         \"b\"\n|       <rt>\n"
1874         }, {
1875                 name: "ruby.dat #8"
1876                 html: "<html><ruby>a<rt>b<rtc></ruby></html>"
1877                 errors: 1
1878                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rt>\n|         \"b\"\n|       <rtc>\n"
1879         }, {
1880                 name: "ruby.dat #9"
1881                 html: "<html><ruby>a<rt>b<rp></ruby></html>"
1882                 errors: 1
1883                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rt>\n|         \"b\"\n|       <rp>\n"
1884         }, {
1885                 name: "ruby.dat #10"
1886                 html: "<html><ruby>a<rt>b<span></ruby></html>"
1887                 errors: 1
1888                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rt>\n|         \"b\"\n|         <span>\n"
1889         }, {
1890                 name: "ruby.dat #11"
1891                 html: "<html><ruby>a<rtc>b<rb></ruby></html>"
1892                 errors: 1
1893                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rtc>\n|         \"b\"\n|       <rb>\n"
1894         }, {
1895                 name: "ruby.dat #12"
1896                 html: "<html><ruby>a<rtc>b<rt>c<rt>d</ruby></html>"
1897                 errors: 1
1898                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rtc>\n|         \"b\"\n|         <rt>\n|           \"c\"\n|         <rt>\n|           \"d\"\n"
1899         }, {
1900                 name: "ruby.dat #13"
1901                 html: "<html><ruby>a<rtc>b<rtc></ruby></html>"
1902                 errors: 1
1903                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rtc>\n|         \"b\"\n|       <rtc>\n"
1904         }, {
1905                 name: "ruby.dat #14"
1906                 html: "<html><ruby>a<rtc>b<rp></ruby></html>"
1907                 errors: 1
1908                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rtc>\n|         \"b\"\n|         <rp>\n"
1909         }, {
1910                 name: "ruby.dat #15"
1911                 html: "<html><ruby>a<rtc>b<span></ruby></html>"
1912                 errors: 1
1913                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rtc>\n|         \"b\"\n|         <span>\n"
1914         }, {
1915                 name: "ruby.dat #16"
1916                 html: "<html><ruby>a<rp>b<rb></ruby></html>"
1917                 errors: 1
1918                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rp>\n|         \"b\"\n|       <rb>\n"
1919         }, {
1920                 name: "ruby.dat #17"
1921                 html: "<html><ruby>a<rp>b<rt></ruby></html>"
1922                 errors: 1
1923                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rp>\n|         \"b\"\n|       <rt>\n"
1924         }, {
1925                 name: "ruby.dat #18"
1926                 html: "<html><ruby>a<rp>b<rtc></ruby></html>"
1927                 errors: 1
1928                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rp>\n|         \"b\"\n|       <rtc>\n"
1929         }, {
1930                 name: "ruby.dat #19"
1931                 html: "<html><ruby>a<rp>b<rp></ruby></html>"
1932                 errors: 1
1933                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rp>\n|         \"b\"\n|       <rp>\n"
1934         }, {
1935                 name: "ruby.dat #20"
1936                 html: "<html><ruby>a<rp>b<span></ruby></html>"
1937                 errors: 1
1938                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rp>\n|         \"b\"\n|         <span>\n"
1939         }, {
1940                 name: "ruby.dat #21"
1941                 html: "<html><ruby><rtc><ruby>a<rb>b<rt></ruby></ruby></html>"
1942                 errors: 1
1943                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <rtc>\n|         <ruby>\n|           \"a\"\n|           <rb>\n|             \"b\"\n|           <rt>\n"
1944         }, {
1945                 name: "scriptdata01.dat #1"
1946                 html: "FOO<script>'Hello'</script>BAR"
1947                 errors: 1
1948                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"'Hello'\"\n|     \"BAR\"\n"
1949         }, {
1950                 name: "scriptdata01.dat #2"
1951                 html: "FOO<script></script>BAR"
1952                 errors: 1
1953                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|     \"BAR\"\n"
1954         }, {
1955                 name: "scriptdata01.dat #3"
1956                 html: "FOO<script></script >BAR"
1957                 errors: 1
1958                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|     \"BAR\"\n"
1959         }, {
1960                 name: "scriptdata01.dat #4"
1961                 html: "FOO<script></script/>BAR"
1962                 errors: 2
1963                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|     \"BAR\"\n"
1964         }, {
1965                 name: "scriptdata01.dat #5"
1966                 html: "FOO<script></script/ >BAR"
1967                 errors: 2
1968                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|     \"BAR\"\n"
1969         }, {
1970                 name: "scriptdata01.dat #6"
1971                 html: "FOO<script type=\"text/plain\"></scriptx>BAR"
1972                 errors: 2
1973                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       type=\"text/plain\"\n|       \"</scriptx>BAR\"\n"
1974         }, {
1975                 name: "scriptdata01.dat #7"
1976                 html: "FOO<script></script foo=\">\" dd>BAR"
1977                 errors: 2
1978                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|     \"BAR\"\n"
1979         }, {
1980                 name: "scriptdata01.dat #8"
1981                 html: "FOO<script>'<'</script>BAR"
1982                 errors: 1
1983                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"'<'\"\n|     \"BAR\"\n"
1984         }, {
1985                 name: "scriptdata01.dat #9"
1986                 html: "FOO<script>'<!'</script>BAR"
1987                 errors: 1
1988                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"'<!'\"\n|     \"BAR\"\n"
1989         }, {
1990                 name: "scriptdata01.dat #10"
1991                 html: "FOO<script>'<!-'</script>BAR"
1992                 errors: 1
1993                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"'<!-'\"\n|     \"BAR\"\n"
1994         }, {
1995                 name: "scriptdata01.dat #11"
1996                 html: "FOO<script>'<!--'</script>BAR"
1997                 errors: 1
1998                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"'<!--'\"\n|     \"BAR\"\n"
1999         }, {
2000                 name: "scriptdata01.dat #12"
2001                 html: "FOO<script>'<!---'</script>BAR"
2002                 errors: 1
2003                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"'<!---'\"\n|     \"BAR\"\n"
2004         }, {
2005                 name: "scriptdata01.dat #13"
2006                 html: "FOO<script>'<!-->'</script>BAR"
2007                 errors: 1
2008                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"'<!-->'\"\n|     \"BAR\"\n"
2009         }, {
2010                 name: "scriptdata01.dat #14"
2011                 html: "FOO<script>'<!-->'</script>BAR"
2012                 errors: 1
2013                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"'<!-->'\"\n|     \"BAR\"\n"
2014         }, {
2015                 name: "scriptdata01.dat #15"
2016                 html: "FOO<script>'<!-- potato'</script>BAR"
2017                 errors: 1
2018                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"'<!-- potato'\"\n|     \"BAR\"\n"
2019         }, {
2020                 name: "scriptdata01.dat #16"
2021                 html: "FOO<script>'<!-- <sCrIpt'</script>BAR"
2022                 errors: 1
2023                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"'<!-- <sCrIpt'\"\n|     \"BAR\"\n"
2024         }, {
2025                 name: "scriptdata01.dat #17"
2026                 html: "FOO<script type=\"text/plain\">'<!-- <sCrIpt>'</script>BAR"
2027                 errors: 3
2028                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       type=\"text/plain\"\n|       \"'<!-- <sCrIpt>'</script>BAR\"\n"
2029         }, {
2030                 name: "scriptdata01.dat #18"
2031                 html: "FOO<script type=\"text/plain\">'<!-- <sCrIpt> -'</script>BAR"
2032                 errors: 3
2033                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       type=\"text/plain\"\n|       \"'<!-- <sCrIpt> -'</script>BAR\"\n"
2034         }, {
2035                 name: "scriptdata01.dat #19"
2036                 html: "FOO<script type=\"text/plain\">'<!-- <sCrIpt> --'</script>BAR"
2037                 errors: 3
2038                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       type=\"text/plain\"\n|       \"'<!-- <sCrIpt> --'</script>BAR\"\n"
2039         }, {
2040                 name: "scriptdata01.dat #20"
2041                 html: "FOO<script>'<!-- <sCrIpt> -->'</script>BAR"
2042                 errors: 1
2043                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"'<!-- <sCrIpt> -->'\"\n|     \"BAR\"\n"
2044         }, {
2045                 name: "scriptdata01.dat #21"
2046                 html: "FOO<script type=\"text/plain\">'<!-- <sCrIpt> --!>'</script>BAR"
2047                 errors: 3
2048                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       type=\"text/plain\"\n|       \"'<!-- <sCrIpt> --!>'</script>BAR\"\n"
2049         }, {
2050                 name: "scriptdata01.dat #22"
2051                 html: "FOO<script type=\"text/plain\">'<!-- <sCrIpt> -- >'</script>BAR"
2052                 errors: 3
2053                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       type=\"text/plain\"\n|       \"'<!-- <sCrIpt> -- >'</script>BAR\"\n"
2054         }, {
2055                 name: "scriptdata01.dat #23"
2056                 html: "FOO<script type=\"text/plain\">'<!-- <sCrIpt '</script>BAR"
2057                 errors: 3
2058                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       type=\"text/plain\"\n|       \"'<!-- <sCrIpt '</script>BAR\"\n"
2059         }, {
2060                 name: "scriptdata01.dat #24"
2061                 html: "FOO<script type=\"text/plain\">'<!-- <sCrIpt/'</script>BAR"
2062                 errors: 3
2063                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       type=\"text/plain\"\n|       \"'<!-- <sCrIpt/'</script>BAR\"\n"
2064         }, {
2065                 name: "scriptdata01.dat #25"
2066                 html: "FOO<script type=\"text/plain\">'<!-- <sCrIpt\\'</script>BAR"
2067                 errors: 1
2068                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       type=\"text/plain\"\n|       \"'<!-- <sCrIpt\\'\"\n|     \"BAR\"\n"
2069         }, {
2070                 name: "scriptdata01.dat #26"
2071                 html: "FOO<script type=\"text/plain\">'<!-- <sCrIpt/'</script>BAR</script>QUX"
2072                 errors: 1
2073                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       type=\"text/plain\"\n|       \"'<!-- <sCrIpt/'</script>BAR\"\n|     \"QUX\"\n"
2074         }, {
2075                 name: "scriptdata01.dat #27"
2076                 html: "FOO<script><!--<script>-></script>--></script>QUX"
2077                 errors: 1
2078                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"<!--<script>-></script>-->\"\n|     \"QUX\"\n"
2079         }, {
2080                 name: "tables01.dat #1"
2081                 html: "<table><th>"
2082                 errors: 3
2083                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <th>\n"
2084         }, {
2085                 name: "tables01.dat #2"
2086                 html: "<table><td>"
2087                 errors: 3
2088                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n"
2089         }, {
2090                 name: "tables01.dat #3"
2091                 html: "<table><col foo='bar'>"
2092                 errors: 2
2093                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <colgroup>\n|         <col>\n|           foo=\"bar\"\n"
2094         }, {
2095                 name: "tables01.dat #4"
2096                 html: "<table><colgroup></html>foo"
2097                 errors: 6
2098                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"foo\"\n|     <table>\n|       <colgroup>\n"
2099         }, {
2100                 name: "tables01.dat #5"
2101                 html: "<table></table><p>foo"
2102                 errors: 1
2103                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|     <p>\n|       \"foo\"\n"
2104         }, {
2105                 name: "tables01.dat #6"
2106                 html: "<table></body></caption></col></colgroup></html></tbody></td></tfoot></th></thead></tr><td>"
2107                 errors: 14
2108                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n"
2109         }, {
2110                 name: "tables01.dat #7"
2111                 html: "<table><select><option>3</select></table>"
2112                 errors: 2
2113                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n|         \"3\"\n|     <table>\n"
2114         }, {
2115                 name: "tables01.dat #8"
2116                 html: "<table><select><table></table></select></table>"
2117                 errors: 6
2118                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|     <table>\n|     <table>\n"
2119         }, {
2120                 name: "tables01.dat #9"
2121                 html: "<table><select></table>"
2122                 errors: 3
2123                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|     <table>\n"
2124         }, {
2125                 name: "tables01.dat #10"
2126                 html: "<table><select><option>A<tr><td>B</td></tr></table>"
2127                 errors: 3
2128                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n|         \"A\"\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             \"B\"\n"
2129         }, {
2130                 name: "tables01.dat #11"
2131                 html: "<table><td></body></caption></col></colgroup></html>foo"
2132                 errors: 8
2133                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             \"foo\"\n"
2134         }, {
2135                 name: "tables01.dat #12"
2136                 html: "<table><td>A</table>B"
2137                 errors: 2
2138                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             \"A\"\n|     \"B\"\n"
2139         }, {
2140                 name: "tables01.dat #13"
2141                 html: "<table><tr><caption>"
2142                 errors: 2
2143                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|       <caption>\n"
2144         }, {
2145                 name: "tables01.dat #14"
2146                 html: "<table><tr></body></caption></col></colgroup></html></td></th><td>foo"
2147                 errors: 9
2148                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             \"foo\"\n"
2149         }, {
2150                 name: "tables01.dat #15"
2151                 html: "<table><td><tr>"
2152                 errors: 3
2153                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|         <tr>\n"
2154         }, {
2155                 name: "tables01.dat #16"
2156                 html: "<table><td><button><td>"
2157                 errors: 4
2158                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <button>\n|           <td>\n"
2159         }, {
2160                 name: "tables01.dat #17"
2161                 html: "<table><tr><td><svg><desc><td>"
2162                 errors: 3
2163                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <svg svg>\n|               <svg desc>\n|           <td>\n"
2164         }, {
2165                 name: "template.dat #1"
2166                 html: "<body><template>Hello</template>"
2167                 errors: 1
2168                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         \"Hello\"\n"
2169         }, {
2170                 name: "template.dat #2"
2171                 html: "<template>Hello</template>"
2172                 errors: 1
2173                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         \"Hello\"\n|   <body>\n"
2174         }, {
2175                 name: "template.dat #3"
2176                 html: "<template></template><div></div>"
2177                 errors: 1
2178                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|   <body>\n|     <div>\n"
2179         }, {
2180                 name: "template.dat #4"
2181                 html: "<html><template>Hello</template>"
2182                 errors: 1
2183                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         \"Hello\"\n|   <body>\n"
2184         }, {
2185                 name: "template.dat #5"
2186                 html: "<head><template><div></div></template></head>"
2187                 errors: 1
2188                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <div>\n|   <body>\n"
2189         }, {
2190                 name: "template.dat #6"
2191                 html: "<div><template><div><span></template><b>"
2192                 errors: 3
2193                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <template>\n|         content\n|           <div>\n|             <span>\n|       <b>\n"
2194         }, {
2195                 name: "template.dat #7"
2196                 html: "<div><template></div>Hello"
2197                 errors: 4
2198                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <template>\n|         content\n|           \"Hello\"\n"
2199         }, {
2200                 name: "template.dat #8"
2201                 html: "<div></template></div>"
2202                 errors: 2
2203                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n"
2204         }, {
2205                 name: "template.dat #9"
2206                 html: "<table><template></template></table>"
2207                 errors: 1
2208                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <template>\n|         content\n"
2209         }, {
2210                 name: "template.dat #10"
2211                 html: "<table><template></template></div>"
2212                 errors: 4
2213                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <template>\n|         content\n"
2214         }, {
2215                 name: "template.dat #11"
2216                 html: "<table><div><template></template></div>"
2217                 errors: 4
2218                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <template>\n|         content\n|     <table>\n"
2219         }, {
2220                 name: "template.dat #12"
2221                 html: "<table><template></template><div></div>"
2222                 errors: 4
2223                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|     <table>\n|       <template>\n|         content\n"
2224         }, {
2225                 name: "template.dat #13"
2226                 html: "<table>   <template></template></table>"
2227                 errors: 1
2228                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       \"   \"\n|       <template>\n|         content\n"
2229         }, {
2230                 name: "template.dat #14"
2231                 html: "<table><tbody><template></template></tbody>"
2232                 errors: 2
2233                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <template>\n|           content\n"
2234         }, {
2235                 name: "template.dat #15"
2236                 html: "<table><tbody><template></tbody></template>"
2237                 errors: 3
2238                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <template>\n|           content\n"
2239         }, {
2240                 name: "template.dat #16"
2241                 html: "<table><tbody><template></template></tbody></table>"
2242                 errors: 1
2243                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <template>\n|           content\n"
2244         }, {
2245                 name: "template.dat #17"
2246                 html: "<table><thead><template></template></thead>"
2247                 errors: 2
2248                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <thead>\n|         <template>\n|           content\n"
2249         }, {
2250                 name: "template.dat #18"
2251                 html: "<table><tfoot><template></template></tfoot>"
2252                 errors: 2
2253                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tfoot>\n|         <template>\n|           content\n"
2254         }, {
2255                 name: "template.dat #19"
2256                 html: "<select><template></template></select>"
2257                 errors: 1
2258                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <template>\n|         content\n"
2259         }, {
2260                 name: "template.dat #20"
2261                 html: "<select><template><option></option></template></select>"
2262                 errors: 1
2263                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <template>\n|         content\n|           <option>\n"
2264         }, {
2265                 name: "template.dat #21"
2266                 html: "<template><option></option></select><option></option></template>"
2267                 errors: 2
2268                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <option>\n|         <option>\n|   <body>\n"
2269         }, {
2270                 name: "template.dat #22"
2271                 html: "<select><template></template><option></select>"
2272                 errors: 1
2273                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <template>\n|         content\n|       <option>\n"
2274         }, {
2275                 name: "template.dat #23"
2276                 html: "<select><option><template></template></select>"
2277                 errors: 1
2278                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n|         <template>\n|           content\n"
2279         }, {
2280                 name: "template.dat #24"
2281                 html: "<select><template>"
2282                 errors: 3
2283                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <template>\n|         content\n"
2284         }, {
2285                 name: "template.dat #25"
2286                 html: "<select><option></option><template>"
2287                 errors: 3
2288                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n|       <template>\n|         content\n"
2289         }, {
2290                 name: "template.dat #26"
2291                 html: "<select><option></option><template><option>"
2292                 errors: 3
2293                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n|       <template>\n|         content\n|           <option>\n"
2294         }, {
2295                 name: "template.dat #27"
2296                 html: "<table><thead><template><td></template></table>"
2297                 errors: 1
2298                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <thead>\n|         <template>\n|           content\n|             <td>\n"
2299         }, {
2300                 name: "template.dat #28"
2301                 html: "<table><template><thead></template></table>"
2302                 errors: 1
2303                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <template>\n|         content\n|           <thead>\n"
2304         }, {
2305                 name: "template.dat #29"
2306                 html: "<body><table><template><td></tr><div></template></table>"
2307                 errors: 3
2308                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <template>\n|         content\n|           <td>\n|             <div>\n"
2309         }, {
2310                 name: "template.dat #30"
2311                 html: "<table><template><thead></template></thead></table>"
2312                 errors: 2
2313                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <template>\n|         content\n|           <thead>\n"
2314         }, {
2315                 name: "template.dat #31"
2316                 html: "<table><thead><template><tr></template></table>"
2317                 errors: 1
2318                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <thead>\n|         <template>\n|           content\n|             <tr>\n"
2319         }, {
2320                 name: "template.dat #32"
2321                 html: "<table><template><tr></template></table>"
2322                 errors: 1
2323                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <template>\n|         content\n|           <tr>\n"
2324         }, {
2325                 name: "template.dat #33"
2326                 html: "<table><tr><template><td>"
2327                 errors: 3
2328                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <template>\n|             content\n|               <td>\n"
2329         }, {
2330                 name: "template.dat #34"
2331                 html: "<table><template><tr><template><td></template></tr></template></table>"
2332                 errors: 1
2333                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <template>\n|         content\n|           <tr>\n|             <template>\n|               content\n|                 <td>\n"
2334         }, {
2335                 name: "template.dat #35"
2336                 html: "<table><template><tr><template><td></td></template></tr></template></table>"
2337                 errors: 1
2338                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <template>\n|         content\n|           <tr>\n|             <template>\n|               content\n|                 <td>\n"
2339         }, {
2340                 name: "template.dat #36"
2341                 html: "<table><template><td></template>"
2342                 errors: 2
2343                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <template>\n|         content\n|           <td>\n"
2344         }, {
2345                 name: "template.dat #37"
2346                 html: "<body><template><td></td></template>"
2347                 errors: 1
2348                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <td>\n"
2349         }, {
2350                 name: "template.dat #38"
2351                 html: "<body><template><template><tr></tr></template><td></td></template>"
2352                 errors: 1
2353                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <tr>\n|         <td>\n"
2354         }, {
2355                 name: "template.dat #39"
2356                 html: "<table><colgroup><template><col>"
2357                 errors: 3
2358                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <colgroup>\n|         <template>\n|           content\n|             <col>\n"
2359         }, {
2360                 name: "template.dat #40"
2361                 html: "<frameset><template><frame></frame></template></frameset>"
2362                 errors: 4
2363                 expected: "| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n"
2364         }, {
2365                 name: "template.dat #41"
2366                 html: "<template><frame></frame></frameset><frame></frame></template>"
2367                 errors: 6
2368                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|   <body>\n"
2369         }, {
2370                 name: "template.dat #42"
2371                 html: "<template><div><frameset><span></span></div><span></span></template>"
2372                 errors: 2
2373                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <div>\n|           <span>\n|         <span>\n|   <body>\n"
2374         }, {
2375                 name: "template.dat #43"
2376                 html: "<body><template><div><frameset><span></span></div><span></span></template></body>"
2377                 errors: 2
2378                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <div>\n|           <span>\n|         <span>\n"
2379         }, {
2380                 name: "template.dat #44"
2381                 html: "<body><template><script>var i = 1;</script><td></td></template>"
2382                 errors: 1
2383                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <script>\n|           \"var i = 1;\"\n|         <td>\n"
2384         }, {
2385                 name: "template.dat #45"
2386                 html: "<body><template><tr><div></div></tr></template>"
2387                 errors: 3
2388                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <tr>\n|         <div>\n"
2389         }, {
2390                 name: "template.dat #46"
2391                 html: "<body><template><tr></tr><td></td></template>"
2392                 errors: 2
2393                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <tr>\n|         <tr>\n|           <td>\n"
2394         }, {
2395                 name: "template.dat #47"
2396                 html: "<body><template><td></td></tr><td></td></template>"
2397                 errors: 2
2398                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <td>\n|         <td>\n"
2399         }, {
2400                 name: "template.dat #48"
2401                 html: "<body><template><td></td><tbody><td></td></template>"
2402                 errors: 2
2403                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <td>\n|         <td>\n"
2404         }, {
2405                 name: "template.dat #49"
2406                 html: "<body><template><td></td><caption></caption><td></td></template>"
2407                 errors: 3
2408                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <td>\n|         <td>\n"
2409         }, {
2410                 name: "template.dat #50"
2411                 html: "<body><template><td></td><colgroup></caption><td></td></template>"
2412                 errors: 3
2413                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <td>\n|         <td>\n"
2414         }, {
2415                 name: "template.dat #51"
2416                 html: "<body><template><td></td></table><td></td></template>"
2417                 errors: 2
2418                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <td>\n|         <td>\n"
2419         }, {
2420                 name: "template.dat #52"
2421                 html: "<body><template><tr></tr><tbody><tr></tr></template>"
2422                 errors: 2
2423                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <tr>\n|         <tr>\n"
2424         }, {
2425                 name: "template.dat #53"
2426                 html: "<body><template><tr></tr><caption><tr></tr></template>"
2427                 errors: 2
2428                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <tr>\n|         <tr>\n"
2429         }, {
2430                 name: "template.dat #54"
2431                 html: "<body><template><tr></tr></table><tr></tr></template>"
2432                 errors: 2
2433                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <tr>\n|         <tr>\n"
2434         }, {
2435                 name: "template.dat #55"
2436                 html: "<body><template><thead></thead><caption></caption><tbody></tbody></template>"
2437                 errors: 1
2438                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <thead>\n|         <caption>\n|         <tbody>\n"
2439         }, {
2440                 name: "template.dat #56"
2441                 html: "<body><template><thead></thead></table><tbody></tbody></template></body>"
2442                 errors: 2
2443                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <thead>\n|         <tbody>\n"
2444         }, {
2445                 name: "template.dat #57"
2446                 html: "<body><template><div><tr></tr></div></template>"
2447                 errors: 3
2448                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <div>\n"
2449         }, {
2450                 name: "template.dat #58"
2451                 html: "<body><template><em>Hello</em></template>"
2452                 errors: 1
2453                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <em>\n|           \"Hello\"\n"
2454         }, {
2455                 name: "template.dat #59"
2456                 html: "<body><template><!--comment--></template>"
2457                 errors: 1
2458                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <!-- comment -->\n"
2459         }, {
2460                 name: "template.dat #60"
2461                 html: "<body><template><style></style><td></td></template>"
2462                 errors: 1
2463                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <style>\n|         <td>\n"
2464         }, {
2465                 name: "template.dat #61"
2466                 html: "<body><template><meta><td></td></template>"
2467                 errors: 1
2468                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <meta>\n|         <td>\n"
2469         }, {
2470                 name: "template.dat #62"
2471                 html: "<body><template><link><td></td></template>"
2472                 errors: 1
2473                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <link>\n|         <td>\n"
2474         }, {
2475                 name: "template.dat #63"
2476                 html: "<body><template><template><tr></tr></template><td></td></template>"
2477                 errors: 1
2478                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <tr>\n|         <td>\n"
2479         }, {
2480                 name: "template.dat #64"
2481                 html: "<body><table><colgroup><template><col></col></template></colgroup></table></body>"
2482                 errors: 2
2483                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <colgroup>\n|         <template>\n|           content\n|             <col>\n"
2484         }, {
2485                 name: "template.dat #65"
2486                 html: "<body a=b><template><div></div><body c=d><div></div></body></template></body>"
2487                 errors: 3
2488                 expected: "| <html>\n|   <head>\n|   <body>\n|     a=\"b\"\n|     <template>\n|       content\n|         <div>\n|         <div>\n"
2489         }, {
2490                 name: "template.dat #66"
2491                 html: "<html a=b><template><div><html b=c><span></template>"
2492                 errors: 3
2493                 expected: "| <html>\n|   a=\"b\"\n|   <head>\n|     <template>\n|       content\n|         <div>\n|           <span>\n|   <body>\n"
2494         }, {
2495                 name: "template.dat #67"
2496                 html: "<html a=b><template><col></col><html b=c><col></col></template>"
2497                 errors: 4
2498                 expected: "| <html>\n|   a=\"b\"\n|   <head>\n|     <template>\n|       content\n|         <col>\n|         <col>\n|   <body>\n"
2499         }, {
2500                 name: "template.dat #68"
2501                 html: "<html a=b><template><frame></frame><html b=c><frame></frame></template>"
2502                 errors: 6
2503                 expected: "| <html>\n|   a=\"b\"\n|   <head>\n|     <template>\n|       content\n|   <body>\n"
2504         }, {
2505                 name: "template.dat #69"
2506                 html: "<body><template><tr></tr><template></template><td></td></template>"
2507                 errors: 2
2508                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <tr>\n|         <template>\n|           content\n|         <tr>\n|           <td>\n"
2509         }, {
2510                 name: "template.dat #70"
2511                 html: "<body><template><thead></thead><template><tr></tr></template><tr></tr><tfoot></tfoot></template>"
2512                 errors: 1
2513                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <thead>\n|         <template>\n|           content\n|             <tr>\n|         <tbody>\n|           <tr>\n|         <tfoot>\n"
2514         }, {
2515                 name: "template.dat #71"
2516                 html: "<body><template><template><b><template></template></template>text</template>"
2517                 errors: 2
2518                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <b>\n|               <template>\n|                 content\n|         \"text\"\n"
2519         }, {
2520                 name: "template.dat #72"
2521                 html: "<body><template><col><colgroup>"
2522                 errors: 3
2523                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <col>\n"
2524         }, {
2525                 name: "template.dat #73"
2526                 html: "<body><template><col></colgroup>"
2527                 errors: 3
2528                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <col>\n"
2529         }, {
2530                 name: "template.dat #74"
2531                 html: "<body><template><col><colgroup></template></body>"
2532                 errors: 2
2533                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <col>\n"
2534         }, {
2535                 name: "template.dat #75"
2536                 html: "<body><template><col><div>"
2537                 errors: 3
2538                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <col>\n"
2539         }, {
2540                 name: "template.dat #76"
2541                 html: "<body><template><col></div>"
2542                 errors: 3
2543                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <col>\n"
2544         }, {
2545                 name: "template.dat #77"
2546                 html: "<body><template><col>Hello"
2547                 errors: 3
2548                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <col>\n"
2549         }, {
2550                 name: "template.dat #78"
2551                 html: "<body><template><i><menu>Foo</i>"
2552                 errors: 3
2553                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <i>\n|         <menu>\n|           <i>\n|             \"Foo\"\n"
2554         }, {
2555                 name: "template.dat #79"
2556                 html: "<body><template></div><div>Foo</div><template></template><tr></tr>"
2557                 errors: 5
2558                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <div>\n|           \"Foo\"\n|         <template>\n|           content\n"
2559         }, {
2560                 name: "template.dat #80"
2561                 html: "<body><div><template></div><tr><td>Foo</td></tr></template>"
2562                 errors: 3
2563                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <template>\n|         content\n|           <tr>\n|             <td>\n|               \"Foo\"\n"
2564         }, {
2565                 name: "template.dat #81"
2566                 html: "<template></figcaption><sub><table></table>"
2567                 errors: 3
2568                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <sub>\n|           <table>\n|   <body>\n"
2569         }, {
2570                 name: "template.dat #82"
2571                 html: "<template><template>"
2572                 errors: 3
2573                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|   <body>\n"
2574         }, {
2575                 name: "template.dat #83"
2576                 html: "<template><div>"
2577                 errors: 2
2578                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <div>\n|   <body>\n"
2579         }, {
2580                 name: "template.dat #84"
2581                 html: "<template><template><div>"
2582                 errors: 3
2583                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <div>\n|   <body>\n"
2584         }, {
2585                 name: "template.dat #85"
2586                 html: "<template><template><table>"
2587                 errors: 3
2588                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <table>\n|   <body>\n"
2589         }, {
2590                 name: "template.dat #86"
2591                 html: "<template><template><tbody>"
2592                 errors: 3
2593                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <tbody>\n|   <body>\n"
2594         }, {
2595                 name: "template.dat #87"
2596                 html: "<template><template><tr>"
2597                 errors: 3
2598                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <tr>\n|   <body>\n"
2599         }, {
2600                 name: "template.dat #88"
2601                 html: "<template><template><td>"
2602                 errors: 3
2603                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <td>\n|   <body>\n"
2604         }, {
2605                 name: "template.dat #89"
2606                 html: "<template><template><caption>"
2607                 errors: 3
2608                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <caption>\n|   <body>\n"
2609         }, {
2610                 name: "template.dat #90"
2611                 html: "<template><template><colgroup>"
2612                 errors: 3
2613                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <colgroup>\n|   <body>\n"
2614         }, {
2615                 name: "template.dat #91"
2616                 html: "<template><template><col>"
2617                 errors: 3
2618                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <col>\n|   <body>\n"
2619         }, {
2620                 name: "template.dat #92"
2621                 html: "<template><template><tbody><select>"
2622                 errors: 4
2623                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <tbody>\n|             <select>\n|   <body>\n"
2624         }, {
2625                 name: "template.dat #93"
2626                 html: "<template><template><table>Foo"
2627                 errors: 6
2628                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             \"Foo\"\n|             <table>\n|   <body>\n"
2629         }, {
2630                 name: "template.dat #94"
2631                 html: "<template><template><frame>"
2632                 errors: 4
2633                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|   <body>\n"
2634         }, {
2635                 name: "template.dat #95"
2636                 html: "<template><template><script>var i"
2637                 errors: 4
2638                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <script>\n|               \"var i\"\n|   <body>\n"
2639         }, {
2640                 name: "template.dat #96"
2641                 html: "<template><template><style>var i"
2642                 errors: 4
2643                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <style>\n|               \"var i\"\n|   <body>\n"
2644         }, {
2645                 name: "template.dat #97"
2646                 html: "<template><table></template><body><span>Foo"
2647                 errors: 3
2648                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <table>\n|   <body>\n|     <span>\n|       \"Foo\"\n"
2649         }, {
2650                 name: "template.dat #98"
2651                 html: "<template><td></template><body><span>Foo"
2652                 errors: 2
2653                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <td>\n|   <body>\n|     <span>\n|       \"Foo\"\n"
2654         }, {
2655                 name: "template.dat #99"
2656                 html: "<template><object></template><body><span>Foo"
2657                 errors: 3
2658                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <object>\n|   <body>\n|     <span>\n|       \"Foo\"\n"
2659         }, {
2660                 name: "template.dat #100"
2661                 html: "<template><svg><template>"
2662                 errors: 2
2663                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <svg svg>\n|           <svg template>\n|   <body>\n"
2664         }, {
2665                 name: "template.dat #101"
2666                 html: "<template><svg><foo><template><foreignObject><div></template><div>"
2667                 errors: 3
2668                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <svg svg>\n|           <svg foo>\n|             <svg template>\n|               <svg foreignObject>\n|                 <div>\n|   <body>\n|     <div>\n"
2669         }, {
2670                 name: "template.dat #102"
2671                 html: "<dummy><template><span></dummy>"
2672                 errors: 4
2673                 expected: "| <html>\n|   <head>\n|   <body>\n|     <dummy>\n|       <template>\n|         content\n|           <span>\n"
2674         }, {
2675                 name: "template.dat #103"
2676                 html: "<body><table><tr><td><select><template>Foo</template><caption>A</table>"
2677                 errors: 2
2678                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <select>\n|               <template>\n|                 content\n|                   \"Foo\"\n|       <caption>\n|         \"A\"\n"
2679         }, {
2680                 name: "template.dat #104"
2681                 html: "<body></body><template>"
2682                 errors: 3
2683                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n"
2684         }, {
2685                 name: "template.dat #105"
2686                 html: "<head></head><template>"
2687                 errors: 3
2688                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|   <body>\n"
2689         }, {
2690                 name: "template.dat #106"
2691                 html: "<head></head><template>Foo</template>"
2692                 errors: 2
2693                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         \"Foo\"\n|   <body>\n"
2694         }, {
2695                 name: "template.dat #107"
2696                 html: "<!DOCTYPE HTML><dummy><table><template><table><template><table><script>"
2697                 errors: 4
2698                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <dummy>\n|       <table>\n|         <template>\n|           content\n|             <table>\n|               <template>\n|                 content\n|                   <table>\n|                     <script>\n"
2699         }, {
2700                 name: "template.dat #108"
2701                 html: "<template><a><table><a>"
2702                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <a>\n|           <a>\n|           <table>\n|   <body>"
2703         }, {
2704                 name: "tests10.dat #1"
2705                 html: "<!DOCTYPE html><svg></svg>"
2706                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n"
2707         }, {
2708                 name: "tests10.dat #2"
2709                 html: "<!DOCTYPE html><svg></svg><![CDATA[a]]>"
2710                 errors: 1
2711                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|     <!-- [CDATA[a]] -->\n"
2712         }, {
2713                 name: "tests10.dat #3"
2714                 html: "<!DOCTYPE html><body><svg></svg>"
2715                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n"
2716         }, {
2717                 name: "tests10.dat #4"
2718                 html: "<!DOCTYPE html><body><select><svg></svg></select>"
2719                 errors: 2
2720                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
2721         }, {
2722                 name: "tests10.dat #5"
2723                 html: "<!DOCTYPE html><body><select><option><svg></svg></option></select>"
2724                 errors: 2
2725                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n"
2726         }, {
2727                 name: "tests10.dat #6"
2728                 html: "<!DOCTYPE html><body><table><svg></svg></table>"
2729                 errors: 1
2730                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|     <table>\n"
2731         }, {
2732                 name: "tests10.dat #7"
2733                 html: "<!DOCTYPE html><body><table><svg><g>foo</g></svg></table>"
2734                 errors: 1
2735                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg g>\n|         \"foo\"\n|     <table>\n"
2736         }, {
2737                 name: "tests10.dat #8"
2738                 html: "<!DOCTYPE html><body><table><svg><g>foo</g><g>bar</g></svg></table>"
2739                 errors: 1
2740                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg g>\n|         \"foo\"\n|       <svg g>\n|         \"bar\"\n|     <table>\n"
2741         }, {
2742                 name: "tests10.dat #9"
2743                 html: "<!DOCTYPE html><body><table><tbody><svg><g>foo</g><g>bar</g></svg></tbody></table>"
2744                 errors: 1
2745                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg g>\n|         \"foo\"\n|       <svg g>\n|         \"bar\"\n|     <table>\n|       <tbody>\n"
2746         }, {
2747                 name: "tests10.dat #10"
2748                 html: "<!DOCTYPE html><body><table><tbody><tr><svg><g>foo</g><g>bar</g></svg></tr></tbody></table>"
2749                 errors: 1
2750                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg g>\n|         \"foo\"\n|       <svg g>\n|         \"bar\"\n|     <table>\n|       <tbody>\n|         <tr>\n"
2751         }, {
2752                 name: "tests10.dat #11"
2753                 html: "<!DOCTYPE html><body><table><tbody><tr><td><svg><g>foo</g><g>bar</g></svg></td></tr></tbody></table>"
2754                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <svg svg>\n|               <svg g>\n|                 \"foo\"\n|               <svg g>\n|                 \"bar\"\n"
2755         }, {
2756                 name: "tests10.dat #12"
2757                 html: "<!DOCTYPE html><body><table><tbody><tr><td><svg><g>foo</g><g>bar</g></svg><p>baz</td></tr></tbody></table>"
2758                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <svg svg>\n|               <svg g>\n|                 \"foo\"\n|               <svg g>\n|                 \"bar\"\n|             <p>\n|               \"baz\"\n"
2759         }, {
2760                 name: "tests10.dat #13"
2761                 html: "<!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g></svg><p>baz</caption></table>"
2762                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <svg svg>\n|           <svg g>\n|             \"foo\"\n|           <svg g>\n|             \"bar\"\n|         <p>\n|           \"baz\"\n"
2763         }, {
2764                 name: "tests10.dat #14"
2765                 html: "<!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g><p>baz</table><p>quux"
2766                 errors: 1
2767                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <svg svg>\n|           <svg g>\n|             \"foo\"\n|           <svg g>\n|             \"bar\"\n|         <p>\n|           \"baz\"\n|     <p>\n|       \"quux\"\n"
2768         }, {
2769                 name: "tests10.dat #15"
2770                 html: "<!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g>baz</table><p>quux"
2771                 errors: 2
2772                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <svg svg>\n|           <svg g>\n|             \"foo\"\n|           <svg g>\n|             \"bar\"\n|           \"baz\"\n|     <p>\n|       \"quux\"\n"
2773         }, {
2774                 name: "tests10.dat #16"
2775                 html: "<!DOCTYPE html><body><table><colgroup><svg><g>foo</g><g>bar</g><p>baz</table><p>quux"
2776                 errors: 6
2777                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg g>\n|         \"foo\"\n|       <svg g>\n|         \"bar\"\n|     <p>\n|       \"baz\"\n|     <table>\n|       <colgroup>\n|     <p>\n|       \"quux\"\n"
2778         }, {
2779                 name: "tests10.dat #17"
2780                 html: "<!DOCTYPE html><body><table><tr><td><select><svg><g>foo</g><g>bar</g><p>baz</table><p>quux"
2781                 errors: 7
2782                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <select>\n|               \"foobarbaz\"\n|     <p>\n|       \"quux\"\n"
2783         }, {
2784                 name: "tests10.dat #18"
2785                 html: "<!DOCTYPE html><body><table><select><svg><g>foo</g><g>bar</g><p>baz</table><p>quux"
2786                 errors: 8
2787                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       \"foobarbaz\"\n|     <table>\n|     <p>\n|       \"quux\"\n"
2788         }, {
2789                 name: "tests10.dat #19"
2790                 html: "<!DOCTYPE html><body></body></html><svg><g>foo</g><g>bar</g><p>baz"
2791                 errors: 2
2792                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg g>\n|         \"foo\"\n|       <svg g>\n|         \"bar\"\n|     <p>\n|       \"baz\"\n"
2793         }, {
2794                 name: "tests10.dat #20"
2795                 html: "<!DOCTYPE html><body></body><svg><g>foo</g><g>bar</g><p>baz"
2796                 errors: 2
2797                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg g>\n|         \"foo\"\n|       <svg g>\n|         \"bar\"\n|     <p>\n|       \"baz\"\n"
2798         }, {
2799                 name: "tests10.dat #21"
2800                 html: "<!DOCTYPE html><frameset><svg><g></g><g></g><p><span>"
2801                 errors: 8
2802                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
2803         }, {
2804                 name: "tests10.dat #22"
2805                 html: "<!DOCTYPE html><frameset></frameset><svg><g></g><g></g><p><span>"
2806                 errors: 7
2807                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
2808         }, {
2809                 name: "tests10.dat #23"
2810                 html: "<!DOCTYPE html><body xlink:href=foo><svg xlink:href=foo></svg>"
2811                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     xlink:href=\"foo\"\n|     <svg svg>\n|       xlink href=\"foo\"\n"
2812         }, {
2813                 name: "tests10.dat #24"
2814                 html: "<!DOCTYPE html><body xlink:href=foo xml:lang=en><svg><g xml:lang=en xlink:href=foo></g></svg>"
2815                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     xlink:href=\"foo\"\n|     xml:lang=\"en\"\n|     <svg svg>\n|       <svg g>\n|         xlink href=\"foo\"\n|         xml lang=\"en\"\n"
2816         }, {
2817                 name: "tests10.dat #25"
2818                 html: "<!DOCTYPE html><body xlink:href=foo xml:lang=en><svg><g xml:lang=en xlink:href=foo /></svg>"
2819                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     xlink:href=\"foo\"\n|     xml:lang=\"en\"\n|     <svg svg>\n|       <svg g>\n|         xlink href=\"foo\"\n|         xml lang=\"en\"\n"
2820         }, {
2821                 name: "tests10.dat #26"
2822                 html: "<!DOCTYPE html><body xlink:href=foo xml:lang=en><svg><g xml:lang=en xlink:href=foo />bar</svg>"
2823                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     xlink:href=\"foo\"\n|     xml:lang=\"en\"\n|     <svg svg>\n|       <svg g>\n|         xlink href=\"foo\"\n|         xml lang=\"en\"\n|       \"bar\"\n"
2824         }, {
2825                 name: "tests10.dat #27"
2826                 html: "<svg></path>"
2827                 errors: 4
2828                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n"
2829         }, {
2830                 name: "tests10.dat #28"
2831                 html: "<div><svg></div>a"
2832                 errors: 3
2833                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <svg svg>\n|     \"a\"\n"
2834         }, {
2835                 name: "tests10.dat #29"
2836                 html: "<div><svg><path></div>a"
2837                 errors: 3
2838                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <svg svg>\n|         <svg path>\n|     \"a\"\n"
2839         }, {
2840                 name: "tests10.dat #30"
2841                 html: "<div><svg><path></svg><path>"
2842                 errors: 3
2843                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <svg svg>\n|         <svg path>\n|       <path>\n"
2844         }, {
2845                 name: "tests10.dat #31"
2846                 html: "<div><svg><path><foreignObject><math></div>a"
2847                 errors: 4
2848                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <svg svg>\n|         <svg path>\n|           <svg foreignObject>\n|             <math math>\n|               \"a\"\n"
2849         }, {
2850                 name: "tests10.dat #32"
2851                 html: "<div><svg><path><foreignObject><p></div>a"
2852                 errors: 3
2853                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <svg svg>\n|         <svg path>\n|           <svg foreignObject>\n|             <p>\n|               \"a\"\n"
2854         }, {
2855                 name: "tests10.dat #33"
2856                 html: "<!DOCTYPE html><svg><desc><div><svg><ul>a"
2857                 errors: 2
2858                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg desc>\n|         <div>\n|           <svg svg>\n|           <ul>\n|             \"a\"\n"
2859         }, {
2860                 name: "tests10.dat #34"
2861                 html: "<!DOCTYPE html><svg><desc><svg><ul>a"
2862                 errors: 2
2863                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg desc>\n|         <svg svg>\n|         <ul>\n|           \"a\"\n"
2864         }, {
2865                 name: "tests10.dat #35"
2866                 html: "<!DOCTYPE html><p><svg><desc><p>"
2867                 errors: 1
2868                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <svg svg>\n|         <svg desc>\n|           <p>\n"
2869         }, {
2870                 name: "tests10.dat #36"
2871                 html: "<!DOCTYPE html><p><svg><title><p>"
2872                 errors: 1
2873                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <svg svg>\n|         <svg title>\n|           <p>\n"
2874         }, {
2875                 name: "tests10.dat #37"
2876                 html: "<div><svg><path><foreignObject><p></foreignObject><p>"
2877                 errors: 3
2878                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <svg svg>\n|         <svg path>\n|           <svg foreignObject>\n|             <p>\n|             <p>\n"
2879         }, {
2880                 name: "tests10.dat #38"
2881                 html: "<math><mi><div><object><div><span></span></div></object></div></mi><mi>"
2882                 errors: 2
2883                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mi>\n|         <div>\n|           <object>\n|             <div>\n|               <span>\n|       <math mi>\n"
2884         }, {
2885                 name: "tests10.dat #39"
2886                 html: "<math><mi><svg><foreignObject><div><div></div></div></foreignObject></svg></mi><mi>"
2887                 errors: 2
2888                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mi>\n|         <svg svg>\n|           <svg foreignObject>\n|             <div>\n|               <div>\n|       <math mi>\n"
2889         }, {
2890                 name: "tests10.dat #40"
2891                 html: "<svg><script></script><path>"
2892                 errors: 2
2893                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg script>\n|       <svg path>\n"
2894         }, {
2895                 name: "tests10.dat #41"
2896                 html: "<table><svg></svg><tr>"
2897                 errors: 3
2898                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|     <table>\n|       <tbody>\n|         <tr>\n"
2899         }, {
2900                 name: "tests10.dat #42"
2901                 html: "<math><mi><mglyph>"
2902                 errors: 2
2903                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mi>\n|         <math mglyph>\n"
2904         }, {
2905                 name: "tests10.dat #43"
2906                 html: "<math><mi><malignmark>"
2907                 errors: 2
2908                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mi>\n|         <math malignmark>\n"
2909         }, {
2910                 name: "tests10.dat #44"
2911                 html: "<math><mo><mglyph>"
2912                 errors: 2
2913                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mo>\n|         <math mglyph>\n"
2914         }, {
2915                 name: "tests10.dat #45"
2916                 html: "<math><mo><malignmark>"
2917                 errors: 2
2918                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mo>\n|         <math malignmark>\n"
2919         }, {
2920                 name: "tests10.dat #46"
2921                 html: "<math><mn><mglyph>"
2922                 errors: 2
2923                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mn>\n|         <math mglyph>\n"
2924         }, {
2925                 name: "tests10.dat #47"
2926                 html: "<math><mn><malignmark>"
2927                 errors: 2
2928                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mn>\n|         <math malignmark>\n"
2929         }, {
2930                 name: "tests10.dat #48"
2931                 html: "<math><ms><mglyph>"
2932                 errors: 2
2933                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math ms>\n|         <math mglyph>\n"
2934         }, {
2935                 name: "tests10.dat #49"
2936                 html: "<math><ms><malignmark>"
2937                 errors: 2
2938                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math ms>\n|         <math malignmark>\n"
2939         }, {
2940                 name: "tests10.dat #50"
2941                 html: "<math><mtext><mglyph>"
2942                 errors: 2
2943                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mtext>\n|         <math mglyph>\n"
2944         }, {
2945                 name: "tests10.dat #51"
2946                 html: "<math><mtext><malignmark>"
2947                 errors: 2
2948                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mtext>\n|         <math malignmark>\n"
2949         }, {
2950                 name: "tests10.dat #52"
2951                 html: "<math><annotation-xml><svg></svg></annotation-xml><mi>"
2952                 errors: 2
2953                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         <svg svg>\n|       <math mi>\n"
2954         }, {
2955                 name: "tests10.dat #53"
2956                 html: "<math><annotation-xml><svg><foreignObject><div><math><mi></mi></math><span></span></div></foreignObject><path></path></svg></annotation-xml><mi>"
2957                 errors: 2
2958                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         <svg svg>\n|           <svg foreignObject>\n|             <div>\n|               <math math>\n|                 <math mi>\n|               <span>\n|           <svg path>\n|       <math mi>\n"
2959         }, {
2960                 name: "tests10.dat #54"
2961                 html: "<math><annotation-xml><svg><foreignObject><math><mi><svg></svg></mi><mo></mo></math><span></span></foreignObject><path></path></svg></annotation-xml><mi>"
2962                 errors: 2
2963                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         <svg svg>\n|           <svg foreignObject>\n|             <math math>\n|               <math mi>\n|                 <svg svg>\n|               <math mo>\n|             <span>\n|           <svg path>\n|       <math mi>\n"
2964         }, {
2965                 name: "tests11.dat #1"
2966                 html: "<!DOCTYPE html><body><svg attributeName='' attributeType='' baseFrequency='' baseProfile='' calcMode='' clipPathUnits='' diffuseConstant='' edgeMode='' filterUnits='' glyphRef='' gradientTransform='' gradientUnits='' kernelMatrix='' kernelUnitLength='' keyPoints='' keySplines='' keyTimes='' lengthAdjust='' limitingConeAngle='' markerHeight='' markerUnits='' markerWidth='' maskContentUnits='' maskUnits='' numOctaves='' pathLength='' patternContentUnits='' patternTransform='' patternUnits='' pointsAtX='' pointsAtY='' pointsAtZ='' preserveAlpha='' preserveAspectRatio='' primitiveUnits='' refX='' refY='' repeatCount='' repeatDur='' requiredExtensions='' requiredFeatures='' specularConstant='' specularExponent='' spreadMethod='' startOffset='' stdDeviation='' stitchTiles='' surfaceScale='' systemLanguage='' tableValues='' targetX='' targetY='' textLength='' viewBox='' viewTarget='' xChannelSelector='' yChannelSelector='' zoomAndPan=''></svg>"
2967                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       attributeName=\"\"\n|       attributeType=\"\"\n|       baseFrequency=\"\"\n|       baseProfile=\"\"\n|       calcMode=\"\"\n|       clipPathUnits=\"\"\n|       diffuseConstant=\"\"\n|       edgeMode=\"\"\n|       filterUnits=\"\"\n|       glyphRef=\"\"\n|       gradientTransform=\"\"\n|       gradientUnits=\"\"\n|       kernelMatrix=\"\"\n|       kernelUnitLength=\"\"\n|       keyPoints=\"\"\n|       keySplines=\"\"\n|       keyTimes=\"\"\n|       lengthAdjust=\"\"\n|       limitingConeAngle=\"\"\n|       markerHeight=\"\"\n|       markerUnits=\"\"\n|       markerWidth=\"\"\n|       maskContentUnits=\"\"\n|       maskUnits=\"\"\n|       numOctaves=\"\"\n|       pathLength=\"\"\n|       patternContentUnits=\"\"\n|       patternTransform=\"\"\n|       patternUnits=\"\"\n|       pointsAtX=\"\"\n|       pointsAtY=\"\"\n|       pointsAtZ=\"\"\n|       preserveAlpha=\"\"\n|       preserveAspectRatio=\"\"\n|       primitiveUnits=\"\"\n|       refX=\"\"\n|       refY=\"\"\n|       repeatCount=\"\"\n|       repeatDur=\"\"\n|       requiredExtensions=\"\"\n|       requiredFeatures=\"\"\n|       specularConstant=\"\"\n|       specularExponent=\"\"\n|       spreadMethod=\"\"\n|       startOffset=\"\"\n|       stdDeviation=\"\"\n|       stitchTiles=\"\"\n|       surfaceScale=\"\"\n|       systemLanguage=\"\"\n|       tableValues=\"\"\n|       targetX=\"\"\n|       targetY=\"\"\n|       textLength=\"\"\n|       viewBox=\"\"\n|       viewTarget=\"\"\n|       xChannelSelector=\"\"\n|       yChannelSelector=\"\"\n|       zoomAndPan=\"\"\n"
2968         }, {
2969                 name: "tests11.dat #2"
2970                 html: "<!DOCTYPE html><BODY><SVG ATTRIBUTENAME='' ATTRIBUTETYPE='' BASEFREQUENCY='' BASEPROFILE='' CALCMODE='' CLIPPATHUNITS='' DIFFUSECONSTANT='' EDGEMODE='' FILTERUNITS='' GLYPHREF='' GRADIENTTRANSFORM='' GRADIENTUNITS='' KERNELMATRIX='' KERNELUNITLENGTH='' KEYPOINTS='' KEYSPLINES='' KEYTIMES='' LENGTHADJUST='' LIMITINGCONEANGLE='' MARKERHEIGHT='' MARKERUNITS='' MARKERWIDTH='' MASKCONTENTUNITS='' MASKUNITS='' NUMOCTAVES='' PATHLENGTH='' PATTERNCONTENTUNITS='' PATTERNTRANSFORM='' PATTERNUNITS='' POINTSATX='' POINTSATY='' POINTSATZ='' PRESERVEALPHA='' PRESERVEASPECTRATIO='' PRIMITIVEUNITS='' REFX='' REFY='' REPEATCOUNT='' REPEATDUR='' REQUIREDEXTENSIONS='' REQUIREDFEATURES='' SPECULARCONSTANT='' SPECULAREXPONENT='' SPREADMETHOD='' STARTOFFSET='' STDDEVIATION='' STITCHTILES='' SURFACESCALE='' SYSTEMLANGUAGE='' TABLEVALUES='' TARGETX='' TARGETY='' TEXTLENGTH='' VIEWBOX='' VIEWTARGET='' XCHANNELSELECTOR='' YCHANNELSELECTOR='' ZOOMANDPAN=''></SVG>"
2971                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       attributeName=\"\"\n|       attributeType=\"\"\n|       baseFrequency=\"\"\n|       baseProfile=\"\"\n|       calcMode=\"\"\n|       clipPathUnits=\"\"\n|       diffuseConstant=\"\"\n|       edgeMode=\"\"\n|       filterUnits=\"\"\n|       glyphRef=\"\"\n|       gradientTransform=\"\"\n|       gradientUnits=\"\"\n|       kernelMatrix=\"\"\n|       kernelUnitLength=\"\"\n|       keyPoints=\"\"\n|       keySplines=\"\"\n|       keyTimes=\"\"\n|       lengthAdjust=\"\"\n|       limitingConeAngle=\"\"\n|       markerHeight=\"\"\n|       markerUnits=\"\"\n|       markerWidth=\"\"\n|       maskContentUnits=\"\"\n|       maskUnits=\"\"\n|       numOctaves=\"\"\n|       pathLength=\"\"\n|       patternContentUnits=\"\"\n|       patternTransform=\"\"\n|       patternUnits=\"\"\n|       pointsAtX=\"\"\n|       pointsAtY=\"\"\n|       pointsAtZ=\"\"\n|       preserveAlpha=\"\"\n|       preserveAspectRatio=\"\"\n|       primitiveUnits=\"\"\n|       refX=\"\"\n|       refY=\"\"\n|       repeatCount=\"\"\n|       repeatDur=\"\"\n|       requiredExtensions=\"\"\n|       requiredFeatures=\"\"\n|       specularConstant=\"\"\n|       specularExponent=\"\"\n|       spreadMethod=\"\"\n|       startOffset=\"\"\n|       stdDeviation=\"\"\n|       stitchTiles=\"\"\n|       surfaceScale=\"\"\n|       systemLanguage=\"\"\n|       tableValues=\"\"\n|       targetX=\"\"\n|       targetY=\"\"\n|       textLength=\"\"\n|       viewBox=\"\"\n|       viewTarget=\"\"\n|       xChannelSelector=\"\"\n|       yChannelSelector=\"\"\n|       zoomAndPan=\"\"\n"
2972         }, {
2973                 name: "tests11.dat #3"
2974                 html: "<!DOCTYPE html><body><svg attributename='' attributetype='' basefrequency='' baseprofile='' calcmode='' clippathunits='' diffuseconstant='' edgemode='' filterunits='' filterres='' glyphref='' gradienttransform='' gradientunits='' kernelmatrix='' kernelunitlength='' keypoints='' keysplines='' keytimes='' lengthadjust='' limitingconeangle='' markerheight='' markerunits='' markerwidth='' maskcontentunits='' maskunits='' numoctaves='' pathlength='' patterncontentunits='' patterntransform='' patternunits='' pointsatx='' pointsaty='' pointsatz='' preservealpha='' preserveaspectratio='' primitiveunits='' refx='' refy='' repeatcount='' repeatdur='' requiredextensions='' requiredfeatures='' specularconstant='' specularexponent='' spreadmethod='' startoffset='' stddeviation='' stitchtiles='' surfacescale='' systemlanguage='' tablevalues='' targetx='' targety='' textlength='' viewbox='' viewtarget='' xchannelselector='' ychannelselector='' zoomandpan=''></svg>"
2975                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       attributeName=\"\"\n|       attributeType=\"\"\n|       baseFrequency=\"\"\n|       baseProfile=\"\"\n|       calcMode=\"\"\n|       clipPathUnits=\"\"\n|       diffuseConstant=\"\"\n|       edgeMode=\"\"\n|       filterUnits=\"\"\n|       filterres=\"\"\n|       glyphRef=\"\"\n|       gradientTransform=\"\"\n|       gradientUnits=\"\"\n|       kernelMatrix=\"\"\n|       kernelUnitLength=\"\"\n|       keyPoints=\"\"\n|       keySplines=\"\"\n|       keyTimes=\"\"\n|       lengthAdjust=\"\"\n|       limitingConeAngle=\"\"\n|       markerHeight=\"\"\n|       markerUnits=\"\"\n|       markerWidth=\"\"\n|       maskContentUnits=\"\"\n|       maskUnits=\"\"\n|       numOctaves=\"\"\n|       pathLength=\"\"\n|       patternContentUnits=\"\"\n|       patternTransform=\"\"\n|       patternUnits=\"\"\n|       pointsAtX=\"\"\n|       pointsAtY=\"\"\n|       pointsAtZ=\"\"\n|       preserveAlpha=\"\"\n|       preserveAspectRatio=\"\"\n|       primitiveUnits=\"\"\n|       refX=\"\"\n|       refY=\"\"\n|       repeatCount=\"\"\n|       repeatDur=\"\"\n|       requiredExtensions=\"\"\n|       requiredFeatures=\"\"\n|       specularConstant=\"\"\n|       specularExponent=\"\"\n|       spreadMethod=\"\"\n|       startOffset=\"\"\n|       stdDeviation=\"\"\n|       stitchTiles=\"\"\n|       surfaceScale=\"\"\n|       systemLanguage=\"\"\n|       tableValues=\"\"\n|       targetX=\"\"\n|       targetY=\"\"\n|       textLength=\"\"\n|       viewBox=\"\"\n|       viewTarget=\"\"\n|       xChannelSelector=\"\"\n|       yChannelSelector=\"\"\n|       zoomAndPan=\"\"\n"
2976         }, {
2977                 name: "tests11.dat #4"
2978                 html: "<!DOCTYPE html><body><math attributeName='' attributeType='' baseFrequency='' baseProfile='' calcMode='' clipPathUnits='' diffuseConstant='' edgeMode='' filterUnits='' glyphRef='' gradientTransform='' gradientUnits='' kernelMatrix='' kernelUnitLength='' keyPoints='' keySplines='' keyTimes='' lengthAdjust='' limitingConeAngle='' markerHeight='' markerUnits='' markerWidth='' maskContentUnits='' maskUnits='' numOctaves='' pathLength='' patternContentUnits='' patternTransform='' patternUnits='' pointsAtX='' pointsAtY='' pointsAtZ='' preserveAlpha='' preserveAspectRatio='' primitiveUnits='' refX='' refY='' repeatCount='' repeatDur='' requiredExtensions='' requiredFeatures='' specularConstant='' specularExponent='' spreadMethod='' startOffset='' stdDeviation='' stitchTiles='' surfaceScale='' systemLanguage='' tableValues='' targetX='' targetY='' textLength='' viewBox='' viewTarget='' xChannelSelector='' yChannelSelector='' zoomAndPan=''></math>"
2979                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       attributename=\"\"\n|       attributetype=\"\"\n|       basefrequency=\"\"\n|       baseprofile=\"\"\n|       calcmode=\"\"\n|       clippathunits=\"\"\n|       diffuseconstant=\"\"\n|       edgemode=\"\"\n|       filterunits=\"\"\n|       glyphref=\"\"\n|       gradienttransform=\"\"\n|       gradientunits=\"\"\n|       kernelmatrix=\"\"\n|       kernelunitlength=\"\"\n|       keypoints=\"\"\n|       keysplines=\"\"\n|       keytimes=\"\"\n|       lengthadjust=\"\"\n|       limitingconeangle=\"\"\n|       markerheight=\"\"\n|       markerunits=\"\"\n|       markerwidth=\"\"\n|       maskcontentunits=\"\"\n|       maskunits=\"\"\n|       numoctaves=\"\"\n|       pathlength=\"\"\n|       patterncontentunits=\"\"\n|       patterntransform=\"\"\n|       patternunits=\"\"\n|       pointsatx=\"\"\n|       pointsaty=\"\"\n|       pointsatz=\"\"\n|       preservealpha=\"\"\n|       preserveaspectratio=\"\"\n|       primitiveunits=\"\"\n|       refx=\"\"\n|       refy=\"\"\n|       repeatcount=\"\"\n|       repeatdur=\"\"\n|       requiredextensions=\"\"\n|       requiredfeatures=\"\"\n|       specularconstant=\"\"\n|       specularexponent=\"\"\n|       spreadmethod=\"\"\n|       startoffset=\"\"\n|       stddeviation=\"\"\n|       stitchtiles=\"\"\n|       surfacescale=\"\"\n|       systemlanguage=\"\"\n|       tablevalues=\"\"\n|       targetx=\"\"\n|       targety=\"\"\n|       textlength=\"\"\n|       viewbox=\"\"\n|       viewtarget=\"\"\n|       xchannelselector=\"\"\n|       ychannelselector=\"\"\n|       zoomandpan=\"\"\n"
2980         }, {
2981                 name: "tests11.dat #5"
2982                 html: "<!DOCTYPE html><body><svg><altGlyph /><altGlyphDef /><altGlyphItem /><animateColor /><animateMotion /><animateTransform /><clipPath /><feBlend /><feColorMatrix /><feComponentTransfer /><feComposite /><feConvolveMatrix /><feDiffuseLighting /><feDisplacementMap /><feDistantLight /><feFlood /><feFuncA /><feFuncB /><feFuncG /><feFuncR /><feGaussianBlur /><feImage /><feMerge /><feMergeNode /><feMorphology /><feOffset /><fePointLight /><feSpecularLighting /><feSpotLight /><feTile /><feTurbulence /><foreignObject /><glyphRef /><linearGradient /><radialGradient /><textPath /></svg>"
2983                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg altGlyph>\n|       <svg altGlyphDef>\n|       <svg altGlyphItem>\n|       <svg animateColor>\n|       <svg animateMotion>\n|       <svg animateTransform>\n|       <svg clipPath>\n|       <svg feBlend>\n|       <svg feColorMatrix>\n|       <svg feComponentTransfer>\n|       <svg feComposite>\n|       <svg feConvolveMatrix>\n|       <svg feDiffuseLighting>\n|       <svg feDisplacementMap>\n|       <svg feDistantLight>\n|       <svg feFlood>\n|       <svg feFuncA>\n|       <svg feFuncB>\n|       <svg feFuncG>\n|       <svg feFuncR>\n|       <svg feGaussianBlur>\n|       <svg feImage>\n|       <svg feMerge>\n|       <svg feMergeNode>\n|       <svg feMorphology>\n|       <svg feOffset>\n|       <svg fePointLight>\n|       <svg feSpecularLighting>\n|       <svg feSpotLight>\n|       <svg feTile>\n|       <svg feTurbulence>\n|       <svg foreignObject>\n|       <svg glyphRef>\n|       <svg linearGradient>\n|       <svg radialGradient>\n|       <svg textPath>\n"
2984         }, {
2985                 name: "tests11.dat #6"
2986                 html: "<!DOCTYPE html><body><svg><altglyph /><altglyphdef /><altglyphitem /><animatecolor /><animatemotion /><animatetransform /><clippath /><feblend /><fecolormatrix /><fecomponenttransfer /><fecomposite /><feconvolvematrix /><fediffuselighting /><fedisplacementmap /><fedistantlight /><feflood /><fefunca /><fefuncb /><fefuncg /><fefuncr /><fegaussianblur /><feimage /><femerge /><femergenode /><femorphology /><feoffset /><fepointlight /><fespecularlighting /><fespotlight /><fetile /><feturbulence /><foreignobject /><glyphref /><lineargradient /><radialgradient /><textpath /></svg>"
2987                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg altGlyph>\n|       <svg altGlyphDef>\n|       <svg altGlyphItem>\n|       <svg animateColor>\n|       <svg animateMotion>\n|       <svg animateTransform>\n|       <svg clipPath>\n|       <svg feBlend>\n|       <svg feColorMatrix>\n|       <svg feComponentTransfer>\n|       <svg feComposite>\n|       <svg feConvolveMatrix>\n|       <svg feDiffuseLighting>\n|       <svg feDisplacementMap>\n|       <svg feDistantLight>\n|       <svg feFlood>\n|       <svg feFuncA>\n|       <svg feFuncB>\n|       <svg feFuncG>\n|       <svg feFuncR>\n|       <svg feGaussianBlur>\n|       <svg feImage>\n|       <svg feMerge>\n|       <svg feMergeNode>\n|       <svg feMorphology>\n|       <svg feOffset>\n|       <svg fePointLight>\n|       <svg feSpecularLighting>\n|       <svg feSpotLight>\n|       <svg feTile>\n|       <svg feTurbulence>\n|       <svg foreignObject>\n|       <svg glyphRef>\n|       <svg linearGradient>\n|       <svg radialGradient>\n|       <svg textPath>\n"
2988         }, {
2989                 name: "tests11.dat #7"
2990                 html: "<!DOCTYPE html><BODY><SVG><ALTGLYPH /><ALTGLYPHDEF /><ALTGLYPHITEM /><ANIMATECOLOR /><ANIMATEMOTION /><ANIMATETRANSFORM /><CLIPPATH /><FEBLEND /><FECOLORMATRIX /><FECOMPONENTTRANSFER /><FECOMPOSITE /><FECONVOLVEMATRIX /><FEDIFFUSELIGHTING /><FEDISPLACEMENTMAP /><FEDISTANTLIGHT /><FEFLOOD /><FEFUNCA /><FEFUNCB /><FEFUNCG /><FEFUNCR /><FEGAUSSIANBLUR /><FEIMAGE /><FEMERGE /><FEMERGENODE /><FEMORPHOLOGY /><FEOFFSET /><FEPOINTLIGHT /><FESPECULARLIGHTING /><FESPOTLIGHT /><FETILE /><FETURBULENCE /><FOREIGNOBJECT /><GLYPHREF /><LINEARGRADIENT /><RADIALGRADIENT /><TEXTPATH /></SVG>"
2991                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg altGlyph>\n|       <svg altGlyphDef>\n|       <svg altGlyphItem>\n|       <svg animateColor>\n|       <svg animateMotion>\n|       <svg animateTransform>\n|       <svg clipPath>\n|       <svg feBlend>\n|       <svg feColorMatrix>\n|       <svg feComponentTransfer>\n|       <svg feComposite>\n|       <svg feConvolveMatrix>\n|       <svg feDiffuseLighting>\n|       <svg feDisplacementMap>\n|       <svg feDistantLight>\n|       <svg feFlood>\n|       <svg feFuncA>\n|       <svg feFuncB>\n|       <svg feFuncG>\n|       <svg feFuncR>\n|       <svg feGaussianBlur>\n|       <svg feImage>\n|       <svg feMerge>\n|       <svg feMergeNode>\n|       <svg feMorphology>\n|       <svg feOffset>\n|       <svg fePointLight>\n|       <svg feSpecularLighting>\n|       <svg feSpotLight>\n|       <svg feTile>\n|       <svg feTurbulence>\n|       <svg foreignObject>\n|       <svg glyphRef>\n|       <svg linearGradient>\n|       <svg radialGradient>\n|       <svg textPath>\n"
2992         }, {
2993                 name: "tests11.dat #8"
2994                 html: "<!DOCTYPE html><body><math><altGlyph /><altGlyphDef /><altGlyphItem /><animateColor /><animateMotion /><animateTransform /><clipPath /><feBlend /><feColorMatrix /><feComponentTransfer /><feComposite /><feConvolveMatrix /><feDiffuseLighting /><feDisplacementMap /><feDistantLight /><feFlood /><feFuncA /><feFuncB /><feFuncG /><feFuncR /><feGaussianBlur /><feImage /><feMerge /><feMergeNode /><feMorphology /><feOffset /><fePointLight /><feSpecularLighting /><feSpotLight /><feTile /><feTurbulence /><foreignObject /><glyphRef /><linearGradient /><radialGradient /><textPath /></math>"
2995                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math altglyph>\n|       <math altglyphdef>\n|       <math altglyphitem>\n|       <math animatecolor>\n|       <math animatemotion>\n|       <math animatetransform>\n|       <math clippath>\n|       <math feblend>\n|       <math fecolormatrix>\n|       <math fecomponenttransfer>\n|       <math fecomposite>\n|       <math feconvolvematrix>\n|       <math fediffuselighting>\n|       <math fedisplacementmap>\n|       <math fedistantlight>\n|       <math feflood>\n|       <math fefunca>\n|       <math fefuncb>\n|       <math fefuncg>\n|       <math fefuncr>\n|       <math fegaussianblur>\n|       <math feimage>\n|       <math femerge>\n|       <math femergenode>\n|       <math femorphology>\n|       <math feoffset>\n|       <math fepointlight>\n|       <math fespecularlighting>\n|       <math fespotlight>\n|       <math fetile>\n|       <math feturbulence>\n|       <math foreignobject>\n|       <math glyphref>\n|       <math lineargradient>\n|       <math radialgradient>\n|       <math textpath>\n"
2996         }, {
2997                 name: "tests11.dat #9"
2998                 html: "<!DOCTYPE html><body><svg><solidColor /></svg>"
2999                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg solidcolor>\n"
3000         }, {
3001                 name: "tests12.dat #1"
3002                 html: "<!DOCTYPE html><body><p>foo<math><mtext><i>baz</i></mtext><annotation-xml><svg><desc><b>eggs</b></desc><g><foreignObject><P>spam<TABLE><tr><td><img></td></table></foreignObject></g><g>quux</g></svg></annotation-xml></math>bar"
3003                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       \"foo\"\n|       <math math>\n|         <math mtext>\n|           <i>\n|             \"baz\"\n|         <math annotation-xml>\n|           <svg svg>\n|             <svg desc>\n|               <b>\n|                 \"eggs\"\n|             <svg g>\n|               <svg foreignObject>\n|                 <p>\n|                   \"spam\"\n|                 <table>\n|                   <tbody>\n|                     <tr>\n|                       <td>\n|                         <img>\n|             <svg g>\n|               \"quux\"\n|       \"bar\"\n"
3004         }, {
3005                 name: "tests12.dat #2"
3006                 html: "<!DOCTYPE html><body>foo<math><mtext><i>baz</i></mtext><annotation-xml><svg><desc><b>eggs</b></desc><g><foreignObject><P>spam<TABLE><tr><td><img></td></table></foreignObject></g><g>quux</g></svg></annotation-xml></math>bar"
3007                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"foo\"\n|     <math math>\n|       <math mtext>\n|         <i>\n|           \"baz\"\n|       <math annotation-xml>\n|         <svg svg>\n|           <svg desc>\n|             <b>\n|               \"eggs\"\n|           <svg g>\n|             <svg foreignObject>\n|               <p>\n|                 \"spam\"\n|               <table>\n|                 <tbody>\n|                   <tr>\n|                     <td>\n|                       <img>\n|           <svg g>\n|             \"quux\"\n|     \"bar\"\n"
3008         }, {
3009                 name: "tests14.dat #1"
3010                 html: "<!DOCTYPE html><html><body><xyz:abc></xyz:abc>"
3011                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <xyz:abc>\n"
3012         }, {
3013                 name: "tests14.dat #2"
3014                 html: "<!DOCTYPE html><html><body><xyz:abc></xyz:abc><span></span>"
3015                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <xyz:abc>\n|     <span>\n"
3016         }, {
3017                 name: "tests14.dat #3"
3018                 html: "<!DOCTYPE html><html><html abc:def=gh><xyz:abc></xyz:abc>"
3019                 errors: 1
3020                 expected: "| <!DOCTYPE html>\n| <html>\n|   abc:def=\"gh\"\n|   <head>\n|   <body>\n|     <xyz:abc>\n"
3021         }, {
3022                 name: "tests14.dat #4"
3023                 html: "<!DOCTYPE html><html xml:lang=bar><html xml:lang=foo>"
3024                 errors: 1
3025                 expected: "| <!DOCTYPE html>\n| <html>\n|   xml:lang=\"bar\"\n|   <head>\n|   <body>\n"
3026         }, {
3027                 name: "tests14.dat #5"
3028                 html: "<!DOCTYPE html><html 123=456>"
3029                 expected: "| <!DOCTYPE html>\n| <html>\n|   123=\"456\"\n|   <head>\n|   <body>\n"
3030         }, {
3031                 name: "tests14.dat #6"
3032                 html: "<!DOCTYPE html><html 123=456><html 789=012>"
3033                 errors: 1
3034                 expected: "| <!DOCTYPE html>\n| <html>\n|   123=\"456\"\n|   789=\"012\"\n|   <head>\n|   <body>\n"
3035         }, {
3036                 name: "tests14.dat #7"
3037                 html: "<!DOCTYPE html><html><body 789=012>"
3038                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     789=\"012\"\n"
3039         }, {
3040                 name: "tests15.dat #1"
3041                 html: "<!DOCTYPE html><p><b><i><u></p> <p>X"
3042                 errors: 2
3043                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <b>\n|         <i>\n|           <u>\n|     <b>\n|       <i>\n|         <u>\n|           \" \"\n|           <p>\n|             \"X\"\n"
3044         }, {
3045                 name: "tests15.dat #2"
3046                 html: "<p><b><i><u></p>\n<p>X"
3047                 errors: 3
3048                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <b>\n|         <i>\n|           <u>\n|     <b>\n|       <i>\n|         <u>\n|           \"\n\"\n|           <p>\n|             \"X\"\n"
3049         }, {
3050                 name: "tests15.dat #3"
3051                 html: "<!doctype html></html> <head>"
3052                 errors: 2
3053                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \" \"\n"
3054         }, {
3055                 name: "tests15.dat #4"
3056                 html: "<!doctype html></body><meta>"
3057                 errors: 1
3058                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <meta>\n"
3059         }, {
3060                 name: "tests15.dat #5"
3061                 html: "<html></html><!-- foo -->"
3062                 errors: 1
3063                 expected: "| <html>\n|   <head>\n|   <body>\n| <!--  foo  -->\n"
3064         }, {
3065                 name: "tests15.dat #6"
3066                 html: "<!doctype html></body><title>X</title>"
3067                 errors: 1
3068                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <title>\n|       \"X\"\n"
3069         }, {
3070                 name: "tests15.dat #7"
3071                 html: "<!doctype html><table> X<meta></table>"
3072                 errors: 3
3073                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \" X\"\n|     <meta>\n|     <table>\n"
3074         }, {
3075                 name: "tests15.dat #8"
3076                 html: "<!doctype html><table> x</table>"
3077                 errors: 2
3078                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \" x\"\n|     <table>\n"
3079         }, {
3080                 name: "tests15.dat #9"
3081                 html: "<!doctype html><table> x </table>"
3082                 errors: 3
3083                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \" x \"\n|     <table>\n"
3084         }, {
3085                 name: "tests15.dat #10"
3086                 html: "<!doctype html><table><tr> x</table>"
3087                 errors: 2
3088                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \" x\"\n|     <table>\n|       <tbody>\n|         <tr>\n"
3089         }, {
3090                 name: "tests15.dat #11"
3091                 html: "<!doctype html><table>X<style> <tr>x </style> </table>"
3092                 errors: 1
3093                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"X\"\n|     <table>\n|       <style>\n|         \" <tr>x \"\n|       \" \"\n"
3094         }, {
3095                 name: "tests15.dat #12"
3096                 html: "<!doctype html><div><table><a>foo</a> <tr><td>bar</td> </tr></table></div>"
3097                 errors: 5
3098                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <a>\n|         \"foo\"\n|       <table>\n|         \" \"\n|         <tbody>\n|           <tr>\n|             <td>\n|               \"bar\"\n|             \" \"\n"
3099         }, {
3100                 name: "tests15.dat #13"
3101                 html: "<frame></frame></frame><frameset><frame><frameset><frame></frameset><noframes></frameset><noframes>"
3102                 errors: 7
3103                 expected: "| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n|     <frameset>\n|       <frame>\n|     <noframes>\n|       \"</frameset><noframes>\"\n"
3104         }, {
3105                 name: "tests15.dat #14"
3106                 html: "<!DOCTYPE html><object></html>"
3107                 errors: 2
3108                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <object>\n"
3109         }, {
3110                 name: "tests16.dat #1"
3111                 html: "<!doctype html><script>"
3112                 errors: 1
3113                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|   <body>\n"
3114         }, {
3115                 name: "tests16.dat #2"
3116                 html: "<!doctype html><script>a"
3117                 errors: 1
3118                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"a\"\n|   <body>\n"
3119         }, {
3120                 name: "tests16.dat #3"
3121                 html: "<!doctype html><script><"
3122                 errors: 1
3123                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<\"\n|   <body>\n"
3124         }, {
3125                 name: "tests16.dat #4"
3126                 html: "<!doctype html><script></"
3127                 errors: 1
3128                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"</\"\n|   <body>\n"
3129         }, {
3130                 name: "tests16.dat #5"
3131                 html: "<!doctype html><script></S"
3132                 errors: 1
3133                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"</S\"\n|   <body>\n"
3134         }, {
3135                 name: "tests16.dat #6"
3136                 html: "<!doctype html><script></SC"
3137                 errors: 1
3138                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"</SC\"\n|   <body>\n"
3139         }, {
3140                 name: "tests16.dat #7"
3141                 html: "<!doctype html><script></SCR"
3142                 errors: 1
3143                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"</SCR\"\n|   <body>\n"
3144         }, {
3145                 name: "tests16.dat #8"
3146                 html: "<!doctype html><script></SCRI"
3147                 errors: 1
3148                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"</SCRI\"\n|   <body>\n"
3149         }, {
3150                 name: "tests16.dat #9"
3151                 html: "<!doctype html><script></SCRIP"
3152                 errors: 1
3153                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"</SCRIP\"\n|   <body>\n"
3154         }, {
3155                 name: "tests16.dat #10"
3156                 html: "<!doctype html><script></SCRIPT"
3157                 errors: 1
3158                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"</SCRIPT\"\n|   <body>\n"
3159         }, {
3160                 name: "tests16.dat #11"
3161                 html: "<!doctype html><script></SCRIPT "
3162                 errors: 2
3163                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|   <body>\n"
3164         }, {
3165                 name: "tests16.dat #12"
3166                 html: "<!doctype html><script></s"
3167                 errors: 1
3168                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"</s\"\n|   <body>\n"
3169         }, {
3170                 name: "tests16.dat #13"
3171                 html: "<!doctype html><script></sc"
3172                 errors: 1
3173                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"</sc\"\n|   <body>\n"
3174         }, {
3175                 name: "tests16.dat #14"
3176                 html: "<!doctype html><script></scr"
3177                 errors: 1
3178                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"</scr\"\n|   <body>\n"
3179         }, {
3180                 name: "tests16.dat #15"
3181                 html: "<!doctype html><script></scri"
3182                 errors: 1
3183                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"</scri\"\n|   <body>\n"
3184         }, {
3185                 name: "tests16.dat #16"
3186                 html: "<!doctype html><script></scrip"
3187                 errors: 1
3188                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"</scrip\"\n|   <body>\n"
3189         }, {
3190                 name: "tests16.dat #17"
3191                 html: "<!doctype html><script></script"
3192                 errors: 1
3193                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"</script\"\n|   <body>\n"
3194         }, {
3195                 name: "tests16.dat #18"
3196                 html: "<!doctype html><script></script "
3197                 errors: 2
3198                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|   <body>\n"
3199         }, {
3200                 name: "tests16.dat #19"
3201                 html: "<!doctype html><script><!"
3202                 errors: 1
3203                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!\"\n|   <body>\n"
3204         }, {
3205                 name: "tests16.dat #20"
3206                 html: "<!doctype html><script><!a"
3207                 errors: 1
3208                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!a\"\n|   <body>\n"
3209         }, {
3210                 name: "tests16.dat #21"
3211                 html: "<!doctype html><script><!-"
3212                 errors: 1
3213                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!-\"\n|   <body>\n"
3214         }, {
3215                 name: "tests16.dat #22"
3216                 html: "<!doctype html><script><!-a"
3217                 errors: 1
3218                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!-a\"\n|   <body>\n"
3219         }, {
3220                 name: "tests16.dat #23"
3221                 html: "<!doctype html><script><!--"
3222                 errors: 2
3223                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--\"\n|   <body>\n"
3224         }, {
3225                 name: "tests16.dat #24"
3226                 html: "<!doctype html><script><!--a"
3227                 errors: 2
3228                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--a\"\n|   <body>\n"
3229         }, {
3230                 name: "tests16.dat #25"
3231                 html: "<!doctype html><script><!--<"
3232                 errors: 2
3233                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<\"\n|   <body>\n"
3234         }, {
3235                 name: "tests16.dat #26"
3236                 html: "<!doctype html><script><!--<a"
3237                 errors: 2
3238                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<a\"\n|   <body>\n"
3239         }, {
3240                 name: "tests16.dat #27"
3241                 html: "<!doctype html><script><!--</"
3242                 errors: 2
3243                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--</\"\n|   <body>\n"
3244         }, {
3245                 name: "tests16.dat #28"
3246                 html: "<!doctype html><script><!--</script"
3247                 errors: 2
3248                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--</script\"\n|   <body>\n"
3249         }, {
3250                 name: "tests16.dat #29"
3251                 html: "<!doctype html><script><!--</script "
3252                 errors: 2
3253                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--\"\n|   <body>\n"
3254         }, {
3255                 name: "tests16.dat #30"
3256                 html: "<!doctype html><script><!--<s"
3257                 errors: 2
3258                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<s\"\n|   <body>\n"
3259         }, {
3260                 name: "tests16.dat #31"
3261                 html: "<!doctype html><script><!--<script"
3262                 errors: 2
3263                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script\"\n|   <body>\n"
3264         }, {
3265                 name: "tests16.dat #32"
3266                 html: "<!doctype html><script><!--<script "
3267                 errors: 2
3268                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script \"\n|   <body>\n"
3269         }, {
3270                 name: "tests16.dat #33"
3271                 html: "<!doctype html><script><!--<script <"
3272                 errors: 2
3273                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script <\"\n|   <body>\n"
3274         }, {
3275                 name: "tests16.dat #34"
3276                 html: "<!doctype html><script><!--<script <a"
3277                 errors: 2
3278                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script <a\"\n|   <body>\n"
3279         }, {
3280                 name: "tests16.dat #35"
3281                 html: "<!doctype html><script><!--<script </"
3282                 errors: 2
3283                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </\"\n|   <body>\n"
3284         }, {
3285                 name: "tests16.dat #36"
3286                 html: "<!doctype html><script><!--<script </s"
3287                 errors: 2
3288                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </s\"\n|   <body>\n"
3289         }, {
3290                 name: "tests16.dat #37"
3291                 html: "<!doctype html><script><!--<script </script"
3292                 errors: 2
3293                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script\"\n|   <body>\n"
3294         }, {
3295                 name: "tests16.dat #38"
3296                 html: "<!doctype html><script><!--<script </scripta"
3297                 errors: 2
3298                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </scripta\"\n|   <body>\n"
3299         }, {
3300                 name: "tests16.dat #39"
3301                 html: "<!doctype html><script><!--<script </script "
3302                 errors: 2
3303                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script \"\n|   <body>\n"
3304         }, {
3305                 name: "tests16.dat #40"
3306                 html: "<!doctype html><script><!--<script </script>"
3307                 errors: 2
3308                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script>\"\n|   <body>\n"
3309         }, {
3310                 name: "tests16.dat #41"
3311                 html: "<!doctype html><script><!--<script </script/"
3312                 errors: 2
3313                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script/\"\n|   <body>\n"
3314         }, {
3315                 name: "tests16.dat #42"
3316                 html: "<!doctype html><script><!--<script </script <"
3317                 errors: 2
3318                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script <\"\n|   <body>\n"
3319         }, {
3320                 name: "tests16.dat #43"
3321                 html: "<!doctype html><script><!--<script </script <a"
3322                 errors: 2
3323                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script <a\"\n|   <body>\n"
3324         }, {
3325                 name: "tests16.dat #44"
3326                 html: "<!doctype html><script><!--<script </script </"
3327                 errors: 2
3328                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script </\"\n|   <body>\n"
3329         }, {
3330                 name: "tests16.dat #45"
3331                 html: "<!doctype html><script><!--<script </script </script"
3332                 errors: 2
3333                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script </script\"\n|   <body>\n"
3334         }, {
3335                 name: "tests16.dat #46"
3336                 html: "<!doctype html><script><!--<script </script </script "
3337                 errors: 2
3338                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script \"\n|   <body>\n"
3339         }, {
3340                 name: "tests16.dat #47"
3341                 html: "<!doctype html><script><!--<script </script </script/"
3342                 errors: 2
3343                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script \"\n|   <body>\n"
3344         }, {
3345                 name: "tests16.dat #48"
3346                 html: "<!doctype html><script><!--<script </script </script>"
3347                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script \"\n|   <body>\n"
3348         }, {
3349                 name: "tests16.dat #49"
3350                 html: "<!doctype html><script><!--<script -"
3351                 errors: 2
3352                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -\"\n|   <body>\n"
3353         }, {
3354                 name: "tests16.dat #50"
3355                 html: "<!doctype html><script><!--<script -a"
3356                 errors: 2
3357                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -a\"\n|   <body>\n"
3358         }, {
3359                 name: "tests16.dat #51"
3360                 html: "<!doctype html><script><!--<script -<"
3361                 errors: 2
3362                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -<\"\n|   <body>\n"
3363         }, {
3364                 name: "tests16.dat #52"
3365                 html: "<!doctype html><script><!--<script --"
3366                 errors: 2
3367                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --\"\n|   <body>\n"
3368         }, {
3369                 name: "tests16.dat #53"
3370                 html: "<!doctype html><script><!--<script --a"
3371                 errors: 2
3372                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --a\"\n|   <body>\n"
3373         }, {
3374                 name: "tests16.dat #54"
3375                 html: "<!doctype html><script><!--<script --<"
3376                 errors: 2
3377                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --<\"\n|   <body>\n"
3378         }, {
3379                 name: "tests16.dat #55"
3380                 html: "<!doctype html><script><!--<script -->"
3381                 errors: 1
3382                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -->\"\n|   <body>\n"
3383         }, {
3384                 name: "tests16.dat #56"
3385                 html: "<!doctype html><script><!--<script --><"
3386                 errors: 1
3387                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --><\"\n|   <body>\n"
3388         }, {
3389                 name: "tests16.dat #57"
3390                 html: "<!doctype html><script><!--<script --></"
3391                 errors: 1
3392                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --></\"\n|   <body>\n"
3393         }, {
3394                 name: "tests16.dat #58"
3395                 html: "<!doctype html><script><!--<script --></script"
3396                 errors: 1
3397                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --></script\"\n|   <body>\n"
3398         }, {
3399                 name: "tests16.dat #59"
3400                 html: "<!doctype html><script><!--<script --></script "
3401                 errors: 2
3402                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -->\"\n|   <body>\n"
3403         }, {
3404                 name: "tests16.dat #60"
3405                 html: "<!doctype html><script><!--<script --></script/"
3406                 errors: 2
3407                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -->\"\n|   <body>\n"
3408         }, {
3409                 name: "tests16.dat #61"
3410                 html: "<!doctype html><script><!--<script --></script>"
3411                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -->\"\n|   <body>\n"
3412         }, {
3413                 name: "tests16.dat #62"
3414                 html: "<!doctype html><script><!--<script><\\/script>--></script>"
3415                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script><\\/script>-->\"\n|   <body>\n"
3416         }, {
3417                 name: "tests16.dat #63"
3418                 html: "<!doctype html><script><!--<script></scr'+'ipt>--></script>"
3419                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></scr'+'ipt>-->\"\n|   <body>\n"
3420         }, {
3421                 name: "tests16.dat #64"
3422                 html: "<!doctype html><script><!--<script></script><script></script></script>"
3423                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>\"\n|   <body>\n"
3424         }, {
3425                 name: "tests16.dat #65"
3426                 html: "<!doctype html><script><!--<script></script><script></script>--><!--</script>"
3427                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>--><!--\"\n|   <body>\n"
3428         }, {
3429                 name: "tests16.dat #66"
3430                 html: "<!doctype html><script><!--<script></script><script></script>-- ></script>"
3431                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>-- >\"\n|   <body>\n"
3432         }, {
3433                 name: "tests16.dat #67"
3434                 html: "<!doctype html><script><!--<script></script><script></script>- -></script>"
3435                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>- ->\"\n|   <body>\n"
3436         }, {
3437                 name: "tests16.dat #68"
3438                 html: "<!doctype html><script><!--<script></script><script></script>- - ></script>"
3439                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>- - >\"\n|   <body>\n"
3440         }, {
3441                 name: "tests16.dat #69"
3442                 html: "<!doctype html><script><!--<script></script><script></script>-></script>"
3443                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>->\"\n|   <body>\n"
3444         }, {
3445                 name: "tests16.dat #70"
3446                 html: "<!doctype html><script><!--<script>--!></script>X"
3447                 errors: 2
3448                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script>--!></script>X\"\n|   <body>\n"
3449         }, {
3450                 name: "tests16.dat #71"
3451                 html: "<!doctype html><script><!--<scr'+'ipt></script>--></script>"
3452                 errors: 1
3453                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<scr'+'ipt>\"\n|   <body>\n|     \"-->\"\n"
3454         }, {
3455                 name: "tests16.dat #72"
3456                 html: "<!doctype html><script><!--<script></scr'+'ipt></script>X"
3457                 errors: 2
3458                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></scr'+'ipt></script>X\"\n|   <body>\n"
3459         }, {
3460                 name: "tests16.dat #73"
3461                 html: "<!doctype html><style><!--<style></style>--></style>"
3462                 errors: 1
3463                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <style>\n|       \"<!--<style>\"\n|   <body>\n|     \"-->\"\n"
3464         }, {
3465                 name: "tests16.dat #74"
3466                 html: "<!doctype html><style><!--</style>X"
3467                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <style>\n|       \"<!--\"\n|   <body>\n|     \"X\"\n"
3468         }, {
3469                 name: "tests16.dat #75"
3470                 html: "<!doctype html><style><!--...</style>...--></style>"
3471                 errors: 1
3472                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <style>\n|       \"<!--...\"\n|   <body>\n|     \"...-->\"\n"
3473         }, {
3474                 name: "tests16.dat #76"
3475                 html: "<!doctype html><style><!--<br><html xmlns:v=\"urn:schemas-microsoft-com:vml\"><!--[if !mso]><style></style>X"
3476                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <style>\n|       \"<!--<br><html xmlns:v=\"urn:schemas-microsoft-com:vml\"><!--[if !mso]><style>\"\n|   <body>\n|     \"X\"\n"
3477         }, {
3478                 name: "tests16.dat #77"
3479                 html: "<!doctype html><style><!--...<style><!--...--!></style>--></style>"
3480                 errors: 1
3481                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <style>\n|       \"<!--...<style><!--...--!>\"\n|   <body>\n|     \"-->\"\n"
3482         }, {
3483                 name: "tests16.dat #78"
3484                 html: "<!doctype html><style><!--...</style><!-- --><style>@import ...</style>"
3485                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <style>\n|       \"<!--...\"\n|     <!--   -->\n|     <style>\n|       \"@import ...\"\n|   <body>\n"
3486         }, {
3487                 name: "tests16.dat #79"
3488                 html: "<!doctype html><style>...<style><!--...</style><!-- --></style>"
3489                 errors: 1
3490                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <style>\n|       \"...<style><!--...\"\n|     <!--   -->\n|   <body>\n"
3491         }, {
3492                 name: "tests16.dat #80"
3493                 html: "<!doctype html><style>...<!--[if IE]><style>...</style>X"
3494                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <style>\n|       \"...<!--[if IE]><style>...\"\n|   <body>\n|     \"X\"\n"
3495         }, {
3496                 name: "tests16.dat #81"
3497                 html: "<!doctype html><title><!--<title></title>--></title>"
3498                 errors: 1
3499                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <title>\n|       \"<!--<title>\"\n|   <body>\n|     \"-->\"\n"
3500         }, {
3501                 name: "tests16.dat #82"
3502                 html: "<!doctype html><title>&lt;/title></title>"
3503                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <title>\n|       \"</title>\"\n|   <body>\n"
3504         }, {
3505                 name: "tests16.dat #83"
3506                 html: "<!doctype html><title>foo/title><link></head><body>X"
3507                 errors: 1
3508                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <title>\n|       \"foo/title><link></head><body>X\"\n|   <body>\n"
3509         }, {
3510                 name: "tests16.dat #84"
3511                 html: "<!doctype html><noscript><!--<noscript></noscript>--></noscript>"
3512                 scripting: true
3513                 errors: 1
3514                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noscript>\n|       \"<!--<noscript>\"\n|   <body>\n|     \"-->\"\n"
3515         }, {
3516                 name: "tests16.dat #85"
3517                 html: "<!doctype html><noscript><!--<noscript></noscript>--></noscript>"
3518                 scripting: false
3519                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noscript>\n|       <!-- <noscript></noscript> -->\n|   <body>\n"
3520         }, {
3521                 name: "tests16.dat #86"
3522                 html: "<!doctype html><noscript><!--</noscript>X<noscript>--></noscript>"
3523                 scripting: true
3524                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noscript>\n|       \"<!--\"\n|   <body>\n|     \"X\"\n|     <noscript>\n|       \"-->\"\n"
3525         }, {
3526                 name: "tests16.dat #87"
3527                 html: "<!doctype html><noscript><!--</noscript>X<noscript>--></noscript>"
3528                 scripting: false
3529                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noscript>\n|       <!-- </noscript>X<noscript> -->\n|   <body>\n"
3530         }, {
3531                 name: "tests16.dat #88"
3532                 html: "<!doctype html><noscript><iframe></noscript>X"
3533                 scripting: true
3534                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noscript>\n|       \"<iframe>\"\n|   <body>\n|     \"X\"\n"
3535         }, {
3536                 name: "tests16.dat #89"
3537                 html: "<!doctype html><noscript><iframe></noscript>X"
3538                 scripting: false
3539                 errors: 2
3540                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noscript>\n|   <body>\n|     <iframe>\n|       \"</noscript>X\"\n"
3541         }, {
3542                 name: "tests16.dat #90"
3543                 html: "<!doctype html><noframes><!--<noframes></noframes>--></noframes>"
3544                 errors: 1
3545                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noframes>\n|       \"<!--<noframes>\"\n|   <body>\n|     \"-->\"\n"
3546         }, {
3547                 name: "tests16.dat #91"
3548                 html: "<!doctype html><noframes><body><script><!--...</script></body></noframes></html>"
3549                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noframes>\n|       \"<body><script><!--...</script></body>\"\n|   <body>\n"
3550         }, {
3551                 name: "tests16.dat #92"
3552                 html: "<!doctype html><textarea><!--<textarea></textarea>--></textarea>"
3553                 errors: 1
3554                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"<!--<textarea>\"\n|     \"-->\"\n"
3555         }, {
3556                 name: "tests16.dat #93"
3557                 html: "<!doctype html><textarea>&lt;/textarea></textarea>"
3558                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"</textarea>\"\n"
3559         }, {
3560                 name: "tests16.dat #94"
3561                 html: "<!doctype html><textarea>&lt;</textarea>"
3562                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"<\"\n"
3563         }, {
3564                 name: "tests16.dat #95"
3565                 html: "<!doctype html><textarea>a&lt;b</textarea>"
3566                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"a<b\"\n"
3567         }, {
3568                 name: "tests16.dat #96"
3569                 html: "<!doctype html><iframe><!--<iframe></iframe>--></iframe>"
3570                 errors: 1
3571                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <iframe>\n|       \"<!--<iframe>\"\n|     \"-->\"\n"
3572         }, {
3573                 name: "tests16.dat #97"
3574                 html: "<!doctype html><iframe>...<!--X->...<!--/X->...</iframe>"
3575                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <iframe>\n|       \"...<!--X->...<!--/X->...\"\n"
3576         }, {
3577                 name: "tests16.dat #98"
3578                 html: "<!doctype html><xmp><!--<xmp></xmp>--></xmp>"
3579                 errors: 1
3580                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <xmp>\n|       \"<!--<xmp>\"\n|     \"-->\"\n"
3581         }, {
3582                 name: "tests16.dat #99"
3583                 html: "<!doctype html><noembed><!--<noembed></noembed>--></noembed>"
3584                 errors: 1
3585                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <noembed>\n|       \"<!--<noembed>\"\n|     \"-->\"\n"
3586         }, {
3587                 name: "tests16.dat #100"
3588                 html: "<script>"
3589                 errors: 2
3590                 expected: "| <html>\n|   <head>\n|     <script>\n|   <body>\n"
3591         }, {
3592                 name: "tests16.dat #101"
3593                 html: "<script>a"
3594                 errors: 2
3595                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"a\"\n|   <body>\n"
3596         }, {
3597                 name: "tests16.dat #102"
3598                 html: "<script><"
3599                 errors: 2
3600                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<\"\n|   <body>\n"
3601         }, {
3602                 name: "tests16.dat #103"
3603                 html: "<script></"
3604                 errors: 2
3605                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</\"\n|   <body>\n"
3606         }, {
3607                 name: "tests16.dat #104"
3608                 html: "<script></S"
3609                 errors: 2
3610                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</S\"\n|   <body>\n"
3611         }, {
3612                 name: "tests16.dat #105"
3613                 html: "<script></SC"
3614                 errors: 2
3615                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</SC\"\n|   <body>\n"
3616         }, {
3617                 name: "tests16.dat #106"
3618                 html: "<script></SCR"
3619                 errors: 2
3620                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</SCR\"\n|   <body>\n"
3621         }, {
3622                 name: "tests16.dat #107"
3623                 html: "<script></SCRI"
3624                 errors: 2
3625                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</SCRI\"\n|   <body>\n"
3626         }, {
3627                 name: "tests16.dat #108"
3628                 html: "<script></SCRIP"
3629                 errors: 2
3630                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</SCRIP\"\n|   <body>\n"
3631         }, {
3632                 name: "tests16.dat #109"
3633                 html: "<script></SCRIPT"
3634                 errors: 2
3635                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</SCRIPT\"\n|   <body>\n"
3636         }, {
3637                 name: "tests16.dat #110"
3638                 html: "<script></SCRIPT "
3639                 errors: 3
3640                 expected: "| <html>\n|   <head>\n|     <script>\n|   <body>\n"
3641         }, {
3642                 name: "tests16.dat #111"
3643                 html: "<script></s"
3644                 errors: 2
3645                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</s\"\n|   <body>\n"
3646         }, {
3647                 name: "tests16.dat #112"
3648                 html: "<script></sc"
3649                 errors: 2
3650                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</sc\"\n|   <body>\n"
3651         }, {
3652                 name: "tests16.dat #113"
3653                 html: "<script></scr"
3654                 errors: 2
3655                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</scr\"\n|   <body>\n"
3656         }, {
3657                 name: "tests16.dat #114"
3658                 html: "<script></scri"
3659                 errors: 2
3660                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</scri\"\n|   <body>\n"
3661         }, {
3662                 name: "tests16.dat #115"
3663                 html: "<script></scrip"
3664                 errors: 2
3665                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</scrip\"\n|   <body>\n"
3666         }, {
3667                 name: "tests16.dat #116"
3668                 html: "<script></script"
3669                 errors: 2
3670                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</script\"\n|   <body>\n"
3671         }, {
3672                 name: "tests16.dat #117"
3673                 html: "<script></script "
3674                 errors: 3
3675                 expected: "| <html>\n|   <head>\n|     <script>\n|   <body>\n"
3676         }, {
3677                 name: "tests16.dat #118"
3678                 html: "<script><!"
3679                 errors: 2
3680                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!\"\n|   <body>\n"
3681         }, {
3682                 name: "tests16.dat #119"
3683                 html: "<script><!a"
3684                 errors: 2
3685                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!a\"\n|   <body>\n"
3686         }, {
3687                 name: "tests16.dat #120"
3688                 html: "<script><!-"
3689                 errors: 2
3690                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!-\"\n|   <body>\n"
3691         }, {
3692                 name: "tests16.dat #121"
3693                 html: "<script><!-a"
3694                 errors: 2
3695                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!-a\"\n|   <body>\n"
3696         }, {
3697                 name: "tests16.dat #122"
3698                 html: "<script><!--"
3699                 errors: 3
3700                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--\"\n|   <body>\n"
3701         }, {
3702                 name: "tests16.dat #123"
3703                 html: "<script><!--a"
3704                 errors: 3
3705                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--a\"\n|   <body>\n"
3706         }, {
3707                 name: "tests16.dat #124"
3708                 html: "<script><!--<"
3709                 errors: 3
3710                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<\"\n|   <body>\n"
3711         }, {
3712                 name: "tests16.dat #125"
3713                 html: "<script><!--<a"
3714                 errors: 3
3715                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<a\"\n|   <body>\n"
3716         }, {
3717                 name: "tests16.dat #126"
3718                 html: "<script><!--</"
3719                 errors: 3
3720                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--</\"\n|   <body>\n"
3721         }, {
3722                 name: "tests16.dat #127"
3723                 html: "<script><!--</script"
3724                 errors: 3
3725                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--</script\"\n|   <body>\n"
3726         }, {
3727                 name: "tests16.dat #128"
3728                 html: "<script><!--</script "
3729                 errors: 3
3730                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--\"\n|   <body>\n"
3731         }, {
3732                 name: "tests16.dat #129"
3733                 html: "<script><!--<s"
3734                 errors: 3
3735                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<s\"\n|   <body>\n"
3736         }, {
3737                 name: "tests16.dat #130"
3738                 html: "<script><!--<script"
3739                 errors: 3
3740                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script\"\n|   <body>\n"
3741         }, {
3742                 name: "tests16.dat #131"
3743                 html: "<script><!--<script "
3744                 errors: 3
3745                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script \"\n|   <body>\n"
3746         }, {
3747                 name: "tests16.dat #132"
3748                 html: "<script><!--<script <"
3749                 errors: 3
3750                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script <\"\n|   <body>\n"
3751         }, {
3752                 name: "tests16.dat #133"
3753                 html: "<script><!--<script <a"
3754                 errors: 3
3755                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script <a\"\n|   <body>\n"
3756         }, {
3757                 name: "tests16.dat #134"
3758                 html: "<script><!--<script </"
3759                 errors: 3
3760                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </\"\n|   <body>\n"
3761         }, {
3762                 name: "tests16.dat #135"
3763                 html: "<script><!--<script </s"
3764                 errors: 3
3765                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </s\"\n|   <body>\n"
3766         }, {
3767                 name: "tests16.dat #136"
3768                 html: "<script><!--<script </script"
3769                 errors: 3
3770                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script\"\n|   <body>\n"
3771         }, {
3772                 name: "tests16.dat #137"
3773                 html: "<script><!--<script </scripta"
3774                 errors: 3
3775                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </scripta\"\n|   <body>\n"
3776         }, {
3777                 name: "tests16.dat #138"
3778                 html: "<script><!--<script </script "
3779                 errors: 3
3780                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script \"\n|   <body>\n"
3781         }, {
3782                 name: "tests16.dat #139"
3783                 html: "<script><!--<script </script>"
3784                 errors: 3
3785                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script>\"\n|   <body>\n"
3786         }, {
3787                 name: "tests16.dat #140"
3788                 html: "<script><!--<script </script/"
3789                 errors: 3
3790                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script/\"\n|   <body>\n"
3791         }, {
3792                 name: "tests16.dat #141"
3793                 html: "<script><!--<script </script <"
3794                 errors: 3
3795                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script <\"\n|   <body>\n"
3796         }, {
3797                 name: "tests16.dat #142"
3798                 html: "<script><!--<script </script <a"
3799                 errors: 3
3800                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script <a\"\n|   <body>\n"
3801         }, {
3802                 name: "tests16.dat #143"
3803                 html: "<script><!--<script </script </"
3804                 errors: 3
3805                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script </\"\n|   <body>\n"
3806         }, {
3807                 name: "tests16.dat #144"
3808                 html: "<script><!--<script </script </script"
3809                 errors: 3
3810                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script </script\"\n|   <body>\n"
3811         }, {
3812                 name: "tests16.dat #145"
3813                 html: "<script><!--<script </script </script "
3814                 errors: 3
3815                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script \"\n|   <body>\n"
3816         }, {
3817                 name: "tests16.dat #146"
3818                 html: "<script><!--<script </script </script/"
3819                 errors: 3
3820                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script \"\n|   <body>\n"
3821         }, {
3822                 name: "tests16.dat #147"
3823                 html: "<script><!--<script </script </script>"
3824                 errors: 1
3825                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script \"\n|   <body>\n"
3826         }, {
3827                 name: "tests16.dat #148"
3828                 html: "<script><!--<script -"
3829                 errors: 3
3830                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -\"\n|   <body>\n"
3831         }, {
3832                 name: "tests16.dat #149"
3833                 html: "<script><!--<script -a"
3834                 errors: 3
3835                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -a\"\n|   <body>\n"
3836         }, {
3837                 name: "tests16.dat #150"
3838                 html: "<script><!--<script --"
3839                 errors: 3
3840                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --\"\n|   <body>\n"
3841         }, {
3842                 name: "tests16.dat #151"
3843                 html: "<script><!--<script --a"
3844                 errors: 3
3845                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --a\"\n|   <body>\n"
3846         }, {
3847                 name: "tests16.dat #152"
3848                 html: "<script><!--<script -->"
3849                 errors: 2
3850                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -->\"\n|   <body>\n"
3851         }, {
3852                 name: "tests16.dat #153"
3853                 html: "<script><!--<script --><"
3854                 errors: 2
3855                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --><\"\n|   <body>\n"
3856         }, {
3857                 name: "tests16.dat #154"
3858                 html: "<script><!--<script --></"
3859                 errors: 2
3860                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --></\"\n|   <body>\n"
3861         }, {
3862                 name: "tests16.dat #155"
3863                 html: "<script><!--<script --></script"
3864                 errors: 2
3865                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --></script\"\n|   <body>\n"
3866         }, {
3867                 name: "tests16.dat #156"
3868                 html: "<script><!--<script --></script "
3869                 errors: 3
3870                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -->\"\n|   <body>\n"
3871         }, {
3872                 name: "tests16.dat #157"
3873                 html: "<script><!--<script --></script/"
3874                 errors: 3
3875                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -->\"\n|   <body>\n"
3876         }, {
3877                 name: "tests16.dat #158"
3878                 html: "<script><!--<script --></script>"
3879                 errors: 1
3880                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -->\"\n|   <body>\n"
3881         }, {
3882                 name: "tests16.dat #159"
3883                 html: "<script><!--<script><\\/script>--></script>"
3884                 errors: 1
3885                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script><\\/script>-->\"\n|   <body>\n"
3886         }, {
3887                 name: "tests16.dat #160"
3888                 html: "<script><!--<script></scr'+'ipt>--></script>"
3889                 errors: 1
3890                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></scr'+'ipt>-->\"\n|   <body>\n"
3891         }, {
3892                 name: "tests16.dat #161"
3893                 html: "<script><!--<script></script><script></script></script>"
3894                 errors: 1
3895                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>\"\n|   <body>\n"
3896         }, {
3897                 name: "tests16.dat #162"
3898                 html: "<script><!--<script></script><script></script>--><!--</script>"
3899                 errors: 1
3900                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>--><!--\"\n|   <body>\n"
3901         }, {
3902                 name: "tests16.dat #163"
3903                 html: "<script><!--<script></script><script></script>-- ></script>"
3904                 errors: 1
3905                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>-- >\"\n|   <body>\n"
3906         }, {
3907                 name: "tests16.dat #164"
3908                 html: "<script><!--<script></script><script></script>- -></script>"
3909                 errors: 1
3910                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>- ->\"\n|   <body>\n"
3911         }, {
3912                 name: "tests16.dat #165"
3913                 html: "<script><!--<script></script><script></script>- - ></script>"
3914                 errors: 1
3915                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>- - >\"\n|   <body>\n"
3916         }, {
3917                 name: "tests16.dat #166"
3918                 html: "<script><!--<script></script><script></script>-></script>"
3919                 errors: 1
3920                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>->\"\n|   <body>\n"
3921         }, {
3922                 name: "tests16.dat #167"
3923                 html: "<script><!--<script>--!></script>X"
3924                 errors: 3
3925                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script>--!></script>X\"\n|   <body>\n"
3926         }, {
3927                 name: "tests16.dat #168"
3928                 html: "<script><!--<scr'+'ipt></script>--></script>"
3929                 errors: 2
3930                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<scr'+'ipt>\"\n|   <body>\n|     \"-->\"\n"
3931         }, {
3932                 name: "tests16.dat #169"
3933                 html: "<script><!--<script></scr'+'ipt></script>X"
3934                 errors: 3
3935                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></scr'+'ipt></script>X\"\n|   <body>\n"
3936         }, {
3937                 name: "tests16.dat #170"
3938                 html: "<style><!--<style></style>--></style>"
3939                 errors: 2
3940                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--<style>\"\n|   <body>\n|     \"-->\"\n"
3941         }, {
3942                 name: "tests16.dat #171"
3943                 html: "<style><!--</style>X"
3944                 errors: 1
3945                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--\"\n|   <body>\n|     \"X\"\n"
3946         }, {
3947                 name: "tests16.dat #172"
3948                 html: "<style><!--...</style>...--></style>"
3949                 errors: 2
3950                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--...\"\n|   <body>\n|     \"...-->\"\n"
3951         }, {
3952                 name: "tests16.dat #173"
3953                 html: "<style><!--<br><html xmlns:v=\"urn:schemas-microsoft-com:vml\"><!--[if !mso]><style></style>X"
3954                 errors: 1
3955                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--<br><html xmlns:v=\"urn:schemas-microsoft-com:vml\"><!--[if !mso]><style>\"\n|   <body>\n|     \"X\"\n"
3956         }, {
3957                 name: "tests16.dat #174"
3958                 html: "<style><!--...<style><!--...--!></style>--></style>"
3959                 errors: 2
3960                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--...<style><!--...--!>\"\n|   <body>\n|     \"-->\"\n"
3961         }, {
3962                 name: "tests16.dat #175"
3963                 html: "<style><!--...</style><!-- --><style>@import ...</style>"
3964                 errors: 1
3965                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--...\"\n|     <!--   -->\n|     <style>\n|       \"@import ...\"\n|   <body>\n"
3966         }, {
3967                 name: "tests16.dat #176"
3968                 html: "<style>...<style><!--...</style><!-- --></style>"
3969                 errors: 2
3970                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"...<style><!--...\"\n|     <!--   -->\n|   <body>\n"
3971         }, {
3972                 name: "tests16.dat #177"
3973                 html: "<style>...<!--[if IE]><style>...</style>X"
3974                 errors: 1
3975                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"...<!--[if IE]><style>...\"\n|   <body>\n|     \"X\"\n"
3976         }, {
3977                 name: "tests16.dat #178"
3978                 html: "<title><!--<title></title>--></title>"
3979                 errors: 2
3980                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"<!--<title>\"\n|   <body>\n|     \"-->\"\n"
3981         }, {
3982                 name: "tests16.dat #179"
3983                 html: "<title>&lt;/title></title>"
3984                 errors: 1
3985                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"</title>\"\n|   <body>\n"
3986         }, {
3987                 name: "tests16.dat #180"
3988                 html: "<title>foo/title><link></head><body>X"
3989                 errors: 2
3990                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"foo/title><link></head><body>X\"\n|   <body>\n"
3991         }, {
3992                 name: "tests16.dat #181"
3993                 html: "<noscript><!--<noscript></noscript>--></noscript>"
3994                 scripting: true
3995                 errors: 2
3996                 expected: "| <html>\n|   <head>\n|     <noscript>\n|       \"<!--<noscript>\"\n|   <body>\n|     \"-->\"\n"
3997         }, {
3998                 name: "tests16.dat #182"
3999                 html: "<noscript><!--<noscript></noscript>--></noscript>"
4000                 scripting: false
4001                 errors: 1
4002                 expected: "| <html>\n|   <head>\n|     <noscript>\n|       <!-- <noscript></noscript> -->\n|   <body>\n"
4003         }, {
4004                 name: "tests16.dat #183"
4005                 html: "<noscript><!--</noscript>X<noscript>--></noscript>"
4006                 scripting: true
4007                 errors: 1
4008                 expected: "| <html>\n|   <head>\n|     <noscript>\n|       \"<!--\"\n|   <body>\n|     \"X\"\n|     <noscript>\n|       \"-->\"\n"
4009         }, {
4010                 name: "tests16.dat #184"
4011                 html: "<noscript><!--</noscript>X<noscript>--></noscript>"
4012                 scripting: false
4013                 errors: 1
4014                 expected: "| <html>\n|   <head>\n|     <noscript>\n|       <!-- </noscript>X<noscript> -->\n|   <body>\n"
4015         }, {
4016                 name: "tests16.dat #185"
4017                 html: "<noscript><iframe></noscript>X"
4018                 scripting: true
4019                 errors: 1
4020                 expected: "| <html>\n|   <head>\n|     <noscript>\n|       \"<iframe>\"\n|   <body>\n|     \"X\"\n"
4021         }, {
4022                 name: "tests16.dat #186"
4023                 html: "<noscript><iframe></noscript>X"
4024                 scripting: false
4025                 errors: 3
4026                 expected: "| <html>\n|   <head>\n|     <noscript>\n|   <body>\n|     <iframe>\n|       \"</noscript>X\"\n"
4027         }, {
4028                 name: "tests16.dat #187"
4029                 html: "<noframes><!--<noframes></noframes>--></noframes>"
4030                 errors: 2
4031                 expected: "| <html>\n|   <head>\n|     <noframes>\n|       \"<!--<noframes>\"\n|   <body>\n|     \"-->\"\n"
4032         }, {
4033                 name: "tests16.dat #188"
4034                 html: "<noframes><body><script><!--...</script></body></noframes></html>"
4035                 errors: 1
4036                 expected: "| <html>\n|   <head>\n|     <noframes>\n|       \"<body><script><!--...</script></body>\"\n|   <body>\n"
4037         }, {
4038                 name: "tests16.dat #189"
4039                 html: "<textarea><!--<textarea></textarea>--></textarea>"
4040                 errors: 2
4041                 expected: "| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"<!--<textarea>\"\n|     \"-->\"\n"
4042         }, {
4043                 name: "tests16.dat #190"
4044                 html: "<textarea>&lt;/textarea></textarea>"
4045                 errors: 1
4046                 expected: "| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"</textarea>\"\n"
4047         }, {
4048                 name: "tests16.dat #191"
4049                 html: "<iframe><!--<iframe></iframe>--></iframe>"
4050                 errors: 2
4051                 expected: "| <html>\n|   <head>\n|   <body>\n|     <iframe>\n|       \"<!--<iframe>\"\n|     \"-->\"\n"
4052         }, {
4053                 name: "tests16.dat #192"
4054                 html: "<iframe>...<!--X->...<!--/X->...</iframe>"
4055                 errors: 1
4056                 expected: "| <html>\n|   <head>\n|   <body>\n|     <iframe>\n|       \"...<!--X->...<!--/X->...\"\n"
4057         }, {
4058                 name: "tests16.dat #193"
4059                 html: "<xmp><!--<xmp></xmp>--></xmp>"
4060                 errors: 2
4061                 expected: "| <html>\n|   <head>\n|   <body>\n|     <xmp>\n|       \"<!--<xmp>\"\n|     \"-->\"\n"
4062         }, {
4063                 name: "tests16.dat #194"
4064                 html: "<noembed><!--<noembed></noembed>--></noembed>"
4065                 errors: 2
4066                 expected: "| <html>\n|   <head>\n|   <body>\n|     <noembed>\n|       \"<!--<noembed>\"\n|     \"-->\"\n"
4067         }, {
4068                 name: "tests16.dat #195"
4069                 html: "<!doctype html><table>\n"
4070                 errors: 1
4071                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       \"\n\"\n"
4072         }, {
4073                 name: "tests16.dat #196"
4074                 html: "<!doctype html><table><td><span><font></span><span>"
4075                 errors: 3
4076                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <span>\n|               <font>\n|             <font>\n|               <span>\n"
4077         }, {
4078                 name: "tests16.dat #197"
4079                 html: "<!doctype html><form><table></form><form></table></form>"
4080                 errors: 5
4081                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <form>\n|       <table>\n|         <form>\n"
4082         }, {
4083                 name: "tests17.dat #1"
4084                 html: "<!doctype html><table><tbody><select><tr>"
4085                 errors: 3
4086                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|     <table>\n|       <tbody>\n|         <tr>\n"
4087         }, {
4088                 name: "tests17.dat #2"
4089                 html: "<!doctype html><table><tr><select><td>"
4090                 errors: 3
4091                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n"
4092         }, {
4093                 name: "tests17.dat #3"
4094                 html: "<!doctype html><table><tr><td><select><td>"
4095                 errors: 2
4096                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <select>\n|           <td>\n"
4097         }, {
4098                 name: "tests17.dat #4"
4099                 html: "<!doctype html><table><tr><th><select><td>"
4100                 errors: 2
4101                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <th>\n|             <select>\n|           <td>\n"
4102         }, {
4103                 name: "tests17.dat #5"
4104                 html: "<!doctype html><table><caption><select><tr>"
4105                 errors: 2
4106                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <select>\n|       <tbody>\n|         <tr>\n"
4107         }, {
4108                 name: "tests17.dat #6"
4109                 html: "<!doctype html><select><tr>"
4110                 errors: 2
4111                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4112         }, {
4113                 name: "tests17.dat #7"
4114                 html: "<!doctype html><select><td>"
4115                 errors: 2
4116                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4117         }, {
4118                 name: "tests17.dat #8"
4119                 html: "<!doctype html><select><th>"
4120                 errors: 2
4121                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4122         }, {
4123                 name: "tests17.dat #9"
4124                 html: "<!doctype html><select><tbody>"
4125                 errors: 2
4126                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4127         }, {
4128                 name: "tests17.dat #10"
4129                 html: "<!doctype html><select><thead>"
4130                 errors: 2
4131                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4132         }, {
4133                 name: "tests17.dat #11"
4134                 html: "<!doctype html><select><tfoot>"
4135                 errors: 2
4136                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4137         }, {
4138                 name: "tests17.dat #12"
4139                 html: "<!doctype html><select><caption>"
4140                 errors: 2
4141                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4142         }, {
4143                 name: "tests17.dat #13"
4144                 html: "<!doctype html><table><tr></table>a"
4145                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|     \"a\"\n"
4146         }, {
4147                 name: "tests18.dat #1"
4148                 html: "<!doctype html><plaintext></plaintext>"
4149                 errors: 1
4150                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <plaintext>\n|       \"</plaintext>\"\n"
4151         }, {
4152                 name: "tests18.dat #2"
4153                 html: "<!doctype html><table><plaintext></plaintext>"
4154                 errors: 14
4155                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <plaintext>\n|       \"</plaintext>\"\n|     <table>\n"
4156         }, {
4157                 name: "tests18.dat #3"
4158                 html: "<!doctype html><table><tbody><plaintext></plaintext>"
4159                 errors: 14
4160                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <plaintext>\n|       \"</plaintext>\"\n|     <table>\n|       <tbody>\n"
4161         }, {
4162                 name: "tests18.dat #4"
4163                 html: "<!doctype html><table><tbody><tr><plaintext></plaintext>"
4164                 errors: 14
4165                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <plaintext>\n|       \"</plaintext>\"\n|     <table>\n|       <tbody>\n|         <tr>\n"
4166         }, {
4167                 name: "tests18.dat #5"
4168                 html: "<!doctype html><table><td><plaintext></plaintext>"
4169                 errors: 2
4170                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <plaintext>\n|               \"</plaintext>\"\n"
4171         }, {
4172                 name: "tests18.dat #6"
4173                 html: "<!doctype html><table><caption><plaintext></plaintext>"
4174                 errors: 1
4175                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <plaintext>\n|           \"</plaintext>\"\n"
4176         }, {
4177                 name: "tests18.dat #7"
4178                 html: "<!doctype html><table><tr><style></script></style>abc"
4179                 errors: 4
4180                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"abc\"\n|     <table>\n|       <tbody>\n|         <tr>\n|           <style>\n|             \"</script>\"\n"
4181         }, {
4182                 name: "tests18.dat #8"
4183                 html: "<!doctype html><table><tr><script></style></script>abc"
4184                 errors: 4
4185                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"abc\"\n|     <table>\n|       <tbody>\n|         <tr>\n|           <script>\n|             \"</style>\"\n"
4186         }, {
4187                 name: "tests18.dat #9"
4188                 html: "<!doctype html><table><caption><style></script></style>abc"
4189                 errors: 1
4190                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <style>\n|           \"</script>\"\n|         \"abc\"\n"
4191         }, {
4192                 name: "tests18.dat #10"
4193                 html: "<!doctype html><table><td><style></script></style>abc"
4194                 errors: 2
4195                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <style>\n|               \"</script>\"\n|             \"abc\"\n"
4196         }, {
4197                 name: "tests18.dat #11"
4198                 html: "<!doctype html><select><script></style></script>abc"
4199                 errors: 1
4200                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <script>\n|         \"</style>\"\n|       \"abc\"\n"
4201         }, {
4202                 name: "tests18.dat #12"
4203                 html: "<!doctype html><table><select><script></style></script>abc"
4204                 errors: 2
4205                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <script>\n|         \"</style>\"\n|       \"abc\"\n|     <table>\n"
4206         }, {
4207                 name: "tests18.dat #13"
4208                 html: "<!doctype html><table><tr><select><script></style></script>abc"
4209                 errors: 2
4210                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <script>\n|         \"</style>\"\n|       \"abc\"\n|     <table>\n|       <tbody>\n|         <tr>\n"
4211         }, {
4212                 name: "tests18.dat #14"
4213                 html: "<!doctype html><frameset></frameset><noframes>abc"
4214                 errors: 1
4215                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|   <noframes>\n|     \"abc\"\n"
4216         }, {
4217                 name: "tests18.dat #15"
4218                 html: "<!doctype html><frameset></frameset><noframes>abc</noframes><!--abc-->"
4219                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|   <noframes>\n|     \"abc\"\n|   <!-- abc -->\n"
4220         }, {
4221                 name: "tests18.dat #16"
4222                 html: "<!doctype html><frameset></frameset></html><noframes>abc"
4223                 errors: 1
4224                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|   <noframes>\n|     \"abc\"\n"
4225         }, {
4226                 name: "tests18.dat #17"
4227                 html: "<!doctype html><frameset></frameset></html><noframes>abc</noframes><!--abc-->"
4228                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|   <noframes>\n|     \"abc\"\n| <!-- abc -->\n"
4229         }, {
4230                 name: "tests18.dat #18"
4231                 html: "<!doctype html><table><tr></tbody><tfoot>"
4232                 errors: 1
4233                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|       <tfoot>\n"
4234         }, {
4235                 name: "tests18.dat #19"
4236                 html: "<!doctype html><table><td><svg></svg>abc<td>"
4237                 errors: 2
4238                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <svg svg>\n|             \"abc\"\n|           <td>\n"
4239         }, {
4240                 name: "tests19.dat #1"
4241                 html: "<!doctype html><math><mn DefinitionUrl=\"foo\">"
4242                 errors: 1
4243                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mn>\n|         definitionURL=\"foo\"\n"
4244         }, {
4245                 name: "tests19.dat #2"
4246                 html: "<!doctype html><html></p><!--foo-->"
4247                 errors: 1
4248                 expected: "| <!DOCTYPE html>\n| <html>\n|   <!-- foo -->\n|   <head>\n|   <body>\n"
4249         }, {
4250                 name: "tests19.dat #3"
4251                 html: "<!doctype html><head></head></p><!--foo-->"
4252                 errors: 1
4253                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <!-- foo -->\n|   <body>\n"
4254         }, {
4255                 name: "tests19.dat #4"
4256                 html: "<!doctype html><body><p><pre>"
4257                 errors: 1
4258                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <pre>\n"
4259         }, {
4260                 name: "tests19.dat #5"
4261                 html: "<!doctype html><body><p><listing>"
4262                 errors: 1
4263                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <listing>\n"
4264         }, {
4265                 name: "tests19.dat #6"
4266                 html: "<!doctype html><p><plaintext>"
4267                 errors: 1
4268                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <plaintext>\n"
4269         }, {
4270                 name: "tests19.dat #7"
4271                 html: "<!doctype html><p><h1>"
4272                 errors: 1
4273                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <h1>\n"
4274         }, {
4275                 name: "tests19.dat #8"
4276                 html: "<!doctype html><form><isindex>"
4277                 errors: 2
4278                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <form>\n"
4279         }, {
4280                 name: "tests19.dat #9"
4281                 html: "<!doctype html><isindex action=\"POST\">"
4282                 errors: 1
4283                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <form>\n|       action=\"POST\"\n|       <hr>\n|       <label>\n|         \"This is a searchable index. Enter search keywords: \"\n|         <input>\n|           name=\"isindex\"\n|       <hr>\n"
4284         }, {
4285                 name: "tests19.dat #10"
4286                 html: "<!doctype html><isindex prompt=\"this is isindex\">"
4287                 errors: 1
4288                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <form>\n|       <hr>\n|       <label>\n|         \"this is isindex\"\n|         <input>\n|           name=\"isindex\"\n|       <hr>\n"
4289         }, {
4290                 name: "tests19.dat #11"
4291                 html: "<!doctype html><isindex type=\"hidden\">"
4292                 errors: 1
4293                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <form>\n|       <hr>\n|       <label>\n|         \"This is a searchable index. Enter search keywords: \"\n|         <input>\n|           name=\"isindex\"\n|           type=\"hidden\"\n|       <hr>\n"
4294         }, {
4295                 name: "tests19.dat #12"
4296                 html: "<!doctype html><isindex name=\"foo\">"
4297                 errors: 1
4298                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <form>\n|       <hr>\n|       <label>\n|         \"This is a searchable index. Enter search keywords: \"\n|         <input>\n|           name=\"isindex\"\n|       <hr>\n"
4299         }, {
4300                 name: "tests19.dat #13"
4301                 html: "<!doctype html><ruby><p><rp>"
4302                 errors: 1
4303                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <p>\n|       <rp>\n"
4304         }, {
4305                 name: "tests19.dat #14"
4306                 html: "<!doctype html><ruby><div><span><rp>"
4307                 errors: 2
4308                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <div>\n|         <span>\n|           <rp>\n"
4309         }, {
4310                 name: "tests19.dat #15"
4311                 html: "<!doctype html><ruby><div><p><rp>"
4312                 errors: 2
4313                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <div>\n|         <p>\n|         <rp>\n"
4314         }, {
4315                 name: "tests19.dat #16"
4316                 html: "<!doctype html><ruby><p><rt>"
4317                 errors: 1
4318                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <p>\n|       <rt>\n"
4319         }, {
4320                 name: "tests19.dat #17"
4321                 html: "<!doctype html><ruby><div><span><rt>"
4322                 errors: 2
4323                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <div>\n|         <span>\n|           <rt>\n"
4324         }, {
4325                 name: "tests19.dat #18"
4326                 html: "<!doctype html><ruby><div><p><rt>"
4327                 errors: 2
4328                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <div>\n|         <p>\n|         <rt>\n"
4329         }, {
4330                 name: "tests19.dat #19"
4331                 html: "<html><ruby>a<rb>b<rt></ruby></html>"
4332                 errors: 1
4333                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rb>\n|         \"b\"\n|       <rt>\n"
4334         }, {
4335                 name: "tests19.dat #20"
4336                 html: "<html><ruby>a<rp>b<rt></ruby></html>"
4337                 errors: 1
4338                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rp>\n|         \"b\"\n|       <rt>\n"
4339         }, {
4340                 name: "tests19.dat #21"
4341                 html: "<html><ruby>a<rt>b<rt></ruby></html>"
4342                 errors: 1
4343                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rt>\n|         \"b\"\n|       <rt>\n"
4344         }, {
4345                 name: "tests19.dat #22"
4346                 html: "<html><ruby>a<rtc>b<rt>c<rb>d</ruby></html>"
4347                 errors: 1
4348                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rtc>\n|         \"b\"\n|         <rt>\n|           \"c\"\n|       <rb>\n|         \"d\"\n"
4349         }, {
4350                 name: "tests19.dat #23"
4351                 html: "<!doctype html><math/><foo>"
4352                 errors: 1
4353                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|     <foo>\n"
4354         }, {
4355                 name: "tests19.dat #24"
4356                 html: "<!doctype html><svg/><foo>"
4357                 errors: 1
4358                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|     <foo>\n"
4359         }, {
4360                 name: "tests19.dat #25"
4361                 html: "<!doctype html><div></body><!--foo-->"
4362                 errors: 1
4363                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <div>\n|   <!-- foo -->\n"
4364         }, {
4365                 name: "tests19.dat #26"
4366                 html: "<!doctype html><h1><div><h3><span></h1>foo"
4367                 errors: 2
4368                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <h1>\n|       <div>\n|         <h3>\n|           <span>\n|         \"foo\"\n"
4369         }, {
4370                 name: "tests19.dat #27"
4371                 html: "<!doctype html><p></h3>foo"
4372                 errors: 1
4373                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       \"foo\"\n"
4374         }, {
4375                 name: "tests19.dat #28"
4376                 html: "<!doctype html><h3><li>abc</h2>foo"
4377                 errors: 1
4378                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <h3>\n|       <li>\n|         \"abc\"\n|     \"foo\"\n"
4379         }, {
4380                 name: "tests19.dat #29"
4381                 html: "<!doctype html><table>abc<!--foo-->"
4382                 errors: 4
4383                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"abc\"\n|     <table>\n|       <!-- foo -->\n"
4384         }, {
4385                 name: "tests19.dat #30"
4386                 html: "<!doctype html><table>  <!--foo-->"
4387                 errors: 1
4388                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       \"  \"\n|       <!-- foo -->\n"
4389         }, {
4390                 name: "tests19.dat #31"
4391                 html: "<!doctype html><table> b <!--foo-->"
4392                 errors: 4
4393                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \" b \"\n|     <table>\n|       <!-- foo -->\n"
4394         }, {
4395                 name: "tests19.dat #32"
4396                 html: "<!doctype html><select><option><option>"
4397                 errors: 1
4398                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n|       <option>\n"
4399         }, {
4400                 name: "tests19.dat #33"
4401                 html: "<!doctype html><select><option></optgroup>"
4402                 errors: 2
4403                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n"
4404         }, {
4405                 name: "tests19.dat #34"
4406                 html: "<!doctype html><select><option></optgroup>"
4407                 errors: 2
4408                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n"
4409         }, {
4410                 name: "tests19.dat #35"
4411                 html: "<!doctype html><dd><optgroup><dd>"
4412                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <dd>\n|       <optgroup>\n|     <dd>\n"
4413         }, {
4414                 name: "tests19.dat #36"
4415                 html: "<!doctype html><p><math><mi><p><h1>"
4416                 errors: 1
4417                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <math math>\n|         <math mi>\n|           <p>\n|           <h1>\n"
4418         }, {
4419                 name: "tests19.dat #37"
4420                 html: "<!doctype html><p><math><mo><p><h1>"
4421                 errors: 1
4422                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <math math>\n|         <math mo>\n|           <p>\n|           <h1>\n"
4423         }, {
4424                 name: "tests19.dat #38"
4425                 html: "<!doctype html><p><math><mn><p><h1>"
4426                 errors: 1
4427                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <math math>\n|         <math mn>\n|           <p>\n|           <h1>\n"
4428         }, {
4429                 name: "tests19.dat #39"
4430                 html: "<!doctype html><p><math><ms><p><h1>"
4431                 errors: 1
4432                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <math math>\n|         <math ms>\n|           <p>\n|           <h1>\n"
4433         }, {
4434                 name: "tests19.dat #40"
4435                 html: "<!doctype html><p><math><mtext><p><h1>"
4436                 errors: 1
4437                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <math math>\n|         <math mtext>\n|           <p>\n|           <h1>\n"
4438         }, {
4439                 name: "tests19.dat #41"
4440                 html: "<!doctype html><frameset></noframes>"
4441                 errors: 2
4442                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
4443         }, {
4444                 name: "tests19.dat #42"
4445                 html: "<!doctype html><html c=d><body></html><html a=b>"
4446                 errors: 1
4447                 expected: "| <!DOCTYPE html>\n| <html>\n|   a=\"b\"\n|   c=\"d\"\n|   <head>\n|   <body>\n"
4448         }, {
4449                 name: "tests19.dat #43"
4450                 html: "<!doctype html><html c=d><frameset></frameset></html><html a=b>"
4451                 errors: 1
4452                 expected: "| <!DOCTYPE html>\n| <html>\n|   a=\"b\"\n|   c=\"d\"\n|   <head>\n|   <frameset>\n"
4453         }, {
4454                 name: "tests19.dat #44"
4455                 html: "<!doctype html><html><frameset></frameset></html><!--foo-->"
4456                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n| <!-- foo -->\n"
4457         }, {
4458                 name: "tests19.dat #45"
4459                 html: "<!doctype html><html><frameset></frameset></html>  "
4460                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|   \"  \"\n"
4461         }, {
4462                 name: "tests19.dat #46"
4463                 html: "<!doctype html><html><frameset></frameset></html>abc"
4464                 errors: 3
4465                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
4466         }, {
4467                 name: "tests19.dat #47"
4468                 html: "<!doctype html><html><frameset></frameset></html><p>"
4469                 errors: 1
4470                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
4471         }, {
4472                 name: "tests19.dat #48"
4473                 html: "<!doctype html><html><frameset></frameset></html></p>"
4474                 errors: 1
4475                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
4476         }, {
4477                 name: "tests19.dat #49"
4478                 html: "<html><frameset></frameset></html><!doctype html>"
4479                 errors: 2
4480                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
4481         }, {
4482                 name: "tests19.dat #50"
4483                 html: "<!doctype html><body><frameset>"
4484                 errors: 1
4485                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
4486         }, {
4487                 name: "tests19.dat #51"
4488                 html: "<!doctype html><p><frameset><frame>"
4489                 errors: 2
4490                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n"
4491         }, {
4492                 name: "tests19.dat #52"
4493                 html: "<!doctype html><p>a<frameset>"
4494                 errors: 1
4495                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       \"a\"\n"
4496         }, {
4497                 name: "tests19.dat #53"
4498                 html: "<!doctype html><p> <frameset><frame>"
4499                 errors: 2
4500                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n"
4501         }, {
4502                 name: "tests19.dat #54"
4503                 html: "<!doctype html><pre><frameset>"
4504                 errors: 2
4505                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n"
4506         }, {
4507                 name: "tests19.dat #55"
4508                 html: "<!doctype html><listing><frameset>"
4509                 errors: 2
4510                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <listing>\n"
4511         }, {
4512                 name: "tests19.dat #56"
4513                 html: "<!doctype html><li><frameset>"
4514                 errors: 1
4515                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <li>\n"
4516         }, {
4517                 name: "tests19.dat #57"
4518                 html: "<!doctype html><dd><frameset>"
4519                 errors: 1
4520                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <dd>\n"
4521         }, {
4522                 name: "tests19.dat #58"
4523                 html: "<!doctype html><dt><frameset>"
4524                 errors: 1
4525                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <dt>\n"
4526         }, {
4527                 name: "tests19.dat #59"
4528                 html: "<!doctype html><button><frameset>"
4529                 errors: 2
4530                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <button>\n"
4531         }, {
4532                 name: "tests19.dat #60"
4533                 html: "<!doctype html><applet><frameset>"
4534                 errors: 2
4535                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <applet>\n"
4536         }, {
4537                 name: "tests19.dat #61"
4538                 html: "<!doctype html><marquee><frameset>"
4539                 errors: 2
4540                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <marquee>\n"
4541         }, {
4542                 name: "tests19.dat #62"
4543                 html: "<!doctype html><object><frameset>"
4544                 errors: 2
4545                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <object>\n"
4546         }, {
4547                 name: "tests19.dat #63"
4548                 html: "<!doctype html><table><frameset>"
4549                 errors: 3
4550                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n"
4551         }, {
4552                 name: "tests19.dat #64"
4553                 html: "<!doctype html><area><frameset>"
4554                 errors: 1
4555                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <area>\n"
4556         }, {
4557                 name: "tests19.dat #65"
4558                 html: "<!doctype html><basefont><frameset>"
4559                 errors: 1
4560                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <basefont>\n|   <frameset>\n"
4561         }, {
4562                 name: "tests19.dat #66"
4563                 html: "<!doctype html><bgsound><frameset>"
4564                 errors: 1
4565                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <bgsound>\n|   <frameset>\n"
4566         }, {
4567                 name: "tests19.dat #67"
4568                 html: "<!doctype html><br><frameset>"
4569                 errors: 1
4570                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <br>\n"
4571         }, {
4572                 name: "tests19.dat #68"
4573                 html: "<!doctype html><embed><frameset>"
4574                 errors: 1
4575                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <embed>\n"
4576         }, {
4577                 name: "tests19.dat #69"
4578                 html: "<!doctype html><img><frameset>"
4579                 errors: 1
4580                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <img>\n"
4581         }, {
4582                 name: "tests19.dat #70"
4583                 html: "<!doctype html><input><frameset>"
4584                 errors: 1
4585                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <input>\n"
4586         }, {
4587                 name: "tests19.dat #71"
4588                 html: "<!doctype html><keygen><frameset>"
4589                 errors: 1
4590                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <keygen>\n"
4591         }, {
4592                 name: "tests19.dat #72"
4593                 html: "<!doctype html><wbr><frameset>"
4594                 errors: 1
4595                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <wbr>\n"
4596         }, {
4597                 name: "tests19.dat #73"
4598                 html: "<!doctype html><hr><frameset>"
4599                 errors: 1
4600                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <hr>\n"
4601         }, {
4602                 name: "tests19.dat #74"
4603                 html: "<!doctype html><textarea></textarea><frameset>"
4604                 errors: 1
4605                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n"
4606         }, {
4607                 name: "tests19.dat #75"
4608                 html: "<!doctype html><xmp></xmp><frameset>"
4609                 errors: 1
4610                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <xmp>\n"
4611         }, {
4612                 name: "tests19.dat #76"
4613                 html: "<!doctype html><iframe></iframe><frameset>"
4614                 errors: 1
4615                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <iframe>\n"
4616         }, {
4617                 name: "tests19.dat #77"
4618                 html: "<!doctype html><select></select><frameset>"
4619                 errors: 1
4620                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4621         }, {
4622                 name: "tests19.dat #78"
4623                 html: "<!doctype html><svg></svg><frameset><frame>"
4624                 errors: 2
4625                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n"
4626         }, {
4627                 name: "tests19.dat #79"
4628                 html: "<!doctype html><math></math><frameset><frame>"
4629                 errors: 2
4630                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n"
4631         }, {
4632                 name: "tests19.dat #80"
4633                 html: "<!doctype html><svg><foreignObject><div> <frameset><frame>"
4634                 errors: 2
4635                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n"
4636         }, {
4637                 name: "tests19.dat #81"
4638                 html: "<!doctype html><svg>a</svg><frameset><frame>"
4639                 errors: 2
4640                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"a\"\n"
4641         }, {
4642                 name: "tests19.dat #82"
4643                 html: "<!doctype html><svg> </svg><frameset><frame>"
4644                 errors: 2
4645                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n"
4646         }, {
4647                 name: "tests19.dat #83"
4648                 html: "<html>aaa<frameset></frameset>"
4649                 errors: 3
4650                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"aaa\"\n"
4651         }, {
4652                 name: "tests19.dat #84"
4653                 html: "<html> a <frameset></frameset>"
4654                 errors: 3
4655                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"a \"\n"
4656         }, {
4657                 name: "tests19.dat #85"
4658                 html: "<!doctype html><div><frameset>"
4659                 errors: 2
4660                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
4661         }, {
4662                 name: "tests19.dat #86"
4663                 html: "<!doctype html><div><body><frameset>"
4664                 errors: 3
4665                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <div>\n"
4666         }, {
4667                 name: "tests19.dat #87"
4668                 html: "<!doctype html><p><math></p>a"
4669                 errors: 2
4670                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <math math>\n|     \"a\"\n"
4671         }, {
4672                 name: "tests19.dat #88"
4673                 html: "<!doctype html><p><math><mn><span></p>a"
4674                 errors: 2
4675                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <math math>\n|         <math mn>\n|           <span>\n|             <p>\n|             \"a\"\n"
4676         }, {
4677                 name: "tests19.dat #89"
4678                 html: "<!doctype html><math></html>"
4679                 errors: 3
4680                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n"
4681         }, {
4682                 name: "tests19.dat #90"
4683                 html: "<!doctype html><meta charset=\"ascii\">"
4684                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <meta>\n|       charset=\"ascii\"\n|   <body>\n"
4685         }, {
4686                 name: "tests19.dat #91"
4687                 html: "<!doctype html><meta http-equiv=\"content-type\" content=\"text/html;charset=ascii\">"
4688                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <meta>\n|       content=\"text/html;charset=ascii\"\n|       http-equiv=\"content-type\"\n|   <body>\n"
4689         }, {
4690                 name: "tests19.dat #92"
4691                 html: "<!doctype html><head><!--aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa--><meta charset=\"utf8\">"
4692                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <!-- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -->\n|     <meta>\n|       charset=\"utf8\"\n|   <body>\n"
4693         }, {
4694                 name: "tests19.dat #93"
4695                 html: "<!doctype html><html a=b><head></head><html c=d>"
4696                 errors: 1
4697                 expected: "| <!DOCTYPE html>\n| <html>\n|   a=\"b\"\n|   c=\"d\"\n|   <head>\n|   <body>\n"
4698         }, {
4699                 name: "tests19.dat #94"
4700                 html: "<!doctype html><image/>"
4701                 errors: 1
4702                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <img>\n"
4703         }, {
4704                 name: "tests19.dat #95"
4705                 html: "<!doctype html>a<i>b<table>c<b>d</i>e</b>f"
4706                 errors: 9
4707                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"a\"\n|     <i>\n|       \"bc\"\n|       <b>\n|         \"de\"\n|       \"f\"\n|       <table>\n"
4708         }, {
4709                 name: "tests19.dat #96"
4710                 html: "<!doctype html><table><i>a<b>b<div>c<a>d</i>e</b>f"
4711                 errors: 17
4712                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <i>\n|       \"a\"\n|       <b>\n|         \"b\"\n|     <b>\n|     <div>\n|       <b>\n|         <i>\n|           \"c\"\n|           <a>\n|             \"d\"\n|         <a>\n|           \"e\"\n|       <a>\n|         \"f\"\n|     <table>\n"
4713         }, {
4714                 name: "tests19.dat #97"
4715                 html: "<!doctype html><i>a<b>b<div>c<a>d</i>e</b>f"
4716                 errors: 5
4717                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <i>\n|       \"a\"\n|       <b>\n|         \"b\"\n|     <b>\n|     <div>\n|       <b>\n|         <i>\n|           \"c\"\n|           <a>\n|             \"d\"\n|         <a>\n|           \"e\"\n|       <a>\n|         \"f\"\n"
4718         }, {
4719                 name: "tests19.dat #98"
4720                 html: "<!doctype html><table><i>a<b>b<div>c</i>"
4721                 errors: 9
4722                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <i>\n|       \"a\"\n|       <b>\n|         \"b\"\n|     <b>\n|       <div>\n|         <i>\n|           \"c\"\n|     <table>\n"
4723         }, {
4724                 name: "tests19.dat #99"
4725                 html: "<!doctype html><table><i>a<b>b<div>c<a>d</i>e</b>f"
4726                 errors: 17
4727                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <i>\n|       \"a\"\n|       <b>\n|         \"b\"\n|     <b>\n|     <div>\n|       <b>\n|         <i>\n|           \"c\"\n|           <a>\n|             \"d\"\n|         <a>\n|           \"e\"\n|       <a>\n|         \"f\"\n|     <table>\n"
4728         }, {
4729                 name: "tests19.dat #100"
4730                 html: "<!doctype html><table><i>a<div>b<tr>c<b>d</i>e"
4731                 errors: 11
4732                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <i>\n|       \"a\"\n|       <div>\n|         \"b\"\n|     <i>\n|       \"c\"\n|       <b>\n|         \"d\"\n|     <b>\n|       \"e\"\n|     <table>\n|       <tbody>\n|         <tr>\n"
4733         }, {
4734                 name: "tests19.dat #101"
4735                 html: "<!doctype html><table><td><table><i>a<div>b<b>c</i>d"
4736                 errors: 12
4737                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <i>\n|               \"a\"\n|             <div>\n|               <i>\n|                 \"b\"\n|                 <b>\n|                   \"c\"\n|               <b>\n|                 \"d\"\n|             <table>\n"
4738         }, {
4739                 name: "tests19.dat #102"
4740                 html: "<!doctype html><body><bgsound>"
4741                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <bgsound>\n"
4742         }, {
4743                 name: "tests19.dat #103"
4744                 html: "<!doctype html><body><basefont>"
4745                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <basefont>\n"
4746         }, {
4747                 name: "tests19.dat #104"
4748                 html: "<!doctype html><a><b></a><basefont>"
4749                 errors: 1
4750                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <a>\n|       <b>\n|     <basefont>\n"
4751         }, {
4752                 name: "tests19.dat #105"
4753                 html: "<!doctype html><a><b></a><bgsound>"
4754                 errors: 1
4755                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <a>\n|       <b>\n|     <bgsound>\n"
4756         }, {
4757                 name: "tests19.dat #106"
4758                 html: "<!doctype html><figcaption><article></figcaption>a"
4759                 errors: 1
4760                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <figcaption>\n|       <article>\n|     \"a\"\n"
4761         }, {
4762                 name: "tests19.dat #107"
4763                 html: "<!doctype html><summary><article></summary>a"
4764                 errors: 1
4765                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <summary>\n|       <article>\n|     \"a\"\n"
4766         }, {
4767                 name: "tests19.dat #108"
4768                 html: "<!doctype html><p><a><plaintext>b"
4769                 errors: 2
4770                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <a>\n|     <plaintext>\n|       <a>\n|         \"b\"\n"
4771         }, {
4772                 name: "tests19.dat #109"
4773                 html: "<!DOCTYPE html><div>a<a></div>b<p>c</p>d"
4774                 errors: 2
4775                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"a\"\n|       <a>\n|     <a>\n|       \"b\"\n|       <p>\n|         \"c\"\n|       \"d\"\n"
4776         }, {
4777                 name: "tests1.dat #1"
4778                 html: "Test"
4779                 errors: 1
4780                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"Test\"\n"
4781         }, {
4782                 name: "tests1.dat #2"
4783                 html: "<p>One<p>Two"
4784                 errors: 1
4785                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       \"One\"\n|     <p>\n|       \"Two\"\n"
4786         }, {
4787                 name: "tests1.dat #3"
4788                 html: "Line1<br>Line2<br>Line3<br>Line4"
4789                 errors: 1
4790                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"Line1\"\n|     <br>\n|     \"Line2\"\n|     <br>\n|     \"Line3\"\n|     <br>\n|     \"Line4\"\n"
4791         }, {
4792                 name: "tests1.dat #4"
4793                 html: "<html>"
4794                 errors: 1
4795                 expected: "| <html>\n|   <head>\n|   <body>\n"
4796         }, {
4797                 name: "tests1.dat #5"
4798                 html: "<head>"
4799                 errors: 1
4800                 expected: "| <html>\n|   <head>\n|   <body>\n"
4801         }, {
4802                 name: "tests1.dat #6"
4803                 html: "<body>"
4804                 errors: 1
4805                 expected: "| <html>\n|   <head>\n|   <body>\n"
4806         }, {
4807                 name: "tests1.dat #7"
4808                 html: "<html><head>"
4809                 errors: 1
4810                 expected: "| <html>\n|   <head>\n|   <body>\n"
4811         }, {
4812                 name: "tests1.dat #8"
4813                 html: "<html><head></head>"
4814                 errors: 1
4815                 expected: "| <html>\n|   <head>\n|   <body>\n"
4816         }, {
4817                 name: "tests1.dat #9"
4818                 html: "<html><head></head><body>"
4819                 errors: 1
4820                 expected: "| <html>\n|   <head>\n|   <body>\n"
4821         }, {
4822                 name: "tests1.dat #10"
4823                 html: "<html><head></head><body></body>"
4824                 errors: 1
4825                 expected: "| <html>\n|   <head>\n|   <body>\n"
4826         }, {
4827                 name: "tests1.dat #11"
4828                 html: "<html><head><body></body></html>"
4829                 errors: 1
4830                 expected: "| <html>\n|   <head>\n|   <body>\n"
4831         }, {
4832                 name: "tests1.dat #12"
4833                 html: "<html><head></body></html>"
4834                 errors: 1
4835                 expected: "| <html>\n|   <head>\n|   <body>\n"
4836         }, {
4837                 name: "tests1.dat #13"
4838                 html: "<html><head><body></html>"
4839                 errors: 1
4840                 expected: "| <html>\n|   <head>\n|   <body>\n"
4841         }, {
4842                 name: "tests1.dat #14"
4843                 html: "<html><body></html>"
4844                 errors: 1
4845                 expected: "| <html>\n|   <head>\n|   <body>\n"
4846         }, {
4847                 name: "tests1.dat #15"
4848                 html: "<body></html>"
4849                 errors: 1
4850                 expected: "| <html>\n|   <head>\n|   <body>\n"
4851         }, {
4852                 name: "tests1.dat #16"
4853                 html: "<head></html>"
4854                 errors: 1
4855                 expected: "| <html>\n|   <head>\n|   <body>\n"
4856         }, {
4857                 name: "tests1.dat #17"
4858                 html: "</head>"
4859                 errors: 1
4860                 expected: "| <html>\n|   <head>\n|   <body>\n"
4861         }, {
4862                 name: "tests1.dat #18"
4863                 html: "</body>"
4864                 errors: 1
4865                 expected: "| <html>\n|   <head>\n|   <body>\n"
4866         }, {
4867                 name: "tests1.dat #19"
4868                 html: "</html>"
4869                 errors: 1
4870                 expected: "| <html>\n|   <head>\n|   <body>\n"
4871         }, {
4872                 name: "tests1.dat #20"
4873                 html: "<b><table><td><i></table>"
4874                 errors: 4
4875                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <table>\n|         <tbody>\n|           <tr>\n|             <td>\n|               <i>\n"
4876         }, {
4877                 name: "tests1.dat #21"
4878                 html: "<b><table><td></b><i></table>X"
4879                 errors: 5
4880                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <table>\n|         <tbody>\n|           <tr>\n|             <td>\n|               <i>\n|       \"X\"\n"
4881         }, {
4882                 name: "tests1.dat #22"
4883                 html: "<h1>Hello<h2>World"
4884                 errors: 3
4885                 expected: "| <html>\n|   <head>\n|   <body>\n|     <h1>\n|       \"Hello\"\n|     <h2>\n|       \"World\"\n"
4886         }, {
4887                 name: "tests1.dat #23"
4888                 html: "<a><p>X<a>Y</a>Z</p></a>"
4889                 errors: 4
4890                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|     <p>\n|       <a>\n|         \"X\"\n|       <a>\n|         \"Y\"\n|       \"Z\"\n"
4891         }, {
4892                 name: "tests1.dat #24"
4893                 html: "<b><button>foo</b>bar"
4894                 errors: 3
4895                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|     <button>\n|       <b>\n|         \"foo\"\n|       \"bar\"\n"
4896         }, {
4897                 name: "tests1.dat #25"
4898                 html: "<!DOCTYPE html><span><button>foo</span>bar"
4899                 errors: 2
4900                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <span>\n|       <button>\n|         \"foobar\"\n"
4901         }, {
4902                 name: "tests1.dat #26"
4903                 html: "<p><b><div><marquee></p></b></div>X"
4904                 errors: 6
4905                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <b>\n|     <div>\n|       <b>\n|         <marquee>\n|           <p>\n|           \"X\"\n"
4906         }, {
4907                 name: "tests1.dat #27"
4908                 html: "<script><div></script></div><title><p></title><p><p>"
4909                 errors: 2
4910                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<div>\"\n|     <title>\n|       \"<p>\"\n|   <body>\n|     <p>\n|     <p>\n"
4911         }, {
4912                 name: "tests1.dat #28"
4913                 html: "<!--><div>--<!-->"
4914                 errors: 4
4915                 expected: "| <!--  -->\n| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"--\"\n|       <!--  -->\n"
4916         }, {
4917                 name: "tests1.dat #29"
4918                 html: "<p><hr></p>"
4919                 errors: 2
4920                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <hr>\n|     <p>\n"
4921         }, {
4922                 name: "tests1.dat #30"
4923                 html: "<select><b><option><select><option></b></select>X"
4924                 errors: 6
4925                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n|     <option>\n|       \"X\"\n"
4926         }, {
4927                 name: "tests1.dat #31"
4928                 html: "<a><table><td><a><table></table><a></tr><a></table><b>X</b>C<a>Y"
4929                 errors: 9
4930                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       <a>\n|       <table>\n|         <tbody>\n|           <tr>\n|             <td>\n|               <a>\n|                 <table>\n|               <a>\n|     <a>\n|       <b>\n|         \"X\"\n|       \"C\"\n|     <a>\n|       \"Y\"\n"
4931         }, {
4932                 name: "tests1.dat #32"
4933                 html: "<a X>0<b>1<a Y>2"
4934                 errors: 4
4935                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       x=\"\"\n|       \"0\"\n|       <b>\n|         \"1\"\n|     <b>\n|       <a>\n|         y=\"\"\n|         \"2\"\n"
4936         }, {
4937                 name: "tests1.dat #33"
4938                 html: "<!-----><font><div>hello<table>excite!<b>me!<th><i>please!</tr><!--X-->"
4939                 errors: 16
4940                 expected: "| <!-- - -->\n| <html>\n|   <head>\n|   <body>\n|     <font>\n|       <div>\n|         \"helloexcite!\"\n|         <b>\n|           \"me!\"\n|         <table>\n|           <tbody>\n|             <tr>\n|               <th>\n|                 <i>\n|                   \"please!\"\n|             <!-- X -->\n"
4941         }, {
4942                 name: "tests1.dat #34"
4943                 html: "<!DOCTYPE html><li>hello<li>world<ul>how<li>do</ul>you</body><!--do-->"
4944                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <li>\n|       \"hello\"\n|     <li>\n|       \"world\"\n|       <ul>\n|         \"how\"\n|         <li>\n|           \"do\"\n|       \"you\"\n|   <!-- do -->\n"
4945         }, {
4946                 name: "tests1.dat #35"
4947                 html: "<!DOCTYPE html>A<option>B<optgroup>C<select>D</option>E"
4948                 errors: 2
4949                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"A\"\n|     <option>\n|       \"B\"\n|     <optgroup>\n|       \"C\"\n|       <select>\n|         \"DE\"\n"
4950         }, {
4951                 name: "tests1.dat #36"
4952                 html: "<"
4953                 errors: 2
4954                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"<\"\n"
4955         }, {
4956                 name: "tests1.dat #37"
4957                 html: "<#"
4958                 errors: 2
4959                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"<#\"\n"
4960         }, {
4961                 name: "tests1.dat #38"
4962                 html: "</"
4963                 errors: 2
4964                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"</\"\n"
4965         }, {
4966                 name: "tests1.dat #39"
4967                 html: "</#"
4968                 errors: 2
4969                 expected: "| <!-- # -->\n| <html>\n|   <head>\n|   <body>\n"
4970         }, {
4971                 name: "tests1.dat #40"
4972                 html: "<?"
4973                 errors: 2
4974                 expected: "| <!-- ? -->\n| <html>\n|   <head>\n|   <body>\n"
4975         }, {
4976                 name: "tests1.dat #41"
4977                 html: "<?#"
4978                 errors: 2
4979                 expected: "| <!-- ?# -->\n| <html>\n|   <head>\n|   <body>\n"
4980         }, {
4981                 name: "tests1.dat #42"
4982                 html: "<!"
4983                 errors: 2
4984                 expected: "| <!--  -->\n| <html>\n|   <head>\n|   <body>\n"
4985         }, {
4986                 name: "tests1.dat #43"
4987                 html: "<!#"
4988                 errors: 2
4989                 expected: "| <!-- # -->\n| <html>\n|   <head>\n|   <body>\n"
4990         }, {
4991                 name: "tests1.dat #44"
4992                 html: "<?COMMENT?>"
4993                 errors: 2
4994                 expected: "| <!-- ?COMMENT? -->\n| <html>\n|   <head>\n|   <body>\n"
4995         }, {
4996                 name: "tests1.dat #45"
4997                 html: "<!COMMENT>"
4998                 errors: 2
4999                 expected: "| <!-- COMMENT -->\n| <html>\n|   <head>\n|   <body>\n"
5000         }, {
5001                 name: "tests1.dat #46"
5002                 html: "</ COMMENT >"
5003                 errors: 2
5004                 expected: "| <!--  COMMENT  -->\n| <html>\n|   <head>\n|   <body>\n"
5005         }, {
5006                 name: "tests1.dat #47"
5007                 html: "<?COM--MENT?>"
5008                 errors: 2
5009                 expected: "| <!-- ?COM--MENT? -->\n| <html>\n|   <head>\n|   <body>\n"
5010         }, {
5011                 name: "tests1.dat #48"
5012                 html: "<!COM--MENT>"
5013                 errors: 2
5014                 expected: "| <!-- COM--MENT -->\n| <html>\n|   <head>\n|   <body>\n"
5015         }, {
5016                 name: "tests1.dat #49"
5017                 html: "</ COM--MENT >"
5018                 errors: 2
5019                 expected: "| <!--  COM--MENT  -->\n| <html>\n|   <head>\n|   <body>\n"
5020         }, {
5021                 name: "tests1.dat #50"
5022                 html: "<!DOCTYPE html><style> EOF"
5023                 errors: 1
5024                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <style>\n|       \" EOF\"\n|   <body>\n"
5025         }, {
5026                 name: "tests1.dat #51"
5027                 html: "<!DOCTYPE html><script> <!-- </script> --> </script> EOF"
5028                 errors: 1
5029                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \" <!-- \"\n|     \" \"\n|   <body>\n|     \"-->  EOF\"\n"
5030         }, {
5031                 name: "tests1.dat #52"
5032                 html: "<b><p></b>TEST"
5033                 errors: 2
5034                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|     <p>\n|       <b>\n|       \"TEST\"\n"
5035         }, {
5036                 name: "tests1.dat #53"
5037                 html: "<p id=a><b><p id=b></b>TEST"
5038                 errors: 3
5039                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       id=\"a\"\n|       <b>\n|     <p>\n|       id=\"b\"\n|       \"TEST\"\n"
5040         }, {
5041                 name: "tests1.dat #54"
5042                 html: "<b id=a><p><b id=b></p></b>TEST"
5043                 errors: 4
5044                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       id=\"a\"\n|       <p>\n|         <b>\n|           id=\"b\"\n|       \"TEST\"\n"
5045         }, {
5046                 name: "tests1.dat #55"
5047                 html: "<!DOCTYPE html><title>U-test</title><body><div><p>Test<u></p></div></body>"
5048                 errors: 1
5049                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <title>\n|       \"U-test\"\n|   <body>\n|     <div>\n|       <p>\n|         \"Test\"\n|         <u>\n"
5050         }, {
5051                 name: "tests1.dat #56"
5052                 html: "<!DOCTYPE html><font><table></font></table></font>"
5053                 errors: 2
5054                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <font>\n|       <table>\n"
5055         }, {
5056                 name: "tests1.dat #57"
5057                 html: "<font><p>hello<b>cruel</font>world"
5058                 errors: 4
5059                 expected: "| <html>\n|   <head>\n|   <body>\n|     <font>\n|     <p>\n|       <font>\n|         \"hello\"\n|         <b>\n|           \"cruel\"\n|       <b>\n|         \"world\"\n"
5060         }, {
5061                 name: "tests1.dat #58"
5062                 html: "<b>Test</i>Test"
5063                 errors: 3
5064                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       \"TestTest\"\n"
5065         }, {
5066                 name: "tests1.dat #59"
5067                 html: "<b>A<cite>B<div>C"
5068                 errors: 2
5069                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       \"A\"\n|       <cite>\n|         \"B\"\n|         <div>\n|           \"C\"\n"
5070         }, {
5071                 name: "tests1.dat #60"
5072                 html: "<b>A<cite>B<div>C</cite>D"
5073                 errors: 3
5074                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       \"A\"\n|       <cite>\n|         \"B\"\n|         <div>\n|           \"CD\"\n"
5075         }, {
5076                 name: "tests1.dat #61"
5077                 html: "<b>A<cite>B<div>C</b>D"
5078                 errors: 3
5079                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       \"A\"\n|       <cite>\n|         \"B\"\n|     <div>\n|       <b>\n|         \"C\"\n|       \"D\"\n"
5080         }, {
5081                 name: "tests1.dat #62"
5082                 html: ""
5083                 errors: 1
5084                 expected: "| <html>\n|   <head>\n|   <body>\n"
5085         }, {
5086                 name: "tests1.dat #63"
5087                 html: "<DIV>"
5088                 errors: 2
5089                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n"
5090         }, {
5091                 name: "tests1.dat #64"
5092                 html: "<DIV> abc"
5093                 errors: 2
5094                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc\"\n"
5095         }, {
5096                 name: "tests1.dat #65"
5097                 html: "<DIV> abc <B>"
5098                 errors: 2
5099                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n"
5100         }, {
5101                 name: "tests1.dat #66"
5102                 html: "<DIV> abc <B> def"
5103                 errors: 2
5104                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n|         \" def\"\n"
5105         }, {
5106                 name: "tests1.dat #67"
5107                 html: "<DIV> abc <B> def <I>"
5108                 errors: 2
5109                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n|         \" def \"\n|         <i>\n"
5110         }, {
5111                 name: "tests1.dat #68"
5112                 html: "<DIV> abc <B> def <I> ghi"
5113                 errors: 2
5114                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n|         \" def \"\n|         <i>\n|           \" ghi\"\n"
5115         }, {
5116                 name: "tests1.dat #69"
5117                 html: "<DIV> abc <B> def <I> ghi <P>"
5118                 errors: 2
5119                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n|         \" def \"\n|         <i>\n|           \" ghi \"\n|           <p>\n"
5120         }, {
5121                 name: "tests1.dat #70"
5122                 html: "<DIV> abc <B> def <I> ghi <P> jkl"
5123                 errors: 2
5124                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n|         \" def \"\n|         <i>\n|           \" ghi \"\n|           <p>\n|             \" jkl\"\n"
5125         }, {
5126                 name: "tests1.dat #71"
5127                 html: "<DIV> abc <B> def <I> ghi <P> jkl </B>"
5128                 errors: 3
5129                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n|         \" def \"\n|         <i>\n|           \" ghi \"\n|       <i>\n|         <p>\n|           <b>\n|             \" jkl \"\n"
5130         }, {
5131                 name: "tests1.dat #72"
5132                 html: "<DIV> abc <B> def <I> ghi <P> jkl </B> mno"
5133                 errors: 3
5134                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n|         \" def \"\n|         <i>\n|           \" ghi \"\n|       <i>\n|         <p>\n|           <b>\n|             \" jkl \"\n|           \" mno\"\n"
5135         }, {
5136                 name: "tests1.dat #73"
5137                 html: "<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I>"
5138                 errors: 4
5139                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n|         \" def \"\n|         <i>\n|           \" ghi \"\n|       <i>\n|       <p>\n|         <i>\n|           <b>\n|             \" jkl \"\n|           \" mno \"\n"
5140         }, {
5141                 name: "tests1.dat #74"
5142                 html: "<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I> pqr"
5143                 errors: 4
5144                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n|         \" def \"\n|         <i>\n|           \" ghi \"\n|       <i>\n|       <p>\n|         <i>\n|           <b>\n|             \" jkl \"\n|           \" mno \"\n|         \" pqr\"\n"
5145         }, {
5146                 name: "tests1.dat #75"
5147                 html: "<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I> pqr </P>"
5148                 errors: 4
5149                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n|         \" def \"\n|         <i>\n|           \" ghi \"\n|       <i>\n|       <p>\n|         <i>\n|           <b>\n|             \" jkl \"\n|           \" mno \"\n|         \" pqr \"\n"
5150         }, {
5151                 name: "tests1.dat #76"
5152                 html: "<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I> pqr </P> stu"
5153                 errors: 4
5154                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n|         \" def \"\n|         <i>\n|           \" ghi \"\n|       <i>\n|       <p>\n|         <i>\n|           <b>\n|             \" jkl \"\n|           \" mno \"\n|         \" pqr \"\n|       \" stu\"\n"
5155         }, {
5156                 name: "tests1.dat #77"
5157                 html: "<test attribute---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->"
5158                 errors: 2
5159                 expected: "| <html>\n|   <head>\n|   <body>\n|     <test>\n|       attribute----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------=\"\"\n"
5160         }, {
5161                 name: "tests1.dat #78"
5162                 html: "<a href=\"blah\">aba<table><a href=\"foo\">br<tr><td></td></tr>x</table>aoe"
5163                 errors: 8
5164                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       href=\"blah\"\n|       \"aba\"\n|       <a>\n|         href=\"foo\"\n|         \"br\"\n|       <a>\n|         href=\"foo\"\n|         \"x\"\n|       <table>\n|         <tbody>\n|           <tr>\n|             <td>\n|     <a>\n|       href=\"foo\"\n|       \"aoe\"\n"
5165         }, {
5166                 name: "tests1.dat #79"
5167                 html: "<a href=\"blah\">aba<table><tr><td><a href=\"foo\">br</td></tr>x</table>aoe"
5168                 errors: 4
5169                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       href=\"blah\"\n|       \"abax\"\n|       <table>\n|         <tbody>\n|           <tr>\n|             <td>\n|               <a>\n|                 href=\"foo\"\n|                 \"br\"\n|       \"aoe\"\n"
5170         }, {
5171                 name: "tests1.dat #80"
5172                 html: "<table><a href=\"blah\">aba<tr><td><a href=\"foo\">br</td></tr>x</table>aoe"
5173                 errors: 8
5174                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       href=\"blah\"\n|       \"aba\"\n|     <a>\n|       href=\"blah\"\n|       \"x\"\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <a>\n|               href=\"foo\"\n|               \"br\"\n|     <a>\n|       href=\"blah\"\n|       \"aoe\"\n"
5175         }, {
5176                 name: "tests1.dat #81"
5177                 html: "<a href=a>aa<marquee>aa<a href=b>bb</marquee>aa"
5178                 errors: 3
5179                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       href=\"a\"\n|       \"aa\"\n|       <marquee>\n|         \"aa\"\n|         <a>\n|           href=\"b\"\n|           \"bb\"\n|       \"aa\"\n"
5180         }, {
5181                 name: "tests1.dat #82"
5182                 html: "<wbr><strike><code></strike><code><strike></code>"
5183                 errors: 4
5184                 expected: "| <html>\n|   <head>\n|   <body>\n|     <wbr>\n|     <strike>\n|       <code>\n|     <code>\n|       <code>\n|         <strike>\n"
5185         }, {
5186                 name: "tests1.dat #83"
5187                 html: "<!DOCTYPE html><spacer>foo"
5188                 errors: 1
5189                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <spacer>\n|       \"foo\"\n"
5190         }, {
5191                 name: "tests1.dat #84"
5192                 html: "<title><meta></title><link><title><meta></title>"
5193                 errors: 1
5194                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"<meta>\"\n|     <link>\n|     <title>\n|       \"<meta>\"\n|   <body>\n"
5195         }, {
5196                 name: "tests1.dat #85"
5197                 html: "<style><!--</style><meta><script>--><link></script>"
5198                 errors: 1
5199                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--\"\n|     <meta>\n|     <script>\n|       \"--><link>\"\n|   <body>\n"
5200         }, {
5201                 name: "tests1.dat #86"
5202                 html: "<head><meta></head><link>"
5203                 errors: 2
5204                 expected: "| <html>\n|   <head>\n|     <meta>\n|     <link>\n|   <body>\n"
5205         }, {
5206                 name: "tests1.dat #87"
5207                 html: "<table><tr><tr><td><td><span><th><span>X</table>"
5208                 errors: 3
5209                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|         <tr>\n|           <td>\n|           <td>\n|             <span>\n|           <th>\n|             <span>\n|               \"X\"\n"
5210         }, {
5211                 name: "tests1.dat #88"
5212                 html: "<body><body><base><link><meta><title><p></title><body><p></body>"
5213                 errors: 3
5214                 expected: "| <html>\n|   <head>\n|   <body>\n|     <base>\n|     <link>\n|     <meta>\n|     <title>\n|       \"<p>\"\n|     <p>\n"
5215         }, {
5216                 name: "tests1.dat #89"
5217                 html: "<textarea><p></textarea>"
5218                 errors: 1
5219                 expected: "| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"<p>\"\n"
5220         }, {
5221                 name: "tests1.dat #90"
5222                 html: "<p><image></p>"
5223                 errors: 2
5224                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <img>\n"
5225         }, {
5226                 name: "tests1.dat #91"
5227                 html: "<a><table><a></table><p><a><div><a>"
5228                 errors: 10
5229                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       <a>\n|       <table>\n|     <p>\n|       <a>\n|     <div>\n|       <a>\n"
5230         }, {
5231                 name: "tests1.dat #92"
5232                 html: "<head></p><meta><p>"
5233                 errors: 2
5234                 expected: "| <html>\n|   <head>\n|     <meta>\n|   <body>\n|     <p>\n"
5235         }, {
5236                 name: "tests1.dat #93"
5237                 html: "<head></html><meta><p>"
5238                 errors: 2
5239                 expected: "| <html>\n|   <head>\n|   <body>\n|     <meta>\n|     <p>\n"
5240         }, {
5241                 name: "tests1.dat #94"
5242                 html: "<b><table><td><i></table>"
5243                 errors: 4
5244                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <table>\n|         <tbody>\n|           <tr>\n|             <td>\n|               <i>\n"
5245         }, {
5246                 name: "tests1.dat #95"
5247                 html: "<b><table><td></b><i></table>"
5248                 errors: 5
5249                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <table>\n|         <tbody>\n|           <tr>\n|             <td>\n|               <i>\n"
5250         }, {
5251                 name: "tests1.dat #96"
5252                 html: "<h1><h2>"
5253                 errors: 3
5254                 expected: "| <html>\n|   <head>\n|   <body>\n|     <h1>\n|     <h2>\n"
5255         }, {
5256                 name: "tests1.dat #97"
5257                 html: "<a><p><a></a></p></a>"
5258                 errors: 4
5259                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|     <p>\n|       <a>\n|       <a>\n"
5260         }, {
5261                 name: "tests1.dat #98"
5262                 html: "<b><button></b></button></b>"
5263                 errors: 3
5264                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|     <button>\n|       <b>\n"
5265         }, {
5266                 name: "tests1.dat #99"
5267                 html: "<p><b><div><marquee></p></b></div>"
5268                 errors: 6
5269                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <b>\n|     <div>\n|       <b>\n|         <marquee>\n|           <p>\n"
5270         }, {
5271                 name: "tests1.dat #100"
5272                 html: "<script></script></div><title></title><p><p>"
5273                 errors: 2
5274                 expected: "| <html>\n|   <head>\n|     <script>\n|     <title>\n|   <body>\n|     <p>\n|     <p>\n"
5275         }, {
5276                 name: "tests1.dat #101"
5277                 html: "<p><hr></p>"
5278                 errors: 2
5279                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <hr>\n|     <p>\n"
5280         }, {
5281                 name: "tests1.dat #102"
5282                 html: "<select><b><option><select><option></b></select>"
5283                 errors: 6
5284                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n|     <option>\n"
5285         }, {
5286                 name: "tests1.dat #103"
5287                 html: "<html><head><title></title><body></body></html>"
5288                 errors: 1
5289                 expected: "| <html>\n|   <head>\n|     <title>\n|   <body>\n"
5290         }, {
5291                 name: "tests1.dat #104"
5292                 html: "<a><table><td><a><table></table><a></tr><a></table><a>"
5293                 errors: 10
5294                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       <a>\n|       <table>\n|         <tbody>\n|           <tr>\n|             <td>\n|               <a>\n|                 <table>\n|               <a>\n|     <a>\n"
5295         }, {
5296                 name: "tests1.dat #105"
5297                 html: "<ul><li></li><div><li></div><li><li><div><li><address><li><b><em></b><li></ul>"
5298                 errors: 4
5299                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ul>\n|       <li>\n|       <div>\n|         <li>\n|       <li>\n|       <li>\n|         <div>\n|       <li>\n|         <address>\n|       <li>\n|         <b>\n|           <em>\n|       <li>\n"
5300         }, {
5301                 name: "tests1.dat #106"
5302                 html: "<ul><li><ul></li><li>a</li></ul></li></ul>"
5303                 errors: 2
5304                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ul>\n|       <li>\n|         <ul>\n|           <li>\n|             \"a\"\n"
5305         }, {
5306                 name: "tests1.dat #107"
5307                 html: "<frameset><frame><frameset><frame></frameset><noframes></noframes></frameset>"
5308                 errors: 1
5309                 expected: "| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n|     <frameset>\n|       <frame>\n|     <noframes>\n"
5310         }, {
5311                 name: "tests1.dat #108"
5312                 html: "<h1><table><td><h3></table><h3></h1>"
5313                 errors: 5
5314                 expected: "| <html>\n|   <head>\n|   <body>\n|     <h1>\n|       <table>\n|         <tbody>\n|           <tr>\n|             <td>\n|               <h3>\n|     <h3>\n"
5315         }, {
5316                 name: "tests1.dat #109"
5317                 html: "<table><colgroup><col><colgroup><col><col><col><colgroup><col><col><thead><tr><td></table>"
5318                 errors: 1
5319                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <colgroup>\n|         <col>\n|       <colgroup>\n|         <col>\n|         <col>\n|         <col>\n|       <colgroup>\n|         <col>\n|         <col>\n|       <thead>\n|         <tr>\n|           <td>\n"
5320         }, {
5321                 name: "tests1.dat #110"
5322                 html: "<table><col><tbody><col><tr><col><td><col></table><col>"
5323                 errors: 3
5324                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <colgroup>\n|         <col>\n|       <tbody>\n|       <colgroup>\n|         <col>\n|       <tbody>\n|         <tr>\n|       <colgroup>\n|         <col>\n|       <tbody>\n|         <tr>\n|           <td>\n|       <colgroup>\n|         <col>\n"
5325         }, {
5326                 name: "tests1.dat #111"
5327                 html: "<table><colgroup><tbody><colgroup><tr><colgroup><td><colgroup></table><colgroup>"
5328                 errors: 3
5329                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <colgroup>\n|       <tbody>\n|       <colgroup>\n|       <tbody>\n|         <tr>\n|       <colgroup>\n|       <tbody>\n|         <tr>\n|           <td>\n|       <colgroup>\n"
5330         }, {
5331                 name: "tests1.dat #112"
5332                 html: "</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>"
5333                 errors: 85
5334                 expected: "| <html>\n|   <head>\n|   <body>\n|     <br>\n|     <p>\n"
5335         }, {
5336                 name: "tests1.dat #113"
5337                 html: "<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>"
5338                 errors: 111
5339                 expected: "| <html>\n|   <head>\n|   <body>\n|     <br>\n|     <table>\n|       <tbody>\n|         <tr>\n|     <p>\n"
5340         }, {
5341                 name: "tests1.dat #114"
5342                 html: "<frameset>"
5343                 errors: 2
5344                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
5345         }, {
5346                 name: "tests20.dat #1"
5347                 html: "<!doctype html><p><button><button>"
5348                 errors: 2
5349                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|       <button>\n"
5350         }, {
5351                 name: "tests20.dat #2"
5352                 html: "<!doctype html><p><button><address>"
5353                 errors: 1
5354                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <address>\n"
5355         }, {
5356                 name: "tests20.dat #3"
5357                 html: "<!doctype html><p><button><blockquote>"
5358                 errors: 1
5359                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <blockquote>\n"
5360         }, {
5361                 name: "tests20.dat #4"
5362                 html: "<!doctype html><p><button><menu>"
5363                 errors: 1
5364                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <menu>\n"
5365         }, {
5366                 name: "tests20.dat #5"
5367                 html: "<!doctype html><p><button><p>"
5368                 errors: 1
5369                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <p>\n"
5370         }, {
5371                 name: "tests20.dat #6"
5372                 html: "<!doctype html><p><button><ul>"
5373                 errors: 1
5374                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <ul>\n"
5375         }, {
5376                 name: "tests20.dat #7"
5377                 html: "<!doctype html><p><button><h1>"
5378                 errors: 1
5379                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <h1>\n"
5380         }, {
5381                 name: "tests20.dat #8"
5382                 html: "<!doctype html><p><button><h6>"
5383                 errors: 1
5384                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <h6>\n"
5385         }, {
5386                 name: "tests20.dat #9"
5387                 html: "<!doctype html><p><button><listing>"
5388                 errors: 1
5389                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <listing>\n"
5390         }, {
5391                 name: "tests20.dat #10"
5392                 html: "<!doctype html><p><button><pre>"
5393                 errors: 1
5394                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <pre>\n"
5395         }, {
5396                 name: "tests20.dat #11"
5397                 html: "<!doctype html><p><button><form>"
5398                 errors: 1
5399                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <form>\n"
5400         }, {
5401                 name: "tests20.dat #12"
5402                 html: "<!doctype html><p><button><li>"
5403                 errors: 1
5404                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <li>\n"
5405         }, {
5406                 name: "tests20.dat #13"
5407                 html: "<!doctype html><p><button><dd>"
5408                 errors: 1
5409                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <dd>\n"
5410         }, {
5411                 name: "tests20.dat #14"
5412                 html: "<!doctype html><p><button><dt>"
5413                 errors: 1
5414                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <dt>\n"
5415         }, {
5416                 name: "tests20.dat #15"
5417                 html: "<!doctype html><p><button><plaintext>"
5418                 errors: 1
5419                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <plaintext>\n"
5420         }, {
5421                 name: "tests20.dat #16"
5422                 html: "<!doctype html><p><button><table>"
5423                 errors: 1
5424                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <table>\n"
5425         }, {
5426                 name: "tests20.dat #17"
5427                 html: "<!doctype html><p><button><hr>"
5428                 errors: 1
5429                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <hr>\n"
5430         }, {
5431                 name: "tests20.dat #18"
5432                 html: "<!doctype html><p><button><xmp>"
5433                 errors: 2
5434                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <xmp>\n"
5435         }, {
5436                 name: "tests20.dat #19"
5437                 html: "<!doctype html><p><button></p>"
5438                 errors: 2
5439                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <p>\n"
5440         }, {
5441                 name: "tests20.dat #20"
5442                 html: "<!doctype html><address><button></address>a"
5443                 errors: 1
5444                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <address>\n|       <button>\n|     \"a\"\n"
5445         }, {
5446                 name: "tests20.dat #21"
5447                 html: "<!doctype html><address><button></address>a"
5448                 errors: 1
5449                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <address>\n|       <button>\n|     \"a\"\n"
5450         }, {
5451                 name: "tests20.dat #22"
5452                 html: "<p><table></p>"
5453                 errors: 4
5454                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <p>\n|       <table>\n"
5455         }, {
5456                 name: "tests20.dat #23"
5457                 html: "<!doctype html><svg>"
5458                 errors: 1
5459                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n"
5460         }, {
5461                 name: "tests20.dat #24"
5462                 html: "<!doctype html><p><figcaption>"
5463                 errors: 1
5464                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <figcaption>\n"
5465         }, {
5466                 name: "tests20.dat #25"
5467                 html: "<!doctype html><p><summary>"
5468                 errors: 1
5469                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <summary>\n"
5470         }, {
5471                 name: "tests20.dat #26"
5472                 html: "<!doctype html><form><table><form>"
5473                 errors: 2
5474                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <form>\n|       <table>\n"
5475         }, {
5476                 name: "tests20.dat #27"
5477                 html: "<!doctype html><table><form><form>"
5478                 errors: 3
5479                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <form>\n"
5480         }, {
5481                 name: "tests20.dat #28"
5482                 html: "<!doctype html><table><form></table><form>"
5483                 errors: 2
5484                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <form>\n"
5485         }, {
5486                 name: "tests20.dat #29"
5487                 html: "<!doctype html><svg><foreignObject><p>"
5488                 errors: 1
5489                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg foreignObject>\n|         <p>\n"
5490         }, {
5491                 name: "tests20.dat #30"
5492                 html: "<!doctype html><svg><title>abc"
5493                 errors: 1
5494                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg title>\n|         \"abc\"\n"
5495         }, {
5496                 name: "tests20.dat #31"
5497                 html: "<option><span><option>"
5498                 errors: 2
5499                 expected: "| <html>\n|   <head>\n|   <body>\n|     <option>\n|       <span>\n|         <option>\n"
5500         }, {
5501                 name: "tests20.dat #32"
5502                 html: "<option><option>"
5503                 errors: 2
5504                 expected: "| <html>\n|   <head>\n|   <body>\n|     <option>\n|     <option>\n"
5505         }, {
5506                 name: "tests20.dat #33"
5507                 html: "<math><annotation-xml><div>"
5508                 errors: 3
5509                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|     <div>\n"
5510         }, {
5511                 name: "tests20.dat #34"
5512                 html: "<math><annotation-xml encoding=\"application/svg+xml\"><div>"
5513                 errors: 3
5514                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         encoding=\"application/svg+xml\"\n|     <div>\n"
5515         }, {
5516                 name: "tests20.dat #35"
5517                 html: "<math><annotation-xml encoding=\"application/xhtml+xml\"><div>"
5518                 errors: 2
5519                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         encoding=\"application/xhtml+xml\"\n|         <div>\n"
5520         }, {
5521                 name: "tests20.dat #36"
5522                 html: "<math><annotation-xml encoding=\"aPPlication/xhtmL+xMl\"><div>"
5523                 errors: 2
5524                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         encoding=\"aPPlication/xhtmL+xMl\"\n|         <div>\n"
5525         }, {
5526                 name: "tests20.dat #37"
5527                 html: "<math><annotation-xml encoding=\"text/html\"><div>"
5528                 errors: 2
5529                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         encoding=\"text/html\"\n|         <div>\n"
5530         }, {
5531                 name: "tests20.dat #38"
5532                 html: "<math><annotation-xml encoding=\"Text/htmL\"><div>"
5533                 errors: 2
5534                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         encoding=\"Text/htmL\"\n|         <div>\n"
5535         }, {
5536                 name: "tests20.dat #39"
5537                 html: "<math><annotation-xml encoding=\" text/html \"><div>"
5538                 errors: 3
5539                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         encoding=\" text/html \"\n|     <div>\n"
5540         }, {
5541                 name: "tests21.dat #1"
5542                 html: "<svg><![CDATA[foo]]>"
5543                 errors: 2
5544                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"foo\"\n"
5545         }, {
5546                 name: "tests21.dat #2"
5547                 html: "<math><![CDATA[foo]]>"
5548                 errors: 2
5549                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       \"foo\"\n"
5550         }, {
5551                 name: "tests21.dat #3"
5552                 html: "<div><![CDATA[foo]]>"
5553                 errors: 3
5554                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <!-- [CDATA[foo]] -->\n"
5555         }, {
5556                 name: "tests21.dat #4"
5557                 html: "<svg><![CDATA[foo"
5558                 errors: 2
5559                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"foo\"\n"
5560         }, {
5561                 name: "tests21.dat #5"
5562                 html: "<svg><![CDATA[foo"
5563                 errors: 2
5564                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"foo\"\n"
5565         }, {
5566                 name: "tests21.dat #6"
5567                 html: "<svg><![CDATA["
5568                 errors: 2
5569                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n"
5570         }, {
5571                 name: "tests21.dat #7"
5572                 html: "<svg><![CDATA[]]>"
5573                 errors: 2
5574                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n"
5575         }, {
5576                 name: "tests21.dat #8"
5577                 html: "<svg><![CDATA[]] >]]>"
5578                 errors: 2
5579                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"]] >\"\n"
5580         }, {
5581                 name: "tests21.dat #9"
5582                 html: "<svg><![CDATA[]] >]]>"
5583                 errors: 2
5584                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"]] >\"\n"
5585         }, {
5586                 name: "tests21.dat #10"
5587                 html: "<svg><![CDATA[]]"
5588                 errors: 2
5589                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"]]\"\n"
5590         }, {
5591                 name: "tests21.dat #11"
5592                 html: "<svg><![CDATA[]"
5593                 errors: 2
5594                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"]\"\n"
5595         }, {
5596                 name: "tests21.dat #12"
5597                 html: "<svg><![CDATA[]>a"
5598                 errors: 2
5599                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"]>a\"\n"
5600         }, {
5601                 name: "tests21.dat #13"
5602                 html: "<!DOCTYPE html><svg><![CDATA[foo]]]>"
5603                 errors: 1
5604                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"foo]\"\n"
5605         }, {
5606                 name: "tests21.dat #14"
5607                 html: "<!DOCTYPE html><svg><![CDATA[foo]]]]>"
5608                 errors: 1
5609                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"foo]]\"\n"
5610         }, {
5611                 name: "tests21.dat #15"
5612                 html: "<!DOCTYPE html><svg><![CDATA[foo]]]]]>"
5613                 errors: 1
5614                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"foo]]]\"\n"
5615         }, {
5616                 name: "tests21.dat #16"
5617                 html: "<svg><foreignObject><div><![CDATA[foo]]>"
5618                 errors: 3
5619                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg foreignObject>\n|         <div>\n|           <!-- [CDATA[foo]] -->\n"
5620         }, {
5621                 name: "tests21.dat #17"
5622                 html: "<svg><![CDATA[<svg>]]>"
5623                 errors: 2
5624                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"<svg>\"\n"
5625         }, {
5626                 name: "tests21.dat #18"
5627                 html: "<svg><![CDATA[</svg>a]]>"
5628                 errors: 2
5629                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"</svg>a\"\n"
5630         }, {
5631                 name: "tests21.dat #19"
5632                 html: "<svg><![CDATA[<svg>a"
5633                 errors: 2
5634                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"<svg>a\"\n"
5635         }, {
5636                 name: "tests21.dat #20"
5637                 html: "<svg><![CDATA[</svg>a"
5638                 errors: 2
5639                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"</svg>a\"\n"
5640         }, {
5641                 name: "tests21.dat #21"
5642                 html: "<svg><![CDATA[<svg>]]><path>"
5643                 errors: 2
5644                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"<svg>\"\n|       <svg path>\n"
5645         }, {
5646                 name: "tests21.dat #22"
5647                 html: "<svg><![CDATA[<svg>]]></path>"
5648                 errors: 4
5649                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"<svg>\"\n"
5650         }, {
5651                 name: "tests21.dat #23"
5652                 html: "<svg><![CDATA[<svg>]]><!--path-->"
5653                 errors: 2
5654                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"<svg>\"\n|       <!-- path -->\n"
5655         }, {
5656                 name: "tests21.dat #24"
5657                 html: "<svg><![CDATA[<svg>]]>path"
5658                 errors: 2
5659                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"<svg>path\"\n"
5660         }, {
5661                 name: "tests21.dat #25"
5662                 html: "<svg><![CDATA[<!--svg-->]]>"
5663                 errors: 2
5664                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"<!--svg-->\"\n"
5665         }, {
5666                 name: "tests22.dat #1"
5667                 html: "<a><b><big><em><strong><div>X</a>"
5668                 errors: 3
5669                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       <b>\n|         <big>\n|           <em>\n|             <strong>\n|     <big>\n|       <em>\n|         <strong>\n|           <div>\n|             <a>\n|               \"X\"\n"
5670         }, {
5671                 name: "tests22.dat #2"
5672                 html: "<a><b><div id=1><div id=2><div id=3><div id=4><div id=5><div id=6><div id=7><div id=8>A</a>"
5673                 errors: 10
5674                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       <b>\n|     <b>\n|       <div>\n|         id=\"1\"\n|         <a>\n|         <div>\n|           id=\"2\"\n|           <a>\n|           <div>\n|             id=\"3\"\n|             <a>\n|             <div>\n|               id=\"4\"\n|               <a>\n|               <div>\n|                 id=\"5\"\n|                 <a>\n|                 <div>\n|                   id=\"6\"\n|                   <a>\n|                   <div>\n|                     id=\"7\"\n|                     <a>\n|                     <div>\n|                       id=\"8\"\n|                       <a>\n|                         \"A\"\n"
5675         }, {
5676                 name: "tests22.dat #3"
5677                 html: "<a><b><div id=1><div id=2><div id=3><div id=4><div id=5><div id=6><div id=7><div id=8><div id=9>A</a>"
5678                 errors: 10
5679                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       <b>\n|     <b>\n|       <div>\n|         id=\"1\"\n|         <a>\n|         <div>\n|           id=\"2\"\n|           <a>\n|           <div>\n|             id=\"3\"\n|             <a>\n|             <div>\n|               id=\"4\"\n|               <a>\n|               <div>\n|                 id=\"5\"\n|                 <a>\n|                 <div>\n|                   id=\"6\"\n|                   <a>\n|                   <div>\n|                     id=\"7\"\n|                     <a>\n|                     <div>\n|                       id=\"8\"\n|                       <a>\n|                         <div>\n|                           id=\"9\"\n|                           \"A\"\n"
5680         }, {
5681                 name: "tests22.dat #4"
5682                 html: "<a><b><div id=1><div id=2><div id=3><div id=4><div id=5><div id=6><div id=7><div id=8><div id=9><div id=10>A</a>"
5683                 errors: 10
5684                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       <b>\n|     <b>\n|       <div>\n|         id=\"1\"\n|         <a>\n|         <div>\n|           id=\"2\"\n|           <a>\n|           <div>\n|             id=\"3\"\n|             <a>\n|             <div>\n|               id=\"4\"\n|               <a>\n|               <div>\n|                 id=\"5\"\n|                 <a>\n|                 <div>\n|                   id=\"6\"\n|                   <a>\n|                   <div>\n|                     id=\"7\"\n|                     <a>\n|                     <div>\n|                       id=\"8\"\n|                       <a>\n|                         <div>\n|                           id=\"9\"\n|                           <div>\n|                             id=\"10\"\n|                             \"A\"\n"
5685         }, {
5686                 name: "tests22.dat #5"
5687                 html: "<cite><b><cite><i><cite><i><cite><i><div>X</b>TEST"
5688                 errors: 3
5689                 expected: "| <html>\n|   <head>\n|   <body>\n|     <cite>\n|       <b>\n|         <cite>\n|           <i>\n|             <cite>\n|               <i>\n|                 <cite>\n|                   <i>\n|       <i>\n|         <i>\n|           <div>\n|             <b>\n|               \"X\"\n|             \"TEST\"\n"
5690         }, {
5691                 name: "tests23.dat #1"
5692                 html: "<p><font size=4><font color=red><font size=4><font size=4><font size=4><font size=4><font size=4><font color=red><p>X"
5693                 errors: 3
5694                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <font>\n|         size=\"4\"\n|         <font>\n|           color=\"red\"\n|           <font>\n|             size=\"4\"\n|             <font>\n|               size=\"4\"\n|               <font>\n|                 size=\"4\"\n|                 <font>\n|                   size=\"4\"\n|                   <font>\n|                     size=\"4\"\n|                     <font>\n|                       color=\"red\"\n|     <p>\n|       <font>\n|         color=\"red\"\n|         <font>\n|           size=\"4\"\n|           <font>\n|             size=\"4\"\n|             <font>\n|               size=\"4\"\n|               <font>\n|                 color=\"red\"\n|                 \"X\"\n"
5695         }, {
5696                 name: "tests23.dat #2"
5697                 html: "<p><font size=4><font size=4><font size=4><font size=4><p>X"
5698                 errors: 3
5699                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <font>\n|         size=\"4\"\n|         <font>\n|           size=\"4\"\n|           <font>\n|             size=\"4\"\n|             <font>\n|               size=\"4\"\n|     <p>\n|       <font>\n|         size=\"4\"\n|         <font>\n|           size=\"4\"\n|           <font>\n|             size=\"4\"\n|             \"X\"\n"
5700         }, {
5701                 name: "tests23.dat #3"
5702                 html: "<p><font size=4><font size=4><font size=4><font size=\"5\"><font size=4><p>X"
5703                 errors: 3
5704                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <font>\n|         size=\"4\"\n|         <font>\n|           size=\"4\"\n|           <font>\n|             size=\"4\"\n|             <font>\n|               size=\"5\"\n|               <font>\n|                 size=\"4\"\n|     <p>\n|       <font>\n|         size=\"4\"\n|         <font>\n|           size=\"4\"\n|           <font>\n|             size=\"5\"\n|             <font>\n|               size=\"4\"\n|               \"X\"\n"
5705         }, {
5706                 name: "tests23.dat #4"
5707                 html: "<p><font size=4 id=a><font size=4 id=b><font size=4><font size=4><p>X"
5708                 errors: 3
5709                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <font>\n|         id=\"a\"\n|         size=\"4\"\n|         <font>\n|           id=\"b\"\n|           size=\"4\"\n|           <font>\n|             size=\"4\"\n|             <font>\n|               size=\"4\"\n|     <p>\n|       <font>\n|         id=\"a\"\n|         size=\"4\"\n|         <font>\n|           id=\"b\"\n|           size=\"4\"\n|           <font>\n|             size=\"4\"\n|             <font>\n|               size=\"4\"\n|               \"X\"\n"
5710         }, {
5711                 name: "tests23.dat #5"
5712                 html: "<p><b id=a><b id=a><b id=a><b><object><b id=a><b id=a>X</object><p>Y"
5713                 errors: 4
5714                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <b>\n|         id=\"a\"\n|         <b>\n|           id=\"a\"\n|           <b>\n|             id=\"a\"\n|             <b>\n|               <object>\n|                 <b>\n|                   id=\"a\"\n|                   <b>\n|                     id=\"a\"\n|                     \"X\"\n|     <p>\n|       <b>\n|         id=\"a\"\n|         <b>\n|           id=\"a\"\n|           <b>\n|             id=\"a\"\n|             <b>\n|               \"Y\"\n"
5715         }, {
5716                 name: "tests24.dat #1"
5717                 html: "<!DOCTYPE html>&NotEqualTilde;"
5718                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"≂̸\"\n"
5719         }, {
5720                 name: "tests24.dat #2"
5721                 html: "<!DOCTYPE html>&NotEqualTilde;A"
5722                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"≂̸A\"\n"
5723         }, {
5724                 name: "tests24.dat #3"
5725                 html: "<!DOCTYPE html>&ThickSpace;"
5726                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"  \"\n"
5727         }, {
5728                 name: "tests24.dat #4"
5729                 html: "<!DOCTYPE html>&ThickSpace;A"
5730                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"  A\"\n"
5731         }, {
5732                 name: "tests24.dat #5"
5733                 html: "<!DOCTYPE html>&NotSubset;"
5734                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"⊂⃒\"\n"
5735         }, {
5736                 name: "tests24.dat #6"
5737                 html: "<!DOCTYPE html>&NotSubset;A"
5738                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"⊂⃒A\"\n"
5739         }, {
5740                 name: "tests24.dat #7"
5741                 html: "<!DOCTYPE html>&Gopf;"
5742                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"𝔾\"\n"
5743         }, {
5744                 name: "tests24.dat #8"
5745                 html: "<!DOCTYPE html>&Gopf;A"
5746                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"𝔾A\"\n"
5747         }, {
5748                 name: "tests25.dat #1"
5749                 html: "<!DOCTYPE html><body><foo>A"
5750                 errors: 1
5751                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <foo>\n|       \"A\"\n"
5752         }, {
5753                 name: "tests25.dat #2"
5754                 html: "<!DOCTYPE html><body><area>A"
5755                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <area>\n|     \"A\"\n"
5756         }, {
5757                 name: "tests25.dat #3"
5758                 html: "<!DOCTYPE html><body><base>A"
5759                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <base>\n|     \"A\"\n"
5760         }, {
5761                 name: "tests25.dat #4"
5762                 html: "<!DOCTYPE html><body><basefont>A"
5763                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <basefont>\n|     \"A\"\n"
5764         }, {
5765                 name: "tests25.dat #5"
5766                 html: "<!DOCTYPE html><body><bgsound>A"
5767                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <bgsound>\n|     \"A\"\n"
5768         }, {
5769                 name: "tests25.dat #6"
5770                 html: "<!DOCTYPE html><body><br>A"
5771                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <br>\n|     \"A\"\n"
5772         }, {
5773                 name: "tests25.dat #7"
5774                 html: "<!DOCTYPE html><body><col>A"
5775                 errors: 1
5776                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"A\"\n"
5777         }, {
5778                 name: "tests25.dat #8"
5779                 html: "<!DOCTYPE html><body><command>A"
5780                 errors: 1
5781                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <command>\n|       \"A\"\n"
5782         }, {
5783                 name: "tests25.dat #9"
5784                 html: "<!DOCTYPE html><body><menuitem>A"
5785                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <menuitem>\n|     \"A\"\n"
5786         }, {
5787                 name: "tests25.dat #10"
5788                 html: "<!DOCTYPE html><body><embed>A"
5789                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <embed>\n|     \"A\"\n"
5790         }, {
5791                 name: "tests25.dat #11"
5792                 html: "<!DOCTYPE html><body><frame>A"
5793                 errors: 1
5794                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"A\"\n"
5795         }, {
5796                 name: "tests25.dat #12"
5797                 html: "<!DOCTYPE html><body><hr>A"
5798                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <hr>\n|     \"A\"\n"
5799         }, {
5800                 name: "tests25.dat #13"
5801                 html: "<!DOCTYPE html><body><img>A"
5802                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <img>\n|     \"A\"\n"
5803         }, {
5804                 name: "tests25.dat #14"
5805                 html: "<!DOCTYPE html><body><input>A"
5806                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <input>\n|     \"A\"\n"
5807         }, {
5808                 name: "tests25.dat #15"
5809                 html: "<!DOCTYPE html><body><keygen>A"
5810                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <keygen>\n|     \"A\"\n"
5811         }, {
5812                 name: "tests25.dat #16"
5813                 html: "<!DOCTYPE html><body><link>A"
5814                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <link>\n|     \"A\"\n"
5815         }, {
5816                 name: "tests25.dat #17"
5817                 html: "<!DOCTYPE html><body><meta>A"
5818                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <meta>\n|     \"A\"\n"
5819         }, {
5820                 name: "tests25.dat #18"
5821                 html: "<!DOCTYPE html><body><param>A"
5822                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <param>\n|     \"A\"\n"
5823         }, {
5824                 name: "tests25.dat #19"
5825                 html: "<!DOCTYPE html><body><source>A"
5826                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <source>\n|     \"A\"\n"
5827         }, {
5828                 name: "tests25.dat #20"
5829                 html: "<!DOCTYPE html><body><track>A"
5830                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <track>\n|     \"A\"\n"
5831         }, {
5832                 name: "tests25.dat #21"
5833                 html: "<!DOCTYPE html><body><wbr>A"
5834                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <wbr>\n|     \"A\"\n"
5835         }, {
5836                 name: "tests26.dat #1"
5837                 html: "<!DOCTYPE html><body><a href='#1'><nobr>1<nobr></a><br><a href='#2'><nobr>2<nobr></a><br><a href='#3'><nobr>3<nobr></a>"
5838                 errors: 10
5839                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <a>\n|       href=\"#1\"\n|       <nobr>\n|         \"1\"\n|       <nobr>\n|     <nobr>\n|       <br>\n|       <a>\n|         href=\"#2\"\n|     <a>\n|       href=\"#2\"\n|       <nobr>\n|         \"2\"\n|       <nobr>\n|     <nobr>\n|       <br>\n|       <a>\n|         href=\"#3\"\n|     <a>\n|       href=\"#3\"\n|       <nobr>\n|         \"3\"\n|       <nobr>\n"
5840         }, {
5841                 name: "tests26.dat #2"
5842                 html: "<!DOCTYPE html><body><b><nobr>1<nobr></b><i><nobr>2<nobr></i>3"
5843                 errors: 7
5844                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <nobr>\n|         \"1\"\n|       <nobr>\n|     <nobr>\n|       <i>\n|     <i>\n|       <nobr>\n|         \"2\"\n|       <nobr>\n|     <nobr>\n|       \"3\"\n"
5845         }, {
5846                 name: "tests26.dat #3"
5847                 html: "<!DOCTYPE html><body><b><nobr>1<table><nobr></b><i><nobr>2<nobr></i>3"
5848                 errors: 14
5849                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <nobr>\n|         \"1\"\n|         <nobr>\n|           <i>\n|         <i>\n|           <nobr>\n|             \"2\"\n|           <nobr>\n|         <nobr>\n|           \"3\"\n|         <table>\n"
5850         }, {
5851                 name: "tests26.dat #4"
5852                 html: "<!DOCTYPE html><body><b><nobr>1<table><tr><td><nobr></b><i><nobr>2<nobr></i>3"
5853                 errors: 6
5854                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <nobr>\n|         \"1\"\n|         <table>\n|           <tbody>\n|             <tr>\n|               <td>\n|                 <nobr>\n|                   <i>\n|                 <i>\n|                   <nobr>\n|                     \"2\"\n|                   <nobr>\n|                 <nobr>\n|                   \"3\"\n"
5855         }, {
5856                 name: "tests26.dat #5"
5857                 html: "<!DOCTYPE html><body><b><nobr>1<div><nobr></b><i><nobr>2<nobr></i>3"
5858                 errors: 9
5859                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <nobr>\n|         \"1\"\n|     <div>\n|       <b>\n|         <nobr>\n|         <nobr>\n|       <nobr>\n|         <i>\n|       <i>\n|         <nobr>\n|           \"2\"\n|         <nobr>\n|       <nobr>\n|         \"3\"\n"
5860         }, {
5861                 name: "tests26.dat #6"
5862                 html: "<!DOCTYPE html><body><b><nobr>1<nobr></b><div><i><nobr>2<nobr></i>3"
5863                 errors: 7
5864                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <nobr>\n|         \"1\"\n|       <nobr>\n|     <div>\n|       <nobr>\n|         <i>\n|       <i>\n|         <nobr>\n|           \"2\"\n|         <nobr>\n|       <nobr>\n|         \"3\"\n"
5865         }, {
5866                 name: "tests26.dat #7"
5867                 html: "<!DOCTYPE html><body><b><nobr>1<nobr><ins></b><i><nobr>"
5868                 errors: 5
5869                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <nobr>\n|         \"1\"\n|       <nobr>\n|         <ins>\n|     <nobr>\n|       <i>\n|     <i>\n|       <nobr>\n"
5870         }, {
5871                 name: "tests26.dat #8"
5872                 html: "<!DOCTYPE html><body><b><nobr>1<ins><nobr></b><i>2"
5873                 errors: 4
5874                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <nobr>\n|         \"1\"\n|         <ins>\n|       <nobr>\n|     <nobr>\n|       <i>\n|         \"2\"\n"
5875         }, {
5876                 name: "tests26.dat #9"
5877                 html: "<!DOCTYPE html><body><b>1<nobr></b><i><nobr>2</i>"
5878                 errors: 4
5879                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <b>\n|       \"1\"\n|       <nobr>\n|     <nobr>\n|       <i>\n|     <i>\n|       <nobr>\n|         \"2\"\n"
5880         }, {
5881                 name: "tests26.dat #10"
5882                 html: "<p><code x</code></p>\n"
5883                 errors: 5
5884                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <code>\n|         code=\"\"\n|         x<=\"\"\n|     <code>\n|       code=\"\"\n|       x<=\"\"\n|       \"\n\"\n"
5885         }, {
5886                 name: "tests26.dat #11"
5887                 html: "<!DOCTYPE html><svg><foreignObject><p><i></p>a"
5888                 errors: 2
5889                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg foreignObject>\n|         <p>\n|           <i>\n|         <i>\n|           \"a\"\n"
5890         }, {
5891                 name: "tests26.dat #12"
5892                 html: "<!DOCTYPE html><table><tr><td><svg><foreignObject><p><i></p>a"
5893                 errors: 2
5894                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <svg svg>\n|               <svg foreignObject>\n|                 <p>\n|                   <i>\n|                 <i>\n|                   \"a\"\n"
5895         }, {
5896                 name: "tests26.dat #13"
5897                 html: "<!DOCTYPE html><math><mtext><p><i></p>a"
5898                 errors: 2
5899                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mtext>\n|         <p>\n|           <i>\n|         <i>\n|           \"a\"\n"
5900         }, {
5901                 name: "tests26.dat #14"
5902                 html: "<!DOCTYPE html><table><tr><td><math><mtext><p><i></p>a"
5903                 errors: 2
5904                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <math math>\n|               <math mtext>\n|                 <p>\n|                   <i>\n|                 <i>\n|                   \"a\"\n"
5905         }, {
5906                 name: "tests26.dat #15"
5907                 html: "<!DOCTYPE html><body><div><!/div>a"
5908                 errors: 2
5909                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <!-- /div -->\n|       \"a\"\n"
5910         }, {
5911                 name: "tests26.dat #16"
5912                 html: "<button><p><button>"
5913                 errors: 3
5914                 expected: "| <html>\n|   <head>\n|   <body>\n|     <button>\n|       <p>\n|     <button>\n"
5915         }, {
5916                 name: "tests2.dat #1"
5917                 html: "<!DOCTYPE html>Test"
5918                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"Test\"\n"
5919         }, {
5920                 name: "tests2.dat #2"
5921                 html: "<textarea>test</div>test"
5922                 errors: 2
5923                 expected: "| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"test</div>test\"\n"
5924         }, {
5925                 name: "tests2.dat #3"
5926                 html: "<table><td>"
5927                 errors: 3
5928                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n"
5929         }, {
5930                 name: "tests2.dat #4"
5931                 html: "<table><td>test</tbody></table>"
5932                 errors: 2
5933                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             \"test\"\n"
5934         }, {
5935                 name: "tests2.dat #5"
5936                 html: "<frame>test"
5937                 errors: 2
5938                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"test\"\n"
5939         }, {
5940                 name: "tests2.dat #6"
5941                 html: "<!DOCTYPE html><frameset>test"
5942                 errors: 5
5943                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
5944         }, {
5945                 name: "tests2.dat #7"
5946                 html: "<!DOCTYPE html><frameset> te st"
5947                 errors: 5
5948                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|     \"  \"\n"
5949         }, {
5950                 name: "tests2.dat #8"
5951                 html: "<!DOCTYPE html><frameset></frameset> te st"
5952                 errors: 4
5953                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|   \"  \"\n"
5954         }, {
5955                 name: "tests2.dat #9"
5956                 html: "<!DOCTYPE html><frameset><!DOCTYPE html>"
5957                 errors: 2
5958                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
5959         }, {
5960                 name: "tests2.dat #10"
5961                 html: "<!DOCTYPE html><font><p><b>test</font>"
5962                 errors: 2
5963                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <font>\n|     <p>\n|       <font>\n|         <b>\n|           \"test\"\n"
5964         }, {
5965                 name: "tests2.dat #11"
5966                 html: "<!DOCTYPE html><dt><div><dd>"
5967                 errors: 1
5968                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <dt>\n|       <div>\n|     <dd>\n"
5969         }, {
5970                 name: "tests2.dat #12"
5971                 html: "<script></x"
5972                 errors: 2
5973                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</x\"\n|   <body>\n"
5974         }, {
5975                 name: "tests2.dat #13"
5976                 html: "<table><plaintext><td>"
5977                 errors: 7
5978                 expected: "| <html>\n|   <head>\n|   <body>\n|     <plaintext>\n|       \"<td>\"\n|     <table>\n"
5979         }, {
5980                 name: "tests2.dat #14"
5981                 html: "<plaintext></plaintext>"
5982                 errors: 2
5983                 expected: "| <html>\n|   <head>\n|   <body>\n|     <plaintext>\n|       \"</plaintext>\"\n"
5984         }, {
5985                 name: "tests2.dat #15"
5986                 html: "<!DOCTYPE html><table><tr>TEST"
5987                 errors: 5
5988                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"TEST\"\n|     <table>\n|       <tbody>\n|         <tr>\n"
5989         }, {
5990                 name: "tests2.dat #16"
5991                 html: "<!DOCTYPE html><body t1=1><body t2=2><body t3=3 t4=4>"
5992                 errors: 2
5993                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     t1=\"1\"\n|     t2=\"2\"\n|     t3=\"3\"\n|     t4=\"4\"\n"
5994         }, {
5995                 name: "tests2.dat #17"
5996                 html: "</b test"
5997                 errors: 2
5998                 expected: "| <html>\n|   <head>\n|   <body>\n"
5999         }, {
6000                 name: "tests2.dat #18"
6001                 html: "<!DOCTYPE html></b test<b &=&amp>X"
6002                 errors: 4
6003                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"X\"\n"
6004         }, {
6005                 name: "tests2.dat #19"
6006                 html: "<!doctypehtml><scrIPt type=text/x-foobar;baz>X</SCRipt"
6007                 errors: 2
6008                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       type=\"text/x-foobar;baz\"\n|       \"X</SCRipt\"\n|   <body>\n"
6009         }, {
6010                 name: "tests2.dat #20"
6011                 html: "&"
6012                 errors: 1
6013                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"&\"\n"
6014         }, {
6015                 name: "tests2.dat #21"
6016                 html: "&#"
6017                 errors: 2
6018                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"&#\"\n"
6019         }, {
6020                 name: "tests2.dat #22"
6021                 html: "&#X"
6022                 errors: 2
6023                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"&#X\"\n"
6024         }, {
6025                 name: "tests2.dat #23"
6026                 html: "&#x"
6027                 errors: 2
6028                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"&#x\"\n"
6029         }, {
6030                 name: "tests2.dat #24"
6031                 html: "&#45"
6032                 errors: 2
6033                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"-\"\n"
6034         }, {
6035                 name: "tests2.dat #25"
6036                 html: "&x-test"
6037                 errors: 1
6038                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"&x-test\"\n"
6039         }, {
6040                 name: "tests2.dat #26"
6041                 html: "<!doctypehtml><p><li>"
6042                 errors: 1
6043                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <li>\n"
6044         }, {
6045                 name: "tests2.dat #27"
6046                 html: "<!doctypehtml><p><dt>"
6047                 errors: 1
6048                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <dt>\n"
6049         }, {
6050                 name: "tests2.dat #28"
6051                 html: "<!doctypehtml><p><dd>"
6052                 errors: 1
6053                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <dd>\n"
6054         }, {
6055                 name: "tests2.dat #29"
6056                 html: "<!doctypehtml><p><form>"
6057                 errors: 2
6058                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <form>\n"
6059         }, {
6060                 name: "tests2.dat #30"
6061                 html: "<!DOCTYPE html><p></P>X"
6062                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     \"X\"\n"
6063         }, {
6064                 name: "tests2.dat #31"
6065                 html: "&AMP"
6066                 errors: 2
6067                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"&\"\n"
6068         }, {
6069                 name: "tests2.dat #32"
6070                 html: "&AMp;"
6071                 errors: 2
6072                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"&AMp;\"\n"
6073         }, {
6074                 name: "tests2.dat #33"
6075                 html: "<!DOCTYPE html><html><head></head><body><thisISasillyTESTelementNameToMakeSureCrazyTagNamesArePARSEDcorrectLY>"
6076                 errors: 1
6077                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <thisisasillytestelementnametomakesurecrazytagnamesareparsedcorrectly>\n"
6078         }, {
6079                 name: "tests2.dat #34"
6080                 html: "<!DOCTYPE html>X</body>X"
6081                 errors: 1
6082                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"XX\"\n"
6083         }, {
6084                 name: "tests2.dat #35"
6085                 html: "<!DOCTYPE html><!-- X"
6086                 errors: 1
6087                 expected: "| <!DOCTYPE html>\n| <!--  X -->\n| <html>\n|   <head>\n|   <body>\n"
6088         }, {
6089                 name: "tests2.dat #36"
6090                 html: "<!DOCTYPE html><table><caption>test TEST</caption><td>test"
6091                 errors: 2
6092                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         \"test TEST\"\n|       <tbody>\n|         <tr>\n|           <td>\n|             \"test\"\n"
6093         }, {
6094                 name: "tests2.dat #37"
6095                 html: "<!DOCTYPE html><select><option><optgroup>"
6096                 errors: 1
6097                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n|       <optgroup>\n"
6098         }, {
6099                 name: "tests2.dat #38"
6100                 html: "<!DOCTYPE html><select><optgroup><option></optgroup><option><select><option>"
6101                 errors: 2
6102                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <optgroup>\n|         <option>\n|       <option>\n|     <option>\n"
6103         }, {
6104                 name: "tests2.dat #39"
6105                 html: "<!DOCTYPE html><select><optgroup><option><optgroup>"
6106                 errors: 1
6107                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <optgroup>\n|         <option>\n|       <optgroup>\n"
6108         }, {
6109                 name: "tests2.dat #40"
6110                 html: "<!DOCTYPE html><datalist><option>foo</datalist>bar"
6111                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <datalist>\n|       <option>\n|         \"foo\"\n|     \"bar\"\n"
6112         }, {
6113                 name: "tests2.dat #41"
6114                 html: "<!DOCTYPE html><font><input><input></font>"
6115                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <font>\n|       <input>\n|       <input>\n"
6116         }, {
6117                 name: "tests2.dat #42"
6118                 html: "<!DOCTYPE html><!-- XXX - XXX -->"
6119                 expected: "| <!DOCTYPE html>\n| <!--  XXX - XXX  -->\n| <html>\n|   <head>\n|   <body>\n"
6120         }, {
6121                 name: "tests2.dat #43"
6122                 html: "<!DOCTYPE html><!-- XXX - XXX"
6123                 errors: 1
6124                 expected: "| <!DOCTYPE html>\n| <!--  XXX - XXX -->\n| <html>\n|   <head>\n|   <body>\n"
6125         }, {
6126                 name: "tests2.dat #44"
6127                 html: "<!DOCTYPE html><!-- XXX - XXX - XXX -->"
6128                 expected: "| <!DOCTYPE html>\n| <!--  XXX - XXX - XXX  -->\n| <html>\n|   <head>\n|   <body>\n"
6129         }, {
6130                 name: "tests2.dat #45"
6131                 html: "<isindex test=x name=x>"
6132                 errors: 2
6133                 expected: "| <html>\n|   <head>\n|   <body>\n|     <form>\n|       <hr>\n|       <label>\n|         \"This is a searchable index. Enter search keywords: \"\n|         <input>\n|           name=\"isindex\"\n|           test=\"x\"\n|       <hr>\n"
6134         }, {
6135                 name: "tests2.dat #46"
6136                 html: "test\ntest"
6137                 errors: 1
6138                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"test\ntest\"\n"
6139         }, {
6140                 name: "tests2.dat #47"
6141                 html: "<!DOCTYPE html><body><title>test</body></title>"
6142                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <title>\n|       \"test</body>\"\n"
6143         }, {
6144                 name: "tests2.dat #48"
6145                 html: "<!DOCTYPE html><body><title>X</title><meta name=z><link rel=foo><style>\nx { content:\"</style\" } </style>"
6146                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <title>\n|       \"X\"\n|     <meta>\n|       name=\"z\"\n|     <link>\n|       rel=\"foo\"\n|     <style>\n|       \"\nx { content:\"</style\" } \"\n"
6147         }, {
6148                 name: "tests2.dat #49"
6149                 html: "<!DOCTYPE html><select><optgroup></optgroup></select>"
6150                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <optgroup>\n"
6151         }, {
6152                 name: "tests2.dat #50"
6153                 html: " \n "
6154                 errors: 1
6155                 expected: "| <html>\n|   <head>\n|   <body>\n"
6156         }, {
6157                 name: "tests2.dat #51"
6158                 html: "<!DOCTYPE html>  <html>"
6159                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
6160         }, {
6161                 name: "tests2.dat #52"
6162                 html: "<!DOCTYPE html><script>\n</script>  <title>x</title>  </head>"
6163                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"\n\"\n|     \"  \"\n|     <title>\n|       \"x\"\n|     \"  \"\n|   <body>\n"
6164         }, {
6165                 name: "tests2.dat #53"
6166                 html: "<!DOCTYPE html><html><body><html id=x>"
6167                 errors: 1
6168                 expected: "| <!DOCTYPE html>\n| <html>\n|   id=\"x\"\n|   <head>\n|   <body>\n"
6169         }, {
6170                 name: "tests2.dat #54"
6171                 html: "<!DOCTYPE html>X</body><html id=\"x\">"
6172                 errors: 1
6173                 expected: "| <!DOCTYPE html>\n| <html>\n|   id=\"x\"\n|   <head>\n|   <body>\n|     \"X\"\n"
6174         }, {
6175                 name: "tests2.dat #55"
6176                 html: "<!DOCTYPE html><head><html id=x>"
6177                 errors: 1
6178                 expected: "| <!DOCTYPE html>\n| <html>\n|   id=\"x\"\n|   <head>\n|   <body>\n"
6179         }, {
6180                 name: "tests2.dat #56"
6181                 html: "<!DOCTYPE html>X</html>X"
6182                 errors: 1
6183                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"XX\"\n"
6184         }, {
6185                 name: "tests2.dat #57"
6186                 html: "<!DOCTYPE html>X</html> "
6187                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"X \"\n"
6188         }, {
6189                 name: "tests2.dat #58"
6190                 html: "<!DOCTYPE html>X</html><p>X"
6191                 errors: 1
6192                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"X\"\n|     <p>\n|       \"X\"\n"
6193         }, {
6194                 name: "tests2.dat #59"
6195                 html: "<!DOCTYPE html>X<p/x/y/z>"
6196                 errors: 3
6197                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"X\"\n|     <p>\n|       x=\"\"\n|       y=\"\"\n|       z=\"\"\n"
6198         }, {
6199                 name: "tests2.dat #60"
6200                 html: "<!DOCTYPE html><!--x--"
6201                 errors: 1
6202                 expected: "| <!DOCTYPE html>\n| <!-- x -->\n| <html>\n|   <head>\n|   <body>\n"
6203         }, {
6204                 name: "tests2.dat #61"
6205                 html: "<!DOCTYPE html><table><tr><td></p></table>"
6206                 errors: 1
6207                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <p>\n"
6208         }, {
6209                 name: "tests2.dat #62"
6210                 html: "<!DOCTYPE <!DOCTYPE HTML>><!--<!--x-->-->"
6211                 errors: 3
6212                 expected: "| <!DOCTYPE <!doctype>\n| <html>\n|   <head>\n|   <body>\n|     \">\"\n|     <!-- <!--x -->\n|     \"-->\"\n"
6213         }, {
6214                 name: "tests2.dat #63"
6215                 html: "<!doctype html><div><form></form><div></div></div>"
6216                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <form>\n|       <div>\n"
6217         }, {
6218                 name: "tests3.dat #1"
6219                 html: "<head></head><style></style>"
6220                 errors: 2
6221                 expected: "| <html>\n|   <head>\n|     <style>\n|   <body>\n"
6222         }, {
6223                 name: "tests3.dat #2"
6224                 html: "<head></head><script></script>"
6225                 errors: 2
6226                 expected: "| <html>\n|   <head>\n|     <script>\n|   <body>\n"
6227         }, {
6228                 name: "tests3.dat #3"
6229                 html: "<head></head><!-- --><style></style><!-- --><script></script>"
6230                 errors: 3
6231                 expected: "| <html>\n|   <head>\n|     <style>\n|     <script>\n|   <!--   -->\n|   <!--   -->\n|   <body>\n"
6232         }, {
6233                 name: "tests3.dat #4"
6234                 html: "<head></head><!-- -->x<style></style><!-- --><script></script>"
6235                 errors: 1
6236                 expected: "| <html>\n|   <head>\n|   <!--   -->\n|   <body>\n|     \"x\"\n|     <style>\n|     <!--   -->\n|     <script>\n"
6237         }, {
6238                 name: "tests3.dat #5"
6239                 html: "<!DOCTYPE html><html><head></head><body><pre>\n</pre></body></html>"
6240                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n"
6241         }, {
6242                 name: "tests3.dat #6"
6243                 html: "<!DOCTYPE html><html><head></head><body><pre>\nfoo</pre></body></html>"
6244                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"foo\"\n"
6245         }, {
6246                 name: "tests3.dat #7"
6247                 html: "<!DOCTYPE html><html><head></head><body><pre>\n\nfoo</pre></body></html>"
6248                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"\nfoo\"\n"
6249         }, {
6250                 name: "tests3.dat #8"
6251                 html: "<!DOCTYPE html><html><head></head><body><pre>\nfoo\n</pre></body></html>"
6252                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"foo\n\"\n"
6253         }, {
6254                 name: "tests3.dat #9"
6255                 html: "<!DOCTYPE html><html><head></head><body><pre>x</pre><span>\n</span></body></html>"
6256                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"x\"\n|     <span>\n|       \"\n\"\n"
6257         }, {
6258                 name: "tests3.dat #10"
6259                 html: "<!DOCTYPE html><html><head></head><body><pre>x\ny</pre></body></html>"
6260                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"x\ny\"\n"
6261         }, {
6262                 name: "tests3.dat #11"
6263                 html: "<!DOCTYPE html><html><head></head><body><pre>x<div>\ny</pre></body></html>"
6264                 errors: 1
6265                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"x\"\n|       <div>\n|         \"\ny\"\n"
6266         }, {
6267                 name: "tests3.dat #12"
6268                 html: "<!DOCTYPE html><pre>&#x0a;&#x0a;A</pre>"
6269                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"\nA\"\n"
6270         }, {
6271                 name: "tests3.dat #13"
6272                 html: "<!DOCTYPE html><HTML><META><HEAD></HEAD></HTML>"
6273                 errors: 1
6274                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <meta>\n|   <body>\n"
6275         }, {
6276                 name: "tests3.dat #14"
6277                 html: "<!DOCTYPE html><HTML><HEAD><head></HEAD></HTML>"
6278                 errors: 1
6279                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
6280         }, {
6281                 name: "tests3.dat #15"
6282                 html: "<textarea>foo<span>bar</span><i>baz"
6283                 errors: 2
6284                 expected: "| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"foo<span>bar</span><i>baz\"\n"
6285         }, {
6286                 name: "tests3.dat #16"
6287                 html: "<title>foo<span>bar</em><i>baz"
6288                 errors: 2
6289                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"foo<span>bar</em><i>baz\"\n|   <body>\n"
6290         }, {
6291                 name: "tests3.dat #17"
6292                 html: "<!DOCTYPE html><textarea>\n</textarea>"
6293                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n"
6294         }, {
6295                 name: "tests3.dat #18"
6296                 html: "<!DOCTYPE html><textarea>\nfoo</textarea>"
6297                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"foo\"\n"
6298         }, {
6299                 name: "tests3.dat #19"
6300                 html: "<!DOCTYPE html><textarea>\n\nfoo</textarea>"
6301                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"\nfoo\"\n"
6302         }, {
6303                 name: "tests3.dat #20"
6304                 html: "<!DOCTYPE html><html><head></head><body><ul><li><div><p><li></ul></body></html>"
6305                 errors: 1
6306                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <ul>\n|       <li>\n|         <div>\n|           <p>\n|       <li>\n"
6307         }, {
6308                 name: "tests3.dat #21"
6309                 html: "<!doctype html><nobr><nobr><nobr>"
6310                 errors: 3
6311                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <nobr>\n|     <nobr>\n|     <nobr>\n"
6312         }, {
6313                 name: "tests3.dat #22"
6314                 html: "<!doctype html><nobr><nobr></nobr><nobr>"
6315                 errors: 2
6316                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <nobr>\n|     <nobr>\n|     <nobr>\n"
6317         }, {
6318                 name: "tests3.dat #23"
6319                 html: "<!doctype html><html><body><p><table></table></body></html>"
6320                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <table>\n"
6321         }, {
6322                 name: "tests3.dat #24"
6323                 html: "<p><table></table>"
6324                 errors: 1
6325                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <table>\n"
6326         }, {
6327                 name: "tests4.dat #1"
6328                 html: "direct div content"
6329                 fragment: "div"
6330                 expected: "| \"direct div content\"\n"
6331         }, {
6332                 name: "tests4.dat #2"
6333                 html: "direct textarea content"
6334                 fragment: "textarea"
6335                 expected: "| \"direct textarea content\"\n"
6336         }, {
6337                 name: "tests4.dat #3"
6338                 html: "textarea content with <em>pseudo</em> <foo>markup"
6339                 fragment: "textarea"
6340                 expected: "| \"textarea content with <em>pseudo</em> <foo>markup\"\n"
6341         }, {
6342                 name: "tests4.dat #4"
6343                 html: "this is &#x0043;DATA inside a <style> element"
6344                 fragment: "style"
6345                 expected: "| \"this is &#x0043;DATA inside a <style> element\"\n"
6346         }, {
6347                 name: "tests4.dat #5"
6348                 html: "</plaintext>"
6349                 fragment: "plaintext"
6350                 expected: "| \"</plaintext>\"\n"
6351         }, {
6352                 name: "tests4.dat #6"
6353                 html: "setting html's innerHTML"
6354                 fragment: "html"
6355                 expected: "| <head>\n| <body>\n|   \"setting html's innerHTML\"\n"
6356         }, {
6357                 name: "tests4.dat #7"
6358                 html: "<title>setting head's innerHTML</title>"
6359                 fragment: "head"
6360                 expected: "| <title>\n|   \"setting head's innerHTML\"\n"
6361         }, {
6362                 name: "tests5.dat #1"
6363                 html: "<style> <!-- </style>x"
6364                 errors: 1
6365                 expected: "| <html>\n|   <head>\n|     <style>\n|       \" <!-- \"\n|   <body>\n|     \"x\"\n"
6366         }, {
6367                 name: "tests5.dat #2"
6368                 html: "<style> <!-- </style> --> </style>x"
6369                 errors: 2
6370                 expected: "| <html>\n|   <head>\n|     <style>\n|       \" <!-- \"\n|     \" \"\n|   <body>\n|     \"--> x\"\n"
6371         }, {
6372                 name: "tests5.dat #3"
6373                 html: "<style> <!--> </style>x"
6374                 errors: 1
6375                 expected: "| <html>\n|   <head>\n|     <style>\n|       \" <!--> \"\n|   <body>\n|     \"x\"\n"
6376         }, {
6377                 name: "tests5.dat #4"
6378                 html: "<style> <!---> </style>x"
6379                 errors: 1
6380                 expected: "| <html>\n|   <head>\n|     <style>\n|       \" <!---> \"\n|   <body>\n|     \"x\"\n"
6381         }, {
6382                 name: "tests5.dat #5"
6383                 html: "<iframe> <!---> </iframe>x"
6384                 errors: 1
6385                 expected: "| <html>\n|   <head>\n|   <body>\n|     <iframe>\n|       \" <!---> \"\n|     \"x\"\n"
6386         }, {
6387                 name: "tests5.dat #6"
6388                 html: "<iframe> <!--- </iframe>->x</iframe> --> </iframe>x"
6389                 errors: 3
6390                 expected: "| <html>\n|   <head>\n|   <body>\n|     <iframe>\n|       \" <!--- \"\n|     \"->x --> x\"\n"
6391         }, {
6392                 name: "tests5.dat #7"
6393                 html: "<script> <!-- </script> --> </script>x"
6394                 errors: 2
6395                 expected: "| <html>\n|   <head>\n|     <script>\n|       \" <!-- \"\n|     \" \"\n|   <body>\n|     \"--> x\"\n"
6396         }, {
6397                 name: "tests5.dat #8"
6398                 html: "<title> <!-- </title> --> </title>x"
6399                 errors: 2
6400                 expected: "| <html>\n|   <head>\n|     <title>\n|       \" <!-- \"\n|     \" \"\n|   <body>\n|     \"--> x\"\n"
6401         }, {
6402                 name: "tests5.dat #9"
6403                 html: "<textarea> <!--- </textarea>->x</textarea> --> </textarea>x"
6404                 errors: 3
6405                 expected: "| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \" <!--- \"\n|     \"->x --> x\"\n"
6406         }, {
6407                 name: "tests5.dat #10"
6408                 html: "<style> <!</-- </style>x"
6409                 errors: 1
6410                 expected: "| <html>\n|   <head>\n|     <style>\n|       \" <!</-- \"\n|   <body>\n|     \"x\"\n"
6411         }, {
6412                 name: "tests5.dat #11"
6413                 html: "<p><xmp></xmp>"
6414                 errors: 1
6415                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <xmp>\n"
6416         }, {
6417                 name: "tests5.dat #12"
6418                 html: "<xmp> <!-- > --> </xmp>"
6419                 errors: 1
6420                 expected: "| <html>\n|   <head>\n|   <body>\n|     <xmp>\n|       \" <!-- > --> \"\n"
6421         }, {
6422                 name: "tests5.dat #13"
6423                 html: "<title>&amp;</title>"
6424                 errors: 1
6425                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"&\"\n|   <body>\n"
6426         }, {
6427                 name: "tests5.dat #14"
6428                 html: "<title><!--&amp;--></title>"
6429                 errors: 1
6430                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"<!--&-->\"\n|   <body>\n"
6431         }, {
6432                 name: "tests5.dat #15"
6433                 html: "<title><!--</title>"
6434                 errors: 1
6435                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"<!--\"\n|   <body>\n"
6436         }, {
6437                 name: "tests5.dat #16"
6438                 html: "<noscript><!--</noscript>--></noscript>"
6439                 scripting: true
6440                 errors: 2
6441                 expected: "| <html>\n|   <head>\n|     <noscript>\n|       \"<!--\"\n|   <body>\n|     \"-->\"\n"
6442         }, {
6443                 name: "tests5.dat #17"
6444                 html: "<noscript><!--</noscript>--></noscript>"
6445                 scripting: false
6446                 errors: 1
6447                 expected: "| <html>\n|   <head>\n|     <noscript>\n|       <!-- </noscript> -->\n|   <body>\n"
6448         }, {
6449                 name: "tests6.dat #1"
6450                 html: "<!doctype html></head> <head>"
6451                 errors: 1
6452                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   \" \"\n|   <body>\n"
6453         }, {
6454                 name: "tests6.dat #2"
6455                 html: "<!doctype html><form><div></form><div>"
6456                 errors: 2
6457                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <form>\n|       <div>\n|         <div>\n"
6458         }, {
6459                 name: "tests6.dat #3"
6460                 html: "<!doctype html><title>&amp;</title>"
6461                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <title>\n|       \"&\"\n|   <body>\n"
6462         }, {
6463                 name: "tests6.dat #4"
6464                 html: "<!doctype html><title><!--&amp;--></title>"
6465                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <title>\n|       \"<!--&-->\"\n|   <body>\n"
6466         }, {
6467                 name: "tests6.dat #5"
6468                 html: "<!doctype>"
6469                 errors: 3
6470                 expected: "| <!DOCTYPE >\n| <html>\n|   <head>\n|   <body>\n"
6471         }, {
6472                 name: "tests6.dat #6"
6473                 html: "<!---x"
6474                 errors: 2
6475                 expected: "| <!-- -x -->\n| <html>\n|   <head>\n|   <body>\n"
6476         }, {
6477                 name: "tests6.dat #7"
6478                 html: "<body>\n<div>"
6479                 errors: 2
6480                 fragment: "div"
6481                 expected: "| \"\n\"\n| <div>\n"
6482         }, {
6483                 name: "tests6.dat #8"
6484                 html: "<frameset></frameset>\nfoo"
6485                 errors: 4
6486                 expected: "| <html>\n|   <head>\n|   <frameset>\n|   \"\n\"\n"
6487         }, {
6488                 name: "tests6.dat #9"
6489                 html: "<frameset></frameset>\n<noframes>"
6490                 errors: 2
6491                 expected: "| <html>\n|   <head>\n|   <frameset>\n|   \"\n\"\n|   <noframes>\n"
6492         }, {
6493                 name: "tests6.dat #10"
6494                 html: "<frameset></frameset>\n<div>"
6495                 errors: 2
6496                 expected: "| <html>\n|   <head>\n|   <frameset>\n|   \"\n\"\n"
6497         }, {
6498                 name: "tests6.dat #11"
6499                 html: "<frameset></frameset>\n</html>"
6500                 errors: 1
6501                 expected: "| <html>\n|   <head>\n|   <frameset>\n|   \"\n\"\n"
6502         }, {
6503                 name: "tests6.dat #12"
6504                 html: "<frameset></frameset>\n</div>"
6505                 errors: 2
6506                 expected: "| <html>\n|   <head>\n|   <frameset>\n|   \"\n\"\n"
6507         }, {
6508                 name: "tests6.dat #13"
6509                 html: "<form><form>"
6510                 errors: 3
6511                 expected: "| <html>\n|   <head>\n|   <body>\n|     <form>\n"
6512         }, {
6513                 name: "tests6.dat #14"
6514                 html: "<button><button>"
6515                 errors: 3
6516                 expected: "| <html>\n|   <head>\n|   <body>\n|     <button>\n|     <button>\n"
6517         }, {
6518                 name: "tests6.dat #15"
6519                 html: "<table><tr><td></th>"
6520                 errors: 3
6521                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n"
6522         }, {
6523                 name: "tests6.dat #16"
6524                 html: "<table><caption><td>"
6525                 errors: 3
6526                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|       <tbody>\n|         <tr>\n|           <td>\n"
6527         }, {
6528                 name: "tests6.dat #17"
6529                 html: "<table><caption><div>"
6530                 errors: 2
6531                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <div>\n"
6532         }, {
6533                 name: "tests6.dat #18"
6534                 html: "</caption><div>"
6535                 errors: 2
6536                 fragment: "caption"
6537                 expected: "| <div>\n"
6538         }, {
6539                 name: "tests6.dat #19"
6540                 html: "<table><caption><div></caption>"
6541                 errors: 3
6542                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <div>\n"
6543         }, {
6544                 name: "tests6.dat #20"
6545                 html: "<table><caption></table>"
6546                 errors: 1
6547                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n"
6548         }, {
6549                 name: "tests6.dat #21"
6550                 html: "</table><div>"
6551                 errors: 2
6552                 fragment: "caption"
6553                 expected: "| <div>\n"
6554         }, {
6555                 name: "tests6.dat #22"
6556                 html: "<table><caption></body></col></colgroup></html></tbody></td></tfoot></th></thead></tr>"
6557                 errors: 12
6558                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n"
6559         }, {
6560                 name: "tests6.dat #23"
6561                 html: "<table><caption><div></div>"
6562                 errors: 2
6563                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <div>\n"
6564         }, {
6565                 name: "tests6.dat #24"
6566                 html: "<table><tr><td></body></caption></col></colgroup></html>"
6567                 errors: 7
6568                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n"
6569         }, {
6570                 name: "tests6.dat #25"
6571                 html: "</table></tbody></tfoot></thead></tr><div>"
6572                 errors: 6
6573                 fragment: "td"
6574                 expected: "| <div>\n"
6575         }, {
6576                 name: "tests6.dat #26"
6577                 html: "<table><colgroup>foo"
6578                 errors: 5
6579                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"foo\"\n|     <table>\n|       <colgroup>\n"
6580         }, {
6581                 name: "tests6.dat #27"
6582                 html: "foo<col>"
6583                 errors: 3
6584                 fragment: "colgroup"
6585                 expected: "| <col>\n"
6586         }, {
6587                 name: "tests6.dat #28"
6588                 html: "<table><colgroup></col>"
6589                 errors: 3
6590                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <colgroup>\n"
6591         }, {
6592                 name: "tests6.dat #29"
6593                 html: "<frameset><div>"
6594                 errors: 3
6595                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
6596         }, {
6597                 name: "tests6.dat #30"
6598                 html: "</frameset><frame>"
6599                 errors: 1
6600                 fragment: "frameset"
6601                 expected: "| <frame>\n"
6602         }, {
6603                 name: "tests6.dat #31"
6604                 html: "<frameset></div>"
6605                 errors: 3
6606                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
6607         }, {
6608                 name: "tests6.dat #32"
6609                 html: "</body><div>"
6610                 errors: 2
6611                 fragment: "body"
6612                 expected: "| <div>\n"
6613         }, {
6614                 name: "tests6.dat #33"
6615                 html: "<table><tr><div>"
6616                 errors: 3
6617                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|     <table>\n|       <tbody>\n|         <tr>\n"
6618         }, {
6619                 name: "tests6.dat #34"
6620                 html: "</tr><td>"
6621                 errors: 1
6622                 fragment: "tr"
6623                 expected: "| <td>\n"
6624         }, {
6625                 name: "tests6.dat #35"
6626                 html: "</tbody></tfoot></thead><td>"
6627                 errors: 3
6628                 fragment: "tr"
6629                 expected: "| <td>\n"
6630         }, {
6631                 name: "tests6.dat #36"
6632                 html: "<table><tr><div><td>"
6633                 errors: 3
6634                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n"
6635         }, {
6636                 name: "tests6.dat #37"
6637                 html: "<caption><col><colgroup><tbody><tfoot><thead><tr>"
6638                 errors: 6
6639                 fragment: "tbody"
6640                 expected: "| <tr>\n"
6641         }, {
6642                 name: "tests6.dat #38"
6643                 html: "<table><tbody></thead>"
6644                 errors: 3
6645                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n"
6646         }, {
6647                 name: "tests6.dat #39"
6648                 html: "</table><tr>"
6649                 errors: 1
6650                 fragment: "tbody"
6651                 expected: "| <tr>\n"
6652         }, {
6653                 name: "tests6.dat #40"
6654                 html: "<table><tbody></body></caption></col></colgroup></html></td></th></tr>"
6655                 errors: 10
6656                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n"
6657         }, {
6658                 name: "tests6.dat #41"
6659                 html: "<table><tbody></div>"
6660                 errors: 4
6661                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n"
6662         }, {
6663                 name: "tests6.dat #42"
6664                 html: "<table><table>"
6665                 errors: 3
6666                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|     <table>\n"
6667         }, {
6668                 name: "tests6.dat #43"
6669                 html: "<table></body></caption></col></colgroup></html></tbody></td></tfoot></th></thead></tr>"
6670                 errors: 13
6671                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n"
6672         }, {
6673                 name: "tests6.dat #44"
6674                 html: "</table><tr>"
6675                 errors: 1
6676                 fragment: "table"
6677                 expected: "| <tbody>\n|   <tr>\n"
6678         }, {
6679                 name: "tests6.dat #45"
6680                 html: "<body></body></html>"
6681                 errors: 1
6682                 fragment: "html"
6683                 expected: "| <head>\n| <body>\n"
6684         }, {
6685                 name: "tests6.dat #46"
6686                 html: "<html><frameset></frameset></html> "
6687                 errors: 1
6688                 expected: "| <html>\n|   <head>\n|   <frameset>\n|   \" \"\n"
6689         }, {
6690                 name: "tests6.dat #47"
6691                 html: "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\"><html></html>"
6692                 expected: "| <!DOCTYPE html \"-//W3C//DTD HTML 4.01//EN\" \"\">\n| <html>\n|   <head>\n|   <body>\n"
6693         }, {
6694                 name: "tests6.dat #48"
6695                 html: "<param><frameset></frameset>"
6696                 errors: 2
6697                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
6698         }, {
6699                 name: "tests6.dat #49"
6700                 html: "<source><frameset></frameset>"
6701                 errors: 2
6702                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
6703         }, {
6704                 name: "tests6.dat #50"
6705                 html: "<track><frameset></frameset>"
6706                 errors: 2
6707                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
6708         }, {
6709                 name: "tests6.dat #51"
6710                 html: "</html><frameset></frameset>"
6711                 errors: 3
6712                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
6713         }, {
6714                 name: "tests6.dat #52"
6715                 html: "</body><frameset></frameset>"
6716                 errors: 3
6717                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
6718         }, {
6719                 name: "tests7.dat #1"
6720                 html: "<!doctype html><body><title>X</title>"
6721                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <title>\n|       \"X\"\n"
6722         }, {
6723                 name: "tests7.dat #2"
6724                 html: "<!doctype html><table><title>X</title></table>"
6725                 errors: 1
6726                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <title>\n|       \"X\"\n|     <table>\n"
6727         }, {
6728                 name: "tests7.dat #3"
6729                 html: "<!doctype html><head></head><title>X</title>"
6730                 errors: 1
6731                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <title>\n|       \"X\"\n|   <body>\n"
6732         }, {
6733                 name: "tests7.dat #4"
6734                 html: "<!doctype html></head><title>X</title>"
6735                 errors: 1
6736                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <title>\n|       \"X\"\n|   <body>\n"
6737         }, {
6738                 name: "tests7.dat #5"
6739                 html: "<!doctype html><table><meta></table>"
6740                 errors: 1
6741                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <meta>\n|     <table>\n"
6742         }, {
6743                 name: "tests7.dat #6"
6744                 html: "<!doctype html><table>X<tr><td><table> <meta></table></table>"
6745                 errors: 2
6746                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"X\"\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <meta>\n|             <table>\n|               \" \"\n"
6747         }, {
6748                 name: "tests7.dat #7"
6749                 html: "<!doctype html><html> <head>"
6750                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
6751         }, {
6752                 name: "tests7.dat #8"
6753                 html: "<!doctype html> <head>"
6754                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
6755         }, {
6756                 name: "tests7.dat #9"
6757                 html: "<!doctype html><table><style> <tr>x </style> </table>"
6758                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <style>\n|         \" <tr>x \"\n|       \" \"\n"
6759         }, {
6760                 name: "tests7.dat #10"
6761                 html: "<!doctype html><table><TBODY><script> <tr>x </script> </table>"
6762                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <script>\n|           \" <tr>x \"\n|         \" \"\n"
6763         }, {
6764                 name: "tests7.dat #11"
6765                 html: "<!doctype html><p><applet><p>X</p></applet>"
6766                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <applet>\n|         <p>\n|           \"X\"\n"
6767         }, {
6768                 name: "tests7.dat #12"
6769                 html: "<!doctype html><p><object type=\"application/x-non-existant-plugin\"><p>X</p></object>"
6770                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <object>\n|         type=\"application/x-non-existant-plugin\"\n|         <p>\n|           \"X\"\n"
6771         }, {
6772                 name: "tests7.dat #13"
6773                 html: "<!doctype html><listing>\nX</listing>"
6774                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <listing>\n|       \"X\"\n"
6775         }, {
6776                 name: "tests7.dat #14"
6777                 html: "<!doctype html><select><input>X"
6778                 errors: 1
6779                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|     <input>\n|     \"X\"\n"
6780         }, {
6781                 name: "tests7.dat #15"
6782                 html: "<!doctype html><select><select>X"
6783                 errors: 1
6784                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|     \"X\"\n"
6785         }, {
6786                 name: "tests7.dat #16"
6787                 html: "<!doctype html><table><input type=hidDEN></table>"
6788                 errors: 1
6789                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <input>\n|         type=\"hidDEN\"\n"
6790         }, {
6791                 name: "tests7.dat #17"
6792                 html: "<!doctype html><table>X<input type=hidDEN></table>"
6793                 errors: 2
6794                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"X\"\n|     <table>\n|       <input>\n|         type=\"hidDEN\"\n"
6795         }, {
6796                 name: "tests7.dat #18"
6797                 html: "<!doctype html><table>  <input type=hidDEN></table>"
6798                 errors: 1
6799                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       \"  \"\n|       <input>\n|         type=\"hidDEN\"\n"
6800         }, {
6801                 name: "tests7.dat #19"
6802                 html: "<!doctype html><table>  <input type='hidDEN'></table>"
6803                 errors: 1
6804                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       \"  \"\n|       <input>\n|         type=\"hidDEN\"\n"
6805         }, {
6806                 name: "tests7.dat #20"
6807                 html: "<!doctype html><table><input type=\" hidden\"><input type=hidDEN></table>"
6808                 errors: 2
6809                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <input>\n|       type=\" hidden\"\n|     <table>\n|       <input>\n|         type=\"hidDEN\"\n"
6810         }, {
6811                 name: "tests7.dat #21"
6812                 html: "<!doctype html><table><select>X<tr>"
6813                 errors: 3
6814                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       \"X\"\n|     <table>\n|       <tbody>\n|         <tr>\n"
6815         }, {
6816                 name: "tests7.dat #22"
6817                 html: "<!doctype html><select>X</select>"
6818                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       \"X\"\n"
6819         }, {
6820                 name: "tests7.dat #23"
6821                 html: "<!DOCTYPE hTmL><html></html>"
6822                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
6823         }, {
6824                 name: "tests7.dat #24"
6825                 html: "<!DOCTYPE HTML><html></html>"
6826                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
6827         }, {
6828                 name: "tests7.dat #25"
6829                 html: "<body>X</body></body>"
6830                 errors: 1
6831                 fragment: "html"
6832                 expected: "| <head>\n| <body>\n|   \"X\"\n"
6833         }, {
6834                 name: "tests7.dat #26"
6835                 html: "<div><p>a</x> b"
6836                 errors: 3
6837                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <p>\n|         \"a b\"\n"
6838         }, {
6839                 name: "tests7.dat #27"
6840                 html: "<table><tr><td><code></code> </table>"
6841                 errors: 1
6842                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <code>\n|             \" \"\n"
6843         }, {
6844                 name: "tests7.dat #28"
6845                 html: "<table><b><tr><td>aaa</td></tr>bbb</table>ccc"
6846                 errors: 6
6847                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|     <b>\n|       \"bbb\"\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             \"aaa\"\n|     <b>\n|       \"ccc\"\n"
6848         }, {
6849                 name: "tests7.dat #29"
6850                 html: "A<table><tr> B</tr> B</table>"
6851                 errors: 5
6852                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"A B B\"\n|     <table>\n|       <tbody>\n|         <tr>\n"
6853         }, {
6854                 name: "tests7.dat #30"
6855                 html: "A<table><tr> B</tr> </em>C</table>"
6856                 errors: 6
6857                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"A BC\"\n|     <table>\n|       <tbody>\n|         <tr>\n|         \" \"\n"
6858         }, {
6859                 name: "tests7.dat #31"
6860                 html: "<select><keygen>"
6861                 errors: 2
6862                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|     <keygen>\n"
6863         }, {
6864                 name: "tests8.dat #1"
6865                 html: "<div>\n<div></div>\n</span>x"
6866                 errors: 3
6867                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"\n\"\n|       <div>\n|       \"\nx\"\n"
6868         }, {
6869                 name: "tests8.dat #2"
6870                 html: "<div>x<div></div>\n</span>x"
6871                 errors: 3
6872                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"x\"\n|       <div>\n|       \"\nx\"\n"
6873         }, {
6874                 name: "tests8.dat #3"
6875                 html: "<div>x<div></div>x</span>x"
6876                 errors: 3
6877                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"x\"\n|       <div>\n|       \"xx\"\n"
6878         }, {
6879                 name: "tests8.dat #4"
6880                 html: "<div>x<div></div>y</span>z"
6881                 errors: 3
6882                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"x\"\n|       <div>\n|       \"yz\"\n"
6883         }, {
6884                 name: "tests8.dat #5"
6885                 html: "<table><div>x<div></div>x</span>x"
6886                 errors: 10
6887                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"x\"\n|       <div>\n|       \"xx\"\n|     <table>\n"
6888         }, {
6889                 name: "tests8.dat #6"
6890                 html: "x<table>x"
6891                 errors: 3
6892                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"xx\"\n|     <table>\n"
6893         }, {
6894                 name: "tests8.dat #7"
6895                 html: "x<table><table>x"
6896                 errors: 4
6897                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"x\"\n|     <table>\n|     \"x\"\n|     <table>\n"
6898         }, {
6899                 name: "tests8.dat #8"
6900                 html: "<b>a<div></div><div></b>y"
6901                 errors: 3
6902                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       \"a\"\n|       <div>\n|     <div>\n|       <b>\n|       \"y\"\n"
6903         }, {
6904                 name: "tests8.dat #9"
6905                 html: "<a><div><p></a>"
6906                 errors: 4
6907                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|     <div>\n|       <a>\n|       <p>\n|         <a>\n"
6908         }, {
6909                 name: "tests9.dat #1"
6910                 html: "<!DOCTYPE html><math></math>"
6911                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n"
6912         }, {
6913                 name: "tests9.dat #2"
6914                 html: "<!DOCTYPE html><body><math></math>"
6915                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n"
6916         }, {
6917                 name: "tests9.dat #3"
6918                 html: "<!DOCTYPE html><math><mi>"
6919                 errors: 1
6920                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mi>\n"
6921         }, {
6922                 name: "tests9.dat #4"
6923                 html: "<!DOCTYPE html><math><annotation-xml><svg><u>"
6924                 errors: 2
6925                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         <svg svg>\n|     <u>\n"
6926         }, {
6927                 name: "tests9.dat #5"
6928                 html: "<!DOCTYPE html><body><select><math></math></select>"
6929                 errors: 2
6930                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
6931         }, {
6932                 name: "tests9.dat #6"
6933                 html: "<!DOCTYPE html><body><select><option><math></math></option></select>"
6934                 errors: 2
6935                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n"
6936         }, {
6937                 name: "tests9.dat #7"
6938                 html: "<!DOCTYPE html><body><table><math></math></table>"
6939                 errors: 1
6940                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|     <table>\n"
6941         }, {
6942                 name: "tests9.dat #8"
6943                 html: "<!DOCTYPE html><body><table><math><mi>foo</mi></math></table>"
6944                 errors: 4
6945                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mi>\n|         \"foo\"\n|     <table>\n"
6946         }, {
6947                 name: "tests9.dat #9"
6948                 html: "<!DOCTYPE html><body><table><math><mi>foo</mi><mi>bar</mi></math></table>"
6949                 errors: 7
6950                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mi>\n|         \"foo\"\n|       <math mi>\n|         \"bar\"\n|     <table>\n"
6951         }, {
6952                 name: "tests9.dat #10"
6953                 html: "<!DOCTYPE html><body><table><tbody><math><mi>foo</mi><mi>bar</mi></math></tbody></table>"
6954                 errors: 7
6955                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mi>\n|         \"foo\"\n|       <math mi>\n|         \"bar\"\n|     <table>\n|       <tbody>\n"
6956         }, {
6957                 name: "tests9.dat #11"
6958                 html: "<!DOCTYPE html><body><table><tbody><tr><math><mi>foo</mi><mi>bar</mi></math></tr></tbody></table>"
6959                 errors: 7
6960                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mi>\n|         \"foo\"\n|       <math mi>\n|         \"bar\"\n|     <table>\n|       <tbody>\n|         <tr>\n"
6961         }, {
6962                 name: "tests9.dat #12"
6963                 html: "<!DOCTYPE html><body><table><tbody><tr><td><math><mi>foo</mi><mi>bar</mi></math></td></tr></tbody></table>"
6964                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <math math>\n|               <math mi>\n|                 \"foo\"\n|               <math mi>\n|                 \"bar\"\n"
6965         }, {
6966                 name: "tests9.dat #13"
6967                 html: "<!DOCTYPE html><body><table><tbody><tr><td><math><mi>foo</mi><mi>bar</mi></math><p>baz</td></tr></tbody></table>"
6968                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <math math>\n|               <math mi>\n|                 \"foo\"\n|               <math mi>\n|                 \"bar\"\n|             <p>\n|               \"baz\"\n"
6969         }, {
6970                 name: "tests9.dat #14"
6971                 html: "<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi></math><p>baz</caption></table>"
6972                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <math math>\n|           <math mi>\n|             \"foo\"\n|           <math mi>\n|             \"bar\"\n|         <p>\n|           \"baz\"\n"
6973         }, {
6974                 name: "tests9.dat #15"
6975                 html: "<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux"
6976                 errors: 1
6977                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <math math>\n|           <math mi>\n|             \"foo\"\n|           <math mi>\n|             \"bar\"\n|         <p>\n|           \"baz\"\n|     <p>\n|       \"quux\"\n"
6978         }, {
6979                 name: "tests9.dat #16"
6980                 html: "<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi>baz</table><p>quux"
6981                 errors: 2
6982                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <math math>\n|           <math mi>\n|             \"foo\"\n|           <math mi>\n|             \"bar\"\n|           \"baz\"\n|     <p>\n|       \"quux\"\n"
6983         }, {
6984                 name: "tests9.dat #17"
6985                 html: "<!DOCTYPE html><body><table><colgroup><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux"
6986                 errors: 12
6987                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mi>\n|         \"foo\"\n|       <math mi>\n|         \"bar\"\n|     <p>\n|       \"baz\"\n|     <table>\n|       <colgroup>\n|     <p>\n|       \"quux\"\n"
6988         }, {
6989                 name: "tests9.dat #18"
6990                 html: "<!DOCTYPE html><body><table><tr><td><select><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux"
6991                 errors: 7
6992                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <select>\n|               \"foobarbaz\"\n|     <p>\n|       \"quux\"\n"
6993         }, {
6994                 name: "tests9.dat #19"
6995                 html: "<!DOCTYPE html><body><table><select><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux"
6996                 errors: 8
6997                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       \"foobarbaz\"\n|     <table>\n|     <p>\n|       \"quux\"\n"
6998         }, {
6999                 name: "tests9.dat #20"
7000                 html: "<!DOCTYPE html><body></body></html><math><mi>foo</mi><mi>bar</mi><p>baz"
7001                 errors: 2
7002                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mi>\n|         \"foo\"\n|       <math mi>\n|         \"bar\"\n|     <p>\n|       \"baz\"\n"
7003         }, {
7004                 name: "tests9.dat #21"
7005                 html: "<!DOCTYPE html><body></body><math><mi>foo</mi><mi>bar</mi><p>baz"
7006                 errors: 2
7007                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mi>\n|         \"foo\"\n|       <math mi>\n|         \"bar\"\n|     <p>\n|       \"baz\"\n"
7008         }, {
7009                 name: "tests9.dat #22"
7010                 html: "<!DOCTYPE html><frameset><math><mi></mi><mi></mi><p><span>"
7011                 errors: 8
7012                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
7013         }, {
7014                 name: "tests9.dat #23"
7015                 html: "<!DOCTYPE html><frameset></frameset><math><mi></mi><mi></mi><p><span>"
7016                 errors: 7
7017                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
7018         }, {
7019                 name: "tests9.dat #24"
7020                 html: "<!DOCTYPE html><body xlink:href=foo><math xlink:href=foo></math>"
7021                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     xlink:href=\"foo\"\n|     <math math>\n|       xlink href=\"foo\"\n"
7022         }, {
7023                 name: "tests9.dat #25"
7024                 html: "<!DOCTYPE html><body xlink:href=foo xml:lang=en><math><mi xml:lang=en xlink:href=foo></mi></math>"
7025                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     xlink:href=\"foo\"\n|     xml:lang=\"en\"\n|     <math math>\n|       <math mi>\n|         xlink href=\"foo\"\n|         xml lang=\"en\"\n"
7026         }, {
7027                 name: "tests9.dat #26"
7028                 html: "<!DOCTYPE html><body xlink:href=foo xml:lang=en><math><mi xml:lang=en xlink:href=foo /></math>"
7029                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     xlink:href=\"foo\"\n|     xml:lang=\"en\"\n|     <math math>\n|       <math mi>\n|         xlink href=\"foo\"\n|         xml lang=\"en\"\n"
7030         }, {
7031                 name: "tests9.dat #27"
7032                 html: "<!DOCTYPE html><body xlink:href=foo xml:lang=en><math><mi xml:lang=en xlink:href=foo />bar</math>"
7033                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     xlink:href=\"foo\"\n|     xml:lang=\"en\"\n|     <math math>\n|       <math mi>\n|         xlink href=\"foo\"\n|         xml lang=\"en\"\n|       \"bar\"\n"
7034         }, {
7035                 name: "tests_innerHTML_1.dat #1"
7036                 html: "<body><span>"
7037                 errors: 2
7038                 fragment: "body"
7039                 expected: "| <span>\n"
7040         }, {
7041                 name: "tests_innerHTML_1.dat #2"
7042                 html: "<span><body>"
7043                 errors: 2
7044                 fragment: "body"
7045                 expected: "| <span>\n"
7046         }, {
7047                 name: "tests_innerHTML_1.dat #3"
7048                 html: "<span><body>"
7049                 errors: 2
7050                 fragment: "div"
7051                 expected: "| <span>\n"
7052         }, {
7053                 name: "tests_innerHTML_1.dat #4"
7054                 html: "<body><span>"
7055                 errors: 1
7056                 fragment: "html"
7057                 expected: "| <head>\n| <body>\n|   <span>\n"
7058         }, {
7059                 name: "tests_innerHTML_1.dat #5"
7060                 html: "<frameset><span>"
7061                 errors: 2
7062                 fragment: "body"
7063                 expected: "| <span>\n"
7064         }, {
7065                 name: "tests_innerHTML_1.dat #6"
7066                 html: "<span><frameset>"
7067                 errors: 2
7068                 fragment: "body"
7069                 expected: "| <span>\n"
7070         }, {
7071                 name: "tests_innerHTML_1.dat #7"
7072                 html: "<span><frameset>"
7073                 errors: 2
7074                 fragment: "div"
7075                 expected: "| <span>\n"
7076         }, {
7077                 name: "tests_innerHTML_1.dat #8"
7078                 html: "<frameset><span>"
7079                 errors: 2
7080                 fragment: "html"
7081                 expected: "| <head>\n| <frameset>\n"
7082         }, {
7083                 name: "tests_innerHTML_1.dat #9"
7084                 html: "<table><tr>"
7085                 errors: 1
7086                 fragment: "table"
7087                 expected: "| <tbody>\n|   <tr>\n"
7088         }, {
7089                 name: "tests_innerHTML_1.dat #10"
7090                 html: "</table><tr>"
7091                 errors: 1
7092                 fragment: "table"
7093                 expected: "| <tbody>\n|   <tr>\n"
7094         }, {
7095                 name: "tests_innerHTML_1.dat #11"
7096                 html: "<a>"
7097                 errors: 2
7098                 fragment: "table"
7099                 expected: "| <a>\n"
7100         }, {
7101                 name: "tests_innerHTML_1.dat #12"
7102                 html: "<a>"
7103                 errors: 2
7104                 fragment: "table"
7105                 expected: "| <a>\n"
7106         }, {
7107                 name: "tests_innerHTML_1.dat #13"
7108                 html: "<a><caption>a"
7109                 errors: 2
7110                 fragment: "table"
7111                 expected: "| <a>\n| <caption>\n|   \"a\"\n"
7112         }, {
7113                 name: "tests_innerHTML_1.dat #14"
7114                 html: "<a><colgroup><col>"
7115                 errors: 2
7116                 fragment: "table"
7117                 expected: "| <a>\n| <colgroup>\n|   <col>\n"
7118         }, {
7119                 name: "tests_innerHTML_1.dat #15"
7120                 html: "<a><tbody><tr>"
7121                 errors: 1
7122                 fragment: "table"
7123                 expected: "| <a>\n| <tbody>\n|   <tr>\n"
7124         }, {
7125                 name: "tests_innerHTML_1.dat #16"
7126                 html: "<a><tfoot><tr>"
7127                 errors: 1
7128                 fragment: "table"
7129                 expected: "| <a>\n| <tfoot>\n|   <tr>\n"
7130         }, {
7131                 name: "tests_innerHTML_1.dat #17"
7132                 html: "<a><thead><tr>"
7133                 errors: 1
7134                 fragment: "table"
7135                 expected: "| <a>\n| <thead>\n|   <tr>\n"
7136         }, {
7137                 name: "tests_innerHTML_1.dat #18"
7138                 html: "<a><tr>"
7139                 errors: 1
7140                 fragment: "table"
7141                 expected: "| <a>\n| <tbody>\n|   <tr>\n"
7142         }, {
7143                 name: "tests_innerHTML_1.dat #19"
7144                 html: "<a><th>"
7145                 errors: 2
7146                 fragment: "table"
7147                 expected: "| <a>\n| <tbody>\n|   <tr>\n|     <th>\n"
7148         }, {
7149                 name: "tests_innerHTML_1.dat #20"
7150                 html: "<a><td>"
7151                 errors: 2
7152                 fragment: "table"
7153                 expected: "| <a>\n| <tbody>\n|   <tr>\n|     <td>\n"
7154         }, {
7155                 name: "tests_innerHTML_1.dat #21"
7156                 html: "<table></table><tbody>"
7157                 errors: 1
7158                 fragment: "caption"
7159                 expected: "| <table>\n"
7160         }, {
7161                 name: "tests_innerHTML_1.dat #22"
7162                 html: "</table><span>"
7163                 errors: 2
7164                 fragment: "caption"
7165                 expected: "| <span>\n"
7166         }, {
7167                 name: "tests_innerHTML_1.dat #23"
7168                 html: "<span></table>"
7169                 errors: 2
7170                 fragment: "caption"
7171                 expected: "| <span>\n"
7172         }, {
7173                 name: "tests_innerHTML_1.dat #24"
7174                 html: "</caption><span>"
7175                 errors: 2
7176                 fragment: "caption"
7177                 expected: "| <span>\n"
7178         }, {
7179                 name: "tests_innerHTML_1.dat #25"
7180                 html: "<span></caption><span>"
7181                 errors: 2
7182                 fragment: "caption"
7183                 expected: "| <span>\n|   <span>\n"
7184         }, {
7185                 name: "tests_innerHTML_1.dat #26"
7186                 html: "<span><caption><span>"
7187                 errors: 2
7188                 fragment: "caption"
7189                 expected: "| <span>\n|   <span>\n"
7190         }, {
7191                 name: "tests_innerHTML_1.dat #27"
7192                 html: "<span><col><span>"
7193                 errors: 2
7194                 fragment: "caption"
7195                 expected: "| <span>\n|   <span>\n"
7196         }, {
7197                 name: "tests_innerHTML_1.dat #28"
7198                 html: "<span><colgroup><span>"
7199                 errors: 2
7200                 fragment: "caption"
7201                 expected: "| <span>\n|   <span>\n"
7202         }, {
7203                 name: "tests_innerHTML_1.dat #29"
7204                 html: "<span><html><span>"
7205                 errors: 2
7206                 fragment: "caption"
7207                 expected: "| <span>\n|   <span>\n"
7208         }, {
7209                 name: "tests_innerHTML_1.dat #30"
7210                 html: "<span><tbody><span>"
7211                 errors: 2
7212                 fragment: "caption"
7213                 expected: "| <span>\n|   <span>\n"
7214         }, {
7215                 name: "tests_innerHTML_1.dat #31"
7216                 html: "<span><td><span>"
7217                 errors: 2
7218                 fragment: "caption"
7219                 expected: "| <span>\n|   <span>\n"
7220         }, {
7221                 name: "tests_innerHTML_1.dat #32"
7222                 html: "<span><tfoot><span>"
7223                 errors: 2
7224                 fragment: "caption"
7225                 expected: "| <span>\n|   <span>\n"
7226         }, {
7227                 name: "tests_innerHTML_1.dat #33"
7228                 html: "<span><thead><span>"
7229                 errors: 2
7230                 fragment: "caption"
7231                 expected: "| <span>\n|   <span>\n"
7232         }, {
7233                 name: "tests_innerHTML_1.dat #34"
7234                 html: "<span><th><span>"
7235                 errors: 2
7236                 fragment: "caption"
7237                 expected: "| <span>\n|   <span>\n"
7238         }, {
7239                 name: "tests_innerHTML_1.dat #35"
7240                 html: "<span><tr><span>"
7241                 errors: 2
7242                 fragment: "caption"
7243                 expected: "| <span>\n|   <span>\n"
7244         }, {
7245                 name: "tests_innerHTML_1.dat #36"
7246                 html: "<span></table><span>"
7247                 errors: 2
7248                 fragment: "caption"
7249                 expected: "| <span>\n|   <span>\n"
7250         }, {
7251                 name: "tests_innerHTML_1.dat #37"
7252                 html: "</colgroup><col>"
7253                 errors: 1
7254                 fragment: "colgroup"
7255                 expected: "| <col>\n"
7256         }, {
7257                 name: "tests_innerHTML_1.dat #38"
7258                 html: "<a><col>"
7259                 errors: 1
7260                 fragment: "colgroup"
7261                 expected: "| <col>\n"
7262         }, {
7263                 name: "tests_innerHTML_1.dat #39"
7264                 html: "<caption><a>"
7265                 errors: 3
7266                 fragment: "tbody"
7267                 expected: "| <a>\n"
7268         }, {
7269                 name: "tests_innerHTML_1.dat #40"
7270                 html: "<col><a>"
7271                 errors: 3
7272                 fragment: "tbody"
7273                 expected: "| <a>\n"
7274         }, {
7275                 name: "tests_innerHTML_1.dat #41"
7276                 html: "<colgroup><a>"
7277                 errors: 3
7278                 fragment: "tbody"
7279                 expected: "| <a>\n"
7280         }, {
7281                 name: "tests_innerHTML_1.dat #42"
7282                 html: "<tbody><a>"
7283                 errors: 3
7284                 fragment: "tbody"
7285                 expected: "| <a>\n"
7286         }, {
7287                 name: "tests_innerHTML_1.dat #43"
7288                 html: "<tfoot><a>"
7289                 errors: 3
7290                 fragment: "tbody"
7291                 expected: "| <a>\n"
7292         }, {
7293                 name: "tests_innerHTML_1.dat #44"
7294                 html: "<thead><a>"
7295                 errors: 3
7296                 fragment: "tbody"
7297                 expected: "| <a>\n"
7298         }, {
7299                 name: "tests_innerHTML_1.dat #45"
7300                 html: "</table><a>"
7301                 errors: 3
7302                 fragment: "tbody"
7303                 expected: "| <a>\n"
7304         }, {
7305                 name: "tests_innerHTML_1.dat #46"
7306                 html: "<a><tr>"
7307                 errors: 1
7308                 fragment: "tbody"
7309                 expected: "| <a>\n| <tr>\n"
7310         }, {
7311                 name: "tests_innerHTML_1.dat #47"
7312                 html: "<a><td>"
7313                 errors: 2
7314                 fragment: "tbody"
7315                 expected: "| <a>\n| <tr>\n|   <td>\n"
7316         }, {
7317                 name: "tests_innerHTML_1.dat #48"
7318                 html: "<a><td>"
7319                 errors: 2
7320                 fragment: "tbody"
7321                 expected: "| <a>\n| <tr>\n|   <td>\n"
7322         }, {
7323                 name: "tests_innerHTML_1.dat #49"
7324                 html: "<a><td>"
7325                 errors: 2
7326                 fragment: "tbody"
7327                 expected: "| <a>\n| <tr>\n|   <td>\n"
7328         }, {
7329                 name: "tests_innerHTML_1.dat #50"
7330                 html: "<td><table><tbody><a><tr>"
7331                 errors: 3
7332                 fragment: "tbody"
7333                 expected: "| <tr>\n|   <td>\n|     <a>\n|     <table>\n|       <tbody>\n|         <tr>\n"
7334         }, {
7335                 name: "tests_innerHTML_1.dat #51"
7336                 html: "</tr><td>"
7337                 errors: 1
7338                 fragment: "tr"
7339                 expected: "| <td>\n"
7340         }, {
7341                 name: "tests_innerHTML_1.dat #52"
7342                 html: "<td><table><a><tr></tr><tr>"
7343                 errors: 2
7344                 fragment: "tr"
7345                 expected: "| <td>\n|   <a>\n|   <table>\n|     <tbody>\n|       <tr>\n|       <tr>\n"
7346         }, {
7347                 name: "tests_innerHTML_1.dat #53"
7348                 html: "<caption><td>"
7349                 errors: 1
7350                 fragment: "tr"
7351                 expected: "| <td>\n"
7352         }, {
7353                 name: "tests_innerHTML_1.dat #54"
7354                 html: "<col><td>"
7355                 errors: 1
7356                 fragment: "tr"
7357                 expected: "| <td>\n"
7358         }, {
7359                 name: "tests_innerHTML_1.dat #55"
7360                 html: "<colgroup><td>"
7361                 errors: 1
7362                 fragment: "tr"
7363                 expected: "| <td>\n"
7364         }, {
7365                 name: "tests_innerHTML_1.dat #56"
7366                 html: "<tbody><td>"
7367                 errors: 1
7368                 fragment: "tr"
7369                 expected: "| <td>\n"
7370         }, {
7371                 name: "tests_innerHTML_1.dat #57"
7372                 html: "<tfoot><td>"
7373                 errors: 1
7374                 fragment: "tr"
7375                 expected: "| <td>\n"
7376         }, {
7377                 name: "tests_innerHTML_1.dat #58"
7378                 html: "<thead><td>"
7379                 errors: 1
7380                 fragment: "tr"
7381                 expected: "| <td>\n"
7382         }, {
7383                 name: "tests_innerHTML_1.dat #59"
7384                 html: "<tr><td>"
7385                 errors: 1
7386                 fragment: "tr"
7387                 expected: "| <td>\n"
7388         }, {
7389                 name: "tests_innerHTML_1.dat #60"
7390                 html: "</table><td>"
7391                 errors: 1
7392                 fragment: "tr"
7393                 expected: "| <td>\n"
7394         }, {
7395                 name: "tests_innerHTML_1.dat #61"
7396                 html: "<td><table></table><td>"
7397                 fragment: "tr"
7398                 expected: "| <td>\n|   <table>\n| <td>\n"
7399         }, {
7400                 name: "tests_innerHTML_1.dat #62"
7401                 html: "<td><table></table><td>"
7402                 fragment: "tr"
7403                 expected: "| <td>\n|   <table>\n| <td>\n"
7404         }, {
7405                 name: "tests_innerHTML_1.dat #63"
7406                 html: "<caption><a>"
7407                 errors: 2
7408                 fragment: "td"
7409                 expected: "| <a>\n"
7410         }, {
7411                 name: "tests_innerHTML_1.dat #64"
7412                 html: "<col><a>"
7413                 errors: 2
7414                 fragment: "td"
7415                 expected: "| <a>\n"
7416         }, {
7417                 name: "tests_innerHTML_1.dat #65"
7418                 html: "<colgroup><a>"
7419                 errors: 2
7420                 fragment: "td"
7421                 expected: "| <a>\n"
7422         }, {
7423                 name: "tests_innerHTML_1.dat #66"
7424                 html: "<tbody><a>"
7425                 errors: 2
7426                 fragment: "td"
7427                 expected: "| <a>\n"
7428         }, {
7429                 name: "tests_innerHTML_1.dat #67"
7430                 html: "<tfoot><a>"
7431                 errors: 2
7432                 fragment: "td"
7433                 expected: "| <a>\n"
7434         }, {
7435                 name: "tests_innerHTML_1.dat #68"
7436                 html: "<th><a>"
7437                 errors: 2
7438                 fragment: "td"
7439                 expected: "| <a>\n"
7440         }, {
7441                 name: "tests_innerHTML_1.dat #69"
7442                 html: "<thead><a>"
7443                 errors: 2
7444                 fragment: "td"
7445                 expected: "| <a>\n"
7446         }, {
7447                 name: "tests_innerHTML_1.dat #70"
7448                 html: "<tr><a>"
7449                 errors: 2
7450                 fragment: "td"
7451                 expected: "| <a>\n"
7452         }, {
7453                 name: "tests_innerHTML_1.dat #71"
7454                 html: "</table><a>"
7455                 errors: 2
7456                 fragment: "td"
7457                 expected: "| <a>\n"
7458         }, {
7459                 name: "tests_innerHTML_1.dat #72"
7460                 html: "</tbody><a>"
7461                 errors: 2
7462                 fragment: "td"
7463                 expected: "| <a>\n"
7464         }, {
7465                 name: "tests_innerHTML_1.dat #73"
7466                 html: "</td><a>"
7467                 errors: 2
7468                 fragment: "td"
7469                 expected: "| <a>\n"
7470         }, {
7471                 name: "tests_innerHTML_1.dat #74"
7472                 html: "</tfoot><a>"
7473                 errors: 2
7474                 fragment: "td"
7475                 expected: "| <a>\n"
7476         }, {
7477                 name: "tests_innerHTML_1.dat #75"
7478                 html: "</thead><a>"
7479                 errors: 2
7480                 fragment: "td"
7481                 expected: "| <a>\n"
7482         }, {
7483                 name: "tests_innerHTML_1.dat #76"
7484                 html: "</th><a>"
7485                 errors: 2
7486                 fragment: "td"
7487                 expected: "| <a>\n"
7488         }, {
7489                 name: "tests_innerHTML_1.dat #77"
7490                 html: "</tr><a>"
7491                 errors: 2
7492                 fragment: "td"
7493                 expected: "| <a>\n"
7494         }, {
7495                 name: "tests_innerHTML_1.dat #78"
7496                 html: "<table><td><td>"
7497                 errors: 2
7498                 fragment: "td"
7499                 expected: "| <table>\n|   <tbody>\n|     <tr>\n|       <td>\n|       <td>\n"
7500         }, {
7501                 name: "tests_innerHTML_1.dat #79"
7502                 html: "</select><option>"
7503                 errors: 2
7504                 fragment: "select"
7505                 expected: "| <option>\n"
7506         }, {
7507                 name: "tests_innerHTML_1.dat #80"
7508                 html: "<input><option>"
7509                 errors: 2
7510                 fragment: "select"
7511                 expected: "| <option>\n"
7512         }, {
7513                 name: "tests_innerHTML_1.dat #81"
7514                 html: "<keygen><option>"
7515                 errors: 2
7516                 fragment: "select"
7517                 expected: "| <option>\n"
7518         }, {
7519                 name: "tests_innerHTML_1.dat #82"
7520                 html: "<textarea><option>"
7521                 errors: 2
7522                 fragment: "select"
7523                 expected: "| <option>\n"
7524         }, {
7525                 name: "tests_innerHTML_1.dat #83"
7526                 html: "</html><!--abc-->"
7527                 errors: 1
7528                 fragment: "html"
7529                 expected: "| <head>\n| <body>\n| <!-- abc -->\n"
7530         }, {
7531                 name: "tests_innerHTML_1.dat #84"
7532                 html: "</frameset><frame>"
7533                 errors: 1
7534                 fragment: "frameset"
7535                 expected: "| <frame>\n"
7536         }, {
7537                 name: "tests_innerHTML_1.dat #85"
7538                 html: ""
7539                 fragment: "html"
7540                 expected: "| <head>\n| <body>\n"
7541         }, {
7542                 name: "tricky01.dat #1"
7543                 html: "<b><p>Bold </b> Not bold</p>\nAlso not bold."
7544                 errors: 2
7545                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|     <p>\n|       <b>\n|         \"Bold \"\n|       \" Not bold\"\n|     \"\nAlso not bold.\"\n"
7546         }, {
7547                 name: "tricky01.dat #2"
7548                 html: "<html>\n<font color=red><i>Italic and Red<p>Italic and Red </font> Just italic.</p> Italic only.</i> Plain\n<p>I should not be red. <font color=red>Red. <i>Italic and red.</p>\n<p>Italic and red. </i> Red.</font> I should not be red.</p>\n<b>Bold <i>Bold and italic</b> Only Italic </i> Plain"
7549                 errors: 6
7550                 expected: "| <html>\n|   <head>\n|   <body>\n|     <font>\n|       color=\"red\"\n|       <i>\n|         \"Italic and Red\"\n|     <i>\n|       <p>\n|         <font>\n|           color=\"red\"\n|           \"Italic and Red \"\n|         \" Just italic.\"\n|       \" Italic only.\"\n|     \" Plain\n\"\n|     <p>\n|       \"I should not be red. \"\n|       <font>\n|         color=\"red\"\n|         \"Red. \"\n|         <i>\n|           \"Italic and red.\"\n|     <font>\n|       color=\"red\"\n|       <i>\n|         \"\n\"\n|     <p>\n|       <font>\n|         color=\"red\"\n|         <i>\n|           \"Italic and red. \"\n|         \" Red.\"\n|       \" I should not be red.\"\n|     \"\n\"\n|     <b>\n|       \"Bold \"\n|       <i>\n|         \"Bold and italic\"\n|     <i>\n|       \" Only Italic \"\n|     \" Plain\"\n"
7551         }, {
7552                 name: "tricky01.dat #3"
7553                 html: "<html><body>\n<p><font size=\"7\">First paragraph.</p>\n<p>Second paragraph.</p></font>\n<b><p><i>Bold and Italic</b> Italic</p>"
7554                 errors: 5
7555                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"\n\"\n|     <p>\n|       <font>\n|         size=\"7\"\n|         \"First paragraph.\"\n|     <font>\n|       size=\"7\"\n|       \"\n\"\n|       <p>\n|         \"Second paragraph.\"\n|     \"\n\"\n|     <b>\n|     <p>\n|       <b>\n|         <i>\n|           \"Bold and Italic\"\n|       <i>\n|         \" Italic\"\n"
7556         }, {
7557                 name: "tricky01.dat #4"
7558                 html: "<html>\n<dl>\n<dt><b>Boo\n<dd>Goo?\n</dl>\n</html>"
7559                 errors: 4
7560                 expected: "| <html>\n|   <head>\n|   <body>\n|     <dl>\n|       \"\n\"\n|       <dt>\n|         <b>\n|           \"Boo\n\"\n|       <dd>\n|         <b>\n|           \"Goo?\n\"\n|     <b>\n|       \"\n\"\n"
7561         }, {
7562                 name: "tricky01.dat #5"
7563                 html: "<html><body>\n<label><a><div>Hello<div>World</div></a></label>  \n</body></html>"
7564                 errors: 4
7565                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"\n\"\n|     <label>\n|       <a>\n|       <div>\n|         <a>\n|           \"Hello\"\n|           <div>\n|             \"World\"\n|         \"  \n\"\n"
7566         }, {
7567                 name: "tricky01.dat #6"
7568                 html: "<table><center> <font>a</center> <img> <tr><td> </td> </tr> </table>"
7569                 errors: 9
7570                 expected: "| <html>\n|   <head>\n|   <body>\n|     <center>\n|       \" \"\n|       <font>\n|         \"a\"\n|     <font>\n|       <img>\n|       \" \"\n|     <table>\n|       \" \"\n|       <tbody>\n|         <tr>\n|           <td>\n|             \" \"\n|           \" \"\n|         \" \"\n"
7571         }, {
7572                 name: "tricky01.dat #7"
7573                 html: "<table><tr><p><a><p>You should see this text."
7574                 errors: 31
7575                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <a>\n|     <p>\n|       <a>\n|         \"You should see this text.\"\n|     <table>\n|       <tbody>\n|         <tr>\n"
7576         }, {
7577                 name: "tricky01.dat #8"
7578                 html: "<TABLE>\n<TR>\n<CENTER><CENTER><TD></TD></TR><TR>\n<FONT>\n<TABLE><tr></tr></TABLE>\n</P>\n<a></font><font></a>\nThis page contains an insanely badly-nested tag sequence."
7579                 errors: 10
7580                 expected: "| <html>\n|   <head>\n|   <body>\n|     <center>\n|       <center>\n|     <font>\n|       \"\n\"\n|     <table>\n|       \"\n\"\n|       <tbody>\n|         <tr>\n|           \"\n\"\n|           <td>\n|         <tr>\n|           \"\n\"\n|     <table>\n|       <tbody>\n|         <tr>\n|     <font>\n|       \"\n\"\n|       <p>\n|       \"\n\"\n|       <a>\n|     <a>\n|       <font>\n|     <font>\n|       \"\nThis page contains an insanely badly-nested tag sequence.\"\n"
7581         }, {
7582                 name: "tricky01.dat #9"
7583                 html: "<html>\n<body>\n<b><nobr><div>This text is in a div inside a nobr</nobr>More text that should not be in the nobr, i.e., the\nnobr should have closed the div inside it implicitly. </b><pre>A pre tag outside everything else.</pre>\n</body>\n</html>"
7584                 errors: 4
7585                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"\n\"\n|     <b>\n|       <nobr>\n|     <div>\n|       <b>\n|         <nobr>\n|           \"This text is in a div inside a nobr\"\n|         \"More text that should not be in the nobr, i.e., the\nnobr should have closed the div inside it implicitly. \"\n|       <pre>\n|         \"A pre tag outside everything else.\"\n|       \"\n\n\"\n"
7586         }, {
7587                 name: "webkit01.dat #1"
7588                 html: "Test"
7589                 errors: 1
7590                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"Test\"\n"
7591         }, {
7592                 name: "webkit01.dat #2"
7593                 html: "<div></div>"
7594                 errors: 1
7595                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n"
7596         }, {
7597                 name: "webkit01.dat #3"
7598                 html: "<div>Test</div>"
7599                 errors: 1
7600                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"Test\"\n"
7601         }, {
7602                 name: "webkit01.dat #4"
7603                 html: "<di"
7604                 errors: 2
7605                 expected: "| <html>\n|   <head>\n|   <body>\n"
7606         }, {
7607                 name: "webkit01.dat #5"
7608                 html: "<div>Hello</div>\n<script>\nconsole.log(\"PASS\");\n</script>\n<div>Bye</div>"
7609                 errors: 1
7610                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"Hello\"\n|     \"\n\"\n|     <script>\n|       \"\nconsole.log(\"PASS\");\n\"\n|     \"\n\"\n|     <div>\n|       \"Bye\"\n"
7611         }, {
7612                 name: "webkit01.dat #6"
7613                 html: "<div foo=\"bar\">Hello</div>"
7614                 errors: 1
7615                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       foo=\"bar\"\n|       \"Hello\"\n"
7616         }, {
7617                 name: "webkit01.dat #7"
7618                 html: "<div>Hello</div>\n<script>\nconsole.log(\"FOO<span>BAR</span>BAZ\");\n</script>\n<div>Bye</div>"
7619                 errors: 1
7620                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"Hello\"\n|     \"\n\"\n|     <script>\n|       \"\nconsole.log(\"FOO<span>BAR</span>BAZ\");\n\"\n|     \"\n\"\n|     <div>\n|       \"Bye\"\n"
7621         }, {
7622                 name: "webkit01.dat #8"
7623                 html: "<foo bar=\"baz\"></foo><potato quack=\"duck\"></potato>"
7624                 errors: 1
7625                 expected: "| <html>\n|   <head>\n|   <body>\n|     <foo>\n|       bar=\"baz\"\n|     <potato>\n|       quack=\"duck\"\n"
7626         }, {
7627                 name: "webkit01.dat #9"
7628                 html: "<foo bar=\"baz\"><potato quack=\"duck\"></potato></foo>"
7629                 errors: 1
7630                 expected: "| <html>\n|   <head>\n|   <body>\n|     <foo>\n|       bar=\"baz\"\n|       <potato>\n|         quack=\"duck\"\n"
7631         }, {
7632                 name: "webkit01.dat #10"
7633                 html: "<foo></foo bar=\"baz\"><potato></potato quack=\"duck\">"
7634                 errors: 3
7635                 expected: "| <html>\n|   <head>\n|   <body>\n|     <foo>\n|     <potato>\n"
7636         }, {
7637                 name: "webkit01.dat #11"
7638                 html: "</ tttt>"
7639                 errors: 2
7640                 expected: "| <!--  tttt -->\n| <html>\n|   <head>\n|   <body>\n"
7641         }, {
7642                 name: "webkit01.dat #12"
7643                 html: "<div FOO ><img><img></div>"
7644                 errors: 1
7645                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       foo=\"\"\n|       <img>\n|       <img>\n"
7646         }, {
7647                 name: "webkit01.dat #13"
7648                 html: "<p>Test</p<p>Test2</p>"
7649                 errors: 2
7650                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       \"TestTest2\"\n"
7651         }, {
7652                 name: "webkit01.dat #14"
7653                 html: "<rdar://problem/6869687>"
7654                 errors: 5
7655                 expected: "| <html>\n|   <head>\n|   <body>\n|     <rdar:>\n|       6869687=\"\"\n|       problem=\"\"\n"
7656         }, {
7657                 name: "webkit01.dat #15"
7658                 html: "<A>test< /A>"
7659                 errors: 3
7660                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       \"test< /A>\"\n"
7661         }, {
7662                 name: "webkit01.dat #16"
7663                 html: "&lt;"
7664                 errors: 1
7665                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"<\"\n"
7666         }, {
7667                 name: "webkit01.dat #17"
7668                 html: "<body foo='bar'><body foo='baz' yo='mama'>"
7669                 errors: 2
7670                 expected: "| <html>\n|   <head>\n|   <body>\n|     foo=\"bar\"\n|     yo=\"mama\"\n"
7671         }, {
7672                 name: "webkit01.dat #18"
7673                 html: "<body></br foo=\"bar\"></body>"
7674                 errors: 3
7675                 expected: "| <html>\n|   <head>\n|   <body>\n|     <br>\n"
7676         }, {
7677                 name: "webkit01.dat #19"
7678                 html: "<bdy><br foo=\"bar\"></body>"
7679                 errors: 2
7680                 expected: "| <html>\n|   <head>\n|   <body>\n|     <bdy>\n|       <br>\n|         foo=\"bar\"\n"
7681         }, {
7682                 name: "webkit01.dat #20"
7683                 html: "<body></body></br foo=\"bar\">"
7684                 errors: 4
7685                 expected: "| <html>\n|   <head>\n|   <body>\n|     <br>\n"
7686         }, {
7687                 name: "webkit01.dat #21"
7688                 html: "<bdy></body><br foo=\"bar\">"
7689                 errors: 4
7690                 expected: "| <html>\n|   <head>\n|   <body>\n|     <bdy>\n|       <br>\n|         foo=\"bar\"\n"
7691         }, {
7692                 name: "webkit01.dat #22"
7693                 html: "<html><body></body></html><!-- Hi there -->"
7694                 errors: 1
7695                 expected: "| <html>\n|   <head>\n|   <body>\n| <!--  Hi there  -->\n"
7696         }, {
7697                 name: "webkit01.dat #23"
7698                 html: "<html><body></body></html>x<!-- Hi there -->"
7699                 errors: 2
7700                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"x\"\n|     <!--  Hi there  -->\n"
7701         }, {
7702                 name: "webkit01.dat #24"
7703                 html: "<html><body></body></html>x<!-- Hi there --></html><!-- Again -->"
7704                 errors: 2
7705                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"x\"\n|     <!--  Hi there  -->\n| <!--  Again  -->\n"
7706         }, {
7707                 name: "webkit01.dat #25"
7708                 html: "<html><body></body></html>x<!-- Hi there --></body></html><!-- Again -->"
7709                 errors: 2
7710                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"x\"\n|     <!--  Hi there  -->\n| <!--  Again  -->\n"
7711         }, {
7712                 name: "webkit01.dat #26"
7713                 html: "<html><body><ruby><div><rp>xx</rp></div></ruby></body></html>"
7714                 errors: 2
7715                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <div>\n|         <rp>\n|           \"xx\"\n"
7716         }, {
7717                 name: "webkit01.dat #27"
7718                 html: "<html><body><ruby><div><rt>xx</rt></div></ruby></body></html>"
7719                 errors: 2
7720                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <div>\n|         <rt>\n|           \"xx\"\n"
7721         }, {
7722                 name: "webkit01.dat #28"
7723                 html: "<html><frameset><!--1--><noframes>A</noframes><!--2--></frameset><!--3--><noframes>B</noframes><!--4--></html><!--5--><noframes>C</noframes><!--6-->"
7724                 errors: 1
7725                 expected: "| <html>\n|   <head>\n|   <frameset>\n|     <!-- 1 -->\n|     <noframes>\n|       \"A\"\n|     <!-- 2 -->\n|   <!-- 3 -->\n|   <noframes>\n|     \"B\"\n|   <!-- 4 -->\n|   <noframes>\n|     \"C\"\n| <!-- 5 -->\n| <!-- 6 -->\n"
7726         }, {
7727                 name: "webkit01.dat #29"
7728                 html: "<select><option>A<select><option>B<select><option>C<select><option>D<select><option>E<select><option>F<select><option>G<select>"
7729                 errors: 6
7730                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n|         \"A\"\n|     <option>\n|       \"B\"\n|       <select>\n|         <option>\n|           \"C\"\n|     <option>\n|       \"D\"\n|       <select>\n|         <option>\n|           \"E\"\n|     <option>\n|       \"F\"\n|       <select>\n|         <option>\n|           \"G\"\n"
7731         }, {
7732                 name: "webkit01.dat #30"
7733                 html: "<dd><dd><dt><dt><dd><li><li>"
7734                 errors: 1
7735                 expected: "| <html>\n|   <head>\n|   <body>\n|     <dd>\n|     <dd>\n|     <dt>\n|     <dt>\n|     <dd>\n|       <li>\n|       <li>\n"
7736         }, {
7737                 name: "webkit01.dat #31"
7738                 html: "<div><b></div><div><nobr>a<nobr>"
7739                 errors: 4
7740                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <b>\n|     <div>\n|       <b>\n|         <nobr>\n|           \"a\"\n|         <nobr>\n"
7741         }, {
7742                 name: "webkit01.dat #32"
7743                 html: "<head></head>\n<body></body>"
7744                 errors: 1
7745                 expected: "| <html>\n|   <head>\n|   \"\n\"\n|   <body>\n"
7746         }, {
7747                 name: "webkit01.dat #33"
7748                 html: "<head></head> <style></style>ddd"
7749                 errors: 2
7750                 expected: "| <html>\n|   <head>\n|     <style>\n|   \" \"\n|   <body>\n|     \"ddd\"\n"
7751         }, {
7752                 name: "webkit01.dat #34"
7753                 html: "<kbd><table></kbd><col><select><tr>"
7754                 errors: 6
7755                 expected: "| <html>\n|   <head>\n|   <body>\n|     <kbd>\n|       <select>\n|       <table>\n|         <colgroup>\n|           <col>\n|         <tbody>\n|           <tr>\n"
7756         }, {
7757                 name: "webkit01.dat #35"
7758                 html: "<kbd><table></kbd><col><select><tr></table><div>"
7759                 errors: 6
7760                 expected: "| <html>\n|   <head>\n|   <body>\n|     <kbd>\n|       <select>\n|       <table>\n|         <colgroup>\n|           <col>\n|         <tbody>\n|           <tr>\n|       <div>\n"
7761         }, {
7762                 name: "webkit01.dat #36"
7763                 html: "<a><li><style></style><title></title></a>"
7764                 errors: 2
7765                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|     <li>\n|       <a>\n|         <style>\n|         <title>\n"
7766         }, {
7767                 name: "webkit01.dat #37"
7768                 html: "<font></p><p><meta><title></title></font>"
7769                 errors: 3
7770                 expected: "| <html>\n|   <head>\n|   <body>\n|     <font>\n|       <p>\n|     <p>\n|       <font>\n|         <meta>\n|         <title>\n"
7771         }, {
7772                 name: "webkit01.dat #38"
7773                 html: "<a><center><title></title><a>"
7774                 errors: 4
7775                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|     <center>\n|       <a>\n|         <title>\n|       <a>\n"
7776         }, {
7777                 name: "webkit01.dat #39"
7778                 html: "<svg><title><div>"
7779                 errors: 2
7780                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg title>\n|         <div>\n"
7781         }, {
7782                 name: "webkit01.dat #40"
7783                 html: "<svg><title><rect><div>"
7784                 errors: 2
7785                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg title>\n|         <rect>\n|           <div>\n"
7786         }, {
7787                 name: "webkit01.dat #41"
7788                 html: "<svg><title><svg><div>"
7789                 errors: 3
7790                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg title>\n|         <svg svg>\n|         <div>\n"
7791         }, {
7792                 name: "webkit01.dat #42"
7793                 html: "<img <=\"\" FAIL>"
7794                 errors: 2
7795                 expected: "| <html>\n|   <head>\n|   <body>\n|     <img>\n|       <=\"\"\n|       fail=\"\"\n"
7796         }, {
7797                 name: "webkit01.dat #43"
7798                 html: "<ul><li><div id='foo'/>A</li><li>B<div>C</div></li></ul>"
7799                 errors: 3
7800                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ul>\n|       <li>\n|         <div>\n|           id=\"foo\"\n|           \"A\"\n|       <li>\n|         \"B\"\n|         <div>\n|           \"C\"\n"
7801         }, {
7802                 name: "webkit01.dat #44"
7803                 html: "<svg><em><desc></em>"
7804                 errors: 3
7805                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|     <em>\n|       <desc>\n"
7806         }, {
7807                 name: "webkit01.dat #45"
7808                 html: "<table><tr><td><svg><desc><td></desc><circle>"
7809                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <svg svg>\n|               <svg desc>\n|           <td>\n|             <circle>\n"
7810         }, {
7811                 name: "webkit01.dat #46"
7812                 html: "<svg><tfoot></mi><td>"
7813                 errors: 4
7814                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg tfoot>\n|         <svg td>\n"
7815         }, {
7816                 name: "webkit01.dat #47"
7817                 html: "<math><mrow><mrow><mn>1</mn></mrow><mi>a</mi></mrow></math>"
7818                 errors: 1
7819                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mrow>\n|         <math mrow>\n|           <math mn>\n|             \"1\"\n|         <math mi>\n|           \"a\"\n"
7820         }, {
7821                 name: "webkit01.dat #48"
7822                 html: "<!doctype html><input type=\"hidden\"><frameset>"
7823                 errors: 2
7824                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
7825         }, {
7826                 name: "webkit01.dat #49"
7827                 html: "<!doctype html><input type=\"button\"><frameset>"
7828                 errors: 1
7829                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <input>\n|       type=\"button\"\n"
7830         }, {
7831                 name: "webkit02.dat #1"
7832                 html: "<foo bar=qux/>"
7833                 errors: 2
7834                 expected: "| <html>\n|   <head>\n|   <body>\n|     <foo>\n|       bar=\"qux/\"\n"
7835         }, {
7836                 name: "webkit02.dat #2"
7837                 html: "<p id=\"status\"><noscript><strong>A</strong></noscript><span>B</span></p>"
7838                 scripting: true
7839                 errors: 1
7840                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       id=\"status\"\n|       <noscript>\n|         \"<strong>A</strong>\"\n|       <span>\n|         \"B\"\n"
7841         }, {
7842                 name: "webkit02.dat #3"
7843                 html: "<p id=\"status\"><noscript><strong>A</strong></noscript><span>B</span></p>"
7844                 scripting: false
7845                 errors: 1
7846                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       id=\"status\"\n|       <noscript>\n|         <strong>\n|           \"A\"\n|       <span>\n|         \"B\"\n"
7847         }, {
7848                 name: "webkit02.dat #4"
7849                 html: "<div><sarcasm><div></div></sarcasm></div>"
7850                 errors: 1
7851                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <sarcasm>\n|         <div>\n"
7852         }, {
7853                 name: "webkit02.dat #5"
7854                 html: "<html><body><img src=\"\" border=\"0\" alt=\"><div>A</div></body></html>"
7855                 errors: 2
7856                 expected: "| <html>\n|   <head>\n|   <body>\n"
7857         }, {
7858                 name: "webkit02.dat #6"
7859                 html: "<table><td></tbody>A"
7860                 errors: 4
7861                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"A\"\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n"
7862         }, {
7863                 name: "webkit02.dat #7"
7864                 html: "<table><td></thead>A"
7865                 errors: 4
7866                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             \"A\"\n"
7867         }, {
7868                 name: "webkit02.dat #8"
7869                 html: "<table><td></tfoot>A"
7870                 errors: 4
7871                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             \"A\"\n"
7872         }, {
7873                 name: "webkit02.dat #9"
7874                 html: "<table><thead><td></tbody>A"
7875                 errors: 4
7876                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <thead>\n|         <tr>\n|           <td>\n|             \"A\"\n"
7877         }, {
7878                 name: "webkit02.dat #10"
7879                 html: "<legend>test</legend>"
7880                 expected: "| <html>\n|   <head>\n|   <body>\n|     <legend>\n|       \"test\"\n"
7881         }, {
7882                 name: "webkit02.dat #11"
7883                 html: "<table><input>"
7884                 expected: "| <html>\n|   <head>\n|   <body>\n|     <input>\n|     <table>\n"
7885         }, {
7886                 name: "webkit02.dat #12"
7887                 html: "<b><em><foo><foo><aside></b>"
7888                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <em>\n|         <foo>\n|           <foo>\n|     <em>\n|       <aside>\n|         <b>\n"
7889         }, {
7890                 name: "webkit02.dat #13"
7891                 html: "<b><em><foo><foo><aside></b></em>"
7892                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <em>\n|         <foo>\n|           <foo>\n|     <em>\n|     <aside>\n|       <em>\n|         <b>\n"
7893         }, {
7894                 name: "webkit02.dat #14"
7895                 html: "<b><em><foo><foo><foo><aside></b>"
7896                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <em>\n|         <foo>\n|           <foo>\n|             <foo>\n|     <aside>\n|       <b>\n"
7897         }, {
7898                 name: "webkit02.dat #15"
7899                 html: "<b><em><foo><foo><foo><aside></b></em>"
7900                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <em>\n|         <foo>\n|           <foo>\n|             <foo>\n|     <aside>\n|       <b>\n"
7901         }, {
7902                 name: "webkit02.dat #16"
7903                 html: "<b><em><foo><foo><foo><foo><foo><foo><foo><foo><foo><foo><aside></b></em>"
7904                 fragment: "div"
7905                 expected: "| <b>\n|   <em>\n|     <foo>\n|       <foo>\n|         <foo>\n|           <foo>\n|             <foo>\n|               <foo>\n|                 <foo>\n|                   <foo>\n|                     <foo>\n|                       <foo>\n| <aside>\n|   <b>\n"
7906         }, {
7907                 name: "webkit02.dat #17"
7908                 html: "<b><em><foo><foob><foob><foob><foob><fooc><fooc><fooc><fooc><food><aside></b></em>"
7909                 fragment: "div"
7910                 expected: "| <b>\n|   <em>\n|     <foo>\n|       <foob>\n|         <foob>\n|           <foob>\n|             <foob>\n|               <fooc>\n|                 <fooc>\n|                   <fooc>\n|                     <fooc>\n|                       <food>\n| <aside>\n|   <b>\n"
7911         }, {
7912                 name: "webkit02.dat #18"
7913                 html: "<isindex action=\"x\">"
7914                 fragment: "table"
7915                 expected: "| <form>\n|   action=\"x\"\n|   <hr>\n|   <label>\n|     \"This is a searchable index. Enter search keywords: \"\n|     <input>\n|       name=\"isindex\"\n|   <hr>\n"
7916         }, {
7917                 name: "webkit02.dat #19"
7918                 html: "<option><XH<optgroup></optgroup>"
7919                 fragment: "select"
7920                 expected: "| <option>\n"
7921         }, {
7922                 name: "webkit02.dat #20"
7923                 html: "<svg><foreignObject><div>foo</div><plaintext></foreignObject></svg><div>bar</div>"
7924                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg foreignObject>\n|         <div>\n|           \"foo\"\n|         <plaintext>\n|           \"</foreignObject></svg><div>bar</div>\"\n"
7925         }, {
7926                 name: "webkit02.dat #21"
7927                 html: "<svg><foreignObject></foreignObject><title></svg>foo"
7928                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg foreignObject>\n|       <svg title>\n|     \"foo\"\n"
7929         }, {
7930                 name: "webkit02.dat #22"
7931                 html: "</foreignObject><plaintext><div>foo</div>"
7932                 expected: "| <html>\n|   <head>\n|   <body>\n|     <plaintext>\n|       \"<div>foo</div>\"\n"
7933         }
7934 ]
7935
7936 if window?.wheic?
7937         wheic = window.wheic
7938 else
7939         wheic = require './wheic.js'
7940
7941 serialize_els = (els, prefix = '| ') ->
7942         ret = ''
7943         for el in els
7944                 switch el.type
7945                         when wheic.TYPE_TAG
7946                                 ret += "#{prefix}<"
7947                                 if el.namespace is wheic.NS_MATHML
7948                                         ret += "math "
7949                                 if el.namespace is wheic.NS_SVG
7950                                         ret += "svg "
7951                                 ret += "#{el.name}>\n"
7952                                 attr_keys = []
7953                                 for k of el.attrs
7954                                         attr_keys.push k
7955                                 attr_keys.sort() # TODO this should be "lexicographically by UTF-16 code unit"
7956                                 for k in attr_keys
7957                                         ret += "#{prefix}  #{k}=\"#{el.attrs[k]}\"\n"
7958                                 if el.name is 'template' # ?check ns
7959                                         ret += "#{prefix}  content\n"
7960                                         ret += serialize_els el.children, "#{prefix}    "
7961                                 else
7962                                         ret += serialize_els el.children, "#{prefix}  "
7963                         when wheic.TYPE_TEXT
7964                                 ret += "#{prefix}\"#{el.text}\"\n"
7965                         when wheic.TYPE_COMMENT
7966                                 ret += "#{prefix}<!-- #{el.text} -->\n"
7967                         when wheic.TYPE_DOCTYPE
7968                                 ret += "#{prefix}<!DOCTYPE #{el.name}"
7969                                 if (el.public_identifier? and el.public_identifier.length > 0) or (el.system_identifier? and el.system_identifier.length > 0)
7970                                         ret += " \"#{el.public_identifier ? ''}\""
7971                                         ret += " \"#{el.system_identifier ? ''}\""
7972                                 ret += ">\n"
7973                         else
7974                                 ret += "#{prefix}UNKNOWN TAG TYPE #{el.type}"
7975         return ret
7976
7977 test_results = passed: 0, failed: 0, fragment: 0, pending: 0, broken: 0
7978 test_parser = (args) ->
7979         if args.fragment? # hide fragment tests for now
7980                 test_results.fragment += 1
7981                 return
7982         if args.name.substr(0, 20) is "pending-spec-changes" # hide for now
7983                 test_results.pending += 1
7984                 return
7985         if args.html.indexOf("\u0000") > -1 and args.expected.indexOf("\ufffd") is -1
7986                 # these tests seem to think that \u0000 doesn't become \uffff in_body
7987                 test_results.broken += 1
7988                 return
7989         wheic.debug_log_reset()
7990         parse_errors = []
7991         args.error_cb = (i) ->
7992                 parse_errors.push i
7993         prev_node_id = 0 # reset counter
7994         parsed = wheic.parse_html args
7995         serialized = serialize_els parsed
7996         if serialized isnt args.expected
7997                 test_results.failed += 1
7998                 if test_results.failed is 1
7999                         wheic.debug_log_each (str) ->
8000                                 console.log str
8001                         console.log "FAILED: \"#{args.name}\""
8002                         console.log "      Input: #{args.html}"
8003                         if args.fragment?
8004                                 console.log "   Fragment: #{args.fragment}"
8005                         console.log "    Correct: #{args.expected}"
8006                         console.log "     Output: #{serialized}"
8007                         if parse_errors.length > 0
8008                                 console.log " parse errs: #{JSON.stringify parse_errors}"
8009                         else
8010                                 console.log "   No parse errors"
8011         else
8012                 test_results.passed += 1
8013                 # console.log "passed \"#{args.name}\""
8014 test_summary = ->
8015         console.log "Tests passed: #{test_results.passed}, Failed: #{test_results.failed}, fragment: #{test_results.fragment}, pending: #{test_results.pending}, broken: #{test_results.broken}"
8016
8017
8018 next_test = 0
8019 run_tests_and_breathe = ->
8020         start_time = new Date()
8021         loop
8022                 if next_test >= tests.length
8023                         test_summary()
8024                         return
8025                 test_parser tests[next_test]
8026                 next_test += 1
8027                 now = new Date()
8028                 if now - start_time > 100 # miliseconds
8029                         break
8030         setTimeout run_tests_and_breathe, 1
8031 run_tests_and_breathe()