JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
ignore fragment tests for now
[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,"document-fragment":"svg path"
1124                 expected: "| <svg nobr>\n|   \"X\"\n"
1125         }, {
1126                 name: "foreign-fragment.dat #2"
1127                 html: "<font color></font>X"
1128                 errors: 1,"document-fragment":"svg path"
1129                 expected: "| <svg font>\n|   color=\"\"\n| \"X\"\n"
1130         }, {
1131                 name: "foreign-fragment.dat #3"
1132                 html: "<font></font>X"
1133                 fragment: "svg path"
1134                 expected: "| <svg font>\n| \"X\"\n"
1135         }, {
1136                 name: "foreign-fragment.dat #4"
1137                 html: "<g></path>X"
1138                 errors: 3,"document-fragment":"svg path"
1139                 expected: "| <svg g>\n|   \"X\"\n"
1140         }, {
1141                 name: "foreign-fragment.dat #5"
1142                 html: "</path>X"
1143                 errors: 1,"document-fragment":"svg path"
1144                 expected: "| \"X\"\n"
1145         }, {
1146                 name: "foreign-fragment.dat #6"
1147                 html: "</foreignObject>X"
1148                 errors: 1,"document-fragment":"svg foreignObject"
1149                 expected: "| \"X\"\n"
1150         }, {
1151                 name: "foreign-fragment.dat #7"
1152                 html: "</desc>X"
1153                 errors: 1,"document-fragment":"svg desc"
1154                 expected: "| \"X\"\n"
1155         }, {
1156                 name: "foreign-fragment.dat #8"
1157                 html: "</title>X"
1158                 errors: 1,"document-fragment":"svg title"
1159                 expected: "| \"X\"\n"
1160         }, {
1161                 name: "foreign-fragment.dat #9"
1162                 html: "</svg>X"
1163                 errors: 1,"document-fragment":"svg svg"
1164                 expected: "| \"X\"\n"
1165         }, {
1166                 name: "foreign-fragment.dat #10"
1167                 html: "</mfenced>X"
1168                 errors: 1,"document-fragment":"math mfenced"
1169                 expected: "| \"X\"\n"
1170         }, {
1171                 name: "foreign-fragment.dat #11"
1172                 html: "</malignmark>X"
1173                 errors: 1,"document-fragment":"math malignmark"
1174                 expected: "| \"X\"\n"
1175         }, {
1176                 name: "foreign-fragment.dat #12"
1177                 html: "</math>X"
1178                 errors: 1,"document-fragment":"math math"
1179                 expected: "| \"X\"\n"
1180         }, {
1181                 name: "foreign-fragment.dat #13"
1182                 html: "</annotation-xml>X"
1183                 errors: 1,"document-fragment":"math annotation-xml"
1184                 expected: "| \"X\"\n"
1185         }, {
1186                 name: "foreign-fragment.dat #14"
1187                 html: "</mtext>X"
1188                 errors: 1,"document-fragment":"math mtext"
1189                 expected: "| \"X\"\n"
1190         }, {
1191                 name: "foreign-fragment.dat #15"
1192                 html: "</mi>X"
1193                 errors: 1,"document-fragment":"math mi"
1194                 expected: "| \"X\"\n"
1195         }, {
1196                 name: "foreign-fragment.dat #16"
1197                 html: "</mo>X"
1198                 errors: 1,"document-fragment":"math mo"
1199                 expected: "| \"X\"\n"
1200         }, {
1201                 name: "foreign-fragment.dat #17"
1202                 html: "</mn>X"
1203                 errors: 1,"document-fragment":"math mn"
1204                 expected: "| \"X\"\n"
1205         }, {
1206                 name: "foreign-fragment.dat #18"
1207                 html: "</ms>X"
1208                 errors: 1,"document-fragment":"math ms"
1209                 expected: "| \"X\"\n"
1210         }, {
1211                 name: "foreign-fragment.dat #19"
1212                 html: "<b></b><mglyph/><i></i><malignmark/><u></u><ms/>X"
1213                 errors: 3,"document-fragment":"math ms"
1214                 expected: "| <b>\n| <math mglyph>\n| <i>\n| <math malignmark>\n| <u>\n| <ms>\n|   \"X\"\n"
1215         }, {
1216                 name: "foreign-fragment.dat #20"
1217                 html: "<malignmark></malignmark>"
1218                 fragment: "math ms"
1219                 expected: "| <math malignmark>\n"
1220         }, {
1221                 name: "foreign-fragment.dat #21"
1222                 html: "<div></div>"
1223                 fragment: "math ms"
1224                 expected: "| <div>\n"
1225         }, {
1226                 name: "foreign-fragment.dat #22"
1227                 html: "<figure></figure>"
1228                 fragment: "math ms"
1229                 expected: "| <figure>\n"
1230         }, {
1231                 name: "foreign-fragment.dat #23"
1232                 html: "<b></b><mglyph/><i></i><malignmark/><u></u><mn/>X"
1233                 errors: 3,"document-fragment":"math mn"
1234                 expected: "| <b>\n| <math mglyph>\n| <i>\n| <math malignmark>\n| <u>\n| <mn>\n|   \"X\"\n"
1235         }, {
1236                 name: "foreign-fragment.dat #24"
1237                 html: "<malignmark></malignmark>"
1238                 fragment: "math mn"
1239                 expected: "| <math malignmark>\n"
1240         }, {
1241                 name: "foreign-fragment.dat #25"
1242                 html: "<div></div>"
1243                 fragment: "math mn"
1244                 expected: "| <div>\n"
1245         }, {
1246                 name: "foreign-fragment.dat #26"
1247                 html: "<figure></figure>"
1248                 fragment: "math mn"
1249                 expected: "| <figure>\n"
1250         }, {
1251                 name: "foreign-fragment.dat #27"
1252                 html: "<b></b><mglyph/><i></i><malignmark/><u></u><mo/>X"
1253                 errors: 3,"document-fragment":"math mo"
1254                 expected: "| <b>\n| <math mglyph>\n| <i>\n| <math malignmark>\n| <u>\n| <mo>\n|   \"X\"\n"
1255         }, {
1256                 name: "foreign-fragment.dat #28"
1257                 html: "<malignmark></malignmark>"
1258                 fragment: "math mo"
1259                 expected: "| <math malignmark>\n"
1260         }, {
1261                 name: "foreign-fragment.dat #29"
1262                 html: "<div></div>"
1263                 fragment: "math mo"
1264                 expected: "| <div>\n"
1265         }, {
1266                 name: "foreign-fragment.dat #30"
1267                 html: "<figure></figure>"
1268                 fragment: "math mo"
1269                 expected: "| <figure>\n"
1270         }, {
1271                 name: "foreign-fragment.dat #31"
1272                 html: "<b></b><mglyph/><i></i><malignmark/><u></u><mi/>X"
1273                 errors: 3,"document-fragment":"math mi"
1274                 expected: "| <b>\n| <math mglyph>\n| <i>\n| <math malignmark>\n| <u>\n| <mi>\n|   \"X\"\n"
1275         }, {
1276                 name: "foreign-fragment.dat #32"
1277                 html: "<malignmark></malignmark>"
1278                 fragment: "math mi"
1279                 expected: "| <math malignmark>\n"
1280         }, {
1281                 name: "foreign-fragment.dat #33"
1282                 html: "<div></div>"
1283                 fragment: "math mi"
1284                 expected: "| <div>\n"
1285         }, {
1286                 name: "foreign-fragment.dat #34"
1287                 html: "<figure></figure>"
1288                 fragment: "math mi"
1289                 expected: "| <figure>\n"
1290         }, {
1291                 name: "foreign-fragment.dat #35"
1292                 html: "<b></b><mglyph/><i></i><malignmark/><u></u><mtext/>X"
1293                 errors: 3,"document-fragment":"math mtext"
1294                 expected: "| <b>\n| <math mglyph>\n| <i>\n| <math malignmark>\n| <u>\n| <mtext>\n|   \"X\"\n"
1295         }, {
1296                 name: "foreign-fragment.dat #36"
1297                 html: "<malignmark></malignmark>"
1298                 fragment: "math mtext"
1299                 expected: "| <math malignmark>\n"
1300         }, {
1301                 name: "foreign-fragment.dat #37"
1302                 html: "<div></div>"
1303                 fragment: "math mtext"
1304                 expected: "| <div>\n"
1305         }, {
1306                 name: "foreign-fragment.dat #38"
1307                 html: "<figure></figure>"
1308                 fragment: "math mtext"
1309                 expected: "| <figure>\n"
1310         }, {
1311                 name: "foreign-fragment.dat #39"
1312                 html: "<div></div>"
1313                 errors: 1,"document-fragment":"math annotation-xml"
1314                 expected: "| <math div>\n"
1315         }, {
1316                 name: "foreign-fragment.dat #40"
1317                 html: "<figure></figure>"
1318                 fragment: "math annotation-xml"
1319                 expected: "| <math figure>\n"
1320         }, {
1321                 name: "foreign-fragment.dat #41"
1322                 html: "<div></div>"
1323                 errors: 1,"document-fragment":"math math"
1324                 expected: "| <math div>\n"
1325         }, {
1326                 name: "foreign-fragment.dat #42"
1327                 html: "<figure></figure>"
1328                 fragment: "math math"
1329                 expected: "| <math figure>\n"
1330         }, {
1331                 name: "foreign-fragment.dat #43"
1332                 html: "<div></div>"
1333                 fragment: "svg foreignObject"
1334                 expected: "| <div>\n"
1335         }, {
1336                 name: "foreign-fragment.dat #44"
1337                 html: "<figure></figure>"
1338                 fragment: "svg foreignObject"
1339                 expected: "| <figure>\n"
1340         }, {
1341                 name: "foreign-fragment.dat #45"
1342                 html: "<div></div>"
1343                 fragment: "svg title"
1344                 expected: "| <div>\n"
1345         }, {
1346                 name: "foreign-fragment.dat #46"
1347                 html: "<figure></figure>"
1348                 fragment: "svg title"
1349                 expected: "| <figure>\n"
1350         }, {
1351                 name: "foreign-fragment.dat #47"
1352                 html: "<figure></figure>"
1353                 fragment: "svg desc"
1354                 expected: "| <figure>\n"
1355         }, {
1356                 name: "foreign-fragment.dat #48"
1357                 html: "<div><h1>X</h1></div>"
1358                 errors: 2,"document-fragment":"svg svg"
1359                 expected: "| <svg div>\n|   <svg h1>\n|     \"X\"\n"
1360         }, {
1361                 name: "foreign-fragment.dat #49"
1362                 html: "<div></div>"
1363                 errors: 1,"document-fragment":"svg svg"
1364                 expected: "| <svg div>\n"
1365         }, {
1366                 name: "foreign-fragment.dat #50"
1367                 html: "<div></div>"
1368                 fragment: "svg desc"
1369                 expected: "| <div>\n"
1370         }, {
1371                 name: "foreign-fragment.dat #51"
1372                 html: "<figure></figure>"
1373                 fragment: "svg desc"
1374                 expected: "| <figure>\n"
1375         }, {
1376                 name: "foreign-fragment.dat #52"
1377                 html: "<plaintext><foo>"
1378                 errors: 2,"document-fragment":"svg desc"
1379                 expected: "| <plaintext>\n|   \"<foo>\"\n"
1380         }, {
1381                 name: "foreign-fragment.dat #53"
1382                 html: "<frameset>X"
1383                 errors: 1,"document-fragment":"svg desc"
1384                 expected: "| \"X\"\n"
1385         }, {
1386                 name: "foreign-fragment.dat #54"
1387                 html: "<head>X"
1388                 errors: 1,"document-fragment":"svg desc"
1389                 expected: "| \"X\"\n"
1390         }, {
1391                 name: "foreign-fragment.dat #55"
1392                 html: "<body>X"
1393                 errors: 1,"document-fragment":"svg desc"
1394                 expected: "| \"X\"\n"
1395         }, {
1396                 name: "foreign-fragment.dat #56"
1397                 html: "<html>X"
1398                 errors: 1,"document-fragment":"svg desc"
1399                 expected: "| \"X\"\n"
1400         }, {
1401                 name: "foreign-fragment.dat #57"
1402                 html: "<html class=\"foo\">X"
1403                 errors: 1,"document-fragment":"svg desc"
1404                 expected: "| \"X\"\n"
1405         }, {
1406                 name: "foreign-fragment.dat #58"
1407                 html: "<body class=\"foo\">X"
1408                 errors: 1,"document-fragment":"svg desc"
1409                 expected: "| \"X\"\n"
1410         }, {
1411                 name: "html5test-com.dat #1"
1412                 html: "<div<div>"
1413                 errors: 2
1414                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div<div>\n"
1415         }, {
1416                 name: "html5test-com.dat #2"
1417                 html: "<div foo<bar=''>"
1418                 errors: 3
1419                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       foo<bar=\"\"\n"
1420         }, {
1421                 name: "html5test-com.dat #3"
1422                 html: "<div foo=`bar`>"
1423                 errors: 4
1424                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       foo=\"`bar`\"\n"
1425         }, {
1426                 name: "html5test-com.dat #4"
1427                 html: "<div \\\"foo=''>"
1428                 errors: 3
1429                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \\\"foo=\"\"\n"
1430         }, {
1431                 name: "html5test-com.dat #5"
1432                 html: "<a href='\\nbar'></a>"
1433                 errors: 1
1434                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       href=\"\\nbar\"\n"
1435         }, {
1436                 name: "html5test-com.dat #6"
1437                 html: "<!DOCTYPE html>"
1438                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
1439         }, {
1440                 name: "html5test-com.dat #7"
1441                 html: "&lang;&rang;"
1442                 errors: 1
1443                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"⟨⟩\"\n"
1444         }, {
1445                 name: "html5test-com.dat #8"
1446                 html: "&apos;"
1447                 errors: 1
1448                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"'\"\n"
1449         }, {
1450                 name: "html5test-com.dat #9"
1451                 html: "&ImaginaryI;"
1452                 errors: 1
1453                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"ⅈ\"\n"
1454         }, {
1455                 name: "html5test-com.dat #10"
1456                 html: "&Kopf;"
1457                 errors: 1
1458                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"𝕂\"\n"
1459         }, {
1460                 name: "html5test-com.dat #11"
1461                 html: "&notinva;"
1462                 errors: 1
1463                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"∉\"\n"
1464         }, {
1465                 name: "html5test-com.dat #12"
1466                 html: "<?import namespace=\"foo\" implementation=\"#bar\">"
1467                 errors: 2
1468                 expected: "| <!-- ?import namespace=\"foo\" implementation=\"#bar\" -->\n| <html>\n|   <head>\n|   <body>\n"
1469         }, {
1470                 name: "html5test-com.dat #13"
1471                 html: "<!--foo--bar-->"
1472                 errors: 2
1473                 expected: "| <!-- foo--bar -->\n| <html>\n|   <head>\n|   <body>\n"
1474         }, {
1475                 name: "html5test-com.dat #14"
1476                 html: "<![CDATA[x]]>"
1477                 errors: 2
1478                 expected: "| <!-- [CDATA[x]] -->\n| <html>\n|   <head>\n|   <body>\n"
1479         }, {
1480                 name: "html5test-com.dat #15"
1481                 html: "<textarea><!--</textarea>--></textarea>"
1482                 errors: 2
1483                 expected: "| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"<!--\"\n|     \"-->\"\n"
1484         }, {
1485                 name: "html5test-com.dat #16"
1486                 html: "<textarea><!--</textarea>-->"
1487                 errors: 1
1488                 expected: "| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"<!--\"\n|     \"-->\"\n"
1489         }, {
1490                 name: "html5test-com.dat #17"
1491                 html: "<style><!--</style>--></style>"
1492                 errors: 2
1493                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--\"\n|   <body>\n|     \"-->\"\n"
1494         }, {
1495                 name: "html5test-com.dat #18"
1496                 html: "<style><!--</style>-->"
1497                 errors: 1
1498                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--\"\n|   <body>\n|     \"-->\"\n"
1499         }, {
1500                 name: "html5test-com.dat #19"
1501                 html: "<ul><li>A </li> <li>B</li></ul>"
1502                 errors: 1
1503                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ul>\n|       <li>\n|         \"A \"\n|       \" \"\n|       <li>\n|         \"B\"\n"
1504         }, {
1505                 name: "html5test-com.dat #20"
1506                 html: "<table><form><input type=hidden><input></form><div></div></table>"
1507                 errors: 8
1508                 expected: "| <html>\n|   <head>\n|   <body>\n|     <input>\n|     <div>\n|     <table>\n|       <form>\n|       <input>\n|         type=\"hidden\"\n"
1509         }, {
1510                 name: "html5test-com.dat #21"
1511                 html: "<i>A<b>B<p></i>C</b>D"
1512                 errors: 3
1513                 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"
1514         }, {
1515                 name: "html5test-com.dat #22"
1516                 html: "<div></div>"
1517                 errors: 1
1518                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n"
1519         }, {
1520                 name: "html5test-com.dat #23"
1521                 html: "<svg></svg>"
1522                 errors: 1
1523                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n"
1524         }, {
1525                 name: "html5test-com.dat #24"
1526                 html: "<math></math>"
1527                 errors: 1
1528                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n"
1529         }, {
1530                 name: "inbody01.dat #1"
1531                 html: "<button>1</foo>"
1532                 errors: 3
1533                 expected: "| <html>\n|   <head>\n|   <body>\n|     <button>\n|       \"1\"\n"
1534         }, {
1535                 name: "inbody01.dat #2"
1536                 html: "<foo>1<p>2</foo>"
1537                 errors: 3
1538                 expected: "| <html>\n|   <head>\n|   <body>\n|     <foo>\n|       \"1\"\n|       <p>\n|         \"2\"\n"
1539         }, {
1540                 name: "inbody01.dat #3"
1541                 html: "<dd>1</foo>"
1542                 errors: 2
1543                 expected: "| <html>\n|   <head>\n|   <body>\n|     <dd>\n|       \"1\"\n"
1544         }, {
1545                 name: "inbody01.dat #4"
1546                 html: "<foo>1<dd>2</foo>"
1547                 errors: 3
1548                 expected: "| <html>\n|   <head>\n|   <body>\n|     <foo>\n|       \"1\"\n|       <dd>\n|         \"2\"\n"
1549         }, {
1550                 name: "isindex.dat #1"
1551                 html: "<isindex>"
1552                 errors: 2
1553                 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"
1554         }, {
1555                 name: "isindex.dat #2"
1556                 html: "<isindex name=\"A\" action=\"B\" prompt=\"C\" foo=\"D\">"
1557                 errors: 2
1558                 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"
1559         }, {
1560                 name: "isindex.dat #3"
1561                 html: "<form><isindex>"
1562                 errors: 3
1563                 expected: "| <html>\n|   <head>\n|   <body>\n|     <form>\n"
1564         }, {
1565                 name: "main-element.dat #1"
1566                 html: "<!doctype html><p>foo<main>bar<p>baz"
1567                 errors: 1
1568                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       \"foo\"\n|     <main>\n|       \"bar\"\n|       <p>\n|         \"baz\"\n"
1569         }, {
1570                 name: "main-element.dat #2"
1571                 html: "<!doctype html><main><p>foo</main>bar"
1572                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <main>\n|       <p>\n|         \"foo\"\n|     \"bar\"\n"
1573         }, {
1574                 name: "main-element.dat #3"
1575                 html: "<!DOCTYPE html>xxx<svg><x><g><a><main><b>"
1576                 errors: 2
1577                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"xxx\"\n|     <svg svg>\n|       <svg x>\n|         <svg g>\n|           <svg a>\n|             <svg main>\n|     <b>\n"
1578         }, {
1579                 name: "math.dat #1"
1580                 html: "<math><tr><td><mo><tr>"
1581                 fragment: "td"
1582                 expected: "| <math math>\n|   <math tr>\n|     <math td>\n|       <math mo>\n"
1583         }, {
1584                 name: "math.dat #2"
1585                 html: "<math><tr><td><mo><tr>"
1586                 fragment: "tr"
1587                 expected: "| <math math>\n|   <math tr>\n|     <math td>\n|       <math mo>\n"
1588         }, {
1589                 name: "math.dat #3"
1590                 html: "<math><thead><mo><tbody>"
1591                 fragment: "thead"
1592                 expected: "| <math math>\n|   <math thead>\n|     <math mo>\n"
1593         }, {
1594                 name: "math.dat #4"
1595                 html: "<math><tfoot><mo><tbody>"
1596                 fragment: "tfoot"
1597                 expected: "| <math math>\n|   <math tfoot>\n|     <math mo>\n"
1598         }, {
1599                 name: "math.dat #5"
1600                 html: "<math><tbody><mo><tfoot>"
1601                 fragment: "tbody"
1602                 expected: "| <math math>\n|   <math tbody>\n|     <math mo>\n"
1603         }, {
1604                 name: "math.dat #6"
1605                 html: "<math><tbody><mo></table>"
1606                 fragment: "tbody"
1607                 expected: "| <math math>\n|   <math tbody>\n|     <math mo>\n"
1608         }, {
1609                 name: "math.dat #7"
1610                 html: "<math><thead><mo></table>"
1611                 fragment: "tbody"
1612                 expected: "| <math math>\n|   <math thead>\n|     <math mo>\n"
1613         }, {
1614                 name: "math.dat #8"
1615                 html: "<math><tfoot><mo></table>"
1616                 fragment: "tbody"
1617                 expected: "| <math math>\n|   <math tfoot>\n|     <math mo>\n"
1618         }, {
1619                 name: "namespace-sensitivity.dat #1"
1620                 html: "<body><table><tr><td><svg><td><foreignObject><span></td>Foo"
1621                 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"
1622         }, {
1623                 name: "pending-spec-changes.dat #1"
1624                 html: "<input type=\"hidden\"><frameset>"
1625                 errors: 3
1626                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
1627         }, {
1628                 name: "pending-spec-changes.dat #2"
1629                 html: "<!DOCTYPE html><table><caption><svg>foo</table>bar"
1630                 errors: 2
1631                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <svg svg>\n|           \"foo\"\n|     \"bar\"\n"
1632         }, {
1633                 name: "pending-spec-changes.dat #3"
1634                 html: "<table><tr><td><svg><desc><td></desc><circle>"
1635                 errors: 4
1636                 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"
1637         }, {
1638                 name: "pending-spec-changes-plain-text-unsafe.dat #1"
1639                 html: "<body><table>\u0000filler\u0000text\u0000"
1640                 errors: 18
1641                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"fillertext\"\n|     <table>\n"
1642         }, {
1643                 name: "plain-text-unsafe.dat #1"
1644                 html: "FOO&#x000D;ZOO"
1645                 errors: 2
1646                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\rZOO\"\n"
1647         }, {
1648                 name: "plain-text-unsafe.dat #2"
1649                 html: "<html>\u0000<frameset></frameset>"
1650                 errors: 4
1651                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
1652         }, {
1653                 name: "plain-text-unsafe.dat #3"
1654                 html: "<html> \u0000 <frameset></frameset>"
1655                 errors: 4
1656                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
1657         }, {
1658                 name: "plain-text-unsafe.dat #4"
1659                 html: "<html>a\u0000a<frameset></frameset>"
1660                 errors: 5
1661                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"aa\"\n"
1662         }, {
1663                 name: "plain-text-unsafe.dat #5"
1664                 html: "<html>\u0000\u0000<frameset></frameset>"
1665                 errors: 6
1666                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
1667         }, {
1668                 name: "plain-text-unsafe.dat #6"
1669                 html: "<html>\u0000\n <frameset></frameset>"
1670                 errors: 4
1671                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
1672         }, {
1673                 name: "plain-text-unsafe.dat #7"
1674                 html: "<html><select>\u0000"
1675                 errors: 4
1676                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n"
1677         }, {
1678                 name: "plain-text-unsafe.dat #8"
1679                 html: "\u0000"
1680                 errors: 3
1681                 expected: "| <html>\n|   <head>\n|   <body>\n"
1682         }, {
1683                 name: "plain-text-unsafe.dat #9"
1684                 html: "<body>\u0000"
1685                 errors: 3
1686                 expected: "| <html>\n|   <head>\n|   <body>\n"
1687         }, {
1688                 name: "plain-text-unsafe.dat #10"
1689                 html: "<plaintext>\u0000filler\u0000text\u0000"
1690                 errors: 5
1691                 expected: "| <html>\n|   <head>\n|   <body>\n|     <plaintext>\n|       \"�filler�text�\"\n"
1692         }, {
1693                 name: "plain-text-unsafe.dat #11"
1694                 html: "<svg><![CDATA[\u0000filler\u0000text\u0000]]>"
1695                 errors: 5
1696                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"�filler�text�\"\n"
1697         }, {
1698                 name: "plain-text-unsafe.dat #12"
1699                 html: "<body><!\u0000>"
1700                 errors: 2
1701                 expected: "| <html>\n|   <head>\n|   <body>\n|     <!-- � -->\n"
1702         }, {
1703                 name: "plain-text-unsafe.dat #13"
1704                 html: "<body><!\u0000filler\u0000text>"
1705                 errors: 2
1706                 expected: "| <html>\n|   <head>\n|   <body>\n|     <!-- �filler�text -->\n"
1707         }, {
1708                 name: "plain-text-unsafe.dat #14"
1709                 html: "<body><svg><foreignObject>\u0000filler\u0000text"
1710                 errors: 6
1711                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg foreignObject>\n|         \"fillertext\"\n"
1712         }, {
1713                 name: "plain-text-unsafe.dat #15"
1714                 html: "<svg>\u0000filler\u0000text"
1715                 errors: 6
1716                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"�filler�text\"\n"
1717         }, {
1718                 name: "plain-text-unsafe.dat #16"
1719                 html: "<svg>\u0000<frameset>"
1720                 errors: 4
1721                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"�\"\n|       <svg frameset>\n"
1722         }, {
1723                 name: "plain-text-unsafe.dat #17"
1724                 html: "<svg>\u0000 <frameset>"
1725                 errors: 4
1726                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"� \"\n|       <svg frameset>\n"
1727         }, {
1728                 name: "plain-text-unsafe.dat #18"
1729                 html: "<svg>\u0000a<frameset>"
1730                 errors: 4
1731                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"�a\"\n|       <svg frameset>\n"
1732         }, {
1733                 name: "plain-text-unsafe.dat #19"
1734                 html: "<svg>\u0000</svg><frameset>"
1735                 errors: 5
1736                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
1737         }, {
1738                 name: "plain-text-unsafe.dat #20"
1739                 html: "<svg>\u0000 </svg><frameset>"
1740                 errors: 5
1741                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
1742         }, {
1743                 name: "plain-text-unsafe.dat #21"
1744                 html: "<svg>\u0000a</svg><frameset>"
1745                 errors: 4
1746                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"�a\"\n"
1747         }, {
1748                 name: "plain-text-unsafe.dat #22"
1749                 html: "<svg><path></path></svg><frameset>"
1750                 errors: 3
1751                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
1752         }, {
1753                 name: "plain-text-unsafe.dat #23"
1754                 html: "<svg><p><frameset>"
1755                 errors: 4
1756                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
1757         }, {
1758                 name: "plain-text-unsafe.dat #24"
1759                 html: "<!DOCTYPE html><pre>\r\n\r\nA</pre>"
1760                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"\nA\"\n"
1761         }, {
1762                 name: "plain-text-unsafe.dat #25"
1763                 html: "<!DOCTYPE html><pre>\r\rA</pre>"
1764                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"\nA\"\n"
1765         }, {
1766                 name: "plain-text-unsafe.dat #26"
1767                 html: "<!DOCTYPE html><pre>\rA</pre>"
1768                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"A\"\n"
1769         }, {
1770                 name: "plain-text-unsafe.dat #27"
1771                 html: "<!DOCTYPE html><table><tr><td><math><mtext>\u0000a"
1772                 errors: 3
1773                 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"
1774         }, {
1775                 name: "plain-text-unsafe.dat #28"
1776                 html: "<!DOCTYPE html><table><tr><td><svg><foreignObject>\u0000a"
1777                 errors: 3
1778                 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"
1779         }, {
1780                 name: "plain-text-unsafe.dat #29"
1781                 html: "<!DOCTYPE html><math><mi>a\u0000b"
1782                 errors: 3
1783                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mi>\n|         \"ab\"\n"
1784         }, {
1785                 name: "plain-text-unsafe.dat #30"
1786                 html: "<!DOCTYPE html><math><mo>a\u0000b"
1787                 errors: 3
1788                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mo>\n|         \"ab\"\n"
1789         }, {
1790                 name: "plain-text-unsafe.dat #31"
1791                 html: "<!DOCTYPE html><math><mn>a\u0000b"
1792                 errors: 3
1793                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mn>\n|         \"ab\"\n"
1794         }, {
1795                 name: "plain-text-unsafe.dat #32"
1796                 html: "<!DOCTYPE html><math><ms>a\u0000b"
1797                 errors: 3
1798                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math ms>\n|         \"ab\"\n"
1799         }, {
1800                 name: "plain-text-unsafe.dat #33"
1801                 html: "<!DOCTYPE html><math><mtext>a\u0000b"
1802                 errors: 3
1803                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mtext>\n|         \"ab\"\n"
1804         }, {
1805                 name: "ruby.dat #1"
1806                 html: "<html><ruby>a<rb>b<rb></ruby></html>"
1807                 errors: 1
1808                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rb>\n|         \"b\"\n|       <rb>\n"
1809         }, {
1810                 name: "ruby.dat #2"
1811                 html: "<html><ruby>a<rb>b<rt></ruby></html>"
1812                 errors: 1
1813                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rb>\n|         \"b\"\n|       <rt>\n"
1814         }, {
1815                 name: "ruby.dat #3"
1816                 html: "<html><ruby>a<rb>b<rtc></ruby></html>"
1817                 errors: 1
1818                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rb>\n|         \"b\"\n|       <rtc>\n"
1819         }, {
1820                 name: "ruby.dat #4"
1821                 html: "<html><ruby>a<rb>b<rp></ruby></html>"
1822                 errors: 1
1823                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rb>\n|         \"b\"\n|       <rp>\n"
1824         }, {
1825                 name: "ruby.dat #5"
1826                 html: "<html><ruby>a<rb>b<span></ruby></html>"
1827                 errors: 1
1828                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rb>\n|         \"b\"\n|         <span>\n"
1829         }, {
1830                 name: "ruby.dat #6"
1831                 html: "<html><ruby>a<rt>b<rb></ruby></html>"
1832                 errors: 1
1833                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rt>\n|         \"b\"\n|       <rb>\n"
1834         }, {
1835                 name: "ruby.dat #7"
1836                 html: "<html><ruby>a<rt>b<rt></ruby></html>"
1837                 errors: 1
1838                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rt>\n|         \"b\"\n|       <rt>\n"
1839         }, {
1840                 name: "ruby.dat #8"
1841                 html: "<html><ruby>a<rt>b<rtc></ruby></html>"
1842                 errors: 1
1843                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rt>\n|         \"b\"\n|       <rtc>\n"
1844         }, {
1845                 name: "ruby.dat #9"
1846                 html: "<html><ruby>a<rt>b<rp></ruby></html>"
1847                 errors: 1
1848                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rt>\n|         \"b\"\n|       <rp>\n"
1849         }, {
1850                 name: "ruby.dat #10"
1851                 html: "<html><ruby>a<rt>b<span></ruby></html>"
1852                 errors: 1
1853                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rt>\n|         \"b\"\n|         <span>\n"
1854         }, {
1855                 name: "ruby.dat #11"
1856                 html: "<html><ruby>a<rtc>b<rb></ruby></html>"
1857                 errors: 1
1858                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rtc>\n|         \"b\"\n|       <rb>\n"
1859         }, {
1860                 name: "ruby.dat #12"
1861                 html: "<html><ruby>a<rtc>b<rt>c<rt>d</ruby></html>"
1862                 errors: 1
1863                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rtc>\n|         \"b\"\n|         <rt>\n|           \"c\"\n|         <rt>\n|           \"d\"\n"
1864         }, {
1865                 name: "ruby.dat #13"
1866                 html: "<html><ruby>a<rtc>b<rtc></ruby></html>"
1867                 errors: 1
1868                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rtc>\n|         \"b\"\n|       <rtc>\n"
1869         }, {
1870                 name: "ruby.dat #14"
1871                 html: "<html><ruby>a<rtc>b<rp></ruby></html>"
1872                 errors: 1
1873                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rtc>\n|         \"b\"\n|         <rp>\n"
1874         }, {
1875                 name: "ruby.dat #15"
1876                 html: "<html><ruby>a<rtc>b<span></ruby></html>"
1877                 errors: 1
1878                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rtc>\n|         \"b\"\n|         <span>\n"
1879         }, {
1880                 name: "ruby.dat #16"
1881                 html: "<html><ruby>a<rp>b<rb></ruby></html>"
1882                 errors: 1
1883                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rp>\n|         \"b\"\n|       <rb>\n"
1884         }, {
1885                 name: "ruby.dat #17"
1886                 html: "<html><ruby>a<rp>b<rt></ruby></html>"
1887                 errors: 1
1888                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rp>\n|         \"b\"\n|       <rt>\n"
1889         }, {
1890                 name: "ruby.dat #18"
1891                 html: "<html><ruby>a<rp>b<rtc></ruby></html>"
1892                 errors: 1
1893                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rp>\n|         \"b\"\n|       <rtc>\n"
1894         }, {
1895                 name: "ruby.dat #19"
1896                 html: "<html><ruby>a<rp>b<rp></ruby></html>"
1897                 errors: 1
1898                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rp>\n|         \"b\"\n|       <rp>\n"
1899         }, {
1900                 name: "ruby.dat #20"
1901                 html: "<html><ruby>a<rp>b<span></ruby></html>"
1902                 errors: 1
1903                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rp>\n|         \"b\"\n|         <span>\n"
1904         }, {
1905                 name: "ruby.dat #21"
1906                 html: "<html><ruby><rtc><ruby>a<rb>b<rt></ruby></ruby></html>"
1907                 errors: 1
1908                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <rtc>\n|         <ruby>\n|           \"a\"\n|           <rb>\n|             \"b\"\n|           <rt>\n"
1909         }, {
1910                 name: "scriptdata01.dat #1"
1911                 html: "FOO<script>'Hello'</script>BAR"
1912                 errors: 1
1913                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"'Hello'\"\n|     \"BAR\"\n"
1914         }, {
1915                 name: "scriptdata01.dat #2"
1916                 html: "FOO<script></script>BAR"
1917                 errors: 1
1918                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|     \"BAR\"\n"
1919         }, {
1920                 name: "scriptdata01.dat #3"
1921                 html: "FOO<script></script >BAR"
1922                 errors: 1
1923                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|     \"BAR\"\n"
1924         }, {
1925                 name: "scriptdata01.dat #4"
1926                 html: "FOO<script></script/>BAR"
1927                 errors: 2
1928                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|     \"BAR\"\n"
1929         }, {
1930                 name: "scriptdata01.dat #5"
1931                 html: "FOO<script></script/ >BAR"
1932                 errors: 2
1933                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|     \"BAR\"\n"
1934         }, {
1935                 name: "scriptdata01.dat #6"
1936                 html: "FOO<script type=\"text/plain\"></scriptx>BAR"
1937                 errors: 2
1938                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       type=\"text/plain\"\n|       \"</scriptx>BAR\"\n"
1939         }, {
1940                 name: "scriptdata01.dat #7"
1941                 html: "FOO<script></script foo=\">\" dd>BAR"
1942                 errors: 2
1943                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|     \"BAR\"\n"
1944         }, {
1945                 name: "scriptdata01.dat #8"
1946                 html: "FOO<script>'<'</script>BAR"
1947                 errors: 1
1948                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"'<'\"\n|     \"BAR\"\n"
1949         }, {
1950                 name: "scriptdata01.dat #9"
1951                 html: "FOO<script>'<!'</script>BAR"
1952                 errors: 1
1953                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"'<!'\"\n|     \"BAR\"\n"
1954         }, {
1955                 name: "scriptdata01.dat #10"
1956                 html: "FOO<script>'<!-'</script>BAR"
1957                 errors: 1
1958                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"'<!-'\"\n|     \"BAR\"\n"
1959         }, {
1960                 name: "scriptdata01.dat #11"
1961                 html: "FOO<script>'<!--'</script>BAR"
1962                 errors: 1
1963                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"'<!--'\"\n|     \"BAR\"\n"
1964         }, {
1965                 name: "scriptdata01.dat #12"
1966                 html: "FOO<script>'<!---'</script>BAR"
1967                 errors: 1
1968                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"'<!---'\"\n|     \"BAR\"\n"
1969         }, {
1970                 name: "scriptdata01.dat #13"
1971                 html: "FOO<script>'<!-->'</script>BAR"
1972                 errors: 1
1973                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"'<!-->'\"\n|     \"BAR\"\n"
1974         }, {
1975                 name: "scriptdata01.dat #14"
1976                 html: "FOO<script>'<!-->'</script>BAR"
1977                 errors: 1
1978                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"'<!-->'\"\n|     \"BAR\"\n"
1979         }, {
1980                 name: "scriptdata01.dat #15"
1981                 html: "FOO<script>'<!-- potato'</script>BAR"
1982                 errors: 1
1983                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"'<!-- potato'\"\n|     \"BAR\"\n"
1984         }, {
1985                 name: "scriptdata01.dat #16"
1986                 html: "FOO<script>'<!-- <sCrIpt'</script>BAR"
1987                 errors: 1
1988                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"'<!-- <sCrIpt'\"\n|     \"BAR\"\n"
1989         }, {
1990                 name: "scriptdata01.dat #17"
1991                 html: "FOO<script type=\"text/plain\">'<!-- <sCrIpt>'</script>BAR"
1992                 errors: 3
1993                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       type=\"text/plain\"\n|       \"'<!-- <sCrIpt>'</script>BAR\"\n"
1994         }, {
1995                 name: "scriptdata01.dat #18"
1996                 html: "FOO<script type=\"text/plain\">'<!-- <sCrIpt> -'</script>BAR"
1997                 errors: 3
1998                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       type=\"text/plain\"\n|       \"'<!-- <sCrIpt> -'</script>BAR\"\n"
1999         }, {
2000                 name: "scriptdata01.dat #19"
2001                 html: "FOO<script type=\"text/plain\">'<!-- <sCrIpt> --'</script>BAR"
2002                 errors: 3
2003                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       type=\"text/plain\"\n|       \"'<!-- <sCrIpt> --'</script>BAR\"\n"
2004         }, {
2005                 name: "scriptdata01.dat #20"
2006                 html: "FOO<script>'<!-- <sCrIpt> -->'</script>BAR"
2007                 errors: 1
2008                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"'<!-- <sCrIpt> -->'\"\n|     \"BAR\"\n"
2009         }, {
2010                 name: "scriptdata01.dat #21"
2011                 html: "FOO<script type=\"text/plain\">'<!-- <sCrIpt> --!>'</script>BAR"
2012                 errors: 3
2013                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       type=\"text/plain\"\n|       \"'<!-- <sCrIpt> --!>'</script>BAR\"\n"
2014         }, {
2015                 name: "scriptdata01.dat #22"
2016                 html: "FOO<script type=\"text/plain\">'<!-- <sCrIpt> -- >'</script>BAR"
2017                 errors: 3
2018                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       type=\"text/plain\"\n|       \"'<!-- <sCrIpt> -- >'</script>BAR\"\n"
2019         }, {
2020                 name: "scriptdata01.dat #23"
2021                 html: "FOO<script type=\"text/plain\">'<!-- <sCrIpt '</script>BAR"
2022                 errors: 3
2023                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       type=\"text/plain\"\n|       \"'<!-- <sCrIpt '</script>BAR\"\n"
2024         }, {
2025                 name: "scriptdata01.dat #24"
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 #25"
2031                 html: "FOO<script type=\"text/plain\">'<!-- <sCrIpt\\'</script>BAR"
2032                 errors: 1
2033                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       type=\"text/plain\"\n|       \"'<!-- <sCrIpt\\'\"\n|     \"BAR\"\n"
2034         }, {
2035                 name: "scriptdata01.dat #26"
2036                 html: "FOO<script type=\"text/plain\">'<!-- <sCrIpt/'</script>BAR</script>QUX"
2037                 errors: 1
2038                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       type=\"text/plain\"\n|       \"'<!-- <sCrIpt/'</script>BAR\"\n|     \"QUX\"\n"
2039         }, {
2040                 name: "scriptdata01.dat #27"
2041                 html: "FOO<script><!--<script>-></script>--></script>QUX"
2042                 errors: 1
2043                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"FOO\"\n|     <script>\n|       \"<!--<script>-></script>-->\"\n|     \"QUX\"\n"
2044         }, {
2045                 name: "tables01.dat #1"
2046                 html: "<table><th>"
2047                 errors: 3
2048                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <th>\n"
2049         }, {
2050                 name: "tables01.dat #2"
2051                 html: "<table><td>"
2052                 errors: 3
2053                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n"
2054         }, {
2055                 name: "tables01.dat #3"
2056                 html: "<table><col foo='bar'>"
2057                 errors: 2
2058                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <colgroup>\n|         <col>\n|           foo=\"bar\"\n"
2059         }, {
2060                 name: "tables01.dat #4"
2061                 html: "<table><colgroup></html>foo"
2062                 errors: 6
2063                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"foo\"\n|     <table>\n|       <colgroup>\n"
2064         }, {
2065                 name: "tables01.dat #5"
2066                 html: "<table></table><p>foo"
2067                 errors: 1
2068                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|     <p>\n|       \"foo\"\n"
2069         }, {
2070                 name: "tables01.dat #6"
2071                 html: "<table></body></caption></col></colgroup></html></tbody></td></tfoot></th></thead></tr><td>"
2072                 errors: 14
2073                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n"
2074         }, {
2075                 name: "tables01.dat #7"
2076                 html: "<table><select><option>3</select></table>"
2077                 errors: 2
2078                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n|         \"3\"\n|     <table>\n"
2079         }, {
2080                 name: "tables01.dat #8"
2081                 html: "<table><select><table></table></select></table>"
2082                 errors: 6
2083                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|     <table>\n|     <table>\n"
2084         }, {
2085                 name: "tables01.dat #9"
2086                 html: "<table><select></table>"
2087                 errors: 3
2088                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|     <table>\n"
2089         }, {
2090                 name: "tables01.dat #10"
2091                 html: "<table><select><option>A<tr><td>B</td></tr></table>"
2092                 errors: 3
2093                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n|         \"A\"\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             \"B\"\n"
2094         }, {
2095                 name: "tables01.dat #11"
2096                 html: "<table><td></body></caption></col></colgroup></html>foo"
2097                 errors: 8
2098                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             \"foo\"\n"
2099         }, {
2100                 name: "tables01.dat #12"
2101                 html: "<table><td>A</table>B"
2102                 errors: 2
2103                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             \"A\"\n|     \"B\"\n"
2104         }, {
2105                 name: "tables01.dat #13"
2106                 html: "<table><tr><caption>"
2107                 errors: 2
2108                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|       <caption>\n"
2109         }, {
2110                 name: "tables01.dat #14"
2111                 html: "<table><tr></body></caption></col></colgroup></html></td></th><td>foo"
2112                 errors: 9
2113                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             \"foo\"\n"
2114         }, {
2115                 name: "tables01.dat #15"
2116                 html: "<table><td><tr>"
2117                 errors: 3
2118                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|         <tr>\n"
2119         }, {
2120                 name: "tables01.dat #16"
2121                 html: "<table><td><button><td>"
2122                 errors: 4
2123                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <button>\n|           <td>\n"
2124         }, {
2125                 name: "tables01.dat #17"
2126                 html: "<table><tr><td><svg><desc><td>"
2127                 errors: 3
2128                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <svg svg>\n|               <svg desc>\n|           <td>\n"
2129         }, {
2130                 name: "template.dat #1"
2131                 html: "<body><template>Hello</template>"
2132                 errors: 1
2133                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         \"Hello\"\n"
2134         }, {
2135                 name: "template.dat #2"
2136                 html: "<template>Hello</template>"
2137                 errors: 1
2138                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         \"Hello\"\n|   <body>\n"
2139         }, {
2140                 name: "template.dat #3"
2141                 html: "<template></template><div></div>"
2142                 errors: 1
2143                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|   <body>\n|     <div>\n"
2144         }, {
2145                 name: "template.dat #4"
2146                 html: "<html><template>Hello</template>"
2147                 errors: 1
2148                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         \"Hello\"\n|   <body>\n"
2149         }, {
2150                 name: "template.dat #5"
2151                 html: "<head><template><div></div></template></head>"
2152                 errors: 1
2153                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <div>\n|   <body>\n"
2154         }, {
2155                 name: "template.dat #6"
2156                 html: "<div><template><div><span></template><b>"
2157                 errors: 3
2158                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <template>\n|         content\n|           <div>\n|             <span>\n|       <b>\n"
2159         }, {
2160                 name: "template.dat #7"
2161                 html: "<div><template></div>Hello"
2162                 errors: 4
2163                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <template>\n|         content\n|           \"Hello\"\n"
2164         }, {
2165                 name: "template.dat #8"
2166                 html: "<div></template></div>"
2167                 errors: 2
2168                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n"
2169         }, {
2170                 name: "template.dat #9"
2171                 html: "<table><template></template></table>"
2172                 errors: 1
2173                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <template>\n|         content\n"
2174         }, {
2175                 name: "template.dat #10"
2176                 html: "<table><template></template></div>"
2177                 errors: 4
2178                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <template>\n|         content\n"
2179         }, {
2180                 name: "template.dat #11"
2181                 html: "<table><div><template></template></div>"
2182                 errors: 4
2183                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <template>\n|         content\n|     <table>\n"
2184         }, {
2185                 name: "template.dat #12"
2186                 html: "<table><template></template><div></div>"
2187                 errors: 4
2188                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|     <table>\n|       <template>\n|         content\n"
2189         }, {
2190                 name: "template.dat #13"
2191                 html: "<table>   <template></template></table>"
2192                 errors: 1
2193                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       \"   \"\n|       <template>\n|         content\n"
2194         }, {
2195                 name: "template.dat #14"
2196                 html: "<table><tbody><template></template></tbody>"
2197                 errors: 2
2198                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <template>\n|           content\n"
2199         }, {
2200                 name: "template.dat #15"
2201                 html: "<table><tbody><template></tbody></template>"
2202                 errors: 3
2203                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <template>\n|           content\n"
2204         }, {
2205                 name: "template.dat #16"
2206                 html: "<table><tbody><template></template></tbody></table>"
2207                 errors: 1
2208                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <template>\n|           content\n"
2209         }, {
2210                 name: "template.dat #17"
2211                 html: "<table><thead><template></template></thead>"
2212                 errors: 2
2213                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <thead>\n|         <template>\n|           content\n"
2214         }, {
2215                 name: "template.dat #18"
2216                 html: "<table><tfoot><template></template></tfoot>"
2217                 errors: 2
2218                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tfoot>\n|         <template>\n|           content\n"
2219         }, {
2220                 name: "template.dat #19"
2221                 html: "<select><template></template></select>"
2222                 errors: 1
2223                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <template>\n|         content\n"
2224         }, {
2225                 name: "template.dat #20"
2226                 html: "<select><template><option></option></template></select>"
2227                 errors: 1
2228                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <template>\n|         content\n|           <option>\n"
2229         }, {
2230                 name: "template.dat #21"
2231                 html: "<template><option></option></select><option></option></template>"
2232                 errors: 2
2233                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <option>\n|         <option>\n|   <body>\n"
2234         }, {
2235                 name: "template.dat #22"
2236                 html: "<select><template></template><option></select>"
2237                 errors: 1
2238                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <template>\n|         content\n|       <option>\n"
2239         }, {
2240                 name: "template.dat #23"
2241                 html: "<select><option><template></template></select>"
2242                 errors: 1
2243                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n|         <template>\n|           content\n"
2244         }, {
2245                 name: "template.dat #24"
2246                 html: "<select><template>"
2247                 errors: 3
2248                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <template>\n|         content\n"
2249         }, {
2250                 name: "template.dat #25"
2251                 html: "<select><option></option><template>"
2252                 errors: 3
2253                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n|       <template>\n|         content\n"
2254         }, {
2255                 name: "template.dat #26"
2256                 html: "<select><option></option><template><option>"
2257                 errors: 3
2258                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n|       <template>\n|         content\n|           <option>\n"
2259         }, {
2260                 name: "template.dat #27"
2261                 html: "<table><thead><template><td></template></table>"
2262                 errors: 1
2263                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <thead>\n|         <template>\n|           content\n|             <td>\n"
2264         }, {
2265                 name: "template.dat #28"
2266                 html: "<table><template><thead></template></table>"
2267                 errors: 1
2268                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <template>\n|         content\n|           <thead>\n"
2269         }, {
2270                 name: "template.dat #29"
2271                 html: "<body><table><template><td></tr><div></template></table>"
2272                 errors: 3
2273                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <template>\n|         content\n|           <td>\n|             <div>\n"
2274         }, {
2275                 name: "template.dat #30"
2276                 html: "<table><template><thead></template></thead></table>"
2277                 errors: 2
2278                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <template>\n|         content\n|           <thead>\n"
2279         }, {
2280                 name: "template.dat #31"
2281                 html: "<table><thead><template><tr></template></table>"
2282                 errors: 1
2283                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <thead>\n|         <template>\n|           content\n|             <tr>\n"
2284         }, {
2285                 name: "template.dat #32"
2286                 html: "<table><template><tr></template></table>"
2287                 errors: 1
2288                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <template>\n|         content\n|           <tr>\n"
2289         }, {
2290                 name: "template.dat #33"
2291                 html: "<table><tr><template><td>"
2292                 errors: 3
2293                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <template>\n|             content\n|               <td>\n"
2294         }, {
2295                 name: "template.dat #34"
2296                 html: "<table><template><tr><template><td></template></tr></template></table>"
2297                 errors: 1
2298                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <template>\n|         content\n|           <tr>\n|             <template>\n|               content\n|                 <td>\n"
2299         }, {
2300                 name: "template.dat #35"
2301                 html: "<table><template><tr><template><td></td></template></tr></template></table>"
2302                 errors: 1
2303                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <template>\n|         content\n|           <tr>\n|             <template>\n|               content\n|                 <td>\n"
2304         }, {
2305                 name: "template.dat #36"
2306                 html: "<table><template><td></template>"
2307                 errors: 2
2308                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <template>\n|         content\n|           <td>\n"
2309         }, {
2310                 name: "template.dat #37"
2311                 html: "<body><template><td></td></template>"
2312                 errors: 1
2313                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <td>\n"
2314         }, {
2315                 name: "template.dat #38"
2316                 html: "<body><template><template><tr></tr></template><td></td></template>"
2317                 errors: 1
2318                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <tr>\n|         <td>\n"
2319         }, {
2320                 name: "template.dat #39"
2321                 html: "<table><colgroup><template><col>"
2322                 errors: 3
2323                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <colgroup>\n|         <template>\n|           content\n|             <col>\n"
2324         }, {
2325                 name: "template.dat #40"
2326                 html: "<frameset><template><frame></frame></template></frameset>"
2327                 errors: 4
2328                 expected: "| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n"
2329         }, {
2330                 name: "template.dat #41"
2331                 html: "<template><frame></frame></frameset><frame></frame></template>"
2332                 errors: 6
2333                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|   <body>\n"
2334         }, {
2335                 name: "template.dat #42"
2336                 html: "<template><div><frameset><span></span></div><span></span></template>"
2337                 errors: 2
2338                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <div>\n|           <span>\n|         <span>\n|   <body>\n"
2339         }, {
2340                 name: "template.dat #43"
2341                 html: "<body><template><div><frameset><span></span></div><span></span></template></body>"
2342                 errors: 2
2343                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <div>\n|           <span>\n|         <span>\n"
2344         }, {
2345                 name: "template.dat #44"
2346                 html: "<body><template><script>var i = 1;</script><td></td></template>"
2347                 errors: 1
2348                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <script>\n|           \"var i = 1;\"\n|         <td>\n"
2349         }, {
2350                 name: "template.dat #45"
2351                 html: "<body><template><tr><div></div></tr></template>"
2352                 errors: 3
2353                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <tr>\n|         <div>\n"
2354         }, {
2355                 name: "template.dat #46"
2356                 html: "<body><template><tr></tr><td></td></template>"
2357                 errors: 2
2358                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <tr>\n|         <tr>\n|           <td>\n"
2359         }, {
2360                 name: "template.dat #47"
2361                 html: "<body><template><td></td></tr><td></td></template>"
2362                 errors: 2
2363                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <td>\n|         <td>\n"
2364         }, {
2365                 name: "template.dat #48"
2366                 html: "<body><template><td></td><tbody><td></td></template>"
2367                 errors: 2
2368                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <td>\n|         <td>\n"
2369         }, {
2370                 name: "template.dat #49"
2371                 html: "<body><template><td></td><caption></caption><td></td></template>"
2372                 errors: 3
2373                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <td>\n|         <td>\n"
2374         }, {
2375                 name: "template.dat #50"
2376                 html: "<body><template><td></td><colgroup></caption><td></td></template>"
2377                 errors: 3
2378                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <td>\n|         <td>\n"
2379         }, {
2380                 name: "template.dat #51"
2381                 html: "<body><template><td></td></table><td></td></template>"
2382                 errors: 2
2383                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <td>\n|         <td>\n"
2384         }, {
2385                 name: "template.dat #52"
2386                 html: "<body><template><tr></tr><tbody><tr></tr></template>"
2387                 errors: 2
2388                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <tr>\n|         <tr>\n"
2389         }, {
2390                 name: "template.dat #53"
2391                 html: "<body><template><tr></tr><caption><tr></tr></template>"
2392                 errors: 2
2393                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <tr>\n|         <tr>\n"
2394         }, {
2395                 name: "template.dat #54"
2396                 html: "<body><template><tr></tr></table><tr></tr></template>"
2397                 errors: 2
2398                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <tr>\n|         <tr>\n"
2399         }, {
2400                 name: "template.dat #55"
2401                 html: "<body><template><thead></thead><caption></caption><tbody></tbody></template>"
2402                 errors: 1
2403                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <thead>\n|         <caption>\n|         <tbody>\n"
2404         }, {
2405                 name: "template.dat #56"
2406                 html: "<body><template><thead></thead></table><tbody></tbody></template></body>"
2407                 errors: 2
2408                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <thead>\n|         <tbody>\n"
2409         }, {
2410                 name: "template.dat #57"
2411                 html: "<body><template><div><tr></tr></div></template>"
2412                 errors: 3
2413                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <div>\n"
2414         }, {
2415                 name: "template.dat #58"
2416                 html: "<body><template><em>Hello</em></template>"
2417                 errors: 1
2418                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <em>\n|           \"Hello\"\n"
2419         }, {
2420                 name: "template.dat #59"
2421                 html: "<body><template><!--comment--></template>"
2422                 errors: 1
2423                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <!-- comment -->\n"
2424         }, {
2425                 name: "template.dat #60"
2426                 html: "<body><template><style></style><td></td></template>"
2427                 errors: 1
2428                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <style>\n|         <td>\n"
2429         }, {
2430                 name: "template.dat #61"
2431                 html: "<body><template><meta><td></td></template>"
2432                 errors: 1
2433                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <meta>\n|         <td>\n"
2434         }, {
2435                 name: "template.dat #62"
2436                 html: "<body><template><link><td></td></template>"
2437                 errors: 1
2438                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <link>\n|         <td>\n"
2439         }, {
2440                 name: "template.dat #63"
2441                 html: "<body><template><template><tr></tr></template><td></td></template>"
2442                 errors: 1
2443                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <tr>\n|         <td>\n"
2444         }, {
2445                 name: "template.dat #64"
2446                 html: "<body><table><colgroup><template><col></col></template></colgroup></table></body>"
2447                 errors: 2
2448                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <colgroup>\n|         <template>\n|           content\n|             <col>\n"
2449         }, {
2450                 name: "template.dat #65"
2451                 html: "<body a=b><template><div></div><body c=d><div></div></body></template></body>"
2452                 errors: 3
2453                 expected: "| <html>\n|   <head>\n|   <body>\n|     a=\"b\"\n|     <template>\n|       content\n|         <div>\n|         <div>\n"
2454         }, {
2455                 name: "template.dat #66"
2456                 html: "<html a=b><template><div><html b=c><span></template>"
2457                 errors: 3
2458                 expected: "| <html>\n|   a=\"b\"\n|   <head>\n|     <template>\n|       content\n|         <div>\n|           <span>\n|   <body>\n"
2459         }, {
2460                 name: "template.dat #67"
2461                 html: "<html a=b><template><col></col><html b=c><col></col></template>"
2462                 errors: 4
2463                 expected: "| <html>\n|   a=\"b\"\n|   <head>\n|     <template>\n|       content\n|         <col>\n|         <col>\n|   <body>\n"
2464         }, {
2465                 name: "template.dat #68"
2466                 html: "<html a=b><template><frame></frame><html b=c><frame></frame></template>"
2467                 errors: 6
2468                 expected: "| <html>\n|   a=\"b\"\n|   <head>\n|     <template>\n|       content\n|   <body>\n"
2469         }, {
2470                 name: "template.dat #69"
2471                 html: "<body><template><tr></tr><template></template><td></td></template>"
2472                 errors: 2
2473                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <tr>\n|         <template>\n|           content\n|         <tr>\n|           <td>\n"
2474         }, {
2475                 name: "template.dat #70"
2476                 html: "<body><template><thead></thead><template><tr></tr></template><tr></tr><tfoot></tfoot></template>"
2477                 errors: 1
2478                 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"
2479         }, {
2480                 name: "template.dat #71"
2481                 html: "<body><template><template><b><template></template></template>text</template>"
2482                 errors: 2
2483                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <b>\n|               <template>\n|                 content\n|         \"text\"\n"
2484         }, {
2485                 name: "template.dat #72"
2486                 html: "<body><template><col><colgroup>"
2487                 errors: 3
2488                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <col>\n"
2489         }, {
2490                 name: "template.dat #73"
2491                 html: "<body><template><col></colgroup>"
2492                 errors: 3
2493                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <col>\n"
2494         }, {
2495                 name: "template.dat #74"
2496                 html: "<body><template><col><colgroup></template></body>"
2497                 errors: 2
2498                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <col>\n"
2499         }, {
2500                 name: "template.dat #75"
2501                 html: "<body><template><col><div>"
2502                 errors: 3
2503                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <col>\n"
2504         }, {
2505                 name: "template.dat #76"
2506                 html: "<body><template><col></div>"
2507                 errors: 3
2508                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <col>\n"
2509         }, {
2510                 name: "template.dat #77"
2511                 html: "<body><template><col>Hello"
2512                 errors: 3
2513                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <col>\n"
2514         }, {
2515                 name: "template.dat #78"
2516                 html: "<body><template><i><menu>Foo</i>"
2517                 errors: 3
2518                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <i>\n|         <menu>\n|           <i>\n|             \"Foo\"\n"
2519         }, {
2520                 name: "template.dat #79"
2521                 html: "<body><template></div><div>Foo</div><template></template><tr></tr>"
2522                 errors: 5
2523                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n|         <div>\n|           \"Foo\"\n|         <template>\n|           content\n"
2524         }, {
2525                 name: "template.dat #80"
2526                 html: "<body><div><template></div><tr><td>Foo</td></tr></template>"
2527                 errors: 3
2528                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <template>\n|         content\n|           <tr>\n|             <td>\n|               \"Foo\"\n"
2529         }, {
2530                 name: "template.dat #81"
2531                 html: "<template></figcaption><sub><table></table>"
2532                 errors: 3
2533                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <sub>\n|           <table>\n|   <body>\n"
2534         }, {
2535                 name: "template.dat #82"
2536                 html: "<template><template>"
2537                 errors: 3
2538                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|   <body>\n"
2539         }, {
2540                 name: "template.dat #83"
2541                 html: "<template><div>"
2542                 errors: 2
2543                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <div>\n|   <body>\n"
2544         }, {
2545                 name: "template.dat #84"
2546                 html: "<template><template><div>"
2547                 errors: 3
2548                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <div>\n|   <body>\n"
2549         }, {
2550                 name: "template.dat #85"
2551                 html: "<template><template><table>"
2552                 errors: 3
2553                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <table>\n|   <body>\n"
2554         }, {
2555                 name: "template.dat #86"
2556                 html: "<template><template><tbody>"
2557                 errors: 3
2558                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <tbody>\n|   <body>\n"
2559         }, {
2560                 name: "template.dat #87"
2561                 html: "<template><template><tr>"
2562                 errors: 3
2563                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <tr>\n|   <body>\n"
2564         }, {
2565                 name: "template.dat #88"
2566                 html: "<template><template><td>"
2567                 errors: 3
2568                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <td>\n|   <body>\n"
2569         }, {
2570                 name: "template.dat #89"
2571                 html: "<template><template><caption>"
2572                 errors: 3
2573                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <caption>\n|   <body>\n"
2574         }, {
2575                 name: "template.dat #90"
2576                 html: "<template><template><colgroup>"
2577                 errors: 3
2578                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <colgroup>\n|   <body>\n"
2579         }, {
2580                 name: "template.dat #91"
2581                 html: "<template><template><col>"
2582                 errors: 3
2583                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <col>\n|   <body>\n"
2584         }, {
2585                 name: "template.dat #92"
2586                 html: "<template><template><tbody><select>"
2587                 errors: 4
2588                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <tbody>\n|             <select>\n|   <body>\n"
2589         }, {
2590                 name: "template.dat #93"
2591                 html: "<template><template><table>Foo"
2592                 errors: 6
2593                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             \"Foo\"\n|             <table>\n|   <body>\n"
2594         }, {
2595                 name: "template.dat #94"
2596                 html: "<template><template><frame>"
2597                 errors: 4
2598                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|   <body>\n"
2599         }, {
2600                 name: "template.dat #95"
2601                 html: "<template><template><script>var i"
2602                 errors: 4
2603                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <script>\n|               \"var i\"\n|   <body>\n"
2604         }, {
2605                 name: "template.dat #96"
2606                 html: "<template><template><style>var i"
2607                 errors: 4
2608                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <template>\n|           content\n|             <style>\n|               \"var i\"\n|   <body>\n"
2609         }, {
2610                 name: "template.dat #97"
2611                 html: "<template><table></template><body><span>Foo"
2612                 errors: 3
2613                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <table>\n|   <body>\n|     <span>\n|       \"Foo\"\n"
2614         }, {
2615                 name: "template.dat #98"
2616                 html: "<template><td></template><body><span>Foo"
2617                 errors: 2
2618                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <td>\n|   <body>\n|     <span>\n|       \"Foo\"\n"
2619         }, {
2620                 name: "template.dat #99"
2621                 html: "<template><object></template><body><span>Foo"
2622                 errors: 3
2623                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <object>\n|   <body>\n|     <span>\n|       \"Foo\"\n"
2624         }, {
2625                 name: "template.dat #100"
2626                 html: "<template><svg><template>"
2627                 errors: 2
2628                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <svg svg>\n|           <svg template>\n|   <body>\n"
2629         }, {
2630                 name: "template.dat #101"
2631                 html: "<template><svg><foo><template><foreignObject><div></template><div>"
2632                 errors: 3
2633                 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"
2634         }, {
2635                 name: "template.dat #102"
2636                 html: "<dummy><template><span></dummy>"
2637                 errors: 4
2638                 expected: "| <html>\n|   <head>\n|   <body>\n|     <dummy>\n|       <template>\n|         content\n|           <span>\n"
2639         }, {
2640                 name: "template.dat #103"
2641                 html: "<body><table><tr><td><select><template>Foo</template><caption>A</table>"
2642                 errors: 2
2643                 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"
2644         }, {
2645                 name: "template.dat #104"
2646                 html: "<body></body><template>"
2647                 errors: 3
2648                 expected: "| <html>\n|   <head>\n|   <body>\n|     <template>\n|       content\n"
2649         }, {
2650                 name: "template.dat #105"
2651                 html: "<head></head><template>"
2652                 errors: 3
2653                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|   <body>\n"
2654         }, {
2655                 name: "template.dat #106"
2656                 html: "<head></head><template>Foo</template>"
2657                 errors: 2
2658                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         \"Foo\"\n|   <body>\n"
2659         }, {
2660                 name: "template.dat #107"
2661                 html: "<!DOCTYPE HTML><dummy><table><template><table><template><table><script>"
2662                 errors: 4
2663                 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"
2664         }, {
2665                 name: "template.dat #108"
2666                 html: "<template><a><table><a>"
2667                 expected: "| <html>\n|   <head>\n|     <template>\n|       content\n|         <a>\n|           <a>\n|           <table>\n|   <body>"
2668         }, {
2669                 name: "tests10.dat #1"
2670                 html: "<!DOCTYPE html><svg></svg>"
2671                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n"
2672         }, {
2673                 name: "tests10.dat #2"
2674                 html: "<!DOCTYPE html><svg></svg><![CDATA[a]]>"
2675                 errors: 1
2676                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|     <!-- [CDATA[a]] -->\n"
2677         }, {
2678                 name: "tests10.dat #3"
2679                 html: "<!DOCTYPE html><body><svg></svg>"
2680                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n"
2681         }, {
2682                 name: "tests10.dat #4"
2683                 html: "<!DOCTYPE html><body><select><svg></svg></select>"
2684                 errors: 2
2685                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
2686         }, {
2687                 name: "tests10.dat #5"
2688                 html: "<!DOCTYPE html><body><select><option><svg></svg></option></select>"
2689                 errors: 2
2690                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n"
2691         }, {
2692                 name: "tests10.dat #6"
2693                 html: "<!DOCTYPE html><body><table><svg></svg></table>"
2694                 errors: 1
2695                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|     <table>\n"
2696         }, {
2697                 name: "tests10.dat #7"
2698                 html: "<!DOCTYPE html><body><table><svg><g>foo</g></svg></table>"
2699                 errors: 1
2700                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg g>\n|         \"foo\"\n|     <table>\n"
2701         }, {
2702                 name: "tests10.dat #8"
2703                 html: "<!DOCTYPE html><body><table><svg><g>foo</g><g>bar</g></svg></table>"
2704                 errors: 1
2705                 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"
2706         }, {
2707                 name: "tests10.dat #9"
2708                 html: "<!DOCTYPE html><body><table><tbody><svg><g>foo</g><g>bar</g></svg></tbody></table>"
2709                 errors: 1
2710                 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"
2711         }, {
2712                 name: "tests10.dat #10"
2713                 html: "<!DOCTYPE html><body><table><tbody><tr><svg><g>foo</g><g>bar</g></svg></tr></tbody></table>"
2714                 errors: 1
2715                 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"
2716         }, {
2717                 name: "tests10.dat #11"
2718                 html: "<!DOCTYPE html><body><table><tbody><tr><td><svg><g>foo</g><g>bar</g></svg></td></tr></tbody></table>"
2719                 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"
2720         }, {
2721                 name: "tests10.dat #12"
2722                 html: "<!DOCTYPE html><body><table><tbody><tr><td><svg><g>foo</g><g>bar</g></svg><p>baz</td></tr></tbody></table>"
2723                 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"
2724         }, {
2725                 name: "tests10.dat #13"
2726                 html: "<!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g></svg><p>baz</caption></table>"
2727                 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"
2728         }, {
2729                 name: "tests10.dat #14"
2730                 html: "<!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g><p>baz</table><p>quux"
2731                 errors: 1
2732                 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"
2733         }, {
2734                 name: "tests10.dat #15"
2735                 html: "<!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g>baz</table><p>quux"
2736                 errors: 2
2737                 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"
2738         }, {
2739                 name: "tests10.dat #16"
2740                 html: "<!DOCTYPE html><body><table><colgroup><svg><g>foo</g><g>bar</g><p>baz</table><p>quux"
2741                 errors: 6
2742                 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"
2743         }, {
2744                 name: "tests10.dat #17"
2745                 html: "<!DOCTYPE html><body><table><tr><td><select><svg><g>foo</g><g>bar</g><p>baz</table><p>quux"
2746                 errors: 7
2747                 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"
2748         }, {
2749                 name: "tests10.dat #18"
2750                 html: "<!DOCTYPE html><body><table><select><svg><g>foo</g><g>bar</g><p>baz</table><p>quux"
2751                 errors: 8
2752                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       \"foobarbaz\"\n|     <table>\n|     <p>\n|       \"quux\"\n"
2753         }, {
2754                 name: "tests10.dat #19"
2755                 html: "<!DOCTYPE html><body></body></html><svg><g>foo</g><g>bar</g><p>baz"
2756                 errors: 2
2757                 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"
2758         }, {
2759                 name: "tests10.dat #20"
2760                 html: "<!DOCTYPE html><body></body><svg><g>foo</g><g>bar</g><p>baz"
2761                 errors: 2
2762                 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"
2763         }, {
2764                 name: "tests10.dat #21"
2765                 html: "<!DOCTYPE html><frameset><svg><g></g><g></g><p><span>"
2766                 errors: 8
2767                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
2768         }, {
2769                 name: "tests10.dat #22"
2770                 html: "<!DOCTYPE html><frameset></frameset><svg><g></g><g></g><p><span>"
2771                 errors: 7
2772                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
2773         }, {
2774                 name: "tests10.dat #23"
2775                 html: "<!DOCTYPE html><body xlink:href=foo><svg xlink:href=foo></svg>"
2776                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     xlink:href=\"foo\"\n|     <svg svg>\n|       xlink href=\"foo\"\n"
2777         }, {
2778                 name: "tests10.dat #24"
2779                 html: "<!DOCTYPE html><body xlink:href=foo xml:lang=en><svg><g xml:lang=en xlink:href=foo></g></svg>"
2780                 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"
2781         }, {
2782                 name: "tests10.dat #25"
2783                 html: "<!DOCTYPE html><body xlink:href=foo xml:lang=en><svg><g xml:lang=en xlink:href=foo /></svg>"
2784                 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"
2785         }, {
2786                 name: "tests10.dat #26"
2787                 html: "<!DOCTYPE html><body xlink:href=foo xml:lang=en><svg><g xml:lang=en xlink:href=foo />bar</svg>"
2788                 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"
2789         }, {
2790                 name: "tests10.dat #27"
2791                 html: "<svg></path>"
2792                 errors: 4
2793                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n"
2794         }, {
2795                 name: "tests10.dat #28"
2796                 html: "<div><svg></div>a"
2797                 errors: 3
2798                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <svg svg>\n|     \"a\"\n"
2799         }, {
2800                 name: "tests10.dat #29"
2801                 html: "<div><svg><path></div>a"
2802                 errors: 3
2803                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <svg svg>\n|         <svg path>\n|     \"a\"\n"
2804         }, {
2805                 name: "tests10.dat #30"
2806                 html: "<div><svg><path></svg><path>"
2807                 errors: 3
2808                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <svg svg>\n|         <svg path>\n|       <path>\n"
2809         }, {
2810                 name: "tests10.dat #31"
2811                 html: "<div><svg><path><foreignObject><math></div>a"
2812                 errors: 4
2813                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <svg svg>\n|         <svg path>\n|           <svg foreignObject>\n|             <math math>\n|               \"a\"\n"
2814         }, {
2815                 name: "tests10.dat #32"
2816                 html: "<div><svg><path><foreignObject><p></div>a"
2817                 errors: 3
2818                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <svg svg>\n|         <svg path>\n|           <svg foreignObject>\n|             <p>\n|               \"a\"\n"
2819         }, {
2820                 name: "tests10.dat #33"
2821                 html: "<!DOCTYPE html><svg><desc><div><svg><ul>a"
2822                 errors: 2
2823                 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"
2824         }, {
2825                 name: "tests10.dat #34"
2826                 html: "<!DOCTYPE html><svg><desc><svg><ul>a"
2827                 errors: 2
2828                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg desc>\n|         <svg svg>\n|         <ul>\n|           \"a\"\n"
2829         }, {
2830                 name: "tests10.dat #35"
2831                 html: "<!DOCTYPE html><p><svg><desc><p>"
2832                 errors: 1
2833                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <svg svg>\n|         <svg desc>\n|           <p>\n"
2834         }, {
2835                 name: "tests10.dat #36"
2836                 html: "<!DOCTYPE html><p><svg><title><p>"
2837                 errors: 1
2838                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <svg svg>\n|         <svg title>\n|           <p>\n"
2839         }, {
2840                 name: "tests10.dat #37"
2841                 html: "<div><svg><path><foreignObject><p></foreignObject><p>"
2842                 errors: 3
2843                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <svg svg>\n|         <svg path>\n|           <svg foreignObject>\n|             <p>\n|             <p>\n"
2844         }, {
2845                 name: "tests10.dat #38"
2846                 html: "<math><mi><div><object><div><span></span></div></object></div></mi><mi>"
2847                 errors: 2
2848                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mi>\n|         <div>\n|           <object>\n|             <div>\n|               <span>\n|       <math mi>\n"
2849         }, {
2850                 name: "tests10.dat #39"
2851                 html: "<math><mi><svg><foreignObject><div><div></div></div></foreignObject></svg></mi><mi>"
2852                 errors: 2
2853                 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"
2854         }, {
2855                 name: "tests10.dat #40"
2856                 html: "<svg><script></script><path>"
2857                 errors: 2
2858                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg script>\n|       <svg path>\n"
2859         }, {
2860                 name: "tests10.dat #41"
2861                 html: "<table><svg></svg><tr>"
2862                 errors: 3
2863                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|     <table>\n|       <tbody>\n|         <tr>\n"
2864         }, {
2865                 name: "tests10.dat #42"
2866                 html: "<math><mi><mglyph>"
2867                 errors: 2
2868                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mi>\n|         <math mglyph>\n"
2869         }, {
2870                 name: "tests10.dat #43"
2871                 html: "<math><mi><malignmark>"
2872                 errors: 2
2873                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mi>\n|         <math malignmark>\n"
2874         }, {
2875                 name: "tests10.dat #44"
2876                 html: "<math><mo><mglyph>"
2877                 errors: 2
2878                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mo>\n|         <math mglyph>\n"
2879         }, {
2880                 name: "tests10.dat #45"
2881                 html: "<math><mo><malignmark>"
2882                 errors: 2
2883                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mo>\n|         <math malignmark>\n"
2884         }, {
2885                 name: "tests10.dat #46"
2886                 html: "<math><mn><mglyph>"
2887                 errors: 2
2888                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mn>\n|         <math mglyph>\n"
2889         }, {
2890                 name: "tests10.dat #47"
2891                 html: "<math><mn><malignmark>"
2892                 errors: 2
2893                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mn>\n|         <math malignmark>\n"
2894         }, {
2895                 name: "tests10.dat #48"
2896                 html: "<math><ms><mglyph>"
2897                 errors: 2
2898                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math ms>\n|         <math mglyph>\n"
2899         }, {
2900                 name: "tests10.dat #49"
2901                 html: "<math><ms><malignmark>"
2902                 errors: 2
2903                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math ms>\n|         <math malignmark>\n"
2904         }, {
2905                 name: "tests10.dat #50"
2906                 html: "<math><mtext><mglyph>"
2907                 errors: 2
2908                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mtext>\n|         <math mglyph>\n"
2909         }, {
2910                 name: "tests10.dat #51"
2911                 html: "<math><mtext><malignmark>"
2912                 errors: 2
2913                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mtext>\n|         <math malignmark>\n"
2914         }, {
2915                 name: "tests10.dat #52"
2916                 html: "<math><annotation-xml><svg></svg></annotation-xml><mi>"
2917                 errors: 2
2918                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         <svg svg>\n|       <math mi>\n"
2919         }, {
2920                 name: "tests10.dat #53"
2921                 html: "<math><annotation-xml><svg><foreignObject><div><math><mi></mi></math><span></span></div></foreignObject><path></path></svg></annotation-xml><mi>"
2922                 errors: 2
2923                 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"
2924         }, {
2925                 name: "tests10.dat #54"
2926                 html: "<math><annotation-xml><svg><foreignObject><math><mi><svg></svg></mi><mo></mo></math><span></span></foreignObject><path></path></svg></annotation-xml><mi>"
2927                 errors: 2
2928                 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"
2929         }, {
2930                 name: "tests11.dat #1"
2931                 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>"
2932                 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"
2933         }, {
2934                 name: "tests11.dat #2"
2935                 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>"
2936                 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"
2937         }, {
2938                 name: "tests11.dat #3"
2939                 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>"
2940                 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"
2941         }, {
2942                 name: "tests11.dat #4"
2943                 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>"
2944                 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"
2945         }, {
2946                 name: "tests11.dat #5"
2947                 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>"
2948                 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"
2949         }, {
2950                 name: "tests11.dat #6"
2951                 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>"
2952                 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"
2953         }, {
2954                 name: "tests11.dat #7"
2955                 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>"
2956                 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"
2957         }, {
2958                 name: "tests11.dat #8"
2959                 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>"
2960                 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"
2961         }, {
2962                 name: "tests11.dat #9"
2963                 html: "<!DOCTYPE html><body><svg><solidColor /></svg>"
2964                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg solidcolor>\n"
2965         }, {
2966                 name: "tests12.dat #1"
2967                 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"
2968                 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"
2969         }, {
2970                 name: "tests12.dat #2"
2971                 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"
2972                 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"
2973         }, {
2974                 name: "tests14.dat #1"
2975                 html: "<!DOCTYPE html><html><body><xyz:abc></xyz:abc>"
2976                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <xyz:abc>\n"
2977         }, {
2978                 name: "tests14.dat #2"
2979                 html: "<!DOCTYPE html><html><body><xyz:abc></xyz:abc><span></span>"
2980                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <xyz:abc>\n|     <span>\n"
2981         }, {
2982                 name: "tests14.dat #3"
2983                 html: "<!DOCTYPE html><html><html abc:def=gh><xyz:abc></xyz:abc>"
2984                 errors: 1
2985                 expected: "| <!DOCTYPE html>\n| <html>\n|   abc:def=\"gh\"\n|   <head>\n|   <body>\n|     <xyz:abc>\n"
2986         }, {
2987                 name: "tests14.dat #4"
2988                 html: "<!DOCTYPE html><html xml:lang=bar><html xml:lang=foo>"
2989                 errors: 1
2990                 expected: "| <!DOCTYPE html>\n| <html>\n|   xml:lang=\"bar\"\n|   <head>\n|   <body>\n"
2991         }, {
2992                 name: "tests14.dat #5"
2993                 html: "<!DOCTYPE html><html 123=456>"
2994                 expected: "| <!DOCTYPE html>\n| <html>\n|   123=\"456\"\n|   <head>\n|   <body>\n"
2995         }, {
2996                 name: "tests14.dat #6"
2997                 html: "<!DOCTYPE html><html 123=456><html 789=012>"
2998                 errors: 1
2999                 expected: "| <!DOCTYPE html>\n| <html>\n|   123=\"456\"\n|   789=\"012\"\n|   <head>\n|   <body>\n"
3000         }, {
3001                 name: "tests14.dat #7"
3002                 html: "<!DOCTYPE html><html><body 789=012>"
3003                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     789=\"012\"\n"
3004         }, {
3005                 name: "tests15.dat #1"
3006                 html: "<!DOCTYPE html><p><b><i><u></p> <p>X"
3007                 errors: 2
3008                 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"
3009         }, {
3010                 name: "tests15.dat #2"
3011                 html: "<p><b><i><u></p>\n<p>X"
3012                 errors: 3
3013                 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"
3014         }, {
3015                 name: "tests15.dat #3"
3016                 html: "<!doctype html></html> <head>"
3017                 errors: 2
3018                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \" \"\n"
3019         }, {
3020                 name: "tests15.dat #4"
3021                 html: "<!doctype html></body><meta>"
3022                 errors: 1
3023                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <meta>\n"
3024         }, {
3025                 name: "tests15.dat #5"
3026                 html: "<html></html><!-- foo -->"
3027                 errors: 1
3028                 expected: "| <html>\n|   <head>\n|   <body>\n| <!--  foo  -->\n"
3029         }, {
3030                 name: "tests15.dat #6"
3031                 html: "<!doctype html></body><title>X</title>"
3032                 errors: 1
3033                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <title>\n|       \"X\"\n"
3034         }, {
3035                 name: "tests15.dat #7"
3036                 html: "<!doctype html><table> X<meta></table>"
3037                 errors: 3
3038                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \" X\"\n|     <meta>\n|     <table>\n"
3039         }, {
3040                 name: "tests15.dat #8"
3041                 html: "<!doctype html><table> x</table>"
3042                 errors: 2
3043                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \" x\"\n|     <table>\n"
3044         }, {
3045                 name: "tests15.dat #9"
3046                 html: "<!doctype html><table> x </table>"
3047                 errors: 3
3048                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \" x \"\n|     <table>\n"
3049         }, {
3050                 name: "tests15.dat #10"
3051                 html: "<!doctype html><table><tr> x</table>"
3052                 errors: 2
3053                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \" x\"\n|     <table>\n|       <tbody>\n|         <tr>\n"
3054         }, {
3055                 name: "tests15.dat #11"
3056                 html: "<!doctype html><table>X<style> <tr>x </style> </table>"
3057                 errors: 1
3058                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"X\"\n|     <table>\n|       <style>\n|         \" <tr>x \"\n|       \" \"\n"
3059         }, {
3060                 name: "tests15.dat #12"
3061                 html: "<!doctype html><div><table><a>foo</a> <tr><td>bar</td> </tr></table></div>"
3062                 errors: 5
3063                 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"
3064         }, {
3065                 name: "tests15.dat #13"
3066                 html: "<frame></frame></frame><frameset><frame><frameset><frame></frameset><noframes></frameset><noframes>"
3067                 errors: 7
3068                 expected: "| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n|     <frameset>\n|       <frame>\n|     <noframes>\n|       \"</frameset><noframes>\"\n"
3069         }, {
3070                 name: "tests15.dat #14"
3071                 html: "<!DOCTYPE html><object></html>"
3072                 errors: 2
3073                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <object>\n"
3074         }, {
3075                 name: "tests16.dat #1"
3076                 html: "<!doctype html><script>"
3077                 errors: 1
3078                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|   <body>\n"
3079         }, {
3080                 name: "tests16.dat #2"
3081                 html: "<!doctype html><script>a"
3082                 errors: 1
3083                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"a\"\n|   <body>\n"
3084         }, {
3085                 name: "tests16.dat #3"
3086                 html: "<!doctype html><script><"
3087                 errors: 1
3088                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<\"\n|   <body>\n"
3089         }, {
3090                 name: "tests16.dat #4"
3091                 html: "<!doctype html><script></"
3092                 errors: 1
3093                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"</\"\n|   <body>\n"
3094         }, {
3095                 name: "tests16.dat #5"
3096                 html: "<!doctype html><script></S"
3097                 errors: 1
3098                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"</S\"\n|   <body>\n"
3099         }, {
3100                 name: "tests16.dat #6"
3101                 html: "<!doctype html><script></SC"
3102                 errors: 1
3103                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"</SC\"\n|   <body>\n"
3104         }, {
3105                 name: "tests16.dat #7"
3106                 html: "<!doctype html><script></SCR"
3107                 errors: 1
3108                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"</SCR\"\n|   <body>\n"
3109         }, {
3110                 name: "tests16.dat #8"
3111                 html: "<!doctype html><script></SCRI"
3112                 errors: 1
3113                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"</SCRI\"\n|   <body>\n"
3114         }, {
3115                 name: "tests16.dat #9"
3116                 html: "<!doctype html><script></SCRIP"
3117                 errors: 1
3118                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"</SCRIP\"\n|   <body>\n"
3119         }, {
3120                 name: "tests16.dat #10"
3121                 html: "<!doctype html><script></SCRIPT"
3122                 errors: 1
3123                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"</SCRIPT\"\n|   <body>\n"
3124         }, {
3125                 name: "tests16.dat #11"
3126                 html: "<!doctype html><script></SCRIPT "
3127                 errors: 2
3128                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|   <body>\n"
3129         }, {
3130                 name: "tests16.dat #12"
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 #13"
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 #14"
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 #15"
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 #16"
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 #17"
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 #18"
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 #19"
3166                 html: "<!doctype html><script><!"
3167                 errors: 1
3168                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!\"\n|   <body>\n"
3169         }, {
3170                 name: "tests16.dat #20"
3171                 html: "<!doctype html><script><!a"
3172                 errors: 1
3173                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!a\"\n|   <body>\n"
3174         }, {
3175                 name: "tests16.dat #21"
3176                 html: "<!doctype html><script><!-"
3177                 errors: 1
3178                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!-\"\n|   <body>\n"
3179         }, {
3180                 name: "tests16.dat #22"
3181                 html: "<!doctype html><script><!-a"
3182                 errors: 1
3183                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!-a\"\n|   <body>\n"
3184         }, {
3185                 name: "tests16.dat #23"
3186                 html: "<!doctype html><script><!--"
3187                 errors: 2
3188                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--\"\n|   <body>\n"
3189         }, {
3190                 name: "tests16.dat #24"
3191                 html: "<!doctype html><script><!--a"
3192                 errors: 2
3193                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--a\"\n|   <body>\n"
3194         }, {
3195                 name: "tests16.dat #25"
3196                 html: "<!doctype html><script><!--<"
3197                 errors: 2
3198                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<\"\n|   <body>\n"
3199         }, {
3200                 name: "tests16.dat #26"
3201                 html: "<!doctype html><script><!--<a"
3202                 errors: 2
3203                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<a\"\n|   <body>\n"
3204         }, {
3205                 name: "tests16.dat #27"
3206                 html: "<!doctype html><script><!--</"
3207                 errors: 2
3208                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--</\"\n|   <body>\n"
3209         }, {
3210                 name: "tests16.dat #28"
3211                 html: "<!doctype html><script><!--</script"
3212                 errors: 2
3213                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--</script\"\n|   <body>\n"
3214         }, {
3215                 name: "tests16.dat #29"
3216                 html: "<!doctype html><script><!--</script "
3217                 errors: 2
3218                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--\"\n|   <body>\n"
3219         }, {
3220                 name: "tests16.dat #30"
3221                 html: "<!doctype html><script><!--<s"
3222                 errors: 2
3223                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<s\"\n|   <body>\n"
3224         }, {
3225                 name: "tests16.dat #31"
3226                 html: "<!doctype html><script><!--<script"
3227                 errors: 2
3228                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script\"\n|   <body>\n"
3229         }, {
3230                 name: "tests16.dat #32"
3231                 html: "<!doctype html><script><!--<script "
3232                 errors: 2
3233                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script \"\n|   <body>\n"
3234         }, {
3235                 name: "tests16.dat #33"
3236                 html: "<!doctype html><script><!--<script <"
3237                 errors: 2
3238                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script <\"\n|   <body>\n"
3239         }, {
3240                 name: "tests16.dat #34"
3241                 html: "<!doctype html><script><!--<script <a"
3242                 errors: 2
3243                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script <a\"\n|   <body>\n"
3244         }, {
3245                 name: "tests16.dat #35"
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 #36"
3251                 html: "<!doctype html><script><!--<script </s"
3252                 errors: 2
3253                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </s\"\n|   <body>\n"
3254         }, {
3255                 name: "tests16.dat #37"
3256                 html: "<!doctype html><script><!--<script </script"
3257                 errors: 2
3258                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script\"\n|   <body>\n"
3259         }, {
3260                 name: "tests16.dat #38"
3261                 html: "<!doctype html><script><!--<script </scripta"
3262                 errors: 2
3263                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </scripta\"\n|   <body>\n"
3264         }, {
3265                 name: "tests16.dat #39"
3266                 html: "<!doctype html><script><!--<script </script "
3267                 errors: 2
3268                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script \"\n|   <body>\n"
3269         }, {
3270                 name: "tests16.dat #40"
3271                 html: "<!doctype html><script><!--<script </script>"
3272                 errors: 2
3273                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script>\"\n|   <body>\n"
3274         }, {
3275                 name: "tests16.dat #41"
3276                 html: "<!doctype html><script><!--<script </script/"
3277                 errors: 2
3278                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script/\"\n|   <body>\n"
3279         }, {
3280                 name: "tests16.dat #42"
3281                 html: "<!doctype html><script><!--<script </script <"
3282                 errors: 2
3283                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script <\"\n|   <body>\n"
3284         }, {
3285                 name: "tests16.dat #43"
3286                 html: "<!doctype html><script><!--<script </script <a"
3287                 errors: 2
3288                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script <a\"\n|   <body>\n"
3289         }, {
3290                 name: "tests16.dat #44"
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 #45"
3296                 html: "<!doctype html><script><!--<script </script </script"
3297                 errors: 2
3298                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script </script\"\n|   <body>\n"
3299         }, {
3300                 name: "tests16.dat #46"
3301                 html: "<!doctype html><script><!--<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 #47"
3306                 html: "<!doctype html><script><!--<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 #48"
3311                 html: "<!doctype html><script><!--<script </script </script>"
3312                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script \"\n|   <body>\n"
3313         }, {
3314                 name: "tests16.dat #49"
3315                 html: "<!doctype html><script><!--<script -"
3316                 errors: 2
3317                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -\"\n|   <body>\n"
3318         }, {
3319                 name: "tests16.dat #50"
3320                 html: "<!doctype html><script><!--<script -a"
3321                 errors: 2
3322                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -a\"\n|   <body>\n"
3323         }, {
3324                 name: "tests16.dat #51"
3325                 html: "<!doctype html><script><!--<script -<"
3326                 errors: 2
3327                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -<\"\n|   <body>\n"
3328         }, {
3329                 name: "tests16.dat #52"
3330                 html: "<!doctype html><script><!--<script --"
3331                 errors: 2
3332                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --\"\n|   <body>\n"
3333         }, {
3334                 name: "tests16.dat #53"
3335                 html: "<!doctype html><script><!--<script --a"
3336                 errors: 2
3337                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --a\"\n|   <body>\n"
3338         }, {
3339                 name: "tests16.dat #54"
3340                 html: "<!doctype html><script><!--<script --<"
3341                 errors: 2
3342                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --<\"\n|   <body>\n"
3343         }, {
3344                 name: "tests16.dat #55"
3345                 html: "<!doctype html><script><!--<script -->"
3346                 errors: 1
3347                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -->\"\n|   <body>\n"
3348         }, {
3349                 name: "tests16.dat #56"
3350                 html: "<!doctype html><script><!--<script --><"
3351                 errors: 1
3352                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --><\"\n|   <body>\n"
3353         }, {
3354                 name: "tests16.dat #57"
3355                 html: "<!doctype html><script><!--<script --></"
3356                 errors: 1
3357                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --></\"\n|   <body>\n"
3358         }, {
3359                 name: "tests16.dat #58"
3360                 html: "<!doctype html><script><!--<script --></script"
3361                 errors: 1
3362                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --></script\"\n|   <body>\n"
3363         }, {
3364                 name: "tests16.dat #59"
3365                 html: "<!doctype html><script><!--<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 #60"
3370                 html: "<!doctype html><script><!--<script --></script/"
3371                 errors: 2
3372                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -->\"\n|   <body>\n"
3373         }, {
3374                 name: "tests16.dat #61"
3375                 html: "<!doctype html><script><!--<script --></script>"
3376                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -->\"\n|   <body>\n"
3377         }, {
3378                 name: "tests16.dat #62"
3379                 html: "<!doctype html><script><!--<script><\\/script>--></script>"
3380                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script><\\/script>-->\"\n|   <body>\n"
3381         }, {
3382                 name: "tests16.dat #63"
3383                 html: "<!doctype html><script><!--<script></scr'+'ipt>--></script>"
3384                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></scr'+'ipt>-->\"\n|   <body>\n"
3385         }, {
3386                 name: "tests16.dat #64"
3387                 html: "<!doctype html><script><!--<script></script><script></script></script>"
3388                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>\"\n|   <body>\n"
3389         }, {
3390                 name: "tests16.dat #65"
3391                 html: "<!doctype html><script><!--<script></script><script></script>--><!--</script>"
3392                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>--><!--\"\n|   <body>\n"
3393         }, {
3394                 name: "tests16.dat #66"
3395                 html: "<!doctype html><script><!--<script></script><script></script>-- ></script>"
3396                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>-- >\"\n|   <body>\n"
3397         }, {
3398                 name: "tests16.dat #67"
3399                 html: "<!doctype html><script><!--<script></script><script></script>- -></script>"
3400                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>- ->\"\n|   <body>\n"
3401         }, {
3402                 name: "tests16.dat #68"
3403                 html: "<!doctype html><script><!--<script></script><script></script>- - ></script>"
3404                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>- - >\"\n|   <body>\n"
3405         }, {
3406                 name: "tests16.dat #69"
3407                 html: "<!doctype html><script><!--<script></script><script></script>-></script>"
3408                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>->\"\n|   <body>\n"
3409         }, {
3410                 name: "tests16.dat #70"
3411                 html: "<!doctype html><script><!--<script>--!></script>X"
3412                 errors: 2
3413                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script>--!></script>X\"\n|   <body>\n"
3414         }, {
3415                 name: "tests16.dat #71"
3416                 html: "<!doctype html><script><!--<scr'+'ipt></script>--></script>"
3417                 errors: 1
3418                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<scr'+'ipt>\"\n|   <body>\n|     \"-->\"\n"
3419         }, {
3420                 name: "tests16.dat #72"
3421                 html: "<!doctype html><script><!--<script></scr'+'ipt></script>X"
3422                 errors: 2
3423                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></scr'+'ipt></script>X\"\n|   <body>\n"
3424         }, {
3425                 name: "tests16.dat #73"
3426                 html: "<!doctype html><style><!--<style></style>--></style>"
3427                 errors: 1
3428                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <style>\n|       \"<!--<style>\"\n|   <body>\n|     \"-->\"\n"
3429         }, {
3430                 name: "tests16.dat #74"
3431                 html: "<!doctype html><style><!--</style>X"
3432                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <style>\n|       \"<!--\"\n|   <body>\n|     \"X\"\n"
3433         }, {
3434                 name: "tests16.dat #75"
3435                 html: "<!doctype html><style><!--...</style>...--></style>"
3436                 errors: 1
3437                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <style>\n|       \"<!--...\"\n|   <body>\n|     \"...-->\"\n"
3438         }, {
3439                 name: "tests16.dat #76"
3440                 html: "<!doctype html><style><!--<br><html xmlns:v=\"urn:schemas-microsoft-com:vml\"><!--[if !mso]><style></style>X"
3441                 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"
3442         }, {
3443                 name: "tests16.dat #77"
3444                 html: "<!doctype html><style><!--...<style><!--...--!></style>--></style>"
3445                 errors: 1
3446                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <style>\n|       \"<!--...<style><!--...--!>\"\n|   <body>\n|     \"-->\"\n"
3447         }, {
3448                 name: "tests16.dat #78"
3449                 html: "<!doctype html><style><!--...</style><!-- --><style>@import ...</style>"
3450                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <style>\n|       \"<!--...\"\n|     <!--   -->\n|     <style>\n|       \"@import ...\"\n|   <body>\n"
3451         }, {
3452                 name: "tests16.dat #79"
3453                 html: "<!doctype html><style>...<style><!--...</style><!-- --></style>"
3454                 errors: 1
3455                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <style>\n|       \"...<style><!--...\"\n|     <!--   -->\n|   <body>\n"
3456         }, {
3457                 name: "tests16.dat #80"
3458                 html: "<!doctype html><style>...<!--[if IE]><style>...</style>X"
3459                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <style>\n|       \"...<!--[if IE]><style>...\"\n|   <body>\n|     \"X\"\n"
3460         }, {
3461                 name: "tests16.dat #81"
3462                 html: "<!doctype html><title><!--<title></title>--></title>"
3463                 errors: 1
3464                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <title>\n|       \"<!--<title>\"\n|   <body>\n|     \"-->\"\n"
3465         }, {
3466                 name: "tests16.dat #82"
3467                 html: "<!doctype html><title>&lt;/title></title>"
3468                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <title>\n|       \"</title>\"\n|   <body>\n"
3469         }, {
3470                 name: "tests16.dat #83"
3471                 html: "<!doctype html><title>foo/title><link></head><body>X"
3472                 errors: 1
3473                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <title>\n|       \"foo/title><link></head><body>X\"\n|   <body>\n"
3474         }, {
3475                 name: "tests16.dat #84"
3476                 html: "<!doctype html><noscript><!--<noscript></noscript>--></noscript>"
3477                 errors: 1
3478                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noscript>\n|       \"<!--<noscript>\"\n|   <body>\n|     \"-->\"\n"
3479         }, {
3480                 name: "tests16.dat #85"
3481                 html: "<!doctype html><noscript><!--<noscript></noscript>--></noscript>"
3482                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noscript>\n|       <!-- <noscript></noscript> -->\n|   <body>\n"
3483         }, {
3484                 name: "tests16.dat #86"
3485                 html: "<!doctype html><noscript><!--</noscript>X<noscript>--></noscript>"
3486                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noscript>\n|       \"<!--\"\n|   <body>\n|     \"X\"\n|     <noscript>\n|       \"-->\"\n"
3487         }, {
3488                 name: "tests16.dat #87"
3489                 html: "<!doctype html><noscript><!--</noscript>X<noscript>--></noscript>"
3490                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noscript>\n|       <!-- </noscript>X<noscript> -->\n|   <body>\n"
3491         }, {
3492                 name: "tests16.dat #88"
3493                 html: "<!doctype html><noscript><iframe></noscript>X"
3494                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noscript>\n|       \"<iframe>\"\n|   <body>\n|     \"X\"\n"
3495         }, {
3496                 name: "tests16.dat #89"
3497                 html: "<!doctype html><noscript><iframe></noscript>X"
3498                 errors: 2
3499                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noscript>\n|   <body>\n|     <iframe>\n|       \"</noscript>X\"\n"
3500         }, {
3501                 name: "tests16.dat #90"
3502                 html: "<!doctype html><noframes><!--<noframes></noframes>--></noframes>"
3503                 errors: 1
3504                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noframes>\n|       \"<!--<noframes>\"\n|   <body>\n|     \"-->\"\n"
3505         }, {
3506                 name: "tests16.dat #91"
3507                 html: "<!doctype html><noframes><body><script><!--...</script></body></noframes></html>"
3508                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noframes>\n|       \"<body><script><!--...</script></body>\"\n|   <body>\n"
3509         }, {
3510                 name: "tests16.dat #92"
3511                 html: "<!doctype html><textarea><!--<textarea></textarea>--></textarea>"
3512                 errors: 1
3513                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"<!--<textarea>\"\n|     \"-->\"\n"
3514         }, {
3515                 name: "tests16.dat #93"
3516                 html: "<!doctype html><textarea>&lt;/textarea></textarea>"
3517                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"</textarea>\"\n"
3518         }, {
3519                 name: "tests16.dat #94"
3520                 html: "<!doctype html><textarea>&lt;</textarea>"
3521                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"<\"\n"
3522         }, {
3523                 name: "tests16.dat #95"
3524                 html: "<!doctype html><textarea>a&lt;b</textarea>"
3525                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"a<b\"\n"
3526         }, {
3527                 name: "tests16.dat #96"
3528                 html: "<!doctype html><iframe><!--<iframe></iframe>--></iframe>"
3529                 errors: 1
3530                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <iframe>\n|       \"<!--<iframe>\"\n|     \"-->\"\n"
3531         }, {
3532                 name: "tests16.dat #97"
3533                 html: "<!doctype html><iframe>...<!--X->...<!--/X->...</iframe>"
3534                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <iframe>\n|       \"...<!--X->...<!--/X->...\"\n"
3535         }, {
3536                 name: "tests16.dat #98"
3537                 html: "<!doctype html><xmp><!--<xmp></xmp>--></xmp>"
3538                 errors: 1
3539                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <xmp>\n|       \"<!--<xmp>\"\n|     \"-->\"\n"
3540         }, {
3541                 name: "tests16.dat #99"
3542                 html: "<!doctype html><noembed><!--<noembed></noembed>--></noembed>"
3543                 errors: 1
3544                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <noembed>\n|       \"<!--<noembed>\"\n|     \"-->\"\n"
3545         }, {
3546                 name: "tests16.dat #100"
3547                 html: "<script>"
3548                 errors: 2
3549                 expected: "| <html>\n|   <head>\n|     <script>\n|   <body>\n"
3550         }, {
3551                 name: "tests16.dat #101"
3552                 html: "<script>a"
3553                 errors: 2
3554                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"a\"\n|   <body>\n"
3555         }, {
3556                 name: "tests16.dat #102"
3557                 html: "<script><"
3558                 errors: 2
3559                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<\"\n|   <body>\n"
3560         }, {
3561                 name: "tests16.dat #103"
3562                 html: "<script></"
3563                 errors: 2
3564                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</\"\n|   <body>\n"
3565         }, {
3566                 name: "tests16.dat #104"
3567                 html: "<script></S"
3568                 errors: 2
3569                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</S\"\n|   <body>\n"
3570         }, {
3571                 name: "tests16.dat #105"
3572                 html: "<script></SC"
3573                 errors: 2
3574                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</SC\"\n|   <body>\n"
3575         }, {
3576                 name: "tests16.dat #106"
3577                 html: "<script></SCR"
3578                 errors: 2
3579                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</SCR\"\n|   <body>\n"
3580         }, {
3581                 name: "tests16.dat #107"
3582                 html: "<script></SCRI"
3583                 errors: 2
3584                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</SCRI\"\n|   <body>\n"
3585         }, {
3586                 name: "tests16.dat #108"
3587                 html: "<script></SCRIP"
3588                 errors: 2
3589                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</SCRIP\"\n|   <body>\n"
3590         }, {
3591                 name: "tests16.dat #109"
3592                 html: "<script></SCRIPT"
3593                 errors: 2
3594                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</SCRIPT\"\n|   <body>\n"
3595         }, {
3596                 name: "tests16.dat #110"
3597                 html: "<script></SCRIPT "
3598                 errors: 3
3599                 expected: "| <html>\n|   <head>\n|     <script>\n|   <body>\n"
3600         }, {
3601                 name: "tests16.dat #111"
3602                 html: "<script></s"
3603                 errors: 2
3604                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</s\"\n|   <body>\n"
3605         }, {
3606                 name: "tests16.dat #112"
3607                 html: "<script></sc"
3608                 errors: 2
3609                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</sc\"\n|   <body>\n"
3610         }, {
3611                 name: "tests16.dat #113"
3612                 html: "<script></scr"
3613                 errors: 2
3614                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</scr\"\n|   <body>\n"
3615         }, {
3616                 name: "tests16.dat #114"
3617                 html: "<script></scri"
3618                 errors: 2
3619                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</scri\"\n|   <body>\n"
3620         }, {
3621                 name: "tests16.dat #115"
3622                 html: "<script></scrip"
3623                 errors: 2
3624                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</scrip\"\n|   <body>\n"
3625         }, {
3626                 name: "tests16.dat #116"
3627                 html: "<script></script"
3628                 errors: 2
3629                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</script\"\n|   <body>\n"
3630         }, {
3631                 name: "tests16.dat #117"
3632                 html: "<script></script "
3633                 errors: 3
3634                 expected: "| <html>\n|   <head>\n|     <script>\n|   <body>\n"
3635         }, {
3636                 name: "tests16.dat #118"
3637                 html: "<script><!"
3638                 errors: 2
3639                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!\"\n|   <body>\n"
3640         }, {
3641                 name: "tests16.dat #119"
3642                 html: "<script><!a"
3643                 errors: 2
3644                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!a\"\n|   <body>\n"
3645         }, {
3646                 name: "tests16.dat #120"
3647                 html: "<script><!-"
3648                 errors: 2
3649                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!-\"\n|   <body>\n"
3650         }, {
3651                 name: "tests16.dat #121"
3652                 html: "<script><!-a"
3653                 errors: 2
3654                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!-a\"\n|   <body>\n"
3655         }, {
3656                 name: "tests16.dat #122"
3657                 html: "<script><!--"
3658                 errors: 3
3659                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--\"\n|   <body>\n"
3660         }, {
3661                 name: "tests16.dat #123"
3662                 html: "<script><!--a"
3663                 errors: 3
3664                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--a\"\n|   <body>\n"
3665         }, {
3666                 name: "tests16.dat #124"
3667                 html: "<script><!--<"
3668                 errors: 3
3669                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<\"\n|   <body>\n"
3670         }, {
3671                 name: "tests16.dat #125"
3672                 html: "<script><!--<a"
3673                 errors: 3
3674                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<a\"\n|   <body>\n"
3675         }, {
3676                 name: "tests16.dat #126"
3677                 html: "<script><!--</"
3678                 errors: 3
3679                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--</\"\n|   <body>\n"
3680         }, {
3681                 name: "tests16.dat #127"
3682                 html: "<script><!--</script"
3683                 errors: 3
3684                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--</script\"\n|   <body>\n"
3685         }, {
3686                 name: "tests16.dat #128"
3687                 html: "<script><!--</script "
3688                 errors: 3
3689                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--\"\n|   <body>\n"
3690         }, {
3691                 name: "tests16.dat #129"
3692                 html: "<script><!--<s"
3693                 errors: 3
3694                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<s\"\n|   <body>\n"
3695         }, {
3696                 name: "tests16.dat #130"
3697                 html: "<script><!--<script"
3698                 errors: 3
3699                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script\"\n|   <body>\n"
3700         }, {
3701                 name: "tests16.dat #131"
3702                 html: "<script><!--<script "
3703                 errors: 3
3704                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script \"\n|   <body>\n"
3705         }, {
3706                 name: "tests16.dat #132"
3707                 html: "<script><!--<script <"
3708                 errors: 3
3709                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script <\"\n|   <body>\n"
3710         }, {
3711                 name: "tests16.dat #133"
3712                 html: "<script><!--<script <a"
3713                 errors: 3
3714                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script <a\"\n|   <body>\n"
3715         }, {
3716                 name: "tests16.dat #134"
3717                 html: "<script><!--<script </"
3718                 errors: 3
3719                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </\"\n|   <body>\n"
3720         }, {
3721                 name: "tests16.dat #135"
3722                 html: "<script><!--<script </s"
3723                 errors: 3
3724                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </s\"\n|   <body>\n"
3725         }, {
3726                 name: "tests16.dat #136"
3727                 html: "<script><!--<script </script"
3728                 errors: 3
3729                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script\"\n|   <body>\n"
3730         }, {
3731                 name: "tests16.dat #137"
3732                 html: "<script><!--<script </scripta"
3733                 errors: 3
3734                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </scripta\"\n|   <body>\n"
3735         }, {
3736                 name: "tests16.dat #138"
3737                 html: "<script><!--<script </script "
3738                 errors: 3
3739                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script \"\n|   <body>\n"
3740         }, {
3741                 name: "tests16.dat #139"
3742                 html: "<script><!--<script </script>"
3743                 errors: 3
3744                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script>\"\n|   <body>\n"
3745         }, {
3746                 name: "tests16.dat #140"
3747                 html: "<script><!--<script </script/"
3748                 errors: 3
3749                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script/\"\n|   <body>\n"
3750         }, {
3751                 name: "tests16.dat #141"
3752                 html: "<script><!--<script </script <"
3753                 errors: 3
3754                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script <\"\n|   <body>\n"
3755         }, {
3756                 name: "tests16.dat #142"
3757                 html: "<script><!--<script </script <a"
3758                 errors: 3
3759                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script <a\"\n|   <body>\n"
3760         }, {
3761                 name: "tests16.dat #143"
3762                 html: "<script><!--<script </script </"
3763                 errors: 3
3764                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script </\"\n|   <body>\n"
3765         }, {
3766                 name: "tests16.dat #144"
3767                 html: "<script><!--<script </script </script"
3768                 errors: 3
3769                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script </script\"\n|   <body>\n"
3770         }, {
3771                 name: "tests16.dat #145"
3772                 html: "<script><!--<script </script </script "
3773                 errors: 3
3774                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script \"\n|   <body>\n"
3775         }, {
3776                 name: "tests16.dat #146"
3777                 html: "<script><!--<script </script </script/"
3778                 errors: 3
3779                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script \"\n|   <body>\n"
3780         }, {
3781                 name: "tests16.dat #147"
3782                 html: "<script><!--<script </script </script>"
3783                 errors: 1
3784                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script \"\n|   <body>\n"
3785         }, {
3786                 name: "tests16.dat #148"
3787                 html: "<script><!--<script -"
3788                 errors: 3
3789                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -\"\n|   <body>\n"
3790         }, {
3791                 name: "tests16.dat #149"
3792                 html: "<script><!--<script -a"
3793                 errors: 3
3794                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -a\"\n|   <body>\n"
3795         }, {
3796                 name: "tests16.dat #150"
3797                 html: "<script><!--<script --"
3798                 errors: 3
3799                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --\"\n|   <body>\n"
3800         }, {
3801                 name: "tests16.dat #151"
3802                 html: "<script><!--<script --a"
3803                 errors: 3
3804                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --a\"\n|   <body>\n"
3805         }, {
3806                 name: "tests16.dat #152"
3807                 html: "<script><!--<script -->"
3808                 errors: 2
3809                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -->\"\n|   <body>\n"
3810         }, {
3811                 name: "tests16.dat #153"
3812                 html: "<script><!--<script --><"
3813                 errors: 2
3814                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --><\"\n|   <body>\n"
3815         }, {
3816                 name: "tests16.dat #154"
3817                 html: "<script><!--<script --></"
3818                 errors: 2
3819                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --></\"\n|   <body>\n"
3820         }, {
3821                 name: "tests16.dat #155"
3822                 html: "<script><!--<script --></script"
3823                 errors: 2
3824                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --></script\"\n|   <body>\n"
3825         }, {
3826                 name: "tests16.dat #156"
3827                 html: "<script><!--<script --></script "
3828                 errors: 3
3829                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -->\"\n|   <body>\n"
3830         }, {
3831                 name: "tests16.dat #157"
3832                 html: "<script><!--<script --></script/"
3833                 errors: 3
3834                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -->\"\n|   <body>\n"
3835         }, {
3836                 name: "tests16.dat #158"
3837                 html: "<script><!--<script --></script>"
3838                 errors: 1
3839                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -->\"\n|   <body>\n"
3840         }, {
3841                 name: "tests16.dat #159"
3842                 html: "<script><!--<script><\\/script>--></script>"
3843                 errors: 1
3844                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script><\\/script>-->\"\n|   <body>\n"
3845         }, {
3846                 name: "tests16.dat #160"
3847                 html: "<script><!--<script></scr'+'ipt>--></script>"
3848                 errors: 1
3849                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></scr'+'ipt>-->\"\n|   <body>\n"
3850         }, {
3851                 name: "tests16.dat #161"
3852                 html: "<script><!--<script></script><script></script></script>"
3853                 errors: 1
3854                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>\"\n|   <body>\n"
3855         }, {
3856                 name: "tests16.dat #162"
3857                 html: "<script><!--<script></script><script></script>--><!--</script>"
3858                 errors: 1
3859                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>--><!--\"\n|   <body>\n"
3860         }, {
3861                 name: "tests16.dat #163"
3862                 html: "<script><!--<script></script><script></script>-- ></script>"
3863                 errors: 1
3864                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>-- >\"\n|   <body>\n"
3865         }, {
3866                 name: "tests16.dat #164"
3867                 html: "<script><!--<script></script><script></script>- -></script>"
3868                 errors: 1
3869                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>- ->\"\n|   <body>\n"
3870         }, {
3871                 name: "tests16.dat #165"
3872                 html: "<script><!--<script></script><script></script>- - ></script>"
3873                 errors: 1
3874                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>- - >\"\n|   <body>\n"
3875         }, {
3876                 name: "tests16.dat #166"
3877                 html: "<script><!--<script></script><script></script>-></script>"
3878                 errors: 1
3879                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>->\"\n|   <body>\n"
3880         }, {
3881                 name: "tests16.dat #167"
3882                 html: "<script><!--<script>--!></script>X"
3883                 errors: 3
3884                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script>--!></script>X\"\n|   <body>\n"
3885         }, {
3886                 name: "tests16.dat #168"
3887                 html: "<script><!--<scr'+'ipt></script>--></script>"
3888                 errors: 2
3889                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<scr'+'ipt>\"\n|   <body>\n|     \"-->\"\n"
3890         }, {
3891                 name: "tests16.dat #169"
3892                 html: "<script><!--<script></scr'+'ipt></script>X"
3893                 errors: 3
3894                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></scr'+'ipt></script>X\"\n|   <body>\n"
3895         }, {
3896                 name: "tests16.dat #170"
3897                 html: "<style><!--<style></style>--></style>"
3898                 errors: 2
3899                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--<style>\"\n|   <body>\n|     \"-->\"\n"
3900         }, {
3901                 name: "tests16.dat #171"
3902                 html: "<style><!--</style>X"
3903                 errors: 1
3904                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--\"\n|   <body>\n|     \"X\"\n"
3905         }, {
3906                 name: "tests16.dat #172"
3907                 html: "<style><!--...</style>...--></style>"
3908                 errors: 2
3909                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--...\"\n|   <body>\n|     \"...-->\"\n"
3910         }, {
3911                 name: "tests16.dat #173"
3912                 html: "<style><!--<br><html xmlns:v=\"urn:schemas-microsoft-com:vml\"><!--[if !mso]><style></style>X"
3913                 errors: 1
3914                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--<br><html xmlns:v=\"urn:schemas-microsoft-com:vml\"><!--[if !mso]><style>\"\n|   <body>\n|     \"X\"\n"
3915         }, {
3916                 name: "tests16.dat #174"
3917                 html: "<style><!--...<style><!--...--!></style>--></style>"
3918                 errors: 2
3919                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--...<style><!--...--!>\"\n|   <body>\n|     \"-->\"\n"
3920         }, {
3921                 name: "tests16.dat #175"
3922                 html: "<style><!--...</style><!-- --><style>@import ...</style>"
3923                 errors: 1
3924                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--...\"\n|     <!--   -->\n|     <style>\n|       \"@import ...\"\n|   <body>\n"
3925         }, {
3926                 name: "tests16.dat #176"
3927                 html: "<style>...<style><!--...</style><!-- --></style>"
3928                 errors: 2
3929                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"...<style><!--...\"\n|     <!--   -->\n|   <body>\n"
3930         }, {
3931                 name: "tests16.dat #177"
3932                 html: "<style>...<!--[if IE]><style>...</style>X"
3933                 errors: 1
3934                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"...<!--[if IE]><style>...\"\n|   <body>\n|     \"X\"\n"
3935         }, {
3936                 name: "tests16.dat #178"
3937                 html: "<title><!--<title></title>--></title>"
3938                 errors: 2
3939                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"<!--<title>\"\n|   <body>\n|     \"-->\"\n"
3940         }, {
3941                 name: "tests16.dat #179"
3942                 html: "<title>&lt;/title></title>"
3943                 errors: 1
3944                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"</title>\"\n|   <body>\n"
3945         }, {
3946                 name: "tests16.dat #180"
3947                 html: "<title>foo/title><link></head><body>X"
3948                 errors: 2
3949                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"foo/title><link></head><body>X\"\n|   <body>\n"
3950         }, {
3951                 name: "tests16.dat #181"
3952                 html: "<noscript><!--<noscript></noscript>--></noscript>"
3953                 errors: 2
3954                 expected: "| <html>\n|   <head>\n|     <noscript>\n|       \"<!--<noscript>\"\n|   <body>\n|     \"-->\"\n"
3955         }, {
3956                 name: "tests16.dat #182"
3957                 html: "<noscript><!--<noscript></noscript>--></noscript>"
3958                 errors: 1
3959                 expected: "| <html>\n|   <head>\n|     <noscript>\n|       <!-- <noscript></noscript> -->\n|   <body>\n"
3960         }, {
3961                 name: "tests16.dat #183"
3962                 html: "<noscript><!--</noscript>X<noscript>--></noscript>"
3963                 errors: 1
3964                 expected: "| <html>\n|   <head>\n|     <noscript>\n|       \"<!--\"\n|   <body>\n|     \"X\"\n|     <noscript>\n|       \"-->\"\n"
3965         }, {
3966                 name: "tests16.dat #184"
3967                 html: "<noscript><!--</noscript>X<noscript>--></noscript>"
3968                 errors: 1
3969                 expected: "| <html>\n|   <head>\n|     <noscript>\n|       <!-- </noscript>X<noscript> -->\n|   <body>\n"
3970         }, {
3971                 name: "tests16.dat #185"
3972                 html: "<noscript><iframe></noscript>X"
3973                 errors: 1
3974                 expected: "| <html>\n|   <head>\n|     <noscript>\n|       \"<iframe>\"\n|   <body>\n|     \"X\"\n"
3975         }, {
3976                 name: "tests16.dat #186"
3977                 html: "<noscript><iframe></noscript>X"
3978                 errors: 3
3979                 expected: "| <html>\n|   <head>\n|     <noscript>\n|   <body>\n|     <iframe>\n|       \"</noscript>X\"\n"
3980         }, {
3981                 name: "tests16.dat #187"
3982                 html: "<noframes><!--<noframes></noframes>--></noframes>"
3983                 errors: 2
3984                 expected: "| <html>\n|   <head>\n|     <noframes>\n|       \"<!--<noframes>\"\n|   <body>\n|     \"-->\"\n"
3985         }, {
3986                 name: "tests16.dat #188"
3987                 html: "<noframes><body><script><!--...</script></body></noframes></html>"
3988                 errors: 1
3989                 expected: "| <html>\n|   <head>\n|     <noframes>\n|       \"<body><script><!--...</script></body>\"\n|   <body>\n"
3990         }, {
3991                 name: "tests16.dat #189"
3992                 html: "<textarea><!--<textarea></textarea>--></textarea>"
3993                 errors: 2
3994                 expected: "| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"<!--<textarea>\"\n|     \"-->\"\n"
3995         }, {
3996                 name: "tests16.dat #190"
3997                 html: "<textarea>&lt;/textarea></textarea>"
3998                 errors: 1
3999                 expected: "| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"</textarea>\"\n"
4000         }, {
4001                 name: "tests16.dat #191"
4002                 html: "<iframe><!--<iframe></iframe>--></iframe>"
4003                 errors: 2
4004                 expected: "| <html>\n|   <head>\n|   <body>\n|     <iframe>\n|       \"<!--<iframe>\"\n|     \"-->\"\n"
4005         }, {
4006                 name: "tests16.dat #192"
4007                 html: "<iframe>...<!--X->...<!--/X->...</iframe>"
4008                 errors: 1
4009                 expected: "| <html>\n|   <head>\n|   <body>\n|     <iframe>\n|       \"...<!--X->...<!--/X->...\"\n"
4010         }, {
4011                 name: "tests16.dat #193"
4012                 html: "<xmp><!--<xmp></xmp>--></xmp>"
4013                 errors: 2
4014                 expected: "| <html>\n|   <head>\n|   <body>\n|     <xmp>\n|       \"<!--<xmp>\"\n|     \"-->\"\n"
4015         }, {
4016                 name: "tests16.dat #194"
4017                 html: "<noembed><!--<noembed></noembed>--></noembed>"
4018                 errors: 2
4019                 expected: "| <html>\n|   <head>\n|   <body>\n|     <noembed>\n|       \"<!--<noembed>\"\n|     \"-->\"\n"
4020         }, {
4021                 name: "tests16.dat #195"
4022                 html: "<!doctype html><table>\n"
4023                 errors: 1
4024                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       \"\n\"\n"
4025         }, {
4026                 name: "tests16.dat #196"
4027                 html: "<!doctype html><table><td><span><font></span><span>"
4028                 errors: 3
4029                 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"
4030         }, {
4031                 name: "tests16.dat #197"
4032                 html: "<!doctype html><form><table></form><form></table></form>"
4033                 errors: 5
4034                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <form>\n|       <table>\n|         <form>\n"
4035         }, {
4036                 name: "tests17.dat #1"
4037                 html: "<!doctype html><table><tbody><select><tr>"
4038                 errors: 3
4039                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|     <table>\n|       <tbody>\n|         <tr>\n"
4040         }, {
4041                 name: "tests17.dat #2"
4042                 html: "<!doctype html><table><tr><select><td>"
4043                 errors: 3
4044                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n"
4045         }, {
4046                 name: "tests17.dat #3"
4047                 html: "<!doctype html><table><tr><td><select><td>"
4048                 errors: 2
4049                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <select>\n|           <td>\n"
4050         }, {
4051                 name: "tests17.dat #4"
4052                 html: "<!doctype html><table><tr><th><select><td>"
4053                 errors: 2
4054                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <th>\n|             <select>\n|           <td>\n"
4055         }, {
4056                 name: "tests17.dat #5"
4057                 html: "<!doctype html><table><caption><select><tr>"
4058                 errors: 2
4059                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <select>\n|       <tbody>\n|         <tr>\n"
4060         }, {
4061                 name: "tests17.dat #6"
4062                 html: "<!doctype html><select><tr>"
4063                 errors: 2
4064                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4065         }, {
4066                 name: "tests17.dat #7"
4067                 html: "<!doctype html><select><td>"
4068                 errors: 2
4069                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4070         }, {
4071                 name: "tests17.dat #8"
4072                 html: "<!doctype html><select><th>"
4073                 errors: 2
4074                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4075         }, {
4076                 name: "tests17.dat #9"
4077                 html: "<!doctype html><select><tbody>"
4078                 errors: 2
4079                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4080         }, {
4081                 name: "tests17.dat #10"
4082                 html: "<!doctype html><select><thead>"
4083                 errors: 2
4084                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4085         }, {
4086                 name: "tests17.dat #11"
4087                 html: "<!doctype html><select><tfoot>"
4088                 errors: 2
4089                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4090         }, {
4091                 name: "tests17.dat #12"
4092                 html: "<!doctype html><select><caption>"
4093                 errors: 2
4094                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4095         }, {
4096                 name: "tests17.dat #13"
4097                 html: "<!doctype html><table><tr></table>a"
4098                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|     \"a\"\n"
4099         }, {
4100                 name: "tests18.dat #1"
4101                 html: "<!doctype html><plaintext></plaintext>"
4102                 errors: 1
4103                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <plaintext>\n|       \"</plaintext>\"\n"
4104         }, {
4105                 name: "tests18.dat #2"
4106                 html: "<!doctype html><table><plaintext></plaintext>"
4107                 errors: 14
4108                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <plaintext>\n|       \"</plaintext>\"\n|     <table>\n"
4109         }, {
4110                 name: "tests18.dat #3"
4111                 html: "<!doctype html><table><tbody><plaintext></plaintext>"
4112                 errors: 14
4113                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <plaintext>\n|       \"</plaintext>\"\n|     <table>\n|       <tbody>\n"
4114         }, {
4115                 name: "tests18.dat #4"
4116                 html: "<!doctype html><table><tbody><tr><plaintext></plaintext>"
4117                 errors: 14
4118                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <plaintext>\n|       \"</plaintext>\"\n|     <table>\n|       <tbody>\n|         <tr>\n"
4119         }, {
4120                 name: "tests18.dat #5"
4121                 html: "<!doctype html><table><td><plaintext></plaintext>"
4122                 errors: 2
4123                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <plaintext>\n|               \"</plaintext>\"\n"
4124         }, {
4125                 name: "tests18.dat #6"
4126                 html: "<!doctype html><table><caption><plaintext></plaintext>"
4127                 errors: 1
4128                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <plaintext>\n|           \"</plaintext>\"\n"
4129         }, {
4130                 name: "tests18.dat #7"
4131                 html: "<!doctype html><table><tr><style></script></style>abc"
4132                 errors: 4
4133                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"abc\"\n|     <table>\n|       <tbody>\n|         <tr>\n|           <style>\n|             \"</script>\"\n"
4134         }, {
4135                 name: "tests18.dat #8"
4136                 html: "<!doctype html><table><tr><script></style></script>abc"
4137                 errors: 4
4138                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"abc\"\n|     <table>\n|       <tbody>\n|         <tr>\n|           <script>\n|             \"</style>\"\n"
4139         }, {
4140                 name: "tests18.dat #9"
4141                 html: "<!doctype html><table><caption><style></script></style>abc"
4142                 errors: 1
4143                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <style>\n|           \"</script>\"\n|         \"abc\"\n"
4144         }, {
4145                 name: "tests18.dat #10"
4146                 html: "<!doctype html><table><td><style></script></style>abc"
4147                 errors: 2
4148                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <style>\n|               \"</script>\"\n|             \"abc\"\n"
4149         }, {
4150                 name: "tests18.dat #11"
4151                 html: "<!doctype html><select><script></style></script>abc"
4152                 errors: 1
4153                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <script>\n|         \"</style>\"\n|       \"abc\"\n"
4154         }, {
4155                 name: "tests18.dat #12"
4156                 html: "<!doctype html><table><select><script></style></script>abc"
4157                 errors: 2
4158                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <script>\n|         \"</style>\"\n|       \"abc\"\n|     <table>\n"
4159         }, {
4160                 name: "tests18.dat #13"
4161                 html: "<!doctype html><table><tr><select><script></style></script>abc"
4162                 errors: 2
4163                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <script>\n|         \"</style>\"\n|       \"abc\"\n|     <table>\n|       <tbody>\n|         <tr>\n"
4164         }, {
4165                 name: "tests18.dat #14"
4166                 html: "<!doctype html><frameset></frameset><noframes>abc"
4167                 errors: 1
4168                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|   <noframes>\n|     \"abc\"\n"
4169         }, {
4170                 name: "tests18.dat #15"
4171                 html: "<!doctype html><frameset></frameset><noframes>abc</noframes><!--abc-->"
4172                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|   <noframes>\n|     \"abc\"\n|   <!-- abc -->\n"
4173         }, {
4174                 name: "tests18.dat #16"
4175                 html: "<!doctype html><frameset></frameset></html><noframes>abc"
4176                 errors: 1
4177                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|   <noframes>\n|     \"abc\"\n"
4178         }, {
4179                 name: "tests18.dat #17"
4180                 html: "<!doctype html><frameset></frameset></html><noframes>abc</noframes><!--abc-->"
4181                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|   <noframes>\n|     \"abc\"\n| <!-- abc -->\n"
4182         }, {
4183                 name: "tests18.dat #18"
4184                 html: "<!doctype html><table><tr></tbody><tfoot>"
4185                 errors: 1
4186                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|       <tfoot>\n"
4187         }, {
4188                 name: "tests18.dat #19"
4189                 html: "<!doctype html><table><td><svg></svg>abc<td>"
4190                 errors: 2
4191                 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"
4192         }, {
4193                 name: "tests19.dat #1"
4194                 html: "<!doctype html><math><mn DefinitionUrl=\"foo\">"
4195                 errors: 1
4196                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mn>\n|         definitionURL=\"foo\"\n"
4197         }, {
4198                 name: "tests19.dat #2"
4199                 html: "<!doctype html><html></p><!--foo-->"
4200                 errors: 1
4201                 expected: "| <!DOCTYPE html>\n| <html>\n|   <!-- foo -->\n|   <head>\n|   <body>\n"
4202         }, {
4203                 name: "tests19.dat #3"
4204                 html: "<!doctype html><head></head></p><!--foo-->"
4205                 errors: 1
4206                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <!-- foo -->\n|   <body>\n"
4207         }, {
4208                 name: "tests19.dat #4"
4209                 html: "<!doctype html><body><p><pre>"
4210                 errors: 1
4211                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <pre>\n"
4212         }, {
4213                 name: "tests19.dat #5"
4214                 html: "<!doctype html><body><p><listing>"
4215                 errors: 1
4216                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <listing>\n"
4217         }, {
4218                 name: "tests19.dat #6"
4219                 html: "<!doctype html><p><plaintext>"
4220                 errors: 1
4221                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <plaintext>\n"
4222         }, {
4223                 name: "tests19.dat #7"
4224                 html: "<!doctype html><p><h1>"
4225                 errors: 1
4226                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <h1>\n"
4227         }, {
4228                 name: "tests19.dat #8"
4229                 html: "<!doctype html><form><isindex>"
4230                 errors: 2
4231                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <form>\n"
4232         }, {
4233                 name: "tests19.dat #9"
4234                 html: "<!doctype html><isindex action=\"POST\">"
4235                 errors: 1
4236                 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"
4237         }, {
4238                 name: "tests19.dat #10"
4239                 html: "<!doctype html><isindex prompt=\"this is isindex\">"
4240                 errors: 1
4241                 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"
4242         }, {
4243                 name: "tests19.dat #11"
4244                 html: "<!doctype html><isindex type=\"hidden\">"
4245                 errors: 1
4246                 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"
4247         }, {
4248                 name: "tests19.dat #12"
4249                 html: "<!doctype html><isindex name=\"foo\">"
4250                 errors: 1
4251                 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"
4252         }, {
4253                 name: "tests19.dat #13"
4254                 html: "<!doctype html><ruby><p><rp>"
4255                 errors: 1
4256                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <p>\n|       <rp>\n"
4257         }, {
4258                 name: "tests19.dat #14"
4259                 html: "<!doctype html><ruby><div><span><rp>"
4260                 errors: 2
4261                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <div>\n|         <span>\n|           <rp>\n"
4262         }, {
4263                 name: "tests19.dat #15"
4264                 html: "<!doctype html><ruby><div><p><rp>"
4265                 errors: 2
4266                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <div>\n|         <p>\n|         <rp>\n"
4267         }, {
4268                 name: "tests19.dat #16"
4269                 html: "<!doctype html><ruby><p><rt>"
4270                 errors: 1
4271                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <p>\n|       <rt>\n"
4272         }, {
4273                 name: "tests19.dat #17"
4274                 html: "<!doctype html><ruby><div><span><rt>"
4275                 errors: 2
4276                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <div>\n|         <span>\n|           <rt>\n"
4277         }, {
4278                 name: "tests19.dat #18"
4279                 html: "<!doctype html><ruby><div><p><rt>"
4280                 errors: 2
4281                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <div>\n|         <p>\n|         <rt>\n"
4282         }, {
4283                 name: "tests19.dat #19"
4284                 html: "<html><ruby>a<rb>b<rt></ruby></html>"
4285                 errors: 1
4286                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rb>\n|         \"b\"\n|       <rt>\n"
4287         }, {
4288                 name: "tests19.dat #20"
4289                 html: "<html><ruby>a<rp>b<rt></ruby></html>"
4290                 errors: 1
4291                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rp>\n|         \"b\"\n|       <rt>\n"
4292         }, {
4293                 name: "tests19.dat #21"
4294                 html: "<html><ruby>a<rt>b<rt></ruby></html>"
4295                 errors: 1
4296                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rt>\n|         \"b\"\n|       <rt>\n"
4297         }, {
4298                 name: "tests19.dat #22"
4299                 html: "<html><ruby>a<rtc>b<rt>c<rb>d</ruby></html>"
4300                 errors: 1
4301                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rtc>\n|         \"b\"\n|         <rt>\n|           \"c\"\n|       <rb>\n|         \"d\"\n"
4302         }, {
4303                 name: "tests19.dat #23"
4304                 html: "<!doctype html><math/><foo>"
4305                 errors: 1
4306                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|     <foo>\n"
4307         }, {
4308                 name: "tests19.dat #24"
4309                 html: "<!doctype html><svg/><foo>"
4310                 errors: 1
4311                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|     <foo>\n"
4312         }, {
4313                 name: "tests19.dat #25"
4314                 html: "<!doctype html><div></body><!--foo-->"
4315                 errors: 1
4316                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <div>\n|   <!-- foo -->\n"
4317         }, {
4318                 name: "tests19.dat #26"
4319                 html: "<!doctype html><h1><div><h3><span></h1>foo"
4320                 errors: 2
4321                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <h1>\n|       <div>\n|         <h3>\n|           <span>\n|         \"foo\"\n"
4322         }, {
4323                 name: "tests19.dat #27"
4324                 html: "<!doctype html><p></h3>foo"
4325                 errors: 1
4326                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       \"foo\"\n"
4327         }, {
4328                 name: "tests19.dat #28"
4329                 html: "<!doctype html><h3><li>abc</h2>foo"
4330                 errors: 1
4331                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <h3>\n|       <li>\n|         \"abc\"\n|     \"foo\"\n"
4332         }, {
4333                 name: "tests19.dat #29"
4334                 html: "<!doctype html><table>abc<!--foo-->"
4335                 errors: 4
4336                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"abc\"\n|     <table>\n|       <!-- foo -->\n"
4337         }, {
4338                 name: "tests19.dat #30"
4339                 html: "<!doctype html><table>  <!--foo-->"
4340                 errors: 1
4341                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       \"  \"\n|       <!-- foo -->\n"
4342         }, {
4343                 name: "tests19.dat #31"
4344                 html: "<!doctype html><table> b <!--foo-->"
4345                 errors: 4
4346                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \" b \"\n|     <table>\n|       <!-- foo -->\n"
4347         }, {
4348                 name: "tests19.dat #32"
4349                 html: "<!doctype html><select><option><option>"
4350                 errors: 1
4351                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n|       <option>\n"
4352         }, {
4353                 name: "tests19.dat #33"
4354                 html: "<!doctype html><select><option></optgroup>"
4355                 errors: 2
4356                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n"
4357         }, {
4358                 name: "tests19.dat #34"
4359                 html: "<!doctype html><select><option></optgroup>"
4360                 errors: 2
4361                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n"
4362         }, {
4363                 name: "tests19.dat #35"
4364                 html: "<!doctype html><dd><optgroup><dd>"
4365                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <dd>\n|       <optgroup>\n|     <dd>\n"
4366         }, {
4367                 name: "tests19.dat #36"
4368                 html: "<!doctype html><p><math><mi><p><h1>"
4369                 errors: 1
4370                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <math math>\n|         <math mi>\n|           <p>\n|           <h1>\n"
4371         }, {
4372                 name: "tests19.dat #37"
4373                 html: "<!doctype html><p><math><mo><p><h1>"
4374                 errors: 1
4375                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <math math>\n|         <math mo>\n|           <p>\n|           <h1>\n"
4376         }, {
4377                 name: "tests19.dat #38"
4378                 html: "<!doctype html><p><math><mn><p><h1>"
4379                 errors: 1
4380                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <math math>\n|         <math mn>\n|           <p>\n|           <h1>\n"
4381         }, {
4382                 name: "tests19.dat #39"
4383                 html: "<!doctype html><p><math><ms><p><h1>"
4384                 errors: 1
4385                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <math math>\n|         <math ms>\n|           <p>\n|           <h1>\n"
4386         }, {
4387                 name: "tests19.dat #40"
4388                 html: "<!doctype html><p><math><mtext><p><h1>"
4389                 errors: 1
4390                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <math math>\n|         <math mtext>\n|           <p>\n|           <h1>\n"
4391         }, {
4392                 name: "tests19.dat #41"
4393                 html: "<!doctype html><frameset></noframes>"
4394                 errors: 2
4395                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
4396         }, {
4397                 name: "tests19.dat #42"
4398                 html: "<!doctype html><html c=d><body></html><html a=b>"
4399                 errors: 1
4400                 expected: "| <!DOCTYPE html>\n| <html>\n|   a=\"b\"\n|   c=\"d\"\n|   <head>\n|   <body>\n"
4401         }, {
4402                 name: "tests19.dat #43"
4403                 html: "<!doctype html><html c=d><frameset></frameset></html><html a=b>"
4404                 errors: 1
4405                 expected: "| <!DOCTYPE html>\n| <html>\n|   a=\"b\"\n|   c=\"d\"\n|   <head>\n|   <frameset>\n"
4406         }, {
4407                 name: "tests19.dat #44"
4408                 html: "<!doctype html><html><frameset></frameset></html><!--foo-->"
4409                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n| <!-- foo -->\n"
4410         }, {
4411                 name: "tests19.dat #45"
4412                 html: "<!doctype html><html><frameset></frameset></html>  "
4413                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|   \"  \"\n"
4414         }, {
4415                 name: "tests19.dat #46"
4416                 html: "<!doctype html><html><frameset></frameset></html>abc"
4417                 errors: 3
4418                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
4419         }, {
4420                 name: "tests19.dat #47"
4421                 html: "<!doctype html><html><frameset></frameset></html><p>"
4422                 errors: 1
4423                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
4424         }, {
4425                 name: "tests19.dat #48"
4426                 html: "<!doctype html><html><frameset></frameset></html></p>"
4427                 errors: 1
4428                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
4429         }, {
4430                 name: "tests19.dat #49"
4431                 html: "<html><frameset></frameset></html><!doctype html>"
4432                 errors: 2
4433                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
4434         }, {
4435                 name: "tests19.dat #50"
4436                 html: "<!doctype html><body><frameset>"
4437                 errors: 1
4438                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
4439         }, {
4440                 name: "tests19.dat #51"
4441                 html: "<!doctype html><p><frameset><frame>"
4442                 errors: 2
4443                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n"
4444         }, {
4445                 name: "tests19.dat #52"
4446                 html: "<!doctype html><p>a<frameset>"
4447                 errors: 1
4448                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       \"a\"\n"
4449         }, {
4450                 name: "tests19.dat #53"
4451                 html: "<!doctype html><p> <frameset><frame>"
4452                 errors: 2
4453                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n"
4454         }, {
4455                 name: "tests19.dat #54"
4456                 html: "<!doctype html><pre><frameset>"
4457                 errors: 2
4458                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n"
4459         }, {
4460                 name: "tests19.dat #55"
4461                 html: "<!doctype html><listing><frameset>"
4462                 errors: 2
4463                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <listing>\n"
4464         }, {
4465                 name: "tests19.dat #56"
4466                 html: "<!doctype html><li><frameset>"
4467                 errors: 1
4468                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <li>\n"
4469         }, {
4470                 name: "tests19.dat #57"
4471                 html: "<!doctype html><dd><frameset>"
4472                 errors: 1
4473                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <dd>\n"
4474         }, {
4475                 name: "tests19.dat #58"
4476                 html: "<!doctype html><dt><frameset>"
4477                 errors: 1
4478                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <dt>\n"
4479         }, {
4480                 name: "tests19.dat #59"
4481                 html: "<!doctype html><button><frameset>"
4482                 errors: 2
4483                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <button>\n"
4484         }, {
4485                 name: "tests19.dat #60"
4486                 html: "<!doctype html><applet><frameset>"
4487                 errors: 2
4488                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <applet>\n"
4489         }, {
4490                 name: "tests19.dat #61"
4491                 html: "<!doctype html><marquee><frameset>"
4492                 errors: 2
4493                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <marquee>\n"
4494         }, {
4495                 name: "tests19.dat #62"
4496                 html: "<!doctype html><object><frameset>"
4497                 errors: 2
4498                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <object>\n"
4499         }, {
4500                 name: "tests19.dat #63"
4501                 html: "<!doctype html><table><frameset>"
4502                 errors: 3
4503                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n"
4504         }, {
4505                 name: "tests19.dat #64"
4506                 html: "<!doctype html><area><frameset>"
4507                 errors: 1
4508                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <area>\n"
4509         }, {
4510                 name: "tests19.dat #65"
4511                 html: "<!doctype html><basefont><frameset>"
4512                 errors: 1
4513                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <basefont>\n|   <frameset>\n"
4514         }, {
4515                 name: "tests19.dat #66"
4516                 html: "<!doctype html><bgsound><frameset>"
4517                 errors: 1
4518                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <bgsound>\n|   <frameset>\n"
4519         }, {
4520                 name: "tests19.dat #67"
4521                 html: "<!doctype html><br><frameset>"
4522                 errors: 1
4523                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <br>\n"
4524         }, {
4525                 name: "tests19.dat #68"
4526                 html: "<!doctype html><embed><frameset>"
4527                 errors: 1
4528                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <embed>\n"
4529         }, {
4530                 name: "tests19.dat #69"
4531                 html: "<!doctype html><img><frameset>"
4532                 errors: 1
4533                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <img>\n"
4534         }, {
4535                 name: "tests19.dat #70"
4536                 html: "<!doctype html><input><frameset>"
4537                 errors: 1
4538                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <input>\n"
4539         }, {
4540                 name: "tests19.dat #71"
4541                 html: "<!doctype html><keygen><frameset>"
4542                 errors: 1
4543                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <keygen>\n"
4544         }, {
4545                 name: "tests19.dat #72"
4546                 html: "<!doctype html><wbr><frameset>"
4547                 errors: 1
4548                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <wbr>\n"
4549         }, {
4550                 name: "tests19.dat #73"
4551                 html: "<!doctype html><hr><frameset>"
4552                 errors: 1
4553                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <hr>\n"
4554         }, {
4555                 name: "tests19.dat #74"
4556                 html: "<!doctype html><textarea></textarea><frameset>"
4557                 errors: 1
4558                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n"
4559         }, {
4560                 name: "tests19.dat #75"
4561                 html: "<!doctype html><xmp></xmp><frameset>"
4562                 errors: 1
4563                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <xmp>\n"
4564         }, {
4565                 name: "tests19.dat #76"
4566                 html: "<!doctype html><iframe></iframe><frameset>"
4567                 errors: 1
4568                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <iframe>\n"
4569         }, {
4570                 name: "tests19.dat #77"
4571                 html: "<!doctype html><select></select><frameset>"
4572                 errors: 1
4573                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4574         }, {
4575                 name: "tests19.dat #78"
4576                 html: "<!doctype html><svg></svg><frameset><frame>"
4577                 errors: 2
4578                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n"
4579         }, {
4580                 name: "tests19.dat #79"
4581                 html: "<!doctype html><math></math><frameset><frame>"
4582                 errors: 2
4583                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n"
4584         }, {
4585                 name: "tests19.dat #80"
4586                 html: "<!doctype html><svg><foreignObject><div> <frameset><frame>"
4587                 errors: 2
4588                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n"
4589         }, {
4590                 name: "tests19.dat #81"
4591                 html: "<!doctype html><svg>a</svg><frameset><frame>"
4592                 errors: 2
4593                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"a\"\n"
4594         }, {
4595                 name: "tests19.dat #82"
4596                 html: "<!doctype html><svg> </svg><frameset><frame>"
4597                 errors: 2
4598                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n"
4599         }, {
4600                 name: "tests19.dat #83"
4601                 html: "<html>aaa<frameset></frameset>"
4602                 errors: 3
4603                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"aaa\"\n"
4604         }, {
4605                 name: "tests19.dat #84"
4606                 html: "<html> a <frameset></frameset>"
4607                 errors: 3
4608                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"a \"\n"
4609         }, {
4610                 name: "tests19.dat #85"
4611                 html: "<!doctype html><div><frameset>"
4612                 errors: 2
4613                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
4614         }, {
4615                 name: "tests19.dat #86"
4616                 html: "<!doctype html><div><body><frameset>"
4617                 errors: 3
4618                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <div>\n"
4619         }, {
4620                 name: "tests19.dat #87"
4621                 html: "<!doctype html><p><math></p>a"
4622                 errors: 2
4623                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <math math>\n|     \"a\"\n"
4624         }, {
4625                 name: "tests19.dat #88"
4626                 html: "<!doctype html><p><math><mn><span></p>a"
4627                 errors: 2
4628                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <math math>\n|         <math mn>\n|           <span>\n|             <p>\n|             \"a\"\n"
4629         }, {
4630                 name: "tests19.dat #89"
4631                 html: "<!doctype html><math></html>"
4632                 errors: 3
4633                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n"
4634         }, {
4635                 name: "tests19.dat #90"
4636                 html: "<!doctype html><meta charset=\"ascii\">"
4637                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <meta>\n|       charset=\"ascii\"\n|   <body>\n"
4638         }, {
4639                 name: "tests19.dat #91"
4640                 html: "<!doctype html><meta http-equiv=\"content-type\" content=\"text/html;charset=ascii\">"
4641                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <meta>\n|       content=\"text/html;charset=ascii\"\n|       http-equiv=\"content-type\"\n|   <body>\n"
4642         }, {
4643                 name: "tests19.dat #92"
4644                 html: "<!doctype html><head><!--aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa--><meta charset=\"utf8\">"
4645                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <!-- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -->\n|     <meta>\n|       charset=\"utf8\"\n|   <body>\n"
4646         }, {
4647                 name: "tests19.dat #93"
4648                 html: "<!doctype html><html a=b><head></head><html c=d>"
4649                 errors: 1
4650                 expected: "| <!DOCTYPE html>\n| <html>\n|   a=\"b\"\n|   c=\"d\"\n|   <head>\n|   <body>\n"
4651         }, {
4652                 name: "tests19.dat #94"
4653                 html: "<!doctype html><image/>"
4654                 errors: 1
4655                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <img>\n"
4656         }, {
4657                 name: "tests19.dat #95"
4658                 html: "<!doctype html>a<i>b<table>c<b>d</i>e</b>f"
4659                 errors: 9
4660                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"a\"\n|     <i>\n|       \"bc\"\n|       <b>\n|         \"de\"\n|       \"f\"\n|       <table>\n"
4661         }, {
4662                 name: "tests19.dat #96"
4663                 html: "<!doctype html><table><i>a<b>b<div>c<a>d</i>e</b>f"
4664                 errors: 17
4665                 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"
4666         }, {
4667                 name: "tests19.dat #97"
4668                 html: "<!doctype html><i>a<b>b<div>c<a>d</i>e</b>f"
4669                 errors: 5
4670                 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"
4671         }, {
4672                 name: "tests19.dat #98"
4673                 html: "<!doctype html><table><i>a<b>b<div>c</i>"
4674                 errors: 9
4675                 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"
4676         }, {
4677                 name: "tests19.dat #99"
4678                 html: "<!doctype html><table><i>a<b>b<div>c<a>d</i>e</b>f"
4679                 errors: 17
4680                 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"
4681         }, {
4682                 name: "tests19.dat #100"
4683                 html: "<!doctype html><table><i>a<div>b<tr>c<b>d</i>e"
4684                 errors: 11
4685                 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"
4686         }, {
4687                 name: "tests19.dat #101"
4688                 html: "<!doctype html><table><td><table><i>a<div>b<b>c</i>d"
4689                 errors: 12
4690                 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"
4691         }, {
4692                 name: "tests19.dat #102"
4693                 html: "<!doctype html><body><bgsound>"
4694                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <bgsound>\n"
4695         }, {
4696                 name: "tests19.dat #103"
4697                 html: "<!doctype html><body><basefont>"
4698                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <basefont>\n"
4699         }, {
4700                 name: "tests19.dat #104"
4701                 html: "<!doctype html><a><b></a><basefont>"
4702                 errors: 1
4703                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <a>\n|       <b>\n|     <basefont>\n"
4704         }, {
4705                 name: "tests19.dat #105"
4706                 html: "<!doctype html><a><b></a><bgsound>"
4707                 errors: 1
4708                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <a>\n|       <b>\n|     <bgsound>\n"
4709         }, {
4710                 name: "tests19.dat #106"
4711                 html: "<!doctype html><figcaption><article></figcaption>a"
4712                 errors: 1
4713                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <figcaption>\n|       <article>\n|     \"a\"\n"
4714         }, {
4715                 name: "tests19.dat #107"
4716                 html: "<!doctype html><summary><article></summary>a"
4717                 errors: 1
4718                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <summary>\n|       <article>\n|     \"a\"\n"
4719         }, {
4720                 name: "tests19.dat #108"
4721                 html: "<!doctype html><p><a><plaintext>b"
4722                 errors: 2
4723                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <a>\n|     <plaintext>\n|       <a>\n|         \"b\"\n"
4724         }, {
4725                 name: "tests19.dat #109"
4726                 html: "<!DOCTYPE html><div>a<a></div>b<p>c</p>d"
4727                 errors: 2
4728                 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"
4729         }, {
4730                 name: "tests1.dat #1"
4731                 html: "Test"
4732                 errors: 1
4733                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"Test\"\n"
4734         }, {
4735                 name: "tests1.dat #2"
4736                 html: "<p>One<p>Two"
4737                 errors: 1
4738                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       \"One\"\n|     <p>\n|       \"Two\"\n"
4739         }, {
4740                 name: "tests1.dat #3"
4741                 html: "Line1<br>Line2<br>Line3<br>Line4"
4742                 errors: 1
4743                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"Line1\"\n|     <br>\n|     \"Line2\"\n|     <br>\n|     \"Line3\"\n|     <br>\n|     \"Line4\"\n"
4744         }, {
4745                 name: "tests1.dat #4"
4746                 html: "<html>"
4747                 errors: 1
4748                 expected: "| <html>\n|   <head>\n|   <body>\n"
4749         }, {
4750                 name: "tests1.dat #5"
4751                 html: "<head>"
4752                 errors: 1
4753                 expected: "| <html>\n|   <head>\n|   <body>\n"
4754         }, {
4755                 name: "tests1.dat #6"
4756                 html: "<body>"
4757                 errors: 1
4758                 expected: "| <html>\n|   <head>\n|   <body>\n"
4759         }, {
4760                 name: "tests1.dat #7"
4761                 html: "<html><head>"
4762                 errors: 1
4763                 expected: "| <html>\n|   <head>\n|   <body>\n"
4764         }, {
4765                 name: "tests1.dat #8"
4766                 html: "<html><head></head>"
4767                 errors: 1
4768                 expected: "| <html>\n|   <head>\n|   <body>\n"
4769         }, {
4770                 name: "tests1.dat #9"
4771                 html: "<html><head></head><body>"
4772                 errors: 1
4773                 expected: "| <html>\n|   <head>\n|   <body>\n"
4774         }, {
4775                 name: "tests1.dat #10"
4776                 html: "<html><head></head><body></body>"
4777                 errors: 1
4778                 expected: "| <html>\n|   <head>\n|   <body>\n"
4779         }, {
4780                 name: "tests1.dat #11"
4781                 html: "<html><head><body></body></html>"
4782                 errors: 1
4783                 expected: "| <html>\n|   <head>\n|   <body>\n"
4784         }, {
4785                 name: "tests1.dat #12"
4786                 html: "<html><head></body></html>"
4787                 errors: 1
4788                 expected: "| <html>\n|   <head>\n|   <body>\n"
4789         }, {
4790                 name: "tests1.dat #13"
4791                 html: "<html><head><body></html>"
4792                 errors: 1
4793                 expected: "| <html>\n|   <head>\n|   <body>\n"
4794         }, {
4795                 name: "tests1.dat #14"
4796                 html: "<html><body></html>"
4797                 errors: 1
4798                 expected: "| <html>\n|   <head>\n|   <body>\n"
4799         }, {
4800                 name: "tests1.dat #15"
4801                 html: "<body></html>"
4802                 errors: 1
4803                 expected: "| <html>\n|   <head>\n|   <body>\n"
4804         }, {
4805                 name: "tests1.dat #16"
4806                 html: "<head></html>"
4807                 errors: 1
4808                 expected: "| <html>\n|   <head>\n|   <body>\n"
4809         }, {
4810                 name: "tests1.dat #17"
4811                 html: "</head>"
4812                 errors: 1
4813                 expected: "| <html>\n|   <head>\n|   <body>\n"
4814         }, {
4815                 name: "tests1.dat #18"
4816                 html: "</body>"
4817                 errors: 1
4818                 expected: "| <html>\n|   <head>\n|   <body>\n"
4819         }, {
4820                 name: "tests1.dat #19"
4821                 html: "</html>"
4822                 errors: 1
4823                 expected: "| <html>\n|   <head>\n|   <body>\n"
4824         }, {
4825                 name: "tests1.dat #20"
4826                 html: "<b><table><td><i></table>"
4827                 errors: 4
4828                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <table>\n|         <tbody>\n|           <tr>\n|             <td>\n|               <i>\n"
4829         }, {
4830                 name: "tests1.dat #21"
4831                 html: "<b><table><td></b><i></table>X"
4832                 errors: 5
4833                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <table>\n|         <tbody>\n|           <tr>\n|             <td>\n|               <i>\n|       \"X\"\n"
4834         }, {
4835                 name: "tests1.dat #22"
4836                 html: "<h1>Hello<h2>World"
4837                 errors: 3
4838                 expected: "| <html>\n|   <head>\n|   <body>\n|     <h1>\n|       \"Hello\"\n|     <h2>\n|       \"World\"\n"
4839         }, {
4840                 name: "tests1.dat #23"
4841                 html: "<a><p>X<a>Y</a>Z</p></a>"
4842                 errors: 4
4843                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|     <p>\n|       <a>\n|         \"X\"\n|       <a>\n|         \"Y\"\n|       \"Z\"\n"
4844         }, {
4845                 name: "tests1.dat #24"
4846                 html: "<b><button>foo</b>bar"
4847                 errors: 3
4848                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|     <button>\n|       <b>\n|         \"foo\"\n|       \"bar\"\n"
4849         }, {
4850                 name: "tests1.dat #25"
4851                 html: "<!DOCTYPE html><span><button>foo</span>bar"
4852                 errors: 2
4853                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <span>\n|       <button>\n|         \"foobar\"\n"
4854         }, {
4855                 name: "tests1.dat #26"
4856                 html: "<p><b><div><marquee></p></b></div>X"
4857                 errors: 6
4858                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <b>\n|     <div>\n|       <b>\n|         <marquee>\n|           <p>\n|           \"X\"\n"
4859         }, {
4860                 name: "tests1.dat #27"
4861                 html: "<script><div></script></div><title><p></title><p><p>"
4862                 errors: 2
4863                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<div>\"\n|     <title>\n|       \"<p>\"\n|   <body>\n|     <p>\n|     <p>\n"
4864         }, {
4865                 name: "tests1.dat #28"
4866                 html: "<!--><div>--<!-->"
4867                 errors: 4
4868                 expected: "| <!--  -->\n| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"--\"\n|       <!--  -->\n"
4869         }, {
4870                 name: "tests1.dat #29"
4871                 html: "<p><hr></p>"
4872                 errors: 2
4873                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <hr>\n|     <p>\n"
4874         }, {
4875                 name: "tests1.dat #30"
4876                 html: "<select><b><option><select><option></b></select>X"
4877                 errors: 6
4878                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n|     <option>\n|       \"X\"\n"
4879         }, {
4880                 name: "tests1.dat #31"
4881                 html: "<a><table><td><a><table></table><a></tr><a></table><b>X</b>C<a>Y"
4882                 errors: 9
4883                 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"
4884         }, {
4885                 name: "tests1.dat #32"
4886                 html: "<a X>0<b>1<a Y>2"
4887                 errors: 4
4888                 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"
4889         }, {
4890                 name: "tests1.dat #33"
4891                 html: "<!-----><font><div>hello<table>excite!<b>me!<th><i>please!</tr><!--X-->"
4892                 errors: 16
4893                 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"
4894         }, {
4895                 name: "tests1.dat #34"
4896                 html: "<!DOCTYPE html><li>hello<li>world<ul>how<li>do</ul>you</body><!--do-->"
4897                 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"
4898         }, {
4899                 name: "tests1.dat #35"
4900                 html: "<!DOCTYPE html>A<option>B<optgroup>C<select>D</option>E"
4901                 errors: 2
4902                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"A\"\n|     <option>\n|       \"B\"\n|     <optgroup>\n|       \"C\"\n|       <select>\n|         \"DE\"\n"
4903         }, {
4904                 name: "tests1.dat #36"
4905                 html: "<"
4906                 errors: 2
4907                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"<\"\n"
4908         }, {
4909                 name: "tests1.dat #37"
4910                 html: "<#"
4911                 errors: 2
4912                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"<#\"\n"
4913         }, {
4914                 name: "tests1.dat #38"
4915                 html: "</"
4916                 errors: 2
4917                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"</\"\n"
4918         }, {
4919                 name: "tests1.dat #39"
4920                 html: "</#"
4921                 errors: 2
4922                 expected: "| <!-- # -->\n| <html>\n|   <head>\n|   <body>\n"
4923         }, {
4924                 name: "tests1.dat #40"
4925                 html: "<?"
4926                 errors: 2
4927                 expected: "| <!-- ? -->\n| <html>\n|   <head>\n|   <body>\n"
4928         }, {
4929                 name: "tests1.dat #41"
4930                 html: "<?#"
4931                 errors: 2
4932                 expected: "| <!-- ?# -->\n| <html>\n|   <head>\n|   <body>\n"
4933         }, {
4934                 name: "tests1.dat #42"
4935                 html: "<!"
4936                 errors: 2
4937                 expected: "| <!--  -->\n| <html>\n|   <head>\n|   <body>\n"
4938         }, {
4939                 name: "tests1.dat #43"
4940                 html: "<!#"
4941                 errors: 2
4942                 expected: "| <!-- # -->\n| <html>\n|   <head>\n|   <body>\n"
4943         }, {
4944                 name: "tests1.dat #44"
4945                 html: "<?COMMENT?>"
4946                 errors: 2
4947                 expected: "| <!-- ?COMMENT? -->\n| <html>\n|   <head>\n|   <body>\n"
4948         }, {
4949                 name: "tests1.dat #45"
4950                 html: "<!COMMENT>"
4951                 errors: 2
4952                 expected: "| <!-- COMMENT -->\n| <html>\n|   <head>\n|   <body>\n"
4953         }, {
4954                 name: "tests1.dat #46"
4955                 html: "</ COMMENT >"
4956                 errors: 2
4957                 expected: "| <!--  COMMENT  -->\n| <html>\n|   <head>\n|   <body>\n"
4958         }, {
4959                 name: "tests1.dat #47"
4960                 html: "<?COM--MENT?>"
4961                 errors: 2
4962                 expected: "| <!-- ?COM--MENT? -->\n| <html>\n|   <head>\n|   <body>\n"
4963         }, {
4964                 name: "tests1.dat #48"
4965                 html: "<!COM--MENT>"
4966                 errors: 2
4967                 expected: "| <!-- COM--MENT -->\n| <html>\n|   <head>\n|   <body>\n"
4968         }, {
4969                 name: "tests1.dat #49"
4970                 html: "</ COM--MENT >"
4971                 errors: 2
4972                 expected: "| <!--  COM--MENT  -->\n| <html>\n|   <head>\n|   <body>\n"
4973         }, {
4974                 name: "tests1.dat #50"
4975                 html: "<!DOCTYPE html><style> EOF"
4976                 errors: 1
4977                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <style>\n|       \" EOF\"\n|   <body>\n"
4978         }, {
4979                 name: "tests1.dat #51"
4980                 html: "<!DOCTYPE html><script> <!-- </script> --> </script> EOF"
4981                 errors: 1
4982                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \" <!-- \"\n|     \" \"\n|   <body>\n|     \"-->  EOF\"\n"
4983         }, {
4984                 name: "tests1.dat #52"
4985                 html: "<b><p></b>TEST"
4986                 errors: 2
4987                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|     <p>\n|       <b>\n|       \"TEST\"\n"
4988         }, {
4989                 name: "tests1.dat #53"
4990                 html: "<p id=a><b><p id=b></b>TEST"
4991                 errors: 3
4992                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       id=\"a\"\n|       <b>\n|     <p>\n|       id=\"b\"\n|       \"TEST\"\n"
4993         }, {
4994                 name: "tests1.dat #54"
4995                 html: "<b id=a><p><b id=b></p></b>TEST"
4996                 errors: 4
4997                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       id=\"a\"\n|       <p>\n|         <b>\n|           id=\"b\"\n|       \"TEST\"\n"
4998         }, {
4999                 name: "tests1.dat #55"
5000                 html: "<!DOCTYPE html><title>U-test</title><body><div><p>Test<u></p></div></body>"
5001                 errors: 1
5002                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <title>\n|       \"U-test\"\n|   <body>\n|     <div>\n|       <p>\n|         \"Test\"\n|         <u>\n"
5003         }, {
5004                 name: "tests1.dat #56"
5005                 html: "<!DOCTYPE html><font><table></font></table></font>"
5006                 errors: 2
5007                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <font>\n|       <table>\n"
5008         }, {
5009                 name: "tests1.dat #57"
5010                 html: "<font><p>hello<b>cruel</font>world"
5011                 errors: 4
5012                 expected: "| <html>\n|   <head>\n|   <body>\n|     <font>\n|     <p>\n|       <font>\n|         \"hello\"\n|         <b>\n|           \"cruel\"\n|       <b>\n|         \"world\"\n"
5013         }, {
5014                 name: "tests1.dat #58"
5015                 html: "<b>Test</i>Test"
5016                 errors: 3
5017                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       \"TestTest\"\n"
5018         }, {
5019                 name: "tests1.dat #59"
5020                 html: "<b>A<cite>B<div>C"
5021                 errors: 2
5022                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       \"A\"\n|       <cite>\n|         \"B\"\n|         <div>\n|           \"C\"\n"
5023         }, {
5024                 name: "tests1.dat #60"
5025                 html: "<b>A<cite>B<div>C</cite>D"
5026                 errors: 3
5027                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       \"A\"\n|       <cite>\n|         \"B\"\n|         <div>\n|           \"CD\"\n"
5028         }, {
5029                 name: "tests1.dat #61"
5030                 html: "<b>A<cite>B<div>C</b>D"
5031                 errors: 3
5032                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       \"A\"\n|       <cite>\n|         \"B\"\n|     <div>\n|       <b>\n|         \"C\"\n|       \"D\"\n"
5033         }, {
5034                 name: "tests1.dat #62"
5035                 html: ""
5036                 errors: 1
5037                 expected: "| <html>\n|   <head>\n|   <body>\n"
5038         }, {
5039                 name: "tests1.dat #63"
5040                 html: "<DIV>"
5041                 errors: 2
5042                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n"
5043         }, {
5044                 name: "tests1.dat #64"
5045                 html: "<DIV> abc"
5046                 errors: 2
5047                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc\"\n"
5048         }, {
5049                 name: "tests1.dat #65"
5050                 html: "<DIV> abc <B>"
5051                 errors: 2
5052                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n"
5053         }, {
5054                 name: "tests1.dat #66"
5055                 html: "<DIV> abc <B> def"
5056                 errors: 2
5057                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n|         \" def\"\n"
5058         }, {
5059                 name: "tests1.dat #67"
5060                 html: "<DIV> abc <B> def <I>"
5061                 errors: 2
5062                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n|         \" def \"\n|         <i>\n"
5063         }, {
5064                 name: "tests1.dat #68"
5065                 html: "<DIV> abc <B> def <I> ghi"
5066                 errors: 2
5067                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n|         \" def \"\n|         <i>\n|           \" ghi\"\n"
5068         }, {
5069                 name: "tests1.dat #69"
5070                 html: "<DIV> abc <B> def <I> ghi <P>"
5071                 errors: 2
5072                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n|         \" def \"\n|         <i>\n|           \" ghi \"\n|           <p>\n"
5073         }, {
5074                 name: "tests1.dat #70"
5075                 html: "<DIV> abc <B> def <I> ghi <P> jkl"
5076                 errors: 2
5077                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n|         \" def \"\n|         <i>\n|           \" ghi \"\n|           <p>\n|             \" jkl\"\n"
5078         }, {
5079                 name: "tests1.dat #71"
5080                 html: "<DIV> abc <B> def <I> ghi <P> jkl </B>"
5081                 errors: 3
5082                 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"
5083         }, {
5084                 name: "tests1.dat #72"
5085                 html: "<DIV> abc <B> def <I> ghi <P> jkl </B> mno"
5086                 errors: 3
5087                 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"
5088         }, {
5089                 name: "tests1.dat #73"
5090                 html: "<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I>"
5091                 errors: 4
5092                 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"
5093         }, {
5094                 name: "tests1.dat #74"
5095                 html: "<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I> pqr"
5096                 errors: 4
5097                 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"
5098         }, {
5099                 name: "tests1.dat #75"
5100                 html: "<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I> pqr </P>"
5101                 errors: 4
5102                 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"
5103         }, {
5104                 name: "tests1.dat #76"
5105                 html: "<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I> pqr </P> stu"
5106                 errors: 4
5107                 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"
5108         }, {
5109                 name: "tests1.dat #77"
5110                 html: "<test attribute---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->"
5111                 errors: 2
5112                 expected: "| <html>\n|   <head>\n|   <body>\n|     <test>\n|       attribute----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------=\"\"\n"
5113         }, {
5114                 name: "tests1.dat #78"
5115                 html: "<a href=\"blah\">aba<table><a href=\"foo\">br<tr><td></td></tr>x</table>aoe"
5116                 errors: 8
5117                 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"
5118         }, {
5119                 name: "tests1.dat #79"
5120                 html: "<a href=\"blah\">aba<table><tr><td><a href=\"foo\">br</td></tr>x</table>aoe"
5121                 errors: 4
5122                 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"
5123         }, {
5124                 name: "tests1.dat #80"
5125                 html: "<table><a href=\"blah\">aba<tr><td><a href=\"foo\">br</td></tr>x</table>aoe"
5126                 errors: 8
5127                 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"
5128         }, {
5129                 name: "tests1.dat #81"
5130                 html: "<a href=a>aa<marquee>aa<a href=b>bb</marquee>aa"
5131                 errors: 3
5132                 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"
5133         }, {
5134                 name: "tests1.dat #82"
5135                 html: "<wbr><strike><code></strike><code><strike></code>"
5136                 errors: 4
5137                 expected: "| <html>\n|   <head>\n|   <body>\n|     <wbr>\n|     <strike>\n|       <code>\n|     <code>\n|       <code>\n|         <strike>\n"
5138         }, {
5139                 name: "tests1.dat #83"
5140                 html: "<!DOCTYPE html><spacer>foo"
5141                 errors: 1
5142                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <spacer>\n|       \"foo\"\n"
5143         }, {
5144                 name: "tests1.dat #84"
5145                 html: "<title><meta></title><link><title><meta></title>"
5146                 errors: 1
5147                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"<meta>\"\n|     <link>\n|     <title>\n|       \"<meta>\"\n|   <body>\n"
5148         }, {
5149                 name: "tests1.dat #85"
5150                 html: "<style><!--</style><meta><script>--><link></script>"
5151                 errors: 1
5152                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--\"\n|     <meta>\n|     <script>\n|       \"--><link>\"\n|   <body>\n"
5153         }, {
5154                 name: "tests1.dat #86"
5155                 html: "<head><meta></head><link>"
5156                 errors: 2
5157                 expected: "| <html>\n|   <head>\n|     <meta>\n|     <link>\n|   <body>\n"
5158         }, {
5159                 name: "tests1.dat #87"
5160                 html: "<table><tr><tr><td><td><span><th><span>X</table>"
5161                 errors: 3
5162                 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"
5163         }, {
5164                 name: "tests1.dat #88"
5165                 html: "<body><body><base><link><meta><title><p></title><body><p></body>"
5166                 errors: 3
5167                 expected: "| <html>\n|   <head>\n|   <body>\n|     <base>\n|     <link>\n|     <meta>\n|     <title>\n|       \"<p>\"\n|     <p>\n"
5168         }, {
5169                 name: "tests1.dat #89"
5170                 html: "<textarea><p></textarea>"
5171                 errors: 1
5172                 expected: "| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"<p>\"\n"
5173         }, {
5174                 name: "tests1.dat #90"
5175                 html: "<p><image></p>"
5176                 errors: 2
5177                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <img>\n"
5178         }, {
5179                 name: "tests1.dat #91"
5180                 html: "<a><table><a></table><p><a><div><a>"
5181                 errors: 10
5182                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       <a>\n|       <table>\n|     <p>\n|       <a>\n|     <div>\n|       <a>\n"
5183         }, {
5184                 name: "tests1.dat #92"
5185                 html: "<head></p><meta><p>"
5186                 errors: 2
5187                 expected: "| <html>\n|   <head>\n|     <meta>\n|   <body>\n|     <p>\n"
5188         }, {
5189                 name: "tests1.dat #93"
5190                 html: "<head></html><meta><p>"
5191                 errors: 2
5192                 expected: "| <html>\n|   <head>\n|   <body>\n|     <meta>\n|     <p>\n"
5193         }, {
5194                 name: "tests1.dat #94"
5195                 html: "<b><table><td><i></table>"
5196                 errors: 4
5197                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <table>\n|         <tbody>\n|           <tr>\n|             <td>\n|               <i>\n"
5198         }, {
5199                 name: "tests1.dat #95"
5200                 html: "<b><table><td></b><i></table>"
5201                 errors: 5
5202                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <table>\n|         <tbody>\n|           <tr>\n|             <td>\n|               <i>\n"
5203         }, {
5204                 name: "tests1.dat #96"
5205                 html: "<h1><h2>"
5206                 errors: 3
5207                 expected: "| <html>\n|   <head>\n|   <body>\n|     <h1>\n|     <h2>\n"
5208         }, {
5209                 name: "tests1.dat #97"
5210                 html: "<a><p><a></a></p></a>"
5211                 errors: 4
5212                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|     <p>\n|       <a>\n|       <a>\n"
5213         }, {
5214                 name: "tests1.dat #98"
5215                 html: "<b><button></b></button></b>"
5216                 errors: 3
5217                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|     <button>\n|       <b>\n"
5218         }, {
5219                 name: "tests1.dat #99"
5220                 html: "<p><b><div><marquee></p></b></div>"
5221                 errors: 6
5222                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <b>\n|     <div>\n|       <b>\n|         <marquee>\n|           <p>\n"
5223         }, {
5224                 name: "tests1.dat #100"
5225                 html: "<script></script></div><title></title><p><p>"
5226                 errors: 2
5227                 expected: "| <html>\n|   <head>\n|     <script>\n|     <title>\n|   <body>\n|     <p>\n|     <p>\n"
5228         }, {
5229                 name: "tests1.dat #101"
5230                 html: "<p><hr></p>"
5231                 errors: 2
5232                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <hr>\n|     <p>\n"
5233         }, {
5234                 name: "tests1.dat #102"
5235                 html: "<select><b><option><select><option></b></select>"
5236                 errors: 6
5237                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n|     <option>\n"
5238         }, {
5239                 name: "tests1.dat #103"
5240                 html: "<html><head><title></title><body></body></html>"
5241                 errors: 1
5242                 expected: "| <html>\n|   <head>\n|     <title>\n|   <body>\n"
5243         }, {
5244                 name: "tests1.dat #104"
5245                 html: "<a><table><td><a><table></table><a></tr><a></table><a>"
5246                 errors: 10
5247                 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"
5248         }, {
5249                 name: "tests1.dat #105"
5250                 html: "<ul><li></li><div><li></div><li><li><div><li><address><li><b><em></b><li></ul>"
5251                 errors: 4
5252                 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"
5253         }, {
5254                 name: "tests1.dat #106"
5255                 html: "<ul><li><ul></li><li>a</li></ul></li></ul>"
5256                 errors: 2
5257                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ul>\n|       <li>\n|         <ul>\n|           <li>\n|             \"a\"\n"
5258         }, {
5259                 name: "tests1.dat #107"
5260                 html: "<frameset><frame><frameset><frame></frameset><noframes></noframes></frameset>"
5261                 errors: 1
5262                 expected: "| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n|     <frameset>\n|       <frame>\n|     <noframes>\n"
5263         }, {
5264                 name: "tests1.dat #108"
5265                 html: "<h1><table><td><h3></table><h3></h1>"
5266                 errors: 5
5267                 expected: "| <html>\n|   <head>\n|   <body>\n|     <h1>\n|       <table>\n|         <tbody>\n|           <tr>\n|             <td>\n|               <h3>\n|     <h3>\n"
5268         }, {
5269                 name: "tests1.dat #109"
5270                 html: "<table><colgroup><col><colgroup><col><col><col><colgroup><col><col><thead><tr><td></table>"
5271                 errors: 1
5272                 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"
5273         }, {
5274                 name: "tests1.dat #110"
5275                 html: "<table><col><tbody><col><tr><col><td><col></table><col>"
5276                 errors: 3
5277                 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"
5278         }, {
5279                 name: "tests1.dat #111"
5280                 html: "<table><colgroup><tbody><colgroup><tr><colgroup><td><colgroup></table><colgroup>"
5281                 errors: 3
5282                 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"
5283         }, {
5284                 name: "tests1.dat #112"
5285                 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>"
5286                 errors: 85
5287                 expected: "| <html>\n|   <head>\n|   <body>\n|     <br>\n|     <p>\n"
5288         }, {
5289                 name: "tests1.dat #113"
5290                 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>"
5291                 errors: 111
5292                 expected: "| <html>\n|   <head>\n|   <body>\n|     <br>\n|     <table>\n|       <tbody>\n|         <tr>\n|     <p>\n"
5293         }, {
5294                 name: "tests1.dat #114"
5295                 html: "<frameset>"
5296                 errors: 2
5297                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
5298         }, {
5299                 name: "tests20.dat #1"
5300                 html: "<!doctype html><p><button><button>"
5301                 errors: 2
5302                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|       <button>\n"
5303         }, {
5304                 name: "tests20.dat #2"
5305                 html: "<!doctype html><p><button><address>"
5306                 errors: 1
5307                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <address>\n"
5308         }, {
5309                 name: "tests20.dat #3"
5310                 html: "<!doctype html><p><button><blockquote>"
5311                 errors: 1
5312                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <blockquote>\n"
5313         }, {
5314                 name: "tests20.dat #4"
5315                 html: "<!doctype html><p><button><menu>"
5316                 errors: 1
5317                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <menu>\n"
5318         }, {
5319                 name: "tests20.dat #5"
5320                 html: "<!doctype html><p><button><p>"
5321                 errors: 1
5322                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <p>\n"
5323         }, {
5324                 name: "tests20.dat #6"
5325                 html: "<!doctype html><p><button><ul>"
5326                 errors: 1
5327                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <ul>\n"
5328         }, {
5329                 name: "tests20.dat #7"
5330                 html: "<!doctype html><p><button><h1>"
5331                 errors: 1
5332                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <h1>\n"
5333         }, {
5334                 name: "tests20.dat #8"
5335                 html: "<!doctype html><p><button><h6>"
5336                 errors: 1
5337                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <h6>\n"
5338         }, {
5339                 name: "tests20.dat #9"
5340                 html: "<!doctype html><p><button><listing>"
5341                 errors: 1
5342                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <listing>\n"
5343         }, {
5344                 name: "tests20.dat #10"
5345                 html: "<!doctype html><p><button><pre>"
5346                 errors: 1
5347                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <pre>\n"
5348         }, {
5349                 name: "tests20.dat #11"
5350                 html: "<!doctype html><p><button><form>"
5351                 errors: 1
5352                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <form>\n"
5353         }, {
5354                 name: "tests20.dat #12"
5355                 html: "<!doctype html><p><button><li>"
5356                 errors: 1
5357                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <li>\n"
5358         }, {
5359                 name: "tests20.dat #13"
5360                 html: "<!doctype html><p><button><dd>"
5361                 errors: 1
5362                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <dd>\n"
5363         }, {
5364                 name: "tests20.dat #14"
5365                 html: "<!doctype html><p><button><dt>"
5366                 errors: 1
5367                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <dt>\n"
5368         }, {
5369                 name: "tests20.dat #15"
5370                 html: "<!doctype html><p><button><plaintext>"
5371                 errors: 1
5372                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <plaintext>\n"
5373         }, {
5374                 name: "tests20.dat #16"
5375                 html: "<!doctype html><p><button><table>"
5376                 errors: 1
5377                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <table>\n"
5378         }, {
5379                 name: "tests20.dat #17"
5380                 html: "<!doctype html><p><button><hr>"
5381                 errors: 1
5382                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <hr>\n"
5383         }, {
5384                 name: "tests20.dat #18"
5385                 html: "<!doctype html><p><button><xmp>"
5386                 errors: 2
5387                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <xmp>\n"
5388         }, {
5389                 name: "tests20.dat #19"
5390                 html: "<!doctype html><p><button></p>"
5391                 errors: 2
5392                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <p>\n"
5393         }, {
5394                 name: "tests20.dat #20"
5395                 html: "<!doctype html><address><button></address>a"
5396                 errors: 1
5397                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <address>\n|       <button>\n|     \"a\"\n"
5398         }, {
5399                 name: "tests20.dat #21"
5400                 html: "<!doctype html><address><button></address>a"
5401                 errors: 1
5402                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <address>\n|       <button>\n|     \"a\"\n"
5403         }, {
5404                 name: "tests20.dat #22"
5405                 html: "<p><table></p>"
5406                 errors: 4
5407                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <p>\n|       <table>\n"
5408         }, {
5409                 name: "tests20.dat #23"
5410                 html: "<!doctype html><svg>"
5411                 errors: 1
5412                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n"
5413         }, {
5414                 name: "tests20.dat #24"
5415                 html: "<!doctype html><p><figcaption>"
5416                 errors: 1
5417                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <figcaption>\n"
5418         }, {
5419                 name: "tests20.dat #25"
5420                 html: "<!doctype html><p><summary>"
5421                 errors: 1
5422                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <summary>\n"
5423         }, {
5424                 name: "tests20.dat #26"
5425                 html: "<!doctype html><form><table><form>"
5426                 errors: 2
5427                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <form>\n|       <table>\n"
5428         }, {
5429                 name: "tests20.dat #27"
5430                 html: "<!doctype html><table><form><form>"
5431                 errors: 3
5432                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <form>\n"
5433         }, {
5434                 name: "tests20.dat #28"
5435                 html: "<!doctype html><table><form></table><form>"
5436                 errors: 2
5437                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <form>\n"
5438         }, {
5439                 name: "tests20.dat #29"
5440                 html: "<!doctype html><svg><foreignObject><p>"
5441                 errors: 1
5442                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg foreignObject>\n|         <p>\n"
5443         }, {
5444                 name: "tests20.dat #30"
5445                 html: "<!doctype html><svg><title>abc"
5446                 errors: 1
5447                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg title>\n|         \"abc\"\n"
5448         }, {
5449                 name: "tests20.dat #31"
5450                 html: "<option><span><option>"
5451                 errors: 2
5452                 expected: "| <html>\n|   <head>\n|   <body>\n|     <option>\n|       <span>\n|         <option>\n"
5453         }, {
5454                 name: "tests20.dat #32"
5455                 html: "<option><option>"
5456                 errors: 2
5457                 expected: "| <html>\n|   <head>\n|   <body>\n|     <option>\n|     <option>\n"
5458         }, {
5459                 name: "tests20.dat #33"
5460                 html: "<math><annotation-xml><div>"
5461                 errors: 3
5462                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|     <div>\n"
5463         }, {
5464                 name: "tests20.dat #34"
5465                 html: "<math><annotation-xml encoding=\"application/svg+xml\"><div>"
5466                 errors: 3
5467                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         encoding=\"application/svg+xml\"\n|     <div>\n"
5468         }, {
5469                 name: "tests20.dat #35"
5470                 html: "<math><annotation-xml encoding=\"application/xhtml+xml\"><div>"
5471                 errors: 2
5472                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         encoding=\"application/xhtml+xml\"\n|         <div>\n"
5473         }, {
5474                 name: "tests20.dat #36"
5475                 html: "<math><annotation-xml encoding=\"aPPlication/xhtmL+xMl\"><div>"
5476                 errors: 2
5477                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         encoding=\"aPPlication/xhtmL+xMl\"\n|         <div>\n"
5478         }, {
5479                 name: "tests20.dat #37"
5480                 html: "<math><annotation-xml encoding=\"text/html\"><div>"
5481                 errors: 2
5482                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         encoding=\"text/html\"\n|         <div>\n"
5483         }, {
5484                 name: "tests20.dat #38"
5485                 html: "<math><annotation-xml encoding=\"Text/htmL\"><div>"
5486                 errors: 2
5487                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         encoding=\"Text/htmL\"\n|         <div>\n"
5488         }, {
5489                 name: "tests20.dat #39"
5490                 html: "<math><annotation-xml encoding=\" text/html \"><div>"
5491                 errors: 3
5492                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         encoding=\" text/html \"\n|     <div>\n"
5493         }, {
5494                 name: "tests21.dat #1"
5495                 html: "<svg><![CDATA[foo]]>"
5496                 errors: 2
5497                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"foo\"\n"
5498         }, {
5499                 name: "tests21.dat #2"
5500                 html: "<math><![CDATA[foo]]>"
5501                 errors: 2
5502                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       \"foo\"\n"
5503         }, {
5504                 name: "tests21.dat #3"
5505                 html: "<div><![CDATA[foo]]>"
5506                 errors: 3
5507                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <!-- [CDATA[foo]] -->\n"
5508         }, {
5509                 name: "tests21.dat #4"
5510                 html: "<svg><![CDATA[foo"
5511                 errors: 2
5512                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"foo\"\n"
5513         }, {
5514                 name: "tests21.dat #5"
5515                 html: "<svg><![CDATA[foo"
5516                 errors: 2
5517                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"foo\"\n"
5518         }, {
5519                 name: "tests21.dat #6"
5520                 html: "<svg><![CDATA["
5521                 errors: 2
5522                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n"
5523         }, {
5524                 name: "tests21.dat #7"
5525                 html: "<svg><![CDATA[]]>"
5526                 errors: 2
5527                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n"
5528         }, {
5529                 name: "tests21.dat #8"
5530                 html: "<svg><![CDATA[]] >]]>"
5531                 errors: 2
5532                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"]] >\"\n"
5533         }, {
5534                 name: "tests21.dat #9"
5535                 html: "<svg><![CDATA[]] >]]>"
5536                 errors: 2
5537                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"]] >\"\n"
5538         }, {
5539                 name: "tests21.dat #10"
5540                 html: "<svg><![CDATA[]]"
5541                 errors: 2
5542                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"]]\"\n"
5543         }, {
5544                 name: "tests21.dat #11"
5545                 html: "<svg><![CDATA[]"
5546                 errors: 2
5547                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"]\"\n"
5548         }, {
5549                 name: "tests21.dat #12"
5550                 html: "<svg><![CDATA[]>a"
5551                 errors: 2
5552                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"]>a\"\n"
5553         }, {
5554                 name: "tests21.dat #13"
5555                 html: "<!DOCTYPE html><svg><![CDATA[foo]]]>"
5556                 errors: 1
5557                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"foo]\"\n"
5558         }, {
5559                 name: "tests21.dat #14"
5560                 html: "<!DOCTYPE html><svg><![CDATA[foo]]]]>"
5561                 errors: 1
5562                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"foo]]\"\n"
5563         }, {
5564                 name: "tests21.dat #15"
5565                 html: "<!DOCTYPE html><svg><![CDATA[foo]]]]]>"
5566                 errors: 1
5567                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"foo]]]\"\n"
5568         }, {
5569                 name: "tests21.dat #16"
5570                 html: "<svg><foreignObject><div><![CDATA[foo]]>"
5571                 errors: 3
5572                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg foreignObject>\n|         <div>\n|           <!-- [CDATA[foo]] -->\n"
5573         }, {
5574                 name: "tests21.dat #17"
5575                 html: "<svg><![CDATA[<svg>]]>"
5576                 errors: 2
5577                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"<svg>\"\n"
5578         }, {
5579                 name: "tests21.dat #18"
5580                 html: "<svg><![CDATA[</svg>a]]>"
5581                 errors: 2
5582                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"</svg>a\"\n"
5583         }, {
5584                 name: "tests21.dat #19"
5585                 html: "<svg><![CDATA[<svg>a"
5586                 errors: 2
5587                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"<svg>a\"\n"
5588         }, {
5589                 name: "tests21.dat #20"
5590                 html: "<svg><![CDATA[</svg>a"
5591                 errors: 2
5592                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"</svg>a\"\n"
5593         }, {
5594                 name: "tests21.dat #21"
5595                 html: "<svg><![CDATA[<svg>]]><path>"
5596                 errors: 2
5597                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"<svg>\"\n|       <svg path>\n"
5598         }, {
5599                 name: "tests21.dat #22"
5600                 html: "<svg><![CDATA[<svg>]]></path>"
5601                 errors: 4
5602                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"<svg>\"\n"
5603         }, {
5604                 name: "tests21.dat #23"
5605                 html: "<svg><![CDATA[<svg>]]><!--path-->"
5606                 errors: 2
5607                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"<svg>\"\n|       <!-- path -->\n"
5608         }, {
5609                 name: "tests21.dat #24"
5610                 html: "<svg><![CDATA[<svg>]]>path"
5611                 errors: 2
5612                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"<svg>path\"\n"
5613         }, {
5614                 name: "tests21.dat #25"
5615                 html: "<svg><![CDATA[<!--svg-->]]>"
5616                 errors: 2
5617                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"<!--svg-->\"\n"
5618         }, {
5619                 name: "tests22.dat #1"
5620                 html: "<a><b><big><em><strong><div>X</a>"
5621                 errors: 3
5622                 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"
5623         }, {
5624                 name: "tests22.dat #2"
5625                 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>"
5626                 errors: 10
5627                 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"
5628         }, {
5629                 name: "tests22.dat #3"
5630                 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>"
5631                 errors: 10
5632                 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"
5633         }, {
5634                 name: "tests22.dat #4"
5635                 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>"
5636                 errors: 10
5637                 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"
5638         }, {
5639                 name: "tests22.dat #5"
5640                 html: "<cite><b><cite><i><cite><i><cite><i><div>X</b>TEST"
5641                 errors: 3
5642                 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"
5643         }, {
5644                 name: "tests23.dat #1"
5645                 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"
5646                 errors: 3
5647                 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"
5648         }, {
5649                 name: "tests23.dat #2"
5650                 html: "<p><font size=4><font size=4><font size=4><font size=4><p>X"
5651                 errors: 3
5652                 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"
5653         }, {
5654                 name: "tests23.dat #3"
5655                 html: "<p><font size=4><font size=4><font size=4><font size=\"5\"><font size=4><p>X"
5656                 errors: 3
5657                 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"
5658         }, {
5659                 name: "tests23.dat #4"
5660                 html: "<p><font size=4 id=a><font size=4 id=b><font size=4><font size=4><p>X"
5661                 errors: 3
5662                 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"
5663         }, {
5664                 name: "tests23.dat #5"
5665                 html: "<p><b id=a><b id=a><b id=a><b><object><b id=a><b id=a>X</object><p>Y"
5666                 errors: 4
5667                 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"
5668         }, {
5669                 name: "tests24.dat #1"
5670                 html: "<!DOCTYPE html>&NotEqualTilde;"
5671                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"≂̸\"\n"
5672         }, {
5673                 name: "tests24.dat #2"
5674                 html: "<!DOCTYPE html>&NotEqualTilde;A"
5675                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"≂̸A\"\n"
5676         }, {
5677                 name: "tests24.dat #3"
5678                 html: "<!DOCTYPE html>&ThickSpace;"
5679                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"  \"\n"
5680         }, {
5681                 name: "tests24.dat #4"
5682                 html: "<!DOCTYPE html>&ThickSpace;A"
5683                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"  A\"\n"
5684         }, {
5685                 name: "tests24.dat #5"
5686                 html: "<!DOCTYPE html>&NotSubset;"
5687                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"⊂⃒\"\n"
5688         }, {
5689                 name: "tests24.dat #6"
5690                 html: "<!DOCTYPE html>&NotSubset;A"
5691                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"⊂⃒A\"\n"
5692         }, {
5693                 name: "tests24.dat #7"
5694                 html: "<!DOCTYPE html>&Gopf;"
5695                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"𝔾\"\n"
5696         }, {
5697                 name: "tests24.dat #8"
5698                 html: "<!DOCTYPE html>&Gopf;A"
5699                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"𝔾A\"\n"
5700         }, {
5701                 name: "tests25.dat #1"
5702                 html: "<!DOCTYPE html><body><foo>A"
5703                 errors: 1
5704                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <foo>\n|       \"A\"\n"
5705         }, {
5706                 name: "tests25.dat #2"
5707                 html: "<!DOCTYPE html><body><area>A"
5708                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <area>\n|     \"A\"\n"
5709         }, {
5710                 name: "tests25.dat #3"
5711                 html: "<!DOCTYPE html><body><base>A"
5712                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <base>\n|     \"A\"\n"
5713         }, {
5714                 name: "tests25.dat #4"
5715                 html: "<!DOCTYPE html><body><basefont>A"
5716                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <basefont>\n|     \"A\"\n"
5717         }, {
5718                 name: "tests25.dat #5"
5719                 html: "<!DOCTYPE html><body><bgsound>A"
5720                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <bgsound>\n|     \"A\"\n"
5721         }, {
5722                 name: "tests25.dat #6"
5723                 html: "<!DOCTYPE html><body><br>A"
5724                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <br>\n|     \"A\"\n"
5725         }, {
5726                 name: "tests25.dat #7"
5727                 html: "<!DOCTYPE html><body><col>A"
5728                 errors: 1
5729                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"A\"\n"
5730         }, {
5731                 name: "tests25.dat #8"
5732                 html: "<!DOCTYPE html><body><command>A"
5733                 errors: 1
5734                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <command>\n|       \"A\"\n"
5735         }, {
5736                 name: "tests25.dat #9"
5737                 html: "<!DOCTYPE html><body><menuitem>A"
5738                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <menuitem>\n|     \"A\"\n"
5739         }, {
5740                 name: "tests25.dat #10"
5741                 html: "<!DOCTYPE html><body><embed>A"
5742                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <embed>\n|     \"A\"\n"
5743         }, {
5744                 name: "tests25.dat #11"
5745                 html: "<!DOCTYPE html><body><frame>A"
5746                 errors: 1
5747                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"A\"\n"
5748         }, {
5749                 name: "tests25.dat #12"
5750                 html: "<!DOCTYPE html><body><hr>A"
5751                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <hr>\n|     \"A\"\n"
5752         }, {
5753                 name: "tests25.dat #13"
5754                 html: "<!DOCTYPE html><body><img>A"
5755                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <img>\n|     \"A\"\n"
5756         }, {
5757                 name: "tests25.dat #14"
5758                 html: "<!DOCTYPE html><body><input>A"
5759                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <input>\n|     \"A\"\n"
5760         }, {
5761                 name: "tests25.dat #15"
5762                 html: "<!DOCTYPE html><body><keygen>A"
5763                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <keygen>\n|     \"A\"\n"
5764         }, {
5765                 name: "tests25.dat #16"
5766                 html: "<!DOCTYPE html><body><link>A"
5767                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <link>\n|     \"A\"\n"
5768         }, {
5769                 name: "tests25.dat #17"
5770                 html: "<!DOCTYPE html><body><meta>A"
5771                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <meta>\n|     \"A\"\n"
5772         }, {
5773                 name: "tests25.dat #18"
5774                 html: "<!DOCTYPE html><body><param>A"
5775                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <param>\n|     \"A\"\n"
5776         }, {
5777                 name: "tests25.dat #19"
5778                 html: "<!DOCTYPE html><body><source>A"
5779                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <source>\n|     \"A\"\n"
5780         }, {
5781                 name: "tests25.dat #20"
5782                 html: "<!DOCTYPE html><body><track>A"
5783                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <track>\n|     \"A\"\n"
5784         }, {
5785                 name: "tests25.dat #21"
5786                 html: "<!DOCTYPE html><body><wbr>A"
5787                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <wbr>\n|     \"A\"\n"
5788         }, {
5789                 name: "tests26.dat #1"
5790                 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>"
5791                 errors: 10
5792                 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"
5793         }, {
5794                 name: "tests26.dat #2"
5795                 html: "<!DOCTYPE html><body><b><nobr>1<nobr></b><i><nobr>2<nobr></i>3"
5796                 errors: 7
5797                 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"
5798         }, {
5799                 name: "tests26.dat #3"
5800                 html: "<!DOCTYPE html><body><b><nobr>1<table><nobr></b><i><nobr>2<nobr></i>3"
5801                 errors: 14
5802                 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"
5803         }, {
5804                 name: "tests26.dat #4"
5805                 html: "<!DOCTYPE html><body><b><nobr>1<table><tr><td><nobr></b><i><nobr>2<nobr></i>3"
5806                 errors: 6
5807                 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"
5808         }, {
5809                 name: "tests26.dat #5"
5810                 html: "<!DOCTYPE html><body><b><nobr>1<div><nobr></b><i><nobr>2<nobr></i>3"
5811                 errors: 9
5812                 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"
5813         }, {
5814                 name: "tests26.dat #6"
5815                 html: "<!DOCTYPE html><body><b><nobr>1<nobr></b><div><i><nobr>2<nobr></i>3"
5816                 errors: 7
5817                 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"
5818         }, {
5819                 name: "tests26.dat #7"
5820                 html: "<!DOCTYPE html><body><b><nobr>1<nobr><ins></b><i><nobr>"
5821                 errors: 5
5822                 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"
5823         }, {
5824                 name: "tests26.dat #8"
5825                 html: "<!DOCTYPE html><body><b><nobr>1<ins><nobr></b><i>2"
5826                 errors: 4
5827                 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"
5828         }, {
5829                 name: "tests26.dat #9"
5830                 html: "<!DOCTYPE html><body><b>1<nobr></b><i><nobr>2</i>"
5831                 errors: 4
5832                 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"
5833         }, {
5834                 name: "tests26.dat #10"
5835                 html: "<p><code x</code></p>\n"
5836                 errors: 5
5837                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <code>\n|         code=\"\"\n|         x<=\"\"\n|     <code>\n|       code=\"\"\n|       x<=\"\"\n|       \"\n\"\n"
5838         }, {
5839                 name: "tests26.dat #11"
5840                 html: "<!DOCTYPE html><svg><foreignObject><p><i></p>a"
5841                 errors: 2
5842                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg foreignObject>\n|         <p>\n|           <i>\n|         <i>\n|           \"a\"\n"
5843         }, {
5844                 name: "tests26.dat #12"
5845                 html: "<!DOCTYPE html><table><tr><td><svg><foreignObject><p><i></p>a"
5846                 errors: 2
5847                 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"
5848         }, {
5849                 name: "tests26.dat #13"
5850                 html: "<!DOCTYPE html><math><mtext><p><i></p>a"
5851                 errors: 2
5852                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mtext>\n|         <p>\n|           <i>\n|         <i>\n|           \"a\"\n"
5853         }, {
5854                 name: "tests26.dat #14"
5855                 html: "<!DOCTYPE html><table><tr><td><math><mtext><p><i></p>a"
5856                 errors: 2
5857                 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"
5858         }, {
5859                 name: "tests26.dat #15"
5860                 html: "<!DOCTYPE html><body><div><!/div>a"
5861                 errors: 2
5862                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <!-- /div -->\n|       \"a\"\n"
5863         }, {
5864                 name: "tests26.dat #16"
5865                 html: "<button><p><button>"
5866                 errors: 3
5867                 expected: "| <html>\n|   <head>\n|   <body>\n|     <button>\n|       <p>\n|     <button>\n"
5868         }, {
5869                 name: "tests2.dat #1"
5870                 html: "<!DOCTYPE html>Test"
5871                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"Test\"\n"
5872         }, {
5873                 name: "tests2.dat #2"
5874                 html: "<textarea>test</div>test"
5875                 errors: 2
5876                 expected: "| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"test</div>test\"\n"
5877         }, {
5878                 name: "tests2.dat #3"
5879                 html: "<table><td>"
5880                 errors: 3
5881                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n"
5882         }, {
5883                 name: "tests2.dat #4"
5884                 html: "<table><td>test</tbody></table>"
5885                 errors: 2
5886                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             \"test\"\n"
5887         }, {
5888                 name: "tests2.dat #5"
5889                 html: "<frame>test"
5890                 errors: 2
5891                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"test\"\n"
5892         }, {
5893                 name: "tests2.dat #6"
5894                 html: "<!DOCTYPE html><frameset>test"
5895                 errors: 5
5896                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
5897         }, {
5898                 name: "tests2.dat #7"
5899                 html: "<!DOCTYPE html><frameset> te st"
5900                 errors: 5
5901                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|     \"  \"\n"
5902         }, {
5903                 name: "tests2.dat #8"
5904                 html: "<!DOCTYPE html><frameset></frameset> te st"
5905                 errors: 4
5906                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|   \"  \"\n"
5907         }, {
5908                 name: "tests2.dat #9"
5909                 html: "<!DOCTYPE html><frameset><!DOCTYPE html>"
5910                 errors: 2
5911                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
5912         }, {
5913                 name: "tests2.dat #10"
5914                 html: "<!DOCTYPE html><font><p><b>test</font>"
5915                 errors: 2
5916                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <font>\n|     <p>\n|       <font>\n|         <b>\n|           \"test\"\n"
5917         }, {
5918                 name: "tests2.dat #11"
5919                 html: "<!DOCTYPE html><dt><div><dd>"
5920                 errors: 1
5921                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <dt>\n|       <div>\n|     <dd>\n"
5922         }, {
5923                 name: "tests2.dat #12"
5924                 html: "<script></x"
5925                 errors: 2
5926                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</x\"\n|   <body>\n"
5927         }, {
5928                 name: "tests2.dat #13"
5929                 html: "<table><plaintext><td>"
5930                 errors: 7
5931                 expected: "| <html>\n|   <head>\n|   <body>\n|     <plaintext>\n|       \"<td>\"\n|     <table>\n"
5932         }, {
5933                 name: "tests2.dat #14"
5934                 html: "<plaintext></plaintext>"
5935                 errors: 2
5936                 expected: "| <html>\n|   <head>\n|   <body>\n|     <plaintext>\n|       \"</plaintext>\"\n"
5937         }, {
5938                 name: "tests2.dat #15"
5939                 html: "<!DOCTYPE html><table><tr>TEST"
5940                 errors: 5
5941                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"TEST\"\n|     <table>\n|       <tbody>\n|         <tr>\n"
5942         }, {
5943                 name: "tests2.dat #16"
5944                 html: "<!DOCTYPE html><body t1=1><body t2=2><body t3=3 t4=4>"
5945                 errors: 2
5946                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     t1=\"1\"\n|     t2=\"2\"\n|     t3=\"3\"\n|     t4=\"4\"\n"
5947         }, {
5948                 name: "tests2.dat #17"
5949                 html: "</b test"
5950                 errors: 2
5951                 expected: "| <html>\n|   <head>\n|   <body>\n"
5952         }, {
5953                 name: "tests2.dat #18"
5954                 html: "<!DOCTYPE html></b test<b &=&amp>X"
5955                 errors: 4
5956                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"X\"\n"
5957         }, {
5958                 name: "tests2.dat #19"
5959                 html: "<!doctypehtml><scrIPt type=text/x-foobar;baz>X</SCRipt"
5960                 errors: 2
5961                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       type=\"text/x-foobar;baz\"\n|       \"X</SCRipt\"\n|   <body>\n"
5962         }, {
5963                 name: "tests2.dat #20"
5964                 html: "&"
5965                 errors: 1
5966                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"&\"\n"
5967         }, {
5968                 name: "tests2.dat #21"
5969                 html: "&#"
5970                 errors: 2
5971                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"&#\"\n"
5972         }, {
5973                 name: "tests2.dat #22"
5974                 html: "&#X"
5975                 errors: 2
5976                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"&#X\"\n"
5977         }, {
5978                 name: "tests2.dat #23"
5979                 html: "&#x"
5980                 errors: 2
5981                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"&#x\"\n"
5982         }, {
5983                 name: "tests2.dat #24"
5984                 html: "&#45"
5985                 errors: 2
5986                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"-\"\n"
5987         }, {
5988                 name: "tests2.dat #25"
5989                 html: "&x-test"
5990                 errors: 1
5991                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"&x-test\"\n"
5992         }, {
5993                 name: "tests2.dat #26"
5994                 html: "<!doctypehtml><p><li>"
5995                 errors: 1
5996                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <li>\n"
5997         }, {
5998                 name: "tests2.dat #27"
5999                 html: "<!doctypehtml><p><dt>"
6000                 errors: 1
6001                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <dt>\n"
6002         }, {
6003                 name: "tests2.dat #28"
6004                 html: "<!doctypehtml><p><dd>"
6005                 errors: 1
6006                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <dd>\n"
6007         }, {
6008                 name: "tests2.dat #29"
6009                 html: "<!doctypehtml><p><form>"
6010                 errors: 2
6011                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <form>\n"
6012         }, {
6013                 name: "tests2.dat #30"
6014                 html: "<!DOCTYPE html><p></P>X"
6015                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     \"X\"\n"
6016         }, {
6017                 name: "tests2.dat #31"
6018                 html: "&AMP"
6019                 errors: 2
6020                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"&\"\n"
6021         }, {
6022                 name: "tests2.dat #32"
6023                 html: "&AMp;"
6024                 errors: 2
6025                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"&AMp;\"\n"
6026         }, {
6027                 name: "tests2.dat #33"
6028                 html: "<!DOCTYPE html><html><head></head><body><thisISasillyTESTelementNameToMakeSureCrazyTagNamesArePARSEDcorrectLY>"
6029                 errors: 1
6030                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <thisisasillytestelementnametomakesurecrazytagnamesareparsedcorrectly>\n"
6031         }, {
6032                 name: "tests2.dat #34"
6033                 html: "<!DOCTYPE html>X</body>X"
6034                 errors: 1
6035                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"XX\"\n"
6036         }, {
6037                 name: "tests2.dat #35"
6038                 html: "<!DOCTYPE html><!-- X"
6039                 errors: 1
6040                 expected: "| <!DOCTYPE html>\n| <!--  X -->\n| <html>\n|   <head>\n|   <body>\n"
6041         }, {
6042                 name: "tests2.dat #36"
6043                 html: "<!DOCTYPE html><table><caption>test TEST</caption><td>test"
6044                 errors: 2
6045                 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"
6046         }, {
6047                 name: "tests2.dat #37"
6048                 html: "<!DOCTYPE html><select><option><optgroup>"
6049                 errors: 1
6050                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n|       <optgroup>\n"
6051         }, {
6052                 name: "tests2.dat #38"
6053                 html: "<!DOCTYPE html><select><optgroup><option></optgroup><option><select><option>"
6054                 errors: 2
6055                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <optgroup>\n|         <option>\n|       <option>\n|     <option>\n"
6056         }, {
6057                 name: "tests2.dat #39"
6058                 html: "<!DOCTYPE html><select><optgroup><option><optgroup>"
6059                 errors: 1
6060                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <optgroup>\n|         <option>\n|       <optgroup>\n"
6061         }, {
6062                 name: "tests2.dat #40"
6063                 html: "<!DOCTYPE html><datalist><option>foo</datalist>bar"
6064                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <datalist>\n|       <option>\n|         \"foo\"\n|     \"bar\"\n"
6065         }, {
6066                 name: "tests2.dat #41"
6067                 html: "<!DOCTYPE html><font><input><input></font>"
6068                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <font>\n|       <input>\n|       <input>\n"
6069         }, {
6070                 name: "tests2.dat #42"
6071                 html: "<!DOCTYPE html><!-- XXX - XXX -->"
6072                 expected: "| <!DOCTYPE html>\n| <!--  XXX - XXX  -->\n| <html>\n|   <head>\n|   <body>\n"
6073         }, {
6074                 name: "tests2.dat #43"
6075                 html: "<!DOCTYPE html><!-- XXX - XXX"
6076                 errors: 1
6077                 expected: "| <!DOCTYPE html>\n| <!--  XXX - XXX -->\n| <html>\n|   <head>\n|   <body>\n"
6078         }, {
6079                 name: "tests2.dat #44"
6080                 html: "<!DOCTYPE html><!-- XXX - XXX - XXX -->"
6081                 expected: "| <!DOCTYPE html>\n| <!--  XXX - XXX - XXX  -->\n| <html>\n|   <head>\n|   <body>\n"
6082         }, {
6083                 name: "tests2.dat #45"
6084                 html: "<isindex test=x name=x>"
6085                 errors: 2
6086                 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"
6087         }, {
6088                 name: "tests2.dat #46"
6089                 html: "test\ntest"
6090                 errors: 1
6091                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"test\ntest\"\n"
6092         }, {
6093                 name: "tests2.dat #47"
6094                 html: "<!DOCTYPE html><body><title>test</body></title>"
6095                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <title>\n|       \"test</body>\"\n"
6096         }, {
6097                 name: "tests2.dat #48"
6098                 html: "<!DOCTYPE html><body><title>X</title><meta name=z><link rel=foo><style>\nx { content:\"</style\" } </style>"
6099                 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"
6100         }, {
6101                 name: "tests2.dat #49"
6102                 html: "<!DOCTYPE html><select><optgroup></optgroup></select>"
6103                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <optgroup>\n"
6104         }, {
6105                 name: "tests2.dat #50"
6106                 html: " \n "
6107                 errors: 1
6108                 expected: "| <html>\n|   <head>\n|   <body>\n"
6109         }, {
6110                 name: "tests2.dat #51"
6111                 html: "<!DOCTYPE html>  <html>"
6112                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
6113         }, {
6114                 name: "tests2.dat #52"
6115                 html: "<!DOCTYPE html><script>\n</script>  <title>x</title>  </head>"
6116                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"\n\"\n|     \"  \"\n|     <title>\n|       \"x\"\n|     \"  \"\n|   <body>\n"
6117         }, {
6118                 name: "tests2.dat #53"
6119                 html: "<!DOCTYPE html><html><body><html id=x>"
6120                 errors: 1
6121                 expected: "| <!DOCTYPE html>\n| <html>\n|   id=\"x\"\n|   <head>\n|   <body>\n"
6122         }, {
6123                 name: "tests2.dat #54"
6124                 html: "<!DOCTYPE html>X</body><html id=\"x\">"
6125                 errors: 1
6126                 expected: "| <!DOCTYPE html>\n| <html>\n|   id=\"x\"\n|   <head>\n|   <body>\n|     \"X\"\n"
6127         }, {
6128                 name: "tests2.dat #55"
6129                 html: "<!DOCTYPE html><head><html id=x>"
6130                 errors: 1
6131                 expected: "| <!DOCTYPE html>\n| <html>\n|   id=\"x\"\n|   <head>\n|   <body>\n"
6132         }, {
6133                 name: "tests2.dat #56"
6134                 html: "<!DOCTYPE html>X</html>X"
6135                 errors: 1
6136                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"XX\"\n"
6137         }, {
6138                 name: "tests2.dat #57"
6139                 html: "<!DOCTYPE html>X</html> "
6140                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"X \"\n"
6141         }, {
6142                 name: "tests2.dat #58"
6143                 html: "<!DOCTYPE html>X</html><p>X"
6144                 errors: 1
6145                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"X\"\n|     <p>\n|       \"X\"\n"
6146         }, {
6147                 name: "tests2.dat #59"
6148                 html: "<!DOCTYPE html>X<p/x/y/z>"
6149                 errors: 3
6150                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"X\"\n|     <p>\n|       x=\"\"\n|       y=\"\"\n|       z=\"\"\n"
6151         }, {
6152                 name: "tests2.dat #60"
6153                 html: "<!DOCTYPE html><!--x--"
6154                 errors: 1
6155                 expected: "| <!DOCTYPE html>\n| <!-- x -->\n| <html>\n|   <head>\n|   <body>\n"
6156         }, {
6157                 name: "tests2.dat #61"
6158                 html: "<!DOCTYPE html><table><tr><td></p></table>"
6159                 errors: 1
6160                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <p>\n"
6161         }, {
6162                 name: "tests2.dat #62"
6163                 html: "<!DOCTYPE <!DOCTYPE HTML>><!--<!--x-->-->"
6164                 errors: 3
6165                 expected: "| <!DOCTYPE <!doctype>\n| <html>\n|   <head>\n|   <body>\n|     \">\"\n|     <!-- <!--x -->\n|     \"-->\"\n"
6166         }, {
6167                 name: "tests2.dat #63"
6168                 html: "<!doctype html><div><form></form><div></div></div>"
6169                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <form>\n|       <div>\n"
6170         }, {
6171                 name: "tests3.dat #1"
6172                 html: "<head></head><style></style>"
6173                 errors: 2
6174                 expected: "| <html>\n|   <head>\n|     <style>\n|   <body>\n"
6175         }, {
6176                 name: "tests3.dat #2"
6177                 html: "<head></head><script></script>"
6178                 errors: 2
6179                 expected: "| <html>\n|   <head>\n|     <script>\n|   <body>\n"
6180         }, {
6181                 name: "tests3.dat #3"
6182                 html: "<head></head><!-- --><style></style><!-- --><script></script>"
6183                 errors: 3
6184                 expected: "| <html>\n|   <head>\n|     <style>\n|     <script>\n|   <!--   -->\n|   <!--   -->\n|   <body>\n"
6185         }, {
6186                 name: "tests3.dat #4"
6187                 html: "<head></head><!-- -->x<style></style><!-- --><script></script>"
6188                 errors: 1
6189                 expected: "| <html>\n|   <head>\n|   <!--   -->\n|   <body>\n|     \"x\"\n|     <style>\n|     <!--   -->\n|     <script>\n"
6190         }, {
6191                 name: "tests3.dat #5"
6192                 html: "<!DOCTYPE html><html><head></head><body><pre>\n</pre></body></html>"
6193                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n"
6194         }, {
6195                 name: "tests3.dat #6"
6196                 html: "<!DOCTYPE html><html><head></head><body><pre>\nfoo</pre></body></html>"
6197                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"foo\"\n"
6198         }, {
6199                 name: "tests3.dat #7"
6200                 html: "<!DOCTYPE html><html><head></head><body><pre>\n\nfoo</pre></body></html>"
6201                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"\nfoo\"\n"
6202         }, {
6203                 name: "tests3.dat #8"
6204                 html: "<!DOCTYPE html><html><head></head><body><pre>\nfoo\n</pre></body></html>"
6205                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"foo\n\"\n"
6206         }, {
6207                 name: "tests3.dat #9"
6208                 html: "<!DOCTYPE html><html><head></head><body><pre>x</pre><span>\n</span></body></html>"
6209                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"x\"\n|     <span>\n|       \"\n\"\n"
6210         }, {
6211                 name: "tests3.dat #10"
6212                 html: "<!DOCTYPE html><html><head></head><body><pre>x\ny</pre></body></html>"
6213                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"x\ny\"\n"
6214         }, {
6215                 name: "tests3.dat #11"
6216                 html: "<!DOCTYPE html><html><head></head><body><pre>x<div>\ny</pre></body></html>"
6217                 errors: 1
6218                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"x\"\n|       <div>\n|         \"\ny\"\n"
6219         }, {
6220                 name: "tests3.dat #12"
6221                 html: "<!DOCTYPE html><pre>&#x0a;&#x0a;A</pre>"
6222                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"\nA\"\n"
6223         }, {
6224                 name: "tests3.dat #13"
6225                 html: "<!DOCTYPE html><HTML><META><HEAD></HEAD></HTML>"
6226                 errors: 1
6227                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <meta>\n|   <body>\n"
6228         }, {
6229                 name: "tests3.dat #14"
6230                 html: "<!DOCTYPE html><HTML><HEAD><head></HEAD></HTML>"
6231                 errors: 1
6232                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
6233         }, {
6234                 name: "tests3.dat #15"
6235                 html: "<textarea>foo<span>bar</span><i>baz"
6236                 errors: 2
6237                 expected: "| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"foo<span>bar</span><i>baz\"\n"
6238         }, {
6239                 name: "tests3.dat #16"
6240                 html: "<title>foo<span>bar</em><i>baz"
6241                 errors: 2
6242                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"foo<span>bar</em><i>baz\"\n|   <body>\n"
6243         }, {
6244                 name: "tests3.dat #17"
6245                 html: "<!DOCTYPE html><textarea>\n</textarea>"
6246                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n"
6247         }, {
6248                 name: "tests3.dat #18"
6249                 html: "<!DOCTYPE html><textarea>\nfoo</textarea>"
6250                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"foo\"\n"
6251         }, {
6252                 name: "tests3.dat #19"
6253                 html: "<!DOCTYPE html><textarea>\n\nfoo</textarea>"
6254                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"\nfoo\"\n"
6255         }, {
6256                 name: "tests3.dat #20"
6257                 html: "<!DOCTYPE html><html><head></head><body><ul><li><div><p><li></ul></body></html>"
6258                 errors: 1
6259                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <ul>\n|       <li>\n|         <div>\n|           <p>\n|       <li>\n"
6260         }, {
6261                 name: "tests3.dat #21"
6262                 html: "<!doctype html><nobr><nobr><nobr>"
6263                 errors: 3
6264                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <nobr>\n|     <nobr>\n|     <nobr>\n"
6265         }, {
6266                 name: "tests3.dat #22"
6267                 html: "<!doctype html><nobr><nobr></nobr><nobr>"
6268                 errors: 2
6269                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <nobr>\n|     <nobr>\n|     <nobr>\n"
6270         }, {
6271                 name: "tests3.dat #23"
6272                 html: "<!doctype html><html><body><p><table></table></body></html>"
6273                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <table>\n"
6274         }, {
6275                 name: "tests3.dat #24"
6276                 html: "<p><table></table>"
6277                 errors: 1
6278                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <table>\n"
6279         }, {
6280                 name: "tests4.dat #1"
6281                 html: "direct div content"
6282                 fragment: "div"
6283                 expected: "| \"direct div content\"\n"
6284         }, {
6285                 name: "tests4.dat #2"
6286                 html: "direct textarea content"
6287                 fragment: "textarea"
6288                 expected: "| \"direct textarea content\"\n"
6289         }, {
6290                 name: "tests4.dat #3"
6291                 html: "textarea content with <em>pseudo</em> <foo>markup"
6292                 fragment: "textarea"
6293                 expected: "| \"textarea content with <em>pseudo</em> <foo>markup\"\n"
6294         }, {
6295                 name: "tests4.dat #4"
6296                 html: "this is &#x0043;DATA inside a <style> element"
6297                 fragment: "style"
6298                 expected: "| \"this is &#x0043;DATA inside a <style> element\"\n"
6299         }, {
6300                 name: "tests4.dat #5"
6301                 html: "</plaintext>"
6302                 fragment: "plaintext"
6303                 expected: "| \"</plaintext>\"\n"
6304         }, {
6305                 name: "tests4.dat #6"
6306                 html: "setting html's innerHTML"
6307                 fragment: "html"
6308                 expected: "| <head>\n| <body>\n|   \"setting html's innerHTML\"\n"
6309         }, {
6310                 name: "tests4.dat #7"
6311                 html: "<title>setting head's innerHTML</title>"
6312                 fragment: "head"
6313                 expected: "| <title>\n|   \"setting head's innerHTML\"\n"
6314         }, {
6315                 name: "tests5.dat #1"
6316                 html: "<style> <!-- </style>x"
6317                 errors: 1
6318                 expected: "| <html>\n|   <head>\n|     <style>\n|       \" <!-- \"\n|   <body>\n|     \"x\"\n"
6319         }, {
6320                 name: "tests5.dat #2"
6321                 html: "<style> <!-- </style> --> </style>x"
6322                 errors: 2
6323                 expected: "| <html>\n|   <head>\n|     <style>\n|       \" <!-- \"\n|     \" \"\n|   <body>\n|     \"--> x\"\n"
6324         }, {
6325                 name: "tests5.dat #3"
6326                 html: "<style> <!--> </style>x"
6327                 errors: 1
6328                 expected: "| <html>\n|   <head>\n|     <style>\n|       \" <!--> \"\n|   <body>\n|     \"x\"\n"
6329         }, {
6330                 name: "tests5.dat #4"
6331                 html: "<style> <!---> </style>x"
6332                 errors: 1
6333                 expected: "| <html>\n|   <head>\n|     <style>\n|       \" <!---> \"\n|   <body>\n|     \"x\"\n"
6334         }, {
6335                 name: "tests5.dat #5"
6336                 html: "<iframe> <!---> </iframe>x"
6337                 errors: 1
6338                 expected: "| <html>\n|   <head>\n|   <body>\n|     <iframe>\n|       \" <!---> \"\n|     \"x\"\n"
6339         }, {
6340                 name: "tests5.dat #6"
6341                 html: "<iframe> <!--- </iframe>->x</iframe> --> </iframe>x"
6342                 errors: 3
6343                 expected: "| <html>\n|   <head>\n|   <body>\n|     <iframe>\n|       \" <!--- \"\n|     \"->x --> x\"\n"
6344         }, {
6345                 name: "tests5.dat #7"
6346                 html: "<script> <!-- </script> --> </script>x"
6347                 errors: 2
6348                 expected: "| <html>\n|   <head>\n|     <script>\n|       \" <!-- \"\n|     \" \"\n|   <body>\n|     \"--> x\"\n"
6349         }, {
6350                 name: "tests5.dat #8"
6351                 html: "<title> <!-- </title> --> </title>x"
6352                 errors: 2
6353                 expected: "| <html>\n|   <head>\n|     <title>\n|       \" <!-- \"\n|     \" \"\n|   <body>\n|     \"--> x\"\n"
6354         }, {
6355                 name: "tests5.dat #9"
6356                 html: "<textarea> <!--- </textarea>->x</textarea> --> </textarea>x"
6357                 errors: 3
6358                 expected: "| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \" <!--- \"\n|     \"->x --> x\"\n"
6359         }, {
6360                 name: "tests5.dat #10"
6361                 html: "<style> <!</-- </style>x"
6362                 errors: 1
6363                 expected: "| <html>\n|   <head>\n|     <style>\n|       \" <!</-- \"\n|   <body>\n|     \"x\"\n"
6364         }, {
6365                 name: "tests5.dat #11"
6366                 html: "<p><xmp></xmp>"
6367                 errors: 1
6368                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <xmp>\n"
6369         }, {
6370                 name: "tests5.dat #12"
6371                 html: "<xmp> <!-- > --> </xmp>"
6372                 errors: 1
6373                 expected: "| <html>\n|   <head>\n|   <body>\n|     <xmp>\n|       \" <!-- > --> \"\n"
6374         }, {
6375                 name: "tests5.dat #13"
6376                 html: "<title>&amp;</title>"
6377                 errors: 1
6378                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"&\"\n|   <body>\n"
6379         }, {
6380                 name: "tests5.dat #14"
6381                 html: "<title><!--&amp;--></title>"
6382                 errors: 1
6383                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"<!--&-->\"\n|   <body>\n"
6384         }, {
6385                 name: "tests5.dat #15"
6386                 html: "<title><!--</title>"
6387                 errors: 1
6388                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"<!--\"\n|   <body>\n"
6389         }, {
6390                 name: "tests5.dat #16"
6391                 html: "<noscript><!--</noscript>--></noscript>"
6392                 errors: 2
6393                 expected: "| <html>\n|   <head>\n|     <noscript>\n|       \"<!--\"\n|   <body>\n|     \"-->\"\n"
6394         }, {
6395                 name: "tests5.dat #17"
6396                 html: "<noscript><!--</noscript>--></noscript>"
6397                 errors: 1
6398                 expected: "| <html>\n|   <head>\n|     <noscript>\n|       <!-- </noscript> -->\n|   <body>\n"
6399         }, {
6400                 name: "tests6.dat #1"
6401                 html: "<!doctype html></head> <head>"
6402                 errors: 1
6403                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   \" \"\n|   <body>\n"
6404         }, {
6405                 name: "tests6.dat #2"
6406                 html: "<!doctype html><form><div></form><div>"
6407                 errors: 2
6408                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <form>\n|       <div>\n|         <div>\n"
6409         }, {
6410                 name: "tests6.dat #3"
6411                 html: "<!doctype html><title>&amp;</title>"
6412                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <title>\n|       \"&\"\n|   <body>\n"
6413         }, {
6414                 name: "tests6.dat #4"
6415                 html: "<!doctype html><title><!--&amp;--></title>"
6416                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <title>\n|       \"<!--&-->\"\n|   <body>\n"
6417         }, {
6418                 name: "tests6.dat #5"
6419                 html: "<!doctype>"
6420                 errors: 3
6421                 expected: "| <!DOCTYPE >\n| <html>\n|   <head>\n|   <body>\n"
6422         }, {
6423                 name: "tests6.dat #6"
6424                 html: "<!---x"
6425                 errors: 2
6426                 expected: "| <!-- -x -->\n| <html>\n|   <head>\n|   <body>\n"
6427         }, {
6428                 name: "tests6.dat #7"
6429                 html: "<body>\n<div>"
6430                 errors: 2,"document-fragment":"div"
6431                 expected: "| \"\n\"\n| <div>\n"
6432         }, {
6433                 name: "tests6.dat #8"
6434                 html: "<frameset></frameset>\nfoo"
6435                 errors: 4
6436                 expected: "| <html>\n|   <head>\n|   <frameset>\n|   \"\n\"\n"
6437         }, {
6438                 name: "tests6.dat #9"
6439                 html: "<frameset></frameset>\n<noframes>"
6440                 errors: 2
6441                 expected: "| <html>\n|   <head>\n|   <frameset>\n|   \"\n\"\n|   <noframes>\n"
6442         }, {
6443                 name: "tests6.dat #10"
6444                 html: "<frameset></frameset>\n<div>"
6445                 errors: 2
6446                 expected: "| <html>\n|   <head>\n|   <frameset>\n|   \"\n\"\n"
6447         }, {
6448                 name: "tests6.dat #11"
6449                 html: "<frameset></frameset>\n</html>"
6450                 errors: 1
6451                 expected: "| <html>\n|   <head>\n|   <frameset>\n|   \"\n\"\n"
6452         }, {
6453                 name: "tests6.dat #12"
6454                 html: "<frameset></frameset>\n</div>"
6455                 errors: 2
6456                 expected: "| <html>\n|   <head>\n|   <frameset>\n|   \"\n\"\n"
6457         }, {
6458                 name: "tests6.dat #13"
6459                 html: "<form><form>"
6460                 errors: 3
6461                 expected: "| <html>\n|   <head>\n|   <body>\n|     <form>\n"
6462         }, {
6463                 name: "tests6.dat #14"
6464                 html: "<button><button>"
6465                 errors: 3
6466                 expected: "| <html>\n|   <head>\n|   <body>\n|     <button>\n|     <button>\n"
6467         }, {
6468                 name: "tests6.dat #15"
6469                 html: "<table><tr><td></th>"
6470                 errors: 3
6471                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n"
6472         }, {
6473                 name: "tests6.dat #16"
6474                 html: "<table><caption><td>"
6475                 errors: 3
6476                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|       <tbody>\n|         <tr>\n|           <td>\n"
6477         }, {
6478                 name: "tests6.dat #17"
6479                 html: "<table><caption><div>"
6480                 errors: 2
6481                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <div>\n"
6482         }, {
6483                 name: "tests6.dat #18"
6484                 html: "</caption><div>"
6485                 errors: 2,"document-fragment":"caption"
6486                 expected: "| <div>\n"
6487         }, {
6488                 name: "tests6.dat #19"
6489                 html: "<table><caption><div></caption>"
6490                 errors: 3
6491                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <div>\n"
6492         }, {
6493                 name: "tests6.dat #20"
6494                 html: "<table><caption></table>"
6495                 errors: 1
6496                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n"
6497         }, {
6498                 name: "tests6.dat #21"
6499                 html: "</table><div>"
6500                 errors: 2,"document-fragment":"caption"
6501                 expected: "| <div>\n"
6502         }, {
6503                 name: "tests6.dat #22"
6504                 html: "<table><caption></body></col></colgroup></html></tbody></td></tfoot></th></thead></tr>"
6505                 errors: 12
6506                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n"
6507         }, {
6508                 name: "tests6.dat #23"
6509                 html: "<table><caption><div></div>"
6510                 errors: 2
6511                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <div>\n"
6512         }, {
6513                 name: "tests6.dat #24"
6514                 html: "<table><tr><td></body></caption></col></colgroup></html>"
6515                 errors: 7
6516                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n"
6517         }, {
6518                 name: "tests6.dat #25"
6519                 html: "</table></tbody></tfoot></thead></tr><div>"
6520                 errors: 6,"document-fragment":"td"
6521                 expected: "| <div>\n"
6522         }, {
6523                 name: "tests6.dat #26"
6524                 html: "<table><colgroup>foo"
6525                 errors: 5
6526                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"foo\"\n|     <table>\n|       <colgroup>\n"
6527         }, {
6528                 name: "tests6.dat #27"
6529                 html: "foo<col>"
6530                 errors: 3,"document-fragment":"colgroup"
6531                 expected: "| <col>\n"
6532         }, {
6533                 name: "tests6.dat #28"
6534                 html: "<table><colgroup></col>"
6535                 errors: 3
6536                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <colgroup>\n"
6537         }, {
6538                 name: "tests6.dat #29"
6539                 html: "<frameset><div>"
6540                 errors: 3
6541                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
6542         }, {
6543                 name: "tests6.dat #30"
6544                 html: "</frameset><frame>"
6545                 errors: 1,"document-fragment":"frameset"
6546                 expected: "| <frame>\n"
6547         }, {
6548                 name: "tests6.dat #31"
6549                 html: "<frameset></div>"
6550                 errors: 3
6551                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
6552         }, {
6553                 name: "tests6.dat #32"
6554                 html: "</body><div>"
6555                 errors: 2,"document-fragment":"body"
6556                 expected: "| <div>\n"
6557         }, {
6558                 name: "tests6.dat #33"
6559                 html: "<table><tr><div>"
6560                 errors: 3
6561                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|     <table>\n|       <tbody>\n|         <tr>\n"
6562         }, {
6563                 name: "tests6.dat #34"
6564                 html: "</tr><td>"
6565                 errors: 1,"document-fragment":"tr"
6566                 expected: "| <td>\n"
6567         }, {
6568                 name: "tests6.dat #35"
6569                 html: "</tbody></tfoot></thead><td>"
6570                 errors: 3,"document-fragment":"tr"
6571                 expected: "| <td>\n"
6572         }, {
6573                 name: "tests6.dat #36"
6574                 html: "<table><tr><div><td>"
6575                 errors: 3
6576                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n"
6577         }, {
6578                 name: "tests6.dat #37"
6579                 html: "<caption><col><colgroup><tbody><tfoot><thead><tr>"
6580                 errors: 6,"document-fragment":"tbody"
6581                 expected: "| <tr>\n"
6582         }, {
6583                 name: "tests6.dat #38"
6584                 html: "<table><tbody></thead>"
6585                 errors: 3
6586                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n"
6587         }, {
6588                 name: "tests6.dat #39"
6589                 html: "</table><tr>"
6590                 errors: 1,"document-fragment":"tbody"
6591                 expected: "| <tr>\n"
6592         }, {
6593                 name: "tests6.dat #40"
6594                 html: "<table><tbody></body></caption></col></colgroup></html></td></th></tr>"
6595                 errors: 10
6596                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n"
6597         }, {
6598                 name: "tests6.dat #41"
6599                 html: "<table><tbody></div>"
6600                 errors: 4
6601                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n"
6602         }, {
6603                 name: "tests6.dat #42"
6604                 html: "<table><table>"
6605                 errors: 3
6606                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|     <table>\n"
6607         }, {
6608                 name: "tests6.dat #43"
6609                 html: "<table></body></caption></col></colgroup></html></tbody></td></tfoot></th></thead></tr>"
6610                 errors: 13
6611                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n"
6612         }, {
6613                 name: "tests6.dat #44"
6614                 html: "</table><tr>"
6615                 errors: 1,"document-fragment":"table"
6616                 expected: "| <tbody>\n|   <tr>\n"
6617         }, {
6618                 name: "tests6.dat #45"
6619                 html: "<body></body></html>"
6620                 errors: 1,"document-fragment":"html"
6621                 expected: "| <head>\n| <body>\n"
6622         }, {
6623                 name: "tests6.dat #46"
6624                 html: "<html><frameset></frameset></html> "
6625                 errors: 1
6626                 expected: "| <html>\n|   <head>\n|   <frameset>\n|   \" \"\n"
6627         }, {
6628                 name: "tests6.dat #47"
6629                 html: "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\"><html></html>"
6630                 expected: "| <!DOCTYPE html \"-//W3C//DTD HTML 4.01//EN\" \"\">\n| <html>\n|   <head>\n|   <body>\n"
6631         }, {
6632                 name: "tests6.dat #48"
6633                 html: "<param><frameset></frameset>"
6634                 errors: 2
6635                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
6636         }, {
6637                 name: "tests6.dat #49"
6638                 html: "<source><frameset></frameset>"
6639                 errors: 2
6640                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
6641         }, {
6642                 name: "tests6.dat #50"
6643                 html: "<track><frameset></frameset>"
6644                 errors: 2
6645                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
6646         }, {
6647                 name: "tests6.dat #51"
6648                 html: "</html><frameset></frameset>"
6649                 errors: 3
6650                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
6651         }, {
6652                 name: "tests6.dat #52"
6653                 html: "</body><frameset></frameset>"
6654                 errors: 3
6655                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
6656         }, {
6657                 name: "tests7.dat #1"
6658                 html: "<!doctype html><body><title>X</title>"
6659                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <title>\n|       \"X\"\n"
6660         }, {
6661                 name: "tests7.dat #2"
6662                 html: "<!doctype html><table><title>X</title></table>"
6663                 errors: 1
6664                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <title>\n|       \"X\"\n|     <table>\n"
6665         }, {
6666                 name: "tests7.dat #3"
6667                 html: "<!doctype html><head></head><title>X</title>"
6668                 errors: 1
6669                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <title>\n|       \"X\"\n|   <body>\n"
6670         }, {
6671                 name: "tests7.dat #4"
6672                 html: "<!doctype html></head><title>X</title>"
6673                 errors: 1
6674                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <title>\n|       \"X\"\n|   <body>\n"
6675         }, {
6676                 name: "tests7.dat #5"
6677                 html: "<!doctype html><table><meta></table>"
6678                 errors: 1
6679                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <meta>\n|     <table>\n"
6680         }, {
6681                 name: "tests7.dat #6"
6682                 html: "<!doctype html><table>X<tr><td><table> <meta></table></table>"
6683                 errors: 2
6684                 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"
6685         }, {
6686                 name: "tests7.dat #7"
6687                 html: "<!doctype html><html> <head>"
6688                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
6689         }, {
6690                 name: "tests7.dat #8"
6691                 html: "<!doctype html> <head>"
6692                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
6693         }, {
6694                 name: "tests7.dat #9"
6695                 html: "<!doctype html><table><style> <tr>x </style> </table>"
6696                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <style>\n|         \" <tr>x \"\n|       \" \"\n"
6697         }, {
6698                 name: "tests7.dat #10"
6699                 html: "<!doctype html><table><TBODY><script> <tr>x </script> </table>"
6700                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <script>\n|           \" <tr>x \"\n|         \" \"\n"
6701         }, {
6702                 name: "tests7.dat #11"
6703                 html: "<!doctype html><p><applet><p>X</p></applet>"
6704                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <applet>\n|         <p>\n|           \"X\"\n"
6705         }, {
6706                 name: "tests7.dat #12"
6707                 html: "<!doctype html><p><object type=\"application/x-non-existant-plugin\"><p>X</p></object>"
6708                 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"
6709         }, {
6710                 name: "tests7.dat #13"
6711                 html: "<!doctype html><listing>\nX</listing>"
6712                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <listing>\n|       \"X\"\n"
6713         }, {
6714                 name: "tests7.dat #14"
6715                 html: "<!doctype html><select><input>X"
6716                 errors: 1
6717                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|     <input>\n|     \"X\"\n"
6718         }, {
6719                 name: "tests7.dat #15"
6720                 html: "<!doctype html><select><select>X"
6721                 errors: 1
6722                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|     \"X\"\n"
6723         }, {
6724                 name: "tests7.dat #16"
6725                 html: "<!doctype html><table><input type=hidDEN></table>"
6726                 errors: 1
6727                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <input>\n|         type=\"hidDEN\"\n"
6728         }, {
6729                 name: "tests7.dat #17"
6730                 html: "<!doctype html><table>X<input type=hidDEN></table>"
6731                 errors: 2
6732                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"X\"\n|     <table>\n|       <input>\n|         type=\"hidDEN\"\n"
6733         }, {
6734                 name: "tests7.dat #18"
6735                 html: "<!doctype html><table>  <input type=hidDEN></table>"
6736                 errors: 1
6737                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       \"  \"\n|       <input>\n|         type=\"hidDEN\"\n"
6738         }, {
6739                 name: "tests7.dat #19"
6740                 html: "<!doctype html><table>  <input type='hidDEN'></table>"
6741                 errors: 1
6742                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       \"  \"\n|       <input>\n|         type=\"hidDEN\"\n"
6743         }, {
6744                 name: "tests7.dat #20"
6745                 html: "<!doctype html><table><input type=\" hidden\"><input type=hidDEN></table>"
6746                 errors: 2
6747                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <input>\n|       type=\" hidden\"\n|     <table>\n|       <input>\n|         type=\"hidDEN\"\n"
6748         }, {
6749                 name: "tests7.dat #21"
6750                 html: "<!doctype html><table><select>X<tr>"
6751                 errors: 3
6752                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       \"X\"\n|     <table>\n|       <tbody>\n|         <tr>\n"
6753         }, {
6754                 name: "tests7.dat #22"
6755                 html: "<!doctype html><select>X</select>"
6756                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       \"X\"\n"
6757         }, {
6758                 name: "tests7.dat #23"
6759                 html: "<!DOCTYPE hTmL><html></html>"
6760                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
6761         }, {
6762                 name: "tests7.dat #24"
6763                 html: "<!DOCTYPE HTML><html></html>"
6764                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
6765         }, {
6766                 name: "tests7.dat #25"
6767                 html: "<body>X</body></body>"
6768                 errors: 1,"document-fragment":"html"
6769                 expected: "| <head>\n| <body>\n|   \"X\"\n"
6770         }, {
6771                 name: "tests7.dat #26"
6772                 html: "<div><p>a</x> b"
6773                 errors: 3
6774                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <p>\n|         \"a b\"\n"
6775         }, {
6776                 name: "tests7.dat #27"
6777                 html: "<table><tr><td><code></code> </table>"
6778                 errors: 1
6779                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <code>\n|             \" \"\n"
6780         }, {
6781                 name: "tests7.dat #28"
6782                 html: "<table><b><tr><td>aaa</td></tr>bbb</table>ccc"
6783                 errors: 6
6784                 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"
6785         }, {
6786                 name: "tests7.dat #29"
6787                 html: "A<table><tr> B</tr> B</table>"
6788                 errors: 5
6789                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"A B B\"\n|     <table>\n|       <tbody>\n|         <tr>\n"
6790         }, {
6791                 name: "tests7.dat #30"
6792                 html: "A<table><tr> B</tr> </em>C</table>"
6793                 errors: 6
6794                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"A BC\"\n|     <table>\n|       <tbody>\n|         <tr>\n|         \" \"\n"
6795         }, {
6796                 name: "tests7.dat #31"
6797                 html: "<select><keygen>"
6798                 errors: 2
6799                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|     <keygen>\n"
6800         }, {
6801                 name: "tests8.dat #1"
6802                 html: "<div>\n<div></div>\n</span>x"
6803                 errors: 3
6804                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"\n\"\n|       <div>\n|       \"\nx\"\n"
6805         }, {
6806                 name: "tests8.dat #2"
6807                 html: "<div>x<div></div>\n</span>x"
6808                 errors: 3
6809                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"x\"\n|       <div>\n|       \"\nx\"\n"
6810         }, {
6811                 name: "tests8.dat #3"
6812                 html: "<div>x<div></div>x</span>x"
6813                 errors: 3
6814                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"x\"\n|       <div>\n|       \"xx\"\n"
6815         }, {
6816                 name: "tests8.dat #4"
6817                 html: "<div>x<div></div>y</span>z"
6818                 errors: 3
6819                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"x\"\n|       <div>\n|       \"yz\"\n"
6820         }, {
6821                 name: "tests8.dat #5"
6822                 html: "<table><div>x<div></div>x</span>x"
6823                 errors: 10
6824                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"x\"\n|       <div>\n|       \"xx\"\n|     <table>\n"
6825         }, {
6826                 name: "tests8.dat #6"
6827                 html: "x<table>x"
6828                 errors: 3
6829                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"xx\"\n|     <table>\n"
6830         }, {
6831                 name: "tests8.dat #7"
6832                 html: "x<table><table>x"
6833                 errors: 4
6834                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"x\"\n|     <table>\n|     \"x\"\n|     <table>\n"
6835         }, {
6836                 name: "tests8.dat #8"
6837                 html: "<b>a<div></div><div></b>y"
6838                 errors: 3
6839                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       \"a\"\n|       <div>\n|     <div>\n|       <b>\n|       \"y\"\n"
6840         }, {
6841                 name: "tests8.dat #9"
6842                 html: "<a><div><p></a>"
6843                 errors: 4
6844                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|     <div>\n|       <a>\n|       <p>\n|         <a>\n"
6845         }, {
6846                 name: "tests9.dat #1"
6847                 html: "<!DOCTYPE html><math></math>"
6848                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n"
6849         }, {
6850                 name: "tests9.dat #2"
6851                 html: "<!DOCTYPE html><body><math></math>"
6852                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n"
6853         }, {
6854                 name: "tests9.dat #3"
6855                 html: "<!DOCTYPE html><math><mi>"
6856                 errors: 1
6857                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mi>\n"
6858         }, {
6859                 name: "tests9.dat #4"
6860                 html: "<!DOCTYPE html><math><annotation-xml><svg><u>"
6861                 errors: 2
6862                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         <svg svg>\n|     <u>\n"
6863         }, {
6864                 name: "tests9.dat #5"
6865                 html: "<!DOCTYPE html><body><select><math></math></select>"
6866                 errors: 2
6867                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
6868         }, {
6869                 name: "tests9.dat #6"
6870                 html: "<!DOCTYPE html><body><select><option><math></math></option></select>"
6871                 errors: 2
6872                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n"
6873         }, {
6874                 name: "tests9.dat #7"
6875                 html: "<!DOCTYPE html><body><table><math></math></table>"
6876                 errors: 1
6877                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|     <table>\n"
6878         }, {
6879                 name: "tests9.dat #8"
6880                 html: "<!DOCTYPE html><body><table><math><mi>foo</mi></math></table>"
6881                 errors: 4
6882                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mi>\n|         \"foo\"\n|     <table>\n"
6883         }, {
6884                 name: "tests9.dat #9"
6885                 html: "<!DOCTYPE html><body><table><math><mi>foo</mi><mi>bar</mi></math></table>"
6886                 errors: 7
6887                 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"
6888         }, {
6889                 name: "tests9.dat #10"
6890                 html: "<!DOCTYPE html><body><table><tbody><math><mi>foo</mi><mi>bar</mi></math></tbody></table>"
6891                 errors: 7
6892                 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"
6893         }, {
6894                 name: "tests9.dat #11"
6895                 html: "<!DOCTYPE html><body><table><tbody><tr><math><mi>foo</mi><mi>bar</mi></math></tr></tbody></table>"
6896                 errors: 7
6897                 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"
6898         }, {
6899                 name: "tests9.dat #12"
6900                 html: "<!DOCTYPE html><body><table><tbody><tr><td><math><mi>foo</mi><mi>bar</mi></math></td></tr></tbody></table>"
6901                 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"
6902         }, {
6903                 name: "tests9.dat #13"
6904                 html: "<!DOCTYPE html><body><table><tbody><tr><td><math><mi>foo</mi><mi>bar</mi></math><p>baz</td></tr></tbody></table>"
6905                 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"
6906         }, {
6907                 name: "tests9.dat #14"
6908                 html: "<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi></math><p>baz</caption></table>"
6909                 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"
6910         }, {
6911                 name: "tests9.dat #15"
6912                 html: "<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux"
6913                 errors: 1
6914                 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"
6915         }, {
6916                 name: "tests9.dat #16"
6917                 html: "<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi>baz</table><p>quux"
6918                 errors: 2
6919                 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"
6920         }, {
6921                 name: "tests9.dat #17"
6922                 html: "<!DOCTYPE html><body><table><colgroup><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux"
6923                 errors: 12
6924                 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"
6925         }, {
6926                 name: "tests9.dat #18"
6927                 html: "<!DOCTYPE html><body><table><tr><td><select><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux"
6928                 errors: 7
6929                 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"
6930         }, {
6931                 name: "tests9.dat #19"
6932                 html: "<!DOCTYPE html><body><table><select><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux"
6933                 errors: 8
6934                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       \"foobarbaz\"\n|     <table>\n|     <p>\n|       \"quux\"\n"
6935         }, {
6936                 name: "tests9.dat #20"
6937                 html: "<!DOCTYPE html><body></body></html><math><mi>foo</mi><mi>bar</mi><p>baz"
6938                 errors: 2
6939                 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"
6940         }, {
6941                 name: "tests9.dat #21"
6942                 html: "<!DOCTYPE html><body></body><math><mi>foo</mi><mi>bar</mi><p>baz"
6943                 errors: 2
6944                 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"
6945         }, {
6946                 name: "tests9.dat #22"
6947                 html: "<!DOCTYPE html><frameset><math><mi></mi><mi></mi><p><span>"
6948                 errors: 8
6949                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
6950         }, {
6951                 name: "tests9.dat #23"
6952                 html: "<!DOCTYPE html><frameset></frameset><math><mi></mi><mi></mi><p><span>"
6953                 errors: 7
6954                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
6955         }, {
6956                 name: "tests9.dat #24"
6957                 html: "<!DOCTYPE html><body xlink:href=foo><math xlink:href=foo></math>"
6958                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     xlink:href=\"foo\"\n|     <math math>\n|       xlink href=\"foo\"\n"
6959         }, {
6960                 name: "tests9.dat #25"
6961                 html: "<!DOCTYPE html><body xlink:href=foo xml:lang=en><math><mi xml:lang=en xlink:href=foo></mi></math>"
6962                 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"
6963         }, {
6964                 name: "tests9.dat #26"
6965                 html: "<!DOCTYPE html><body xlink:href=foo xml:lang=en><math><mi xml:lang=en xlink:href=foo /></math>"
6966                 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"
6967         }, {
6968                 name: "tests9.dat #27"
6969                 html: "<!DOCTYPE html><body xlink:href=foo xml:lang=en><math><mi xml:lang=en xlink:href=foo />bar</math>"
6970                 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"
6971         }, {
6972                 name: "tests_innerHTML_1.dat #1"
6973                 html: "<body><span>"
6974                 errors: 2,"document-fragment":"body"
6975                 expected: "| <span>\n"
6976         }, {
6977                 name: "tests_innerHTML_1.dat #2"
6978                 html: "<span><body>"
6979                 errors: 2,"document-fragment":"body"
6980                 expected: "| <span>\n"
6981         }, {
6982                 name: "tests_innerHTML_1.dat #3"
6983                 html: "<span><body>"
6984                 errors: 2,"document-fragment":"div"
6985                 expected: "| <span>\n"
6986         }, {
6987                 name: "tests_innerHTML_1.dat #4"
6988                 html: "<body><span>"
6989                 errors: 1,"document-fragment":"html"
6990                 expected: "| <head>\n| <body>\n|   <span>\n"
6991         }, {
6992                 name: "tests_innerHTML_1.dat #5"
6993                 html: "<frameset><span>"
6994                 errors: 2,"document-fragment":"body"
6995                 expected: "| <span>\n"
6996         }, {
6997                 name: "tests_innerHTML_1.dat #6"
6998                 html: "<span><frameset>"
6999                 errors: 2,"document-fragment":"body"
7000                 expected: "| <span>\n"
7001         }, {
7002                 name: "tests_innerHTML_1.dat #7"
7003                 html: "<span><frameset>"
7004                 errors: 2,"document-fragment":"div"
7005                 expected: "| <span>\n"
7006         }, {
7007                 name: "tests_innerHTML_1.dat #8"
7008                 html: "<frameset><span>"
7009                 errors: 2,"document-fragment":"html"
7010                 expected: "| <head>\n| <frameset>\n"
7011         }, {
7012                 name: "tests_innerHTML_1.dat #9"
7013                 html: "<table><tr>"
7014                 errors: 1,"document-fragment":"table"
7015                 expected: "| <tbody>\n|   <tr>\n"
7016         }, {
7017                 name: "tests_innerHTML_1.dat #10"
7018                 html: "</table><tr>"
7019                 errors: 1,"document-fragment":"table"
7020                 expected: "| <tbody>\n|   <tr>\n"
7021         }, {
7022                 name: "tests_innerHTML_1.dat #11"
7023                 html: "<a>"
7024                 errors: 2,"document-fragment":"table"
7025                 expected: "| <a>\n"
7026         }, {
7027                 name: "tests_innerHTML_1.dat #12"
7028                 html: "<a>"
7029                 errors: 2,"document-fragment":"table"
7030                 expected: "| <a>\n"
7031         }, {
7032                 name: "tests_innerHTML_1.dat #13"
7033                 html: "<a><caption>a"
7034                 errors: 2,"document-fragment":"table"
7035                 expected: "| <a>\n| <caption>\n|   \"a\"\n"
7036         }, {
7037                 name: "tests_innerHTML_1.dat #14"
7038                 html: "<a><colgroup><col>"
7039                 errors: 2,"document-fragment":"table"
7040                 expected: "| <a>\n| <colgroup>\n|   <col>\n"
7041         }, {
7042                 name: "tests_innerHTML_1.dat #15"
7043                 html: "<a><tbody><tr>"
7044                 errors: 1,"document-fragment":"table"
7045                 expected: "| <a>\n| <tbody>\n|   <tr>\n"
7046         }, {
7047                 name: "tests_innerHTML_1.dat #16"
7048                 html: "<a><tfoot><tr>"
7049                 errors: 1,"document-fragment":"table"
7050                 expected: "| <a>\n| <tfoot>\n|   <tr>\n"
7051         }, {
7052                 name: "tests_innerHTML_1.dat #17"
7053                 html: "<a><thead><tr>"
7054                 errors: 1,"document-fragment":"table"
7055                 expected: "| <a>\n| <thead>\n|   <tr>\n"
7056         }, {
7057                 name: "tests_innerHTML_1.dat #18"
7058                 html: "<a><tr>"
7059                 errors: 1,"document-fragment":"table"
7060                 expected: "| <a>\n| <tbody>\n|   <tr>\n"
7061         }, {
7062                 name: "tests_innerHTML_1.dat #19"
7063                 html: "<a><th>"
7064                 errors: 2,"document-fragment":"table"
7065                 expected: "| <a>\n| <tbody>\n|   <tr>\n|     <th>\n"
7066         }, {
7067                 name: "tests_innerHTML_1.dat #20"
7068                 html: "<a><td>"
7069                 errors: 2,"document-fragment":"table"
7070                 expected: "| <a>\n| <tbody>\n|   <tr>\n|     <td>\n"
7071         }, {
7072                 name: "tests_innerHTML_1.dat #21"
7073                 html: "<table></table><tbody>"
7074                 errors: 1,"document-fragment":"caption"
7075                 expected: "| <table>\n"
7076         }, {
7077                 name: "tests_innerHTML_1.dat #22"
7078                 html: "</table><span>"
7079                 errors: 2,"document-fragment":"caption"
7080                 expected: "| <span>\n"
7081         }, {
7082                 name: "tests_innerHTML_1.dat #23"
7083                 html: "<span></table>"
7084                 errors: 2,"document-fragment":"caption"
7085                 expected: "| <span>\n"
7086         }, {
7087                 name: "tests_innerHTML_1.dat #24"
7088                 html: "</caption><span>"
7089                 errors: 2,"document-fragment":"caption"
7090                 expected: "| <span>\n"
7091         }, {
7092                 name: "tests_innerHTML_1.dat #25"
7093                 html: "<span></caption><span>"
7094                 errors: 2,"document-fragment":"caption"
7095                 expected: "| <span>\n|   <span>\n"
7096         }, {
7097                 name: "tests_innerHTML_1.dat #26"
7098                 html: "<span><caption><span>"
7099                 errors: 2,"document-fragment":"caption"
7100                 expected: "| <span>\n|   <span>\n"
7101         }, {
7102                 name: "tests_innerHTML_1.dat #27"
7103                 html: "<span><col><span>"
7104                 errors: 2,"document-fragment":"caption"
7105                 expected: "| <span>\n|   <span>\n"
7106         }, {
7107                 name: "tests_innerHTML_1.dat #28"
7108                 html: "<span><colgroup><span>"
7109                 errors: 2,"document-fragment":"caption"
7110                 expected: "| <span>\n|   <span>\n"
7111         }, {
7112                 name: "tests_innerHTML_1.dat #29"
7113                 html: "<span><html><span>"
7114                 errors: 2,"document-fragment":"caption"
7115                 expected: "| <span>\n|   <span>\n"
7116         }, {
7117                 name: "tests_innerHTML_1.dat #30"
7118                 html: "<span><tbody><span>"
7119                 errors: 2,"document-fragment":"caption"
7120                 expected: "| <span>\n|   <span>\n"
7121         }, {
7122                 name: "tests_innerHTML_1.dat #31"
7123                 html: "<span><td><span>"
7124                 errors: 2,"document-fragment":"caption"
7125                 expected: "| <span>\n|   <span>\n"
7126         }, {
7127                 name: "tests_innerHTML_1.dat #32"
7128                 html: "<span><tfoot><span>"
7129                 errors: 2,"document-fragment":"caption"
7130                 expected: "| <span>\n|   <span>\n"
7131         }, {
7132                 name: "tests_innerHTML_1.dat #33"
7133                 html: "<span><thead><span>"
7134                 errors: 2,"document-fragment":"caption"
7135                 expected: "| <span>\n|   <span>\n"
7136         }, {
7137                 name: "tests_innerHTML_1.dat #34"
7138                 html: "<span><th><span>"
7139                 errors: 2,"document-fragment":"caption"
7140                 expected: "| <span>\n|   <span>\n"
7141         }, {
7142                 name: "tests_innerHTML_1.dat #35"
7143                 html: "<span><tr><span>"
7144                 errors: 2,"document-fragment":"caption"
7145                 expected: "| <span>\n|   <span>\n"
7146         }, {
7147                 name: "tests_innerHTML_1.dat #36"
7148                 html: "<span></table><span>"
7149                 errors: 2,"document-fragment":"caption"
7150                 expected: "| <span>\n|   <span>\n"
7151         }, {
7152                 name: "tests_innerHTML_1.dat #37"
7153                 html: "</colgroup><col>"
7154                 errors: 1,"document-fragment":"colgroup"
7155                 expected: "| <col>\n"
7156         }, {
7157                 name: "tests_innerHTML_1.dat #38"
7158                 html: "<a><col>"
7159                 errors: 1,"document-fragment":"colgroup"
7160                 expected: "| <col>\n"
7161         }, {
7162                 name: "tests_innerHTML_1.dat #39"
7163                 html: "<caption><a>"
7164                 errors: 3,"document-fragment":"tbody"
7165                 expected: "| <a>\n"
7166         }, {
7167                 name: "tests_innerHTML_1.dat #40"
7168                 html: "<col><a>"
7169                 errors: 3,"document-fragment":"tbody"
7170                 expected: "| <a>\n"
7171         }, {
7172                 name: "tests_innerHTML_1.dat #41"
7173                 html: "<colgroup><a>"
7174                 errors: 3,"document-fragment":"tbody"
7175                 expected: "| <a>\n"
7176         }, {
7177                 name: "tests_innerHTML_1.dat #42"
7178                 html: "<tbody><a>"
7179                 errors: 3,"document-fragment":"tbody"
7180                 expected: "| <a>\n"
7181         }, {
7182                 name: "tests_innerHTML_1.dat #43"
7183                 html: "<tfoot><a>"
7184                 errors: 3,"document-fragment":"tbody"
7185                 expected: "| <a>\n"
7186         }, {
7187                 name: "tests_innerHTML_1.dat #44"
7188                 html: "<thead><a>"
7189                 errors: 3,"document-fragment":"tbody"
7190                 expected: "| <a>\n"
7191         }, {
7192                 name: "tests_innerHTML_1.dat #45"
7193                 html: "</table><a>"
7194                 errors: 3,"document-fragment":"tbody"
7195                 expected: "| <a>\n"
7196         }, {
7197                 name: "tests_innerHTML_1.dat #46"
7198                 html: "<a><tr>"
7199                 errors: 1,"document-fragment":"tbody"
7200                 expected: "| <a>\n| <tr>\n"
7201         }, {
7202                 name: "tests_innerHTML_1.dat #47"
7203                 html: "<a><td>"
7204                 errors: 2,"document-fragment":"tbody"
7205                 expected: "| <a>\n| <tr>\n|   <td>\n"
7206         }, {
7207                 name: "tests_innerHTML_1.dat #48"
7208                 html: "<a><td>"
7209                 errors: 2,"document-fragment":"tbody"
7210                 expected: "| <a>\n| <tr>\n|   <td>\n"
7211         }, {
7212                 name: "tests_innerHTML_1.dat #49"
7213                 html: "<a><td>"
7214                 errors: 2,"document-fragment":"tbody"
7215                 expected: "| <a>\n| <tr>\n|   <td>\n"
7216         }, {
7217                 name: "tests_innerHTML_1.dat #50"
7218                 html: "<td><table><tbody><a><tr>"
7219                 errors: 3,"document-fragment":"tbody"
7220                 expected: "| <tr>\n|   <td>\n|     <a>\n|     <table>\n|       <tbody>\n|         <tr>\n"
7221         }, {
7222                 name: "tests_innerHTML_1.dat #51"
7223                 html: "</tr><td>"
7224                 errors: 1,"document-fragment":"tr"
7225                 expected: "| <td>\n"
7226         }, {
7227                 name: "tests_innerHTML_1.dat #52"
7228                 html: "<td><table><a><tr></tr><tr>"
7229                 errors: 2,"document-fragment":"tr"
7230                 expected: "| <td>\n|   <a>\n|   <table>\n|     <tbody>\n|       <tr>\n|       <tr>\n"
7231         }, {
7232                 name: "tests_innerHTML_1.dat #53"
7233                 html: "<caption><td>"
7234                 errors: 1,"document-fragment":"tr"
7235                 expected: "| <td>\n"
7236         }, {
7237                 name: "tests_innerHTML_1.dat #54"
7238                 html: "<col><td>"
7239                 errors: 1,"document-fragment":"tr"
7240                 expected: "| <td>\n"
7241         }, {
7242                 name: "tests_innerHTML_1.dat #55"
7243                 html: "<colgroup><td>"
7244                 errors: 1,"document-fragment":"tr"
7245                 expected: "| <td>\n"
7246         }, {
7247                 name: "tests_innerHTML_1.dat #56"
7248                 html: "<tbody><td>"
7249                 errors: 1,"document-fragment":"tr"
7250                 expected: "| <td>\n"
7251         }, {
7252                 name: "tests_innerHTML_1.dat #57"
7253                 html: "<tfoot><td>"
7254                 errors: 1,"document-fragment":"tr"
7255                 expected: "| <td>\n"
7256         }, {
7257                 name: "tests_innerHTML_1.dat #58"
7258                 html: "<thead><td>"
7259                 errors: 1,"document-fragment":"tr"
7260                 expected: "| <td>\n"
7261         }, {
7262                 name: "tests_innerHTML_1.dat #59"
7263                 html: "<tr><td>"
7264                 errors: 1,"document-fragment":"tr"
7265                 expected: "| <td>\n"
7266         }, {
7267                 name: "tests_innerHTML_1.dat #60"
7268                 html: "</table><td>"
7269                 errors: 1,"document-fragment":"tr"
7270                 expected: "| <td>\n"
7271         }, {
7272                 name: "tests_innerHTML_1.dat #61"
7273                 html: "<td><table></table><td>"
7274                 fragment: "tr"
7275                 expected: "| <td>\n|   <table>\n| <td>\n"
7276         }, {
7277                 name: "tests_innerHTML_1.dat #62"
7278                 html: "<td><table></table><td>"
7279                 fragment: "tr"
7280                 expected: "| <td>\n|   <table>\n| <td>\n"
7281         }, {
7282                 name: "tests_innerHTML_1.dat #63"
7283                 html: "<caption><a>"
7284                 errors: 2,"document-fragment":"td"
7285                 expected: "| <a>\n"
7286         }, {
7287                 name: "tests_innerHTML_1.dat #64"
7288                 html: "<col><a>"
7289                 errors: 2,"document-fragment":"td"
7290                 expected: "| <a>\n"
7291         }, {
7292                 name: "tests_innerHTML_1.dat #65"
7293                 html: "<colgroup><a>"
7294                 errors: 2,"document-fragment":"td"
7295                 expected: "| <a>\n"
7296         }, {
7297                 name: "tests_innerHTML_1.dat #66"
7298                 html: "<tbody><a>"
7299                 errors: 2,"document-fragment":"td"
7300                 expected: "| <a>\n"
7301         }, {
7302                 name: "tests_innerHTML_1.dat #67"
7303                 html: "<tfoot><a>"
7304                 errors: 2,"document-fragment":"td"
7305                 expected: "| <a>\n"
7306         }, {
7307                 name: "tests_innerHTML_1.dat #68"
7308                 html: "<th><a>"
7309                 errors: 2,"document-fragment":"td"
7310                 expected: "| <a>\n"
7311         }, {
7312                 name: "tests_innerHTML_1.dat #69"
7313                 html: "<thead><a>"
7314                 errors: 2,"document-fragment":"td"
7315                 expected: "| <a>\n"
7316         }, {
7317                 name: "tests_innerHTML_1.dat #70"
7318                 html: "<tr><a>"
7319                 errors: 2,"document-fragment":"td"
7320                 expected: "| <a>\n"
7321         }, {
7322                 name: "tests_innerHTML_1.dat #71"
7323                 html: "</table><a>"
7324                 errors: 2,"document-fragment":"td"
7325                 expected: "| <a>\n"
7326         }, {
7327                 name: "tests_innerHTML_1.dat #72"
7328                 html: "</tbody><a>"
7329                 errors: 2,"document-fragment":"td"
7330                 expected: "| <a>\n"
7331         }, {
7332                 name: "tests_innerHTML_1.dat #73"
7333                 html: "</td><a>"
7334                 errors: 2,"document-fragment":"td"
7335                 expected: "| <a>\n"
7336         }, {
7337                 name: "tests_innerHTML_1.dat #74"
7338                 html: "</tfoot><a>"
7339                 errors: 2,"document-fragment":"td"
7340                 expected: "| <a>\n"
7341         }, {
7342                 name: "tests_innerHTML_1.dat #75"
7343                 html: "</thead><a>"
7344                 errors: 2,"document-fragment":"td"
7345                 expected: "| <a>\n"
7346         }, {
7347                 name: "tests_innerHTML_1.dat #76"
7348                 html: "</th><a>"
7349                 errors: 2,"document-fragment":"td"
7350                 expected: "| <a>\n"
7351         }, {
7352                 name: "tests_innerHTML_1.dat #77"
7353                 html: "</tr><a>"
7354                 errors: 2,"document-fragment":"td"
7355                 expected: "| <a>\n"
7356         }, {
7357                 name: "tests_innerHTML_1.dat #78"
7358                 html: "<table><td><td>"
7359                 errors: 2,"document-fragment":"td"
7360                 expected: "| <table>\n|   <tbody>\n|     <tr>\n|       <td>\n|       <td>\n"
7361         }, {
7362                 name: "tests_innerHTML_1.dat #79"
7363                 html: "</select><option>"
7364                 errors: 2,"document-fragment":"select"
7365                 expected: "| <option>\n"
7366         }, {
7367                 name: "tests_innerHTML_1.dat #80"
7368                 html: "<input><option>"
7369                 errors: 2,"document-fragment":"select"
7370                 expected: "| <option>\n"
7371         }, {
7372                 name: "tests_innerHTML_1.dat #81"
7373                 html: "<keygen><option>"
7374                 errors: 2,"document-fragment":"select"
7375                 expected: "| <option>\n"
7376         }, {
7377                 name: "tests_innerHTML_1.dat #82"
7378                 html: "<textarea><option>"
7379                 errors: 2,"document-fragment":"select"
7380                 expected: "| <option>\n"
7381         }, {
7382                 name: "tests_innerHTML_1.dat #83"
7383                 html: "</html><!--abc-->"
7384                 errors: 1,"document-fragment":"html"
7385                 expected: "| <head>\n| <body>\n| <!-- abc -->\n"
7386         }, {
7387                 name: "tests_innerHTML_1.dat #84"
7388                 html: "</frameset><frame>"
7389                 errors: 1,"document-fragment":"frameset"
7390                 expected: "| <frame>\n"
7391         }, {
7392                 name: "tests_innerHTML_1.dat #85"
7393                 html: ""
7394                 fragment: "html"
7395                 expected: "| <head>\n| <body>\n"
7396         }, {
7397                 name: "tricky01.dat #1"
7398                 html: "<b><p>Bold </b> Not bold</p>\nAlso not bold."
7399                 errors: 2
7400                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|     <p>\n|       <b>\n|         \"Bold \"\n|       \" Not bold\"\n|     \"\nAlso not bold.\"\n"
7401         }, {
7402                 name: "tricky01.dat #2"
7403                 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"
7404                 errors: 6
7405                 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"
7406         }, {
7407                 name: "tricky01.dat #3"
7408                 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>"
7409                 errors: 5
7410                 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"
7411         }, {
7412                 name: "tricky01.dat #4"
7413                 html: "<html>\n<dl>\n<dt><b>Boo\n<dd>Goo?\n</dl>\n</html>"
7414                 errors: 4
7415                 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"
7416         }, {
7417                 name: "tricky01.dat #5"
7418                 html: "<html><body>\n<label><a><div>Hello<div>World</div></a></label>  \n</body></html>"
7419                 errors: 4
7420                 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"
7421         }, {
7422                 name: "tricky01.dat #6"
7423                 html: "<table><center> <font>a</center> <img> <tr><td> </td> </tr> </table>"
7424                 errors: 9
7425                 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"
7426         }, {
7427                 name: "tricky01.dat #7"
7428                 html: "<table><tr><p><a><p>You should see this text."
7429                 errors: 31
7430                 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"
7431         }, {
7432                 name: "tricky01.dat #8"
7433                 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."
7434                 errors: 10
7435                 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"
7436         }, {
7437                 name: "tricky01.dat #9"
7438                 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>"
7439                 errors: 4
7440                 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"
7441         }, {
7442                 name: "webkit01.dat #1"
7443                 html: "Test"
7444                 errors: 1
7445                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"Test\"\n"
7446         }, {
7447                 name: "webkit01.dat #2"
7448                 html: "<div></div>"
7449                 errors: 1
7450                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n"
7451         }, {
7452                 name: "webkit01.dat #3"
7453                 html: "<div>Test</div>"
7454                 errors: 1
7455                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"Test\"\n"
7456         }, {
7457                 name: "webkit01.dat #4"
7458                 html: "<di"
7459                 errors: 2
7460                 expected: "| <html>\n|   <head>\n|   <body>\n"
7461         }, {
7462                 name: "webkit01.dat #5"
7463                 html: "<div>Hello</div>\n<script>\nconsole.log(\"PASS\");\n</script>\n<div>Bye</div>"
7464                 errors: 1
7465                 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"
7466         }, {
7467                 name: "webkit01.dat #6"
7468                 html: "<div foo=\"bar\">Hello</div>"
7469                 errors: 1
7470                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       foo=\"bar\"\n|       \"Hello\"\n"
7471         }, {
7472                 name: "webkit01.dat #7"
7473                 html: "<div>Hello</div>\n<script>\nconsole.log(\"FOO<span>BAR</span>BAZ\");\n</script>\n<div>Bye</div>"
7474                 errors: 1
7475                 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"
7476         }, {
7477                 name: "webkit01.dat #8"
7478                 html: "<foo bar=\"baz\"></foo><potato quack=\"duck\"></potato>"
7479                 errors: 1
7480                 expected: "| <html>\n|   <head>\n|   <body>\n|     <foo>\n|       bar=\"baz\"\n|     <potato>\n|       quack=\"duck\"\n"
7481         }, {
7482                 name: "webkit01.dat #9"
7483                 html: "<foo bar=\"baz\"><potato quack=\"duck\"></potato></foo>"
7484                 errors: 1
7485                 expected: "| <html>\n|   <head>\n|   <body>\n|     <foo>\n|       bar=\"baz\"\n|       <potato>\n|         quack=\"duck\"\n"
7486         }, {
7487                 name: "webkit01.dat #10"
7488                 html: "<foo></foo bar=\"baz\"><potato></potato quack=\"duck\">"
7489                 errors: 3
7490                 expected: "| <html>\n|   <head>\n|   <body>\n|     <foo>\n|     <potato>\n"
7491         }, {
7492                 name: "webkit01.dat #11"
7493                 html: "</ tttt>"
7494                 errors: 2
7495                 expected: "| <!--  tttt -->\n| <html>\n|   <head>\n|   <body>\n"
7496         }, {
7497                 name: "webkit01.dat #12"
7498                 html: "<div FOO ><img><img></div>"
7499                 errors: 1
7500                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       foo=\"\"\n|       <img>\n|       <img>\n"
7501         }, {
7502                 name: "webkit01.dat #13"
7503                 html: "<p>Test</p<p>Test2</p>"
7504                 errors: 2
7505                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       \"TestTest2\"\n"
7506         }, {
7507                 name: "webkit01.dat #14"
7508                 html: "<rdar://problem/6869687>"
7509                 errors: 5
7510                 expected: "| <html>\n|   <head>\n|   <body>\n|     <rdar:>\n|       6869687=\"\"\n|       problem=\"\"\n"
7511         }, {
7512                 name: "webkit01.dat #15"
7513                 html: "<A>test< /A>"
7514                 errors: 3
7515                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       \"test< /A>\"\n"
7516         }, {
7517                 name: "webkit01.dat #16"
7518                 html: "&lt;"
7519                 errors: 1
7520                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"<\"\n"
7521         }, {
7522                 name: "webkit01.dat #17"
7523                 html: "<body foo='bar'><body foo='baz' yo='mama'>"
7524                 errors: 2
7525                 expected: "| <html>\n|   <head>\n|   <body>\n|     foo=\"bar\"\n|     yo=\"mama\"\n"
7526         }, {
7527                 name: "webkit01.dat #18"
7528                 html: "<body></br foo=\"bar\"></body>"
7529                 errors: 3
7530                 expected: "| <html>\n|   <head>\n|   <body>\n|     <br>\n"
7531         }, {
7532                 name: "webkit01.dat #19"
7533                 html: "<bdy><br foo=\"bar\"></body>"
7534                 errors: 2
7535                 expected: "| <html>\n|   <head>\n|   <body>\n|     <bdy>\n|       <br>\n|         foo=\"bar\"\n"
7536         }, {
7537                 name: "webkit01.dat #20"
7538                 html: "<body></body></br foo=\"bar\">"
7539                 errors: 4
7540                 expected: "| <html>\n|   <head>\n|   <body>\n|     <br>\n"
7541         }, {
7542                 name: "webkit01.dat #21"
7543                 html: "<bdy></body><br foo=\"bar\">"
7544                 errors: 4
7545                 expected: "| <html>\n|   <head>\n|   <body>\n|     <bdy>\n|       <br>\n|         foo=\"bar\"\n"
7546         }, {
7547                 name: "webkit01.dat #22"
7548                 html: "<html><body></body></html><!-- Hi there -->"
7549                 errors: 1
7550                 expected: "| <html>\n|   <head>\n|   <body>\n| <!--  Hi there  -->\n"
7551         }, {
7552                 name: "webkit01.dat #23"
7553                 html: "<html><body></body></html>x<!-- Hi there -->"
7554                 errors: 2
7555                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"x\"\n|     <!--  Hi there  -->\n"
7556         }, {
7557                 name: "webkit01.dat #24"
7558                 html: "<html><body></body></html>x<!-- Hi there --></html><!-- Again -->"
7559                 errors: 2
7560                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"x\"\n|     <!--  Hi there  -->\n| <!--  Again  -->\n"
7561         }, {
7562                 name: "webkit01.dat #25"
7563                 html: "<html><body></body></html>x<!-- Hi there --></body></html><!-- Again -->"
7564                 errors: 2
7565                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"x\"\n|     <!--  Hi there  -->\n| <!--  Again  -->\n"
7566         }, {
7567                 name: "webkit01.dat #26"
7568                 html: "<html><body><ruby><div><rp>xx</rp></div></ruby></body></html>"
7569                 errors: 2
7570                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <div>\n|         <rp>\n|           \"xx\"\n"
7571         }, {
7572                 name: "webkit01.dat #27"
7573                 html: "<html><body><ruby><div><rt>xx</rt></div></ruby></body></html>"
7574                 errors: 2
7575                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <div>\n|         <rt>\n|           \"xx\"\n"
7576         }, {
7577                 name: "webkit01.dat #28"
7578                 html: "<html><frameset><!--1--><noframes>A</noframes><!--2--></frameset><!--3--><noframes>B</noframes><!--4--></html><!--5--><noframes>C</noframes><!--6-->"
7579                 errors: 1
7580                 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"
7581         }, {
7582                 name: "webkit01.dat #29"
7583                 html: "<select><option>A<select><option>B<select><option>C<select><option>D<select><option>E<select><option>F<select><option>G<select>"
7584                 errors: 6
7585                 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"
7586         }, {
7587                 name: "webkit01.dat #30"
7588                 html: "<dd><dd><dt><dt><dd><li><li>"
7589                 errors: 1
7590                 expected: "| <html>\n|   <head>\n|   <body>\n|     <dd>\n|     <dd>\n|     <dt>\n|     <dt>\n|     <dd>\n|       <li>\n|       <li>\n"
7591         }, {
7592                 name: "webkit01.dat #31"
7593                 html: "<div><b></div><div><nobr>a<nobr>"
7594                 errors: 4
7595                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <b>\n|     <div>\n|       <b>\n|         <nobr>\n|           \"a\"\n|         <nobr>\n"
7596         }, {
7597                 name: "webkit01.dat #32"
7598                 html: "<head></head>\n<body></body>"
7599                 errors: 1
7600                 expected: "| <html>\n|   <head>\n|   \"\n\"\n|   <body>\n"
7601         }, {
7602                 name: "webkit01.dat #33"
7603                 html: "<head></head> <style></style>ddd"
7604                 errors: 2
7605                 expected: "| <html>\n|   <head>\n|     <style>\n|   \" \"\n|   <body>\n|     \"ddd\"\n"
7606         }, {
7607                 name: "webkit01.dat #34"
7608                 html: "<kbd><table></kbd><col><select><tr>"
7609                 errors: 6
7610                 expected: "| <html>\n|   <head>\n|   <body>\n|     <kbd>\n|       <select>\n|       <table>\n|         <colgroup>\n|           <col>\n|         <tbody>\n|           <tr>\n"
7611         }, {
7612                 name: "webkit01.dat #35"
7613                 html: "<kbd><table></kbd><col><select><tr></table><div>"
7614                 errors: 6
7615                 expected: "| <html>\n|   <head>\n|   <body>\n|     <kbd>\n|       <select>\n|       <table>\n|         <colgroup>\n|           <col>\n|         <tbody>\n|           <tr>\n|       <div>\n"
7616         }, {
7617                 name: "webkit01.dat #36"
7618                 html: "<a><li><style></style><title></title></a>"
7619                 errors: 2
7620                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|     <li>\n|       <a>\n|         <style>\n|         <title>\n"
7621         }, {
7622                 name: "webkit01.dat #37"
7623                 html: "<font></p><p><meta><title></title></font>"
7624                 errors: 3
7625                 expected: "| <html>\n|   <head>\n|   <body>\n|     <font>\n|       <p>\n|     <p>\n|       <font>\n|         <meta>\n|         <title>\n"
7626         }, {
7627                 name: "webkit01.dat #38"
7628                 html: "<a><center><title></title><a>"
7629                 errors: 4
7630                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|     <center>\n|       <a>\n|         <title>\n|       <a>\n"
7631         }, {
7632                 name: "webkit01.dat #39"
7633                 html: "<svg><title><div>"
7634                 errors: 2
7635                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg title>\n|         <div>\n"
7636         }, {
7637                 name: "webkit01.dat #40"
7638                 html: "<svg><title><rect><div>"
7639                 errors: 2
7640                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg title>\n|         <rect>\n|           <div>\n"
7641         }, {
7642                 name: "webkit01.dat #41"
7643                 html: "<svg><title><svg><div>"
7644                 errors: 3
7645                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg title>\n|         <svg svg>\n|         <div>\n"
7646         }, {
7647                 name: "webkit01.dat #42"
7648                 html: "<img <=\"\" FAIL>"
7649                 errors: 2
7650                 expected: "| <html>\n|   <head>\n|   <body>\n|     <img>\n|       <=\"\"\n|       fail=\"\"\n"
7651         }, {
7652                 name: "webkit01.dat #43"
7653                 html: "<ul><li><div id='foo'/>A</li><li>B<div>C</div></li></ul>"
7654                 errors: 3
7655                 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"
7656         }, {
7657                 name: "webkit01.dat #44"
7658                 html: "<svg><em><desc></em>"
7659                 errors: 3
7660                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|     <em>\n|       <desc>\n"
7661         }, {
7662                 name: "webkit01.dat #45"
7663                 html: "<table><tr><td><svg><desc><td></desc><circle>"
7664                 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"
7665         }, {
7666                 name: "webkit01.dat #46"
7667                 html: "<svg><tfoot></mi><td>"
7668                 errors: 4
7669                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg tfoot>\n|         <svg td>\n"
7670         }, {
7671                 name: "webkit01.dat #47"
7672                 html: "<math><mrow><mrow><mn>1</mn></mrow><mi>a</mi></mrow></math>"
7673                 errors: 1
7674                 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"
7675         }, {
7676                 name: "webkit01.dat #48"
7677                 html: "<!doctype html><input type=\"hidden\"><frameset>"
7678                 errors: 2
7679                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
7680         }, {
7681                 name: "webkit01.dat #49"
7682                 html: "<!doctype html><input type=\"button\"><frameset>"
7683                 errors: 1
7684                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <input>\n|       type=\"button\"\n"
7685         }, {
7686                 name: "webkit02.dat #1"
7687                 html: "<foo bar=qux/>"
7688                 errors: 2
7689                 expected: "| <html>\n|   <head>\n|   <body>\n|     <foo>\n|       bar=\"qux/\"\n"
7690         }, {
7691                 name: "webkit02.dat #2"
7692                 html: "<p id=\"status\"><noscript><strong>A</strong></noscript><span>B</span></p>"
7693                 errors: 1
7694                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       id=\"status\"\n|       <noscript>\n|         \"<strong>A</strong>\"\n|       <span>\n|         \"B\"\n"
7695         }, {
7696                 name: "webkit02.dat #3"
7697                 html: "<p id=\"status\"><noscript><strong>A</strong></noscript><span>B</span></p>"
7698                 errors: 1
7699                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       id=\"status\"\n|       <noscript>\n|         <strong>\n|           \"A\"\n|       <span>\n|         \"B\"\n"
7700         }, {
7701                 name: "webkit02.dat #4"
7702                 html: "<div><sarcasm><div></div></sarcasm></div>"
7703                 errors: 1
7704                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <sarcasm>\n|         <div>\n"
7705         }, {
7706                 name: "webkit02.dat #5"
7707                 html: "<html><body><img src=\"\" border=\"0\" alt=\"><div>A</div></body></html>"
7708                 errors: 2
7709                 expected: "| <html>\n|   <head>\n|   <body>\n"
7710         }, {
7711                 name: "webkit02.dat #6"
7712                 html: "<table><td></tbody>A"
7713                 errors: 4
7714                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"A\"\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n"
7715         }, {
7716                 name: "webkit02.dat #7"
7717                 html: "<table><td></thead>A"
7718                 errors: 4
7719                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             \"A\"\n"
7720         }, {
7721                 name: "webkit02.dat #8"
7722                 html: "<table><td></tfoot>A"
7723                 errors: 4
7724                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             \"A\"\n"
7725         }, {
7726                 name: "webkit02.dat #9"
7727                 html: "<table><thead><td></tbody>A"
7728                 errors: 4
7729                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <thead>\n|         <tr>\n|           <td>\n|             \"A\"\n"
7730         }, {
7731                 name: "webkit02.dat #10"
7732                 html: "<legend>test</legend>"
7733                 expected: "| <html>\n|   <head>\n|   <body>\n|     <legend>\n|       \"test\"\n"
7734         }, {
7735                 name: "webkit02.dat #11"
7736                 html: "<table><input>"
7737                 expected: "| <html>\n|   <head>\n|   <body>\n|     <input>\n|     <table>\n"
7738         }, {
7739                 name: "webkit02.dat #12"
7740                 html: "<b><em><foo><foo><aside></b>"
7741                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <em>\n|         <foo>\n|           <foo>\n|     <em>\n|       <aside>\n|         <b>\n"
7742         }, {
7743                 name: "webkit02.dat #13"
7744                 html: "<b><em><foo><foo><aside></b></em>"
7745                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <em>\n|         <foo>\n|           <foo>\n|     <em>\n|     <aside>\n|       <em>\n|         <b>\n"
7746         }, {
7747                 name: "webkit02.dat #14"
7748                 html: "<b><em><foo><foo><foo><aside></b>"
7749                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <em>\n|         <foo>\n|           <foo>\n|             <foo>\n|     <aside>\n|       <b>\n"
7750         }, {
7751                 name: "webkit02.dat #15"
7752                 html: "<b><em><foo><foo><foo><aside></b></em>"
7753                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <em>\n|         <foo>\n|           <foo>\n|             <foo>\n|     <aside>\n|       <b>\n"
7754         }, {
7755                 name: "webkit02.dat #16"
7756                 html: "<b><em><foo><foo><foo><foo><foo><foo><foo><foo><foo><foo><aside></b></em>"
7757                 fragment: "div"
7758                 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"
7759         }, {
7760                 name: "webkit02.dat #17"
7761                 html: "<b><em><foo><foob><foob><foob><foob><fooc><fooc><fooc><fooc><food><aside></b></em>"
7762                 fragment: "div"
7763                 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"
7764         }, {
7765                 name: "webkit02.dat #18"
7766                 html: "<isindex action=\"x\">"
7767                 fragment: "table"
7768                 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"
7769         }, {
7770                 name: "webkit02.dat #19"
7771                 html: "<option><XH<optgroup></optgroup>"
7772                 fragment: "select"
7773                 expected: "| <option>\n"
7774         }, {
7775                 name: "webkit02.dat #20"
7776                 html: "<svg><foreignObject><div>foo</div><plaintext></foreignObject></svg><div>bar</div>"
7777                 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"
7778         }, {
7779                 name: "webkit02.dat #21"
7780                 html: "<svg><foreignObject></foreignObject><title></svg>foo"
7781                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg foreignObject>\n|       <svg title>\n|     \"foo\"\n"
7782         }, {
7783                 name: "webkit02.dat #22"
7784                 html: "</foreignObject><plaintext><div>foo</div>"
7785                 expected: "| <html>\n|   <head>\n|   <body>\n|     <plaintext>\n|       \"<div>foo</div>\"\n"
7786         }
7787 ]
7788
7789 if window?.wheic?
7790         wheic = window.wheic
7791 else
7792         wheic = require './wheic.js'
7793
7794 serialize_els = (els, prefix = '| ') ->
7795         ret = ''
7796         for el in els
7797                 switch el.type
7798                         when wheic.TYPE_TAG
7799                                 ret += "#{prefix}<"
7800                                 if el.namespace is wheic.NS_MATHML
7801                                         ret += "math "
7802                                 if el.namespace is wheic.NS_SVG
7803                                         ret += "svg "
7804                                 ret += "#{el.name}>\n"
7805                                 attr_keys = []
7806                                 for k of el.attrs
7807                                         attr_keys.push k
7808                                 attr_keys.sort() # TODO this should be "lexicographically by UTF-16 code unit"
7809                                 for k in attr_keys
7810                                         ret += "#{prefix}  #{k}=\"#{el.attrs[k]}\"\n"
7811                                 if el.name is 'template' # ?check ns
7812                                         ret += "#{prefix}  content\n"
7813                                         ret += serialize_els el.children, "#{prefix}    "
7814                                 else
7815                                         ret += serialize_els el.children, "#{prefix}  "
7816                         when wheic.TYPE_TEXT
7817                                 ret += "#{prefix}\"#{el.text}\"\n"
7818                         when wheic.TYPE_COMMENT
7819                                 ret += "#{prefix}<!-- #{el.text} -->\n"
7820                         when wheic.TYPE_DOCTYPE
7821                                 ret += "#{prefix}<!DOCTYPE #{el.name}"
7822                                 if (el.public_identifier? and el.public_identifier.length > 0) or (el.system_identifier? and el.system_identifier.length > 0)
7823                                         ret += " \"#{el.public_identifier ? ''}\""
7824                                         ret += " \"#{el.system_identifier ? ''}\""
7825                                 ret += ">\n"
7826                         else
7827                                 ret += "#{prefix}UNKNOWN TAG TYPE #{el.type}"
7828         return ret
7829
7830 test_results = passed: 0, failed: 0, fragment: 0
7831 test_parser = (args) ->
7832         if args.fragment? # hide fragment tests for now
7833                 test_results.fragment += 1
7834                 return
7835         wheic.debug_log_reset()
7836         parse_errors = []
7837         errors_cb = (i) ->
7838                 parse_errors.push i
7839         prev_node_id = 0 # reset counter
7840         parsed = wheic.parse_html args.html, errors_cb
7841         serialized = serialize_els parsed
7842         if serialized isnt args.expected
7843                 #wheic.debug_log_each (str) ->
7844                 #       console.log str
7845                 console.log "FAILED: \"#{args.name}\""
7846                 console.log "      Input: #{args.html}"
7847                 if args.fragment?
7848                         console.log "   Fragment: #{args.fragment}"
7849                 console.log "    Correct: #{args.expected}"
7850                 console.log "     Output: #{serialized}"
7851                 if parse_errors.length > 0
7852                         console.log " parse errs: #{JSON.stringify parse_errors}"
7853                 else
7854                         console.log "   No parse errors"
7855                 test_results.failed += 1
7856         else
7857                 console.log "passed \"#{args.name}\""
7858                 test_results.passed += 1
7859 test_summary = ->
7860         console.log "Tests passed: #{test_results.passed}, Failed: #{test_results.failed}, ignored: #{test_results.fragment}"
7861
7862
7863 next_test = 0
7864 run_tests_and_breathe = ->
7865         start_time = new Date()
7866         loop
7867                 if next_test >= tests.length
7868                         test_summary()
7869                         return
7870                 test_parser tests[next_test]
7871                 next_test += 1
7872                 now = new Date()
7873                 if now - start_time > 100 # miliseconds
7874                         break
7875         setTimeout run_tests_and_breathe, 1
7876 run_tests_and_breathe()