JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
289f46dc33c6c758c63b51822faaf7758b26a5f4
[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                 scripting: true
3478                 errors: 1
3479                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noscript>\n|       \"<!--<noscript>\"\n|   <body>\n|     \"-->\"\n"
3480         }, {
3481                 name: "tests16.dat #85"
3482                 html: "<!doctype html><noscript><!--<noscript></noscript>--></noscript>"
3483                 scripting: false
3484                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noscript>\n|       <!-- <noscript></noscript> -->\n|   <body>\n"
3485         }, {
3486                 name: "tests16.dat #86"
3487                 html: "<!doctype html><noscript><!--</noscript>X<noscript>--></noscript>"
3488                 scripting: true
3489                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noscript>\n|       \"<!--\"\n|   <body>\n|     \"X\"\n|     <noscript>\n|       \"-->\"\n"
3490         }, {
3491                 name: "tests16.dat #87"
3492                 html: "<!doctype html><noscript><!--</noscript>X<noscript>--></noscript>"
3493                 scripting: false
3494                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noscript>\n|       <!-- </noscript>X<noscript> -->\n|   <body>\n"
3495         }, {
3496                 name: "tests16.dat #88"
3497                 html: "<!doctype html><noscript><iframe></noscript>X"
3498                 scripting: true
3499                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noscript>\n|       \"<iframe>\"\n|   <body>\n|     \"X\"\n"
3500         }, {
3501                 name: "tests16.dat #89"
3502                 html: "<!doctype html><noscript><iframe></noscript>X"
3503                 scripting: false
3504                 errors: 2
3505                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noscript>\n|   <body>\n|     <iframe>\n|       \"</noscript>X\"\n"
3506         }, {
3507                 name: "tests16.dat #90"
3508                 html: "<!doctype html><noframes><!--<noframes></noframes>--></noframes>"
3509                 errors: 1
3510                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noframes>\n|       \"<!--<noframes>\"\n|   <body>\n|     \"-->\"\n"
3511         }, {
3512                 name: "tests16.dat #91"
3513                 html: "<!doctype html><noframes><body><script><!--...</script></body></noframes></html>"
3514                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <noframes>\n|       \"<body><script><!--...</script></body>\"\n|   <body>\n"
3515         }, {
3516                 name: "tests16.dat #92"
3517                 html: "<!doctype html><textarea><!--<textarea></textarea>--></textarea>"
3518                 errors: 1
3519                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"<!--<textarea>\"\n|     \"-->\"\n"
3520         }, {
3521                 name: "tests16.dat #93"
3522                 html: "<!doctype html><textarea>&lt;/textarea></textarea>"
3523                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"</textarea>\"\n"
3524         }, {
3525                 name: "tests16.dat #94"
3526                 html: "<!doctype html><textarea>&lt;</textarea>"
3527                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"<\"\n"
3528         }, {
3529                 name: "tests16.dat #95"
3530                 html: "<!doctype html><textarea>a&lt;b</textarea>"
3531                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"a<b\"\n"
3532         }, {
3533                 name: "tests16.dat #96"
3534                 html: "<!doctype html><iframe><!--<iframe></iframe>--></iframe>"
3535                 errors: 1
3536                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <iframe>\n|       \"<!--<iframe>\"\n|     \"-->\"\n"
3537         }, {
3538                 name: "tests16.dat #97"
3539                 html: "<!doctype html><iframe>...<!--X->...<!--/X->...</iframe>"
3540                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <iframe>\n|       \"...<!--X->...<!--/X->...\"\n"
3541         }, {
3542                 name: "tests16.dat #98"
3543                 html: "<!doctype html><xmp><!--<xmp></xmp>--></xmp>"
3544                 errors: 1
3545                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <xmp>\n|       \"<!--<xmp>\"\n|     \"-->\"\n"
3546         }, {
3547                 name: "tests16.dat #99"
3548                 html: "<!doctype html><noembed><!--<noembed></noembed>--></noembed>"
3549                 errors: 1
3550                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <noembed>\n|       \"<!--<noembed>\"\n|     \"-->\"\n"
3551         }, {
3552                 name: "tests16.dat #100"
3553                 html: "<script>"
3554                 errors: 2
3555                 expected: "| <html>\n|   <head>\n|     <script>\n|   <body>\n"
3556         }, {
3557                 name: "tests16.dat #101"
3558                 html: "<script>a"
3559                 errors: 2
3560                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"a\"\n|   <body>\n"
3561         }, {
3562                 name: "tests16.dat #102"
3563                 html: "<script><"
3564                 errors: 2
3565                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<\"\n|   <body>\n"
3566         }, {
3567                 name: "tests16.dat #103"
3568                 html: "<script></"
3569                 errors: 2
3570                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</\"\n|   <body>\n"
3571         }, {
3572                 name: "tests16.dat #104"
3573                 html: "<script></S"
3574                 errors: 2
3575                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</S\"\n|   <body>\n"
3576         }, {
3577                 name: "tests16.dat #105"
3578                 html: "<script></SC"
3579                 errors: 2
3580                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</SC\"\n|   <body>\n"
3581         }, {
3582                 name: "tests16.dat #106"
3583                 html: "<script></SCR"
3584                 errors: 2
3585                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</SCR\"\n|   <body>\n"
3586         }, {
3587                 name: "tests16.dat #107"
3588                 html: "<script></SCRI"
3589                 errors: 2
3590                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</SCRI\"\n|   <body>\n"
3591         }, {
3592                 name: "tests16.dat #108"
3593                 html: "<script></SCRIP"
3594                 errors: 2
3595                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</SCRIP\"\n|   <body>\n"
3596         }, {
3597                 name: "tests16.dat #109"
3598                 html: "<script></SCRIPT"
3599                 errors: 2
3600                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</SCRIPT\"\n|   <body>\n"
3601         }, {
3602                 name: "tests16.dat #110"
3603                 html: "<script></SCRIPT "
3604                 errors: 3
3605                 expected: "| <html>\n|   <head>\n|     <script>\n|   <body>\n"
3606         }, {
3607                 name: "tests16.dat #111"
3608                 html: "<script></s"
3609                 errors: 2
3610                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</s\"\n|   <body>\n"
3611         }, {
3612                 name: "tests16.dat #112"
3613                 html: "<script></sc"
3614                 errors: 2
3615                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</sc\"\n|   <body>\n"
3616         }, {
3617                 name: "tests16.dat #113"
3618                 html: "<script></scr"
3619                 errors: 2
3620                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</scr\"\n|   <body>\n"
3621         }, {
3622                 name: "tests16.dat #114"
3623                 html: "<script></scri"
3624                 errors: 2
3625                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</scri\"\n|   <body>\n"
3626         }, {
3627                 name: "tests16.dat #115"
3628                 html: "<script></scrip"
3629                 errors: 2
3630                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</scrip\"\n|   <body>\n"
3631         }, {
3632                 name: "tests16.dat #116"
3633                 html: "<script></script"
3634                 errors: 2
3635                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</script\"\n|   <body>\n"
3636         }, {
3637                 name: "tests16.dat #117"
3638                 html: "<script></script "
3639                 errors: 3
3640                 expected: "| <html>\n|   <head>\n|     <script>\n|   <body>\n"
3641         }, {
3642                 name: "tests16.dat #118"
3643                 html: "<script><!"
3644                 errors: 2
3645                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!\"\n|   <body>\n"
3646         }, {
3647                 name: "tests16.dat #119"
3648                 html: "<script><!a"
3649                 errors: 2
3650                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!a\"\n|   <body>\n"
3651         }, {
3652                 name: "tests16.dat #120"
3653                 html: "<script><!-"
3654                 errors: 2
3655                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!-\"\n|   <body>\n"
3656         }, {
3657                 name: "tests16.dat #121"
3658                 html: "<script><!-a"
3659                 errors: 2
3660                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!-a\"\n|   <body>\n"
3661         }, {
3662                 name: "tests16.dat #122"
3663                 html: "<script><!--"
3664                 errors: 3
3665                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--\"\n|   <body>\n"
3666         }, {
3667                 name: "tests16.dat #123"
3668                 html: "<script><!--a"
3669                 errors: 3
3670                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--a\"\n|   <body>\n"
3671         }, {
3672                 name: "tests16.dat #124"
3673                 html: "<script><!--<"
3674                 errors: 3
3675                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<\"\n|   <body>\n"
3676         }, {
3677                 name: "tests16.dat #125"
3678                 html: "<script><!--<a"
3679                 errors: 3
3680                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<a\"\n|   <body>\n"
3681         }, {
3682                 name: "tests16.dat #126"
3683                 html: "<script><!--</"
3684                 errors: 3
3685                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--</\"\n|   <body>\n"
3686         }, {
3687                 name: "tests16.dat #127"
3688                 html: "<script><!--</script"
3689                 errors: 3
3690                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--</script\"\n|   <body>\n"
3691         }, {
3692                 name: "tests16.dat #128"
3693                 html: "<script><!--</script "
3694                 errors: 3
3695                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--\"\n|   <body>\n"
3696         }, {
3697                 name: "tests16.dat #129"
3698                 html: "<script><!--<s"
3699                 errors: 3
3700                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<s\"\n|   <body>\n"
3701         }, {
3702                 name: "tests16.dat #130"
3703                 html: "<script><!--<script"
3704                 errors: 3
3705                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script\"\n|   <body>\n"
3706         }, {
3707                 name: "tests16.dat #131"
3708                 html: "<script><!--<script "
3709                 errors: 3
3710                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script \"\n|   <body>\n"
3711         }, {
3712                 name: "tests16.dat #132"
3713                 html: "<script><!--<script <"
3714                 errors: 3
3715                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script <\"\n|   <body>\n"
3716         }, {
3717                 name: "tests16.dat #133"
3718                 html: "<script><!--<script <a"
3719                 errors: 3
3720                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script <a\"\n|   <body>\n"
3721         }, {
3722                 name: "tests16.dat #134"
3723                 html: "<script><!--<script </"
3724                 errors: 3
3725                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </\"\n|   <body>\n"
3726         }, {
3727                 name: "tests16.dat #135"
3728                 html: "<script><!--<script </s"
3729                 errors: 3
3730                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </s\"\n|   <body>\n"
3731         }, {
3732                 name: "tests16.dat #136"
3733                 html: "<script><!--<script </script"
3734                 errors: 3
3735                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script\"\n|   <body>\n"
3736         }, {
3737                 name: "tests16.dat #137"
3738                 html: "<script><!--<script </scripta"
3739                 errors: 3
3740                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </scripta\"\n|   <body>\n"
3741         }, {
3742                 name: "tests16.dat #138"
3743                 html: "<script><!--<script </script "
3744                 errors: 3
3745                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script \"\n|   <body>\n"
3746         }, {
3747                 name: "tests16.dat #139"
3748                 html: "<script><!--<script </script>"
3749                 errors: 3
3750                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script>\"\n|   <body>\n"
3751         }, {
3752                 name: "tests16.dat #140"
3753                 html: "<script><!--<script </script/"
3754                 errors: 3
3755                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script/\"\n|   <body>\n"
3756         }, {
3757                 name: "tests16.dat #141"
3758                 html: "<script><!--<script </script <"
3759                 errors: 3
3760                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script <\"\n|   <body>\n"
3761         }, {
3762                 name: "tests16.dat #142"
3763                 html: "<script><!--<script </script <a"
3764                 errors: 3
3765                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script <a\"\n|   <body>\n"
3766         }, {
3767                 name: "tests16.dat #143"
3768                 html: "<script><!--<script </script </"
3769                 errors: 3
3770                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script </\"\n|   <body>\n"
3771         }, {
3772                 name: "tests16.dat #144"
3773                 html: "<script><!--<script </script </script"
3774                 errors: 3
3775                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script </script\"\n|   <body>\n"
3776         }, {
3777                 name: "tests16.dat #145"
3778                 html: "<script><!--<script </script </script "
3779                 errors: 3
3780                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script \"\n|   <body>\n"
3781         }, {
3782                 name: "tests16.dat #146"
3783                 html: "<script><!--<script </script </script/"
3784                 errors: 3
3785                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script \"\n|   <body>\n"
3786         }, {
3787                 name: "tests16.dat #147"
3788                 html: "<script><!--<script </script </script>"
3789                 errors: 1
3790                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script </script \"\n|   <body>\n"
3791         }, {
3792                 name: "tests16.dat #148"
3793                 html: "<script><!--<script -"
3794                 errors: 3
3795                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -\"\n|   <body>\n"
3796         }, {
3797                 name: "tests16.dat #149"
3798                 html: "<script><!--<script -a"
3799                 errors: 3
3800                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -a\"\n|   <body>\n"
3801         }, {
3802                 name: "tests16.dat #150"
3803                 html: "<script><!--<script --"
3804                 errors: 3
3805                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --\"\n|   <body>\n"
3806         }, {
3807                 name: "tests16.dat #151"
3808                 html: "<script><!--<script --a"
3809                 errors: 3
3810                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --a\"\n|   <body>\n"
3811         }, {
3812                 name: "tests16.dat #152"
3813                 html: "<script><!--<script -->"
3814                 errors: 2
3815                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -->\"\n|   <body>\n"
3816         }, {
3817                 name: "tests16.dat #153"
3818                 html: "<script><!--<script --><"
3819                 errors: 2
3820                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --><\"\n|   <body>\n"
3821         }, {
3822                 name: "tests16.dat #154"
3823                 html: "<script><!--<script --></"
3824                 errors: 2
3825                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --></\"\n|   <body>\n"
3826         }, {
3827                 name: "tests16.dat #155"
3828                 html: "<script><!--<script --></script"
3829                 errors: 2
3830                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script --></script\"\n|   <body>\n"
3831         }, {
3832                 name: "tests16.dat #156"
3833                 html: "<script><!--<script --></script "
3834                 errors: 3
3835                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -->\"\n|   <body>\n"
3836         }, {
3837                 name: "tests16.dat #157"
3838                 html: "<script><!--<script --></script/"
3839                 errors: 3
3840                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -->\"\n|   <body>\n"
3841         }, {
3842                 name: "tests16.dat #158"
3843                 html: "<script><!--<script --></script>"
3844                 errors: 1
3845                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script -->\"\n|   <body>\n"
3846         }, {
3847                 name: "tests16.dat #159"
3848                 html: "<script><!--<script><\\/script>--></script>"
3849                 errors: 1
3850                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script><\\/script>-->\"\n|   <body>\n"
3851         }, {
3852                 name: "tests16.dat #160"
3853                 html: "<script><!--<script></scr'+'ipt>--></script>"
3854                 errors: 1
3855                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></scr'+'ipt>-->\"\n|   <body>\n"
3856         }, {
3857                 name: "tests16.dat #161"
3858                 html: "<script><!--<script></script><script></script></script>"
3859                 errors: 1
3860                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>\"\n|   <body>\n"
3861         }, {
3862                 name: "tests16.dat #162"
3863                 html: "<script><!--<script></script><script></script>--><!--</script>"
3864                 errors: 1
3865                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>--><!--\"\n|   <body>\n"
3866         }, {
3867                 name: "tests16.dat #163"
3868                 html: "<script><!--<script></script><script></script>-- ></script>"
3869                 errors: 1
3870                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>-- >\"\n|   <body>\n"
3871         }, {
3872                 name: "tests16.dat #164"
3873                 html: "<script><!--<script></script><script></script>- -></script>"
3874                 errors: 1
3875                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>- ->\"\n|   <body>\n"
3876         }, {
3877                 name: "tests16.dat #165"
3878                 html: "<script><!--<script></script><script></script>- - ></script>"
3879                 errors: 1
3880                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>- - >\"\n|   <body>\n"
3881         }, {
3882                 name: "tests16.dat #166"
3883                 html: "<script><!--<script></script><script></script>-></script>"
3884                 errors: 1
3885                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></script><script></script>->\"\n|   <body>\n"
3886         }, {
3887                 name: "tests16.dat #167"
3888                 html: "<script><!--<script>--!></script>X"
3889                 errors: 3
3890                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script>--!></script>X\"\n|   <body>\n"
3891         }, {
3892                 name: "tests16.dat #168"
3893                 html: "<script><!--<scr'+'ipt></script>--></script>"
3894                 errors: 2
3895                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<scr'+'ipt>\"\n|   <body>\n|     \"-->\"\n"
3896         }, {
3897                 name: "tests16.dat #169"
3898                 html: "<script><!--<script></scr'+'ipt></script>X"
3899                 errors: 3
3900                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<!--<script></scr'+'ipt></script>X\"\n|   <body>\n"
3901         }, {
3902                 name: "tests16.dat #170"
3903                 html: "<style><!--<style></style>--></style>"
3904                 errors: 2
3905                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--<style>\"\n|   <body>\n|     \"-->\"\n"
3906         }, {
3907                 name: "tests16.dat #171"
3908                 html: "<style><!--</style>X"
3909                 errors: 1
3910                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--\"\n|   <body>\n|     \"X\"\n"
3911         }, {
3912                 name: "tests16.dat #172"
3913                 html: "<style><!--...</style>...--></style>"
3914                 errors: 2
3915                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--...\"\n|   <body>\n|     \"...-->\"\n"
3916         }, {
3917                 name: "tests16.dat #173"
3918                 html: "<style><!--<br><html xmlns:v=\"urn:schemas-microsoft-com:vml\"><!--[if !mso]><style></style>X"
3919                 errors: 1
3920                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--<br><html xmlns:v=\"urn:schemas-microsoft-com:vml\"><!--[if !mso]><style>\"\n|   <body>\n|     \"X\"\n"
3921         }, {
3922                 name: "tests16.dat #174"
3923                 html: "<style><!--...<style><!--...--!></style>--></style>"
3924                 errors: 2
3925                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--...<style><!--...--!>\"\n|   <body>\n|     \"-->\"\n"
3926         }, {
3927                 name: "tests16.dat #175"
3928                 html: "<style><!--...</style><!-- --><style>@import ...</style>"
3929                 errors: 1
3930                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--...\"\n|     <!--   -->\n|     <style>\n|       \"@import ...\"\n|   <body>\n"
3931         }, {
3932                 name: "tests16.dat #176"
3933                 html: "<style>...<style><!--...</style><!-- --></style>"
3934                 errors: 2
3935                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"...<style><!--...\"\n|     <!--   -->\n|   <body>\n"
3936         }, {
3937                 name: "tests16.dat #177"
3938                 html: "<style>...<!--[if IE]><style>...</style>X"
3939                 errors: 1
3940                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"...<!--[if IE]><style>...\"\n|   <body>\n|     \"X\"\n"
3941         }, {
3942                 name: "tests16.dat #178"
3943                 html: "<title><!--<title></title>--></title>"
3944                 errors: 2
3945                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"<!--<title>\"\n|   <body>\n|     \"-->\"\n"
3946         }, {
3947                 name: "tests16.dat #179"
3948                 html: "<title>&lt;/title></title>"
3949                 errors: 1
3950                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"</title>\"\n|   <body>\n"
3951         }, {
3952                 name: "tests16.dat #180"
3953                 html: "<title>foo/title><link></head><body>X"
3954                 errors: 2
3955                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"foo/title><link></head><body>X\"\n|   <body>\n"
3956         }, {
3957                 name: "tests16.dat #181"
3958                 html: "<noscript><!--<noscript></noscript>--></noscript>"
3959                 scripting: true
3960                 errors: 2
3961                 expected: "| <html>\n|   <head>\n|     <noscript>\n|       \"<!--<noscript>\"\n|   <body>\n|     \"-->\"\n"
3962         }, {
3963                 name: "tests16.dat #182"
3964                 html: "<noscript><!--<noscript></noscript>--></noscript>"
3965                 scripting: false
3966                 errors: 1
3967                 expected: "| <html>\n|   <head>\n|     <noscript>\n|       <!-- <noscript></noscript> -->\n|   <body>\n"
3968         }, {
3969                 name: "tests16.dat #183"
3970                 html: "<noscript><!--</noscript>X<noscript>--></noscript>"
3971                 scripting: true
3972                 errors: 1
3973                 expected: "| <html>\n|   <head>\n|     <noscript>\n|       \"<!--\"\n|   <body>\n|     \"X\"\n|     <noscript>\n|       \"-->\"\n"
3974         }, {
3975                 name: "tests16.dat #184"
3976                 html: "<noscript><!--</noscript>X<noscript>--></noscript>"
3977                 scripting: false
3978                 errors: 1
3979                 expected: "| <html>\n|   <head>\n|     <noscript>\n|       <!-- </noscript>X<noscript> -->\n|   <body>\n"
3980         }, {
3981                 name: "tests16.dat #185"
3982                 html: "<noscript><iframe></noscript>X"
3983                 scripting: true
3984                 errors: 1
3985                 expected: "| <html>\n|   <head>\n|     <noscript>\n|       \"<iframe>\"\n|   <body>\n|     \"X\"\n"
3986         }, {
3987                 name: "tests16.dat #186"
3988                 html: "<noscript><iframe></noscript>X"
3989                 scripting: false
3990                 errors: 3
3991                 expected: "| <html>\n|   <head>\n|     <noscript>\n|   <body>\n|     <iframe>\n|       \"</noscript>X\"\n"
3992         }, {
3993                 name: "tests16.dat #187"
3994                 html: "<noframes><!--<noframes></noframes>--></noframes>"
3995                 errors: 2
3996                 expected: "| <html>\n|   <head>\n|     <noframes>\n|       \"<!--<noframes>\"\n|   <body>\n|     \"-->\"\n"
3997         }, {
3998                 name: "tests16.dat #188"
3999                 html: "<noframes><body><script><!--...</script></body></noframes></html>"
4000                 errors: 1
4001                 expected: "| <html>\n|   <head>\n|     <noframes>\n|       \"<body><script><!--...</script></body>\"\n|   <body>\n"
4002         }, {
4003                 name: "tests16.dat #189"
4004                 html: "<textarea><!--<textarea></textarea>--></textarea>"
4005                 errors: 2
4006                 expected: "| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"<!--<textarea>\"\n|     \"-->\"\n"
4007         }, {
4008                 name: "tests16.dat #190"
4009                 html: "<textarea>&lt;/textarea></textarea>"
4010                 errors: 1
4011                 expected: "| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"</textarea>\"\n"
4012         }, {
4013                 name: "tests16.dat #191"
4014                 html: "<iframe><!--<iframe></iframe>--></iframe>"
4015                 errors: 2
4016                 expected: "| <html>\n|   <head>\n|   <body>\n|     <iframe>\n|       \"<!--<iframe>\"\n|     \"-->\"\n"
4017         }, {
4018                 name: "tests16.dat #192"
4019                 html: "<iframe>...<!--X->...<!--/X->...</iframe>"
4020                 errors: 1
4021                 expected: "| <html>\n|   <head>\n|   <body>\n|     <iframe>\n|       \"...<!--X->...<!--/X->...\"\n"
4022         }, {
4023                 name: "tests16.dat #193"
4024                 html: "<xmp><!--<xmp></xmp>--></xmp>"
4025                 errors: 2
4026                 expected: "| <html>\n|   <head>\n|   <body>\n|     <xmp>\n|       \"<!--<xmp>\"\n|     \"-->\"\n"
4027         }, {
4028                 name: "tests16.dat #194"
4029                 html: "<noembed><!--<noembed></noembed>--></noembed>"
4030                 errors: 2
4031                 expected: "| <html>\n|   <head>\n|   <body>\n|     <noembed>\n|       \"<!--<noembed>\"\n|     \"-->\"\n"
4032         }, {
4033                 name: "tests16.dat #195"
4034                 html: "<!doctype html><table>\n"
4035                 errors: 1
4036                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       \"\n\"\n"
4037         }, {
4038                 name: "tests16.dat #196"
4039                 html: "<!doctype html><table><td><span><font></span><span>"
4040                 errors: 3
4041                 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"
4042         }, {
4043                 name: "tests16.dat #197"
4044                 html: "<!doctype html><form><table></form><form></table></form>"
4045                 errors: 5
4046                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <form>\n|       <table>\n|         <form>\n"
4047         }, {
4048                 name: "tests17.dat #1"
4049                 html: "<!doctype html><table><tbody><select><tr>"
4050                 errors: 3
4051                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|     <table>\n|       <tbody>\n|         <tr>\n"
4052         }, {
4053                 name: "tests17.dat #2"
4054                 html: "<!doctype html><table><tr><select><td>"
4055                 errors: 3
4056                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n"
4057         }, {
4058                 name: "tests17.dat #3"
4059                 html: "<!doctype html><table><tr><td><select><td>"
4060                 errors: 2
4061                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <select>\n|           <td>\n"
4062         }, {
4063                 name: "tests17.dat #4"
4064                 html: "<!doctype html><table><tr><th><select><td>"
4065                 errors: 2
4066                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <th>\n|             <select>\n|           <td>\n"
4067         }, {
4068                 name: "tests17.dat #5"
4069                 html: "<!doctype html><table><caption><select><tr>"
4070                 errors: 2
4071                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <select>\n|       <tbody>\n|         <tr>\n"
4072         }, {
4073                 name: "tests17.dat #6"
4074                 html: "<!doctype html><select><tr>"
4075                 errors: 2
4076                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4077         }, {
4078                 name: "tests17.dat #7"
4079                 html: "<!doctype html><select><td>"
4080                 errors: 2
4081                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4082         }, {
4083                 name: "tests17.dat #8"
4084                 html: "<!doctype html><select><th>"
4085                 errors: 2
4086                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4087         }, {
4088                 name: "tests17.dat #9"
4089                 html: "<!doctype html><select><tbody>"
4090                 errors: 2
4091                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4092         }, {
4093                 name: "tests17.dat #10"
4094                 html: "<!doctype html><select><thead>"
4095                 errors: 2
4096                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4097         }, {
4098                 name: "tests17.dat #11"
4099                 html: "<!doctype html><select><tfoot>"
4100                 errors: 2
4101                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4102         }, {
4103                 name: "tests17.dat #12"
4104                 html: "<!doctype html><select><caption>"
4105                 errors: 2
4106                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4107         }, {
4108                 name: "tests17.dat #13"
4109                 html: "<!doctype html><table><tr></table>a"
4110                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|     \"a\"\n"
4111         }, {
4112                 name: "tests18.dat #1"
4113                 html: "<!doctype html><plaintext></plaintext>"
4114                 errors: 1
4115                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <plaintext>\n|       \"</plaintext>\"\n"
4116         }, {
4117                 name: "tests18.dat #2"
4118                 html: "<!doctype html><table><plaintext></plaintext>"
4119                 errors: 14
4120                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <plaintext>\n|       \"</plaintext>\"\n|     <table>\n"
4121         }, {
4122                 name: "tests18.dat #3"
4123                 html: "<!doctype html><table><tbody><plaintext></plaintext>"
4124                 errors: 14
4125                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <plaintext>\n|       \"</plaintext>\"\n|     <table>\n|       <tbody>\n"
4126         }, {
4127                 name: "tests18.dat #4"
4128                 html: "<!doctype html><table><tbody><tr><plaintext></plaintext>"
4129                 errors: 14
4130                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <plaintext>\n|       \"</plaintext>\"\n|     <table>\n|       <tbody>\n|         <tr>\n"
4131         }, {
4132                 name: "tests18.dat #5"
4133                 html: "<!doctype html><table><td><plaintext></plaintext>"
4134                 errors: 2
4135                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <plaintext>\n|               \"</plaintext>\"\n"
4136         }, {
4137                 name: "tests18.dat #6"
4138                 html: "<!doctype html><table><caption><plaintext></plaintext>"
4139                 errors: 1
4140                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <plaintext>\n|           \"</plaintext>\"\n"
4141         }, {
4142                 name: "tests18.dat #7"
4143                 html: "<!doctype html><table><tr><style></script></style>abc"
4144                 errors: 4
4145                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"abc\"\n|     <table>\n|       <tbody>\n|         <tr>\n|           <style>\n|             \"</script>\"\n"
4146         }, {
4147                 name: "tests18.dat #8"
4148                 html: "<!doctype html><table><tr><script></style></script>abc"
4149                 errors: 4
4150                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"abc\"\n|     <table>\n|       <tbody>\n|         <tr>\n|           <script>\n|             \"</style>\"\n"
4151         }, {
4152                 name: "tests18.dat #9"
4153                 html: "<!doctype html><table><caption><style></script></style>abc"
4154                 errors: 1
4155                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <style>\n|           \"</script>\"\n|         \"abc\"\n"
4156         }, {
4157                 name: "tests18.dat #10"
4158                 html: "<!doctype html><table><td><style></script></style>abc"
4159                 errors: 2
4160                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <style>\n|               \"</script>\"\n|             \"abc\"\n"
4161         }, {
4162                 name: "tests18.dat #11"
4163                 html: "<!doctype html><select><script></style></script>abc"
4164                 errors: 1
4165                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <script>\n|         \"</style>\"\n|       \"abc\"\n"
4166         }, {
4167                 name: "tests18.dat #12"
4168                 html: "<!doctype html><table><select><script></style></script>abc"
4169                 errors: 2
4170                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <script>\n|         \"</style>\"\n|       \"abc\"\n|     <table>\n"
4171         }, {
4172                 name: "tests18.dat #13"
4173                 html: "<!doctype html><table><tr><select><script></style></script>abc"
4174                 errors: 2
4175                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <script>\n|         \"</style>\"\n|       \"abc\"\n|     <table>\n|       <tbody>\n|         <tr>\n"
4176         }, {
4177                 name: "tests18.dat #14"
4178                 html: "<!doctype html><frameset></frameset><noframes>abc"
4179                 errors: 1
4180                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|   <noframes>\n|     \"abc\"\n"
4181         }, {
4182                 name: "tests18.dat #15"
4183                 html: "<!doctype html><frameset></frameset><noframes>abc</noframes><!--abc-->"
4184                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|   <noframes>\n|     \"abc\"\n|   <!-- abc -->\n"
4185         }, {
4186                 name: "tests18.dat #16"
4187                 html: "<!doctype html><frameset></frameset></html><noframes>abc"
4188                 errors: 1
4189                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|   <noframes>\n|     \"abc\"\n"
4190         }, {
4191                 name: "tests18.dat #17"
4192                 html: "<!doctype html><frameset></frameset></html><noframes>abc</noframes><!--abc-->"
4193                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|   <noframes>\n|     \"abc\"\n| <!-- abc -->\n"
4194         }, {
4195                 name: "tests18.dat #18"
4196                 html: "<!doctype html><table><tr></tbody><tfoot>"
4197                 errors: 1
4198                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|       <tfoot>\n"
4199         }, {
4200                 name: "tests18.dat #19"
4201                 html: "<!doctype html><table><td><svg></svg>abc<td>"
4202                 errors: 2
4203                 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"
4204         }, {
4205                 name: "tests19.dat #1"
4206                 html: "<!doctype html><math><mn DefinitionUrl=\"foo\">"
4207                 errors: 1
4208                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mn>\n|         definitionURL=\"foo\"\n"
4209         }, {
4210                 name: "tests19.dat #2"
4211                 html: "<!doctype html><html></p><!--foo-->"
4212                 errors: 1
4213                 expected: "| <!DOCTYPE html>\n| <html>\n|   <!-- foo -->\n|   <head>\n|   <body>\n"
4214         }, {
4215                 name: "tests19.dat #3"
4216                 html: "<!doctype html><head></head></p><!--foo-->"
4217                 errors: 1
4218                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <!-- foo -->\n|   <body>\n"
4219         }, {
4220                 name: "tests19.dat #4"
4221                 html: "<!doctype html><body><p><pre>"
4222                 errors: 1
4223                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <pre>\n"
4224         }, {
4225                 name: "tests19.dat #5"
4226                 html: "<!doctype html><body><p><listing>"
4227                 errors: 1
4228                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <listing>\n"
4229         }, {
4230                 name: "tests19.dat #6"
4231                 html: "<!doctype html><p><plaintext>"
4232                 errors: 1
4233                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <plaintext>\n"
4234         }, {
4235                 name: "tests19.dat #7"
4236                 html: "<!doctype html><p><h1>"
4237                 errors: 1
4238                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <h1>\n"
4239         }, {
4240                 name: "tests19.dat #8"
4241                 html: "<!doctype html><form><isindex>"
4242                 errors: 2
4243                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <form>\n"
4244         }, {
4245                 name: "tests19.dat #9"
4246                 html: "<!doctype html><isindex action=\"POST\">"
4247                 errors: 1
4248                 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"
4249         }, {
4250                 name: "tests19.dat #10"
4251                 html: "<!doctype html><isindex prompt=\"this is isindex\">"
4252                 errors: 1
4253                 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"
4254         }, {
4255                 name: "tests19.dat #11"
4256                 html: "<!doctype html><isindex type=\"hidden\">"
4257                 errors: 1
4258                 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"
4259         }, {
4260                 name: "tests19.dat #12"
4261                 html: "<!doctype html><isindex name=\"foo\">"
4262                 errors: 1
4263                 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"
4264         }, {
4265                 name: "tests19.dat #13"
4266                 html: "<!doctype html><ruby><p><rp>"
4267                 errors: 1
4268                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <p>\n|       <rp>\n"
4269         }, {
4270                 name: "tests19.dat #14"
4271                 html: "<!doctype html><ruby><div><span><rp>"
4272                 errors: 2
4273                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <div>\n|         <span>\n|           <rp>\n"
4274         }, {
4275                 name: "tests19.dat #15"
4276                 html: "<!doctype html><ruby><div><p><rp>"
4277                 errors: 2
4278                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <div>\n|         <p>\n|         <rp>\n"
4279         }, {
4280                 name: "tests19.dat #16"
4281                 html: "<!doctype html><ruby><p><rt>"
4282                 errors: 1
4283                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <p>\n|       <rt>\n"
4284         }, {
4285                 name: "tests19.dat #17"
4286                 html: "<!doctype html><ruby><div><span><rt>"
4287                 errors: 2
4288                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <div>\n|         <span>\n|           <rt>\n"
4289         }, {
4290                 name: "tests19.dat #18"
4291                 html: "<!doctype html><ruby><div><p><rt>"
4292                 errors: 2
4293                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <div>\n|         <p>\n|         <rt>\n"
4294         }, {
4295                 name: "tests19.dat #19"
4296                 html: "<html><ruby>a<rb>b<rt></ruby></html>"
4297                 errors: 1
4298                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rb>\n|         \"b\"\n|       <rt>\n"
4299         }, {
4300                 name: "tests19.dat #20"
4301                 html: "<html><ruby>a<rp>b<rt></ruby></html>"
4302                 errors: 1
4303                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rp>\n|         \"b\"\n|       <rt>\n"
4304         }, {
4305                 name: "tests19.dat #21"
4306                 html: "<html><ruby>a<rt>b<rt></ruby></html>"
4307                 errors: 1
4308                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rt>\n|         \"b\"\n|       <rt>\n"
4309         }, {
4310                 name: "tests19.dat #22"
4311                 html: "<html><ruby>a<rtc>b<rt>c<rb>d</ruby></html>"
4312                 errors: 1
4313                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       \"a\"\n|       <rtc>\n|         \"b\"\n|         <rt>\n|           \"c\"\n|       <rb>\n|         \"d\"\n"
4314         }, {
4315                 name: "tests19.dat #23"
4316                 html: "<!doctype html><math/><foo>"
4317                 errors: 1
4318                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|     <foo>\n"
4319         }, {
4320                 name: "tests19.dat #24"
4321                 html: "<!doctype html><svg/><foo>"
4322                 errors: 1
4323                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|     <foo>\n"
4324         }, {
4325                 name: "tests19.dat #25"
4326                 html: "<!doctype html><div></body><!--foo-->"
4327                 errors: 1
4328                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <div>\n|   <!-- foo -->\n"
4329         }, {
4330                 name: "tests19.dat #26"
4331                 html: "<!doctype html><h1><div><h3><span></h1>foo"
4332                 errors: 2
4333                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <h1>\n|       <div>\n|         <h3>\n|           <span>\n|         \"foo\"\n"
4334         }, {
4335                 name: "tests19.dat #27"
4336                 html: "<!doctype html><p></h3>foo"
4337                 errors: 1
4338                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       \"foo\"\n"
4339         }, {
4340                 name: "tests19.dat #28"
4341                 html: "<!doctype html><h3><li>abc</h2>foo"
4342                 errors: 1
4343                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <h3>\n|       <li>\n|         \"abc\"\n|     \"foo\"\n"
4344         }, {
4345                 name: "tests19.dat #29"
4346                 html: "<!doctype html><table>abc<!--foo-->"
4347                 errors: 4
4348                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"abc\"\n|     <table>\n|       <!-- foo -->\n"
4349         }, {
4350                 name: "tests19.dat #30"
4351                 html: "<!doctype html><table>  <!--foo-->"
4352                 errors: 1
4353                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       \"  \"\n|       <!-- foo -->\n"
4354         }, {
4355                 name: "tests19.dat #31"
4356                 html: "<!doctype html><table> b <!--foo-->"
4357                 errors: 4
4358                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \" b \"\n|     <table>\n|       <!-- foo -->\n"
4359         }, {
4360                 name: "tests19.dat #32"
4361                 html: "<!doctype html><select><option><option>"
4362                 errors: 1
4363                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n|       <option>\n"
4364         }, {
4365                 name: "tests19.dat #33"
4366                 html: "<!doctype html><select><option></optgroup>"
4367                 errors: 2
4368                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n"
4369         }, {
4370                 name: "tests19.dat #34"
4371                 html: "<!doctype html><select><option></optgroup>"
4372                 errors: 2
4373                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n"
4374         }, {
4375                 name: "tests19.dat #35"
4376                 html: "<!doctype html><dd><optgroup><dd>"
4377                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <dd>\n|       <optgroup>\n|     <dd>\n"
4378         }, {
4379                 name: "tests19.dat #36"
4380                 html: "<!doctype html><p><math><mi><p><h1>"
4381                 errors: 1
4382                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <math math>\n|         <math mi>\n|           <p>\n|           <h1>\n"
4383         }, {
4384                 name: "tests19.dat #37"
4385                 html: "<!doctype html><p><math><mo><p><h1>"
4386                 errors: 1
4387                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <math math>\n|         <math mo>\n|           <p>\n|           <h1>\n"
4388         }, {
4389                 name: "tests19.dat #38"
4390                 html: "<!doctype html><p><math><mn><p><h1>"
4391                 errors: 1
4392                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <math math>\n|         <math mn>\n|           <p>\n|           <h1>\n"
4393         }, {
4394                 name: "tests19.dat #39"
4395                 html: "<!doctype html><p><math><ms><p><h1>"
4396                 errors: 1
4397                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <math math>\n|         <math ms>\n|           <p>\n|           <h1>\n"
4398         }, {
4399                 name: "tests19.dat #40"
4400                 html: "<!doctype html><p><math><mtext><p><h1>"
4401                 errors: 1
4402                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <math math>\n|         <math mtext>\n|           <p>\n|           <h1>\n"
4403         }, {
4404                 name: "tests19.dat #41"
4405                 html: "<!doctype html><frameset></noframes>"
4406                 errors: 2
4407                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
4408         }, {
4409                 name: "tests19.dat #42"
4410                 html: "<!doctype html><html c=d><body></html><html a=b>"
4411                 errors: 1
4412                 expected: "| <!DOCTYPE html>\n| <html>\n|   a=\"b\"\n|   c=\"d\"\n|   <head>\n|   <body>\n"
4413         }, {
4414                 name: "tests19.dat #43"
4415                 html: "<!doctype html><html c=d><frameset></frameset></html><html a=b>"
4416                 errors: 1
4417                 expected: "| <!DOCTYPE html>\n| <html>\n|   a=\"b\"\n|   c=\"d\"\n|   <head>\n|   <frameset>\n"
4418         }, {
4419                 name: "tests19.dat #44"
4420                 html: "<!doctype html><html><frameset></frameset></html><!--foo-->"
4421                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n| <!-- foo -->\n"
4422         }, {
4423                 name: "tests19.dat #45"
4424                 html: "<!doctype html><html><frameset></frameset></html>  "
4425                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|   \"  \"\n"
4426         }, {
4427                 name: "tests19.dat #46"
4428                 html: "<!doctype html><html><frameset></frameset></html>abc"
4429                 errors: 3
4430                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
4431         }, {
4432                 name: "tests19.dat #47"
4433                 html: "<!doctype html><html><frameset></frameset></html><p>"
4434                 errors: 1
4435                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
4436         }, {
4437                 name: "tests19.dat #48"
4438                 html: "<!doctype html><html><frameset></frameset></html></p>"
4439                 errors: 1
4440                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
4441         }, {
4442                 name: "tests19.dat #49"
4443                 html: "<html><frameset></frameset></html><!doctype html>"
4444                 errors: 2
4445                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
4446         }, {
4447                 name: "tests19.dat #50"
4448                 html: "<!doctype html><body><frameset>"
4449                 errors: 1
4450                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
4451         }, {
4452                 name: "tests19.dat #51"
4453                 html: "<!doctype html><p><frameset><frame>"
4454                 errors: 2
4455                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n"
4456         }, {
4457                 name: "tests19.dat #52"
4458                 html: "<!doctype html><p>a<frameset>"
4459                 errors: 1
4460                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       \"a\"\n"
4461         }, {
4462                 name: "tests19.dat #53"
4463                 html: "<!doctype html><p> <frameset><frame>"
4464                 errors: 2
4465                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n"
4466         }, {
4467                 name: "tests19.dat #54"
4468                 html: "<!doctype html><pre><frameset>"
4469                 errors: 2
4470                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n"
4471         }, {
4472                 name: "tests19.dat #55"
4473                 html: "<!doctype html><listing><frameset>"
4474                 errors: 2
4475                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <listing>\n"
4476         }, {
4477                 name: "tests19.dat #56"
4478                 html: "<!doctype html><li><frameset>"
4479                 errors: 1
4480                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <li>\n"
4481         }, {
4482                 name: "tests19.dat #57"
4483                 html: "<!doctype html><dd><frameset>"
4484                 errors: 1
4485                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <dd>\n"
4486         }, {
4487                 name: "tests19.dat #58"
4488                 html: "<!doctype html><dt><frameset>"
4489                 errors: 1
4490                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <dt>\n"
4491         }, {
4492                 name: "tests19.dat #59"
4493                 html: "<!doctype html><button><frameset>"
4494                 errors: 2
4495                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <button>\n"
4496         }, {
4497                 name: "tests19.dat #60"
4498                 html: "<!doctype html><applet><frameset>"
4499                 errors: 2
4500                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <applet>\n"
4501         }, {
4502                 name: "tests19.dat #61"
4503                 html: "<!doctype html><marquee><frameset>"
4504                 errors: 2
4505                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <marquee>\n"
4506         }, {
4507                 name: "tests19.dat #62"
4508                 html: "<!doctype html><object><frameset>"
4509                 errors: 2
4510                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <object>\n"
4511         }, {
4512                 name: "tests19.dat #63"
4513                 html: "<!doctype html><table><frameset>"
4514                 errors: 3
4515                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n"
4516         }, {
4517                 name: "tests19.dat #64"
4518                 html: "<!doctype html><area><frameset>"
4519                 errors: 1
4520                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <area>\n"
4521         }, {
4522                 name: "tests19.dat #65"
4523                 html: "<!doctype html><basefont><frameset>"
4524                 errors: 1
4525                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <basefont>\n|   <frameset>\n"
4526         }, {
4527                 name: "tests19.dat #66"
4528                 html: "<!doctype html><bgsound><frameset>"
4529                 errors: 1
4530                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <bgsound>\n|   <frameset>\n"
4531         }, {
4532                 name: "tests19.dat #67"
4533                 html: "<!doctype html><br><frameset>"
4534                 errors: 1
4535                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <br>\n"
4536         }, {
4537                 name: "tests19.dat #68"
4538                 html: "<!doctype html><embed><frameset>"
4539                 errors: 1
4540                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <embed>\n"
4541         }, {
4542                 name: "tests19.dat #69"
4543                 html: "<!doctype html><img><frameset>"
4544                 errors: 1
4545                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <img>\n"
4546         }, {
4547                 name: "tests19.dat #70"
4548                 html: "<!doctype html><input><frameset>"
4549                 errors: 1
4550                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <input>\n"
4551         }, {
4552                 name: "tests19.dat #71"
4553                 html: "<!doctype html><keygen><frameset>"
4554                 errors: 1
4555                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <keygen>\n"
4556         }, {
4557                 name: "tests19.dat #72"
4558                 html: "<!doctype html><wbr><frameset>"
4559                 errors: 1
4560                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <wbr>\n"
4561         }, {
4562                 name: "tests19.dat #73"
4563                 html: "<!doctype html><hr><frameset>"
4564                 errors: 1
4565                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <hr>\n"
4566         }, {
4567                 name: "tests19.dat #74"
4568                 html: "<!doctype html><textarea></textarea><frameset>"
4569                 errors: 1
4570                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n"
4571         }, {
4572                 name: "tests19.dat #75"
4573                 html: "<!doctype html><xmp></xmp><frameset>"
4574                 errors: 1
4575                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <xmp>\n"
4576         }, {
4577                 name: "tests19.dat #76"
4578                 html: "<!doctype html><iframe></iframe><frameset>"
4579                 errors: 1
4580                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <iframe>\n"
4581         }, {
4582                 name: "tests19.dat #77"
4583                 html: "<!doctype html><select></select><frameset>"
4584                 errors: 1
4585                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
4586         }, {
4587                 name: "tests19.dat #78"
4588                 html: "<!doctype html><svg></svg><frameset><frame>"
4589                 errors: 2
4590                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n"
4591         }, {
4592                 name: "tests19.dat #79"
4593                 html: "<!doctype html><math></math><frameset><frame>"
4594                 errors: 2
4595                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n"
4596         }, {
4597                 name: "tests19.dat #80"
4598                 html: "<!doctype html><svg><foreignObject><div> <frameset><frame>"
4599                 errors: 2
4600                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n"
4601         }, {
4602                 name: "tests19.dat #81"
4603                 html: "<!doctype html><svg>a</svg><frameset><frame>"
4604                 errors: 2
4605                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"a\"\n"
4606         }, {
4607                 name: "tests19.dat #82"
4608                 html: "<!doctype html><svg> </svg><frameset><frame>"
4609                 errors: 2
4610                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n"
4611         }, {
4612                 name: "tests19.dat #83"
4613                 html: "<html>aaa<frameset></frameset>"
4614                 errors: 3
4615                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"aaa\"\n"
4616         }, {
4617                 name: "tests19.dat #84"
4618                 html: "<html> a <frameset></frameset>"
4619                 errors: 3
4620                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"a \"\n"
4621         }, {
4622                 name: "tests19.dat #85"
4623                 html: "<!doctype html><div><frameset>"
4624                 errors: 2
4625                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
4626         }, {
4627                 name: "tests19.dat #86"
4628                 html: "<!doctype html><div><body><frameset>"
4629                 errors: 3
4630                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <div>\n"
4631         }, {
4632                 name: "tests19.dat #87"
4633                 html: "<!doctype html><p><math></p>a"
4634                 errors: 2
4635                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <math math>\n|     \"a\"\n"
4636         }, {
4637                 name: "tests19.dat #88"
4638                 html: "<!doctype html><p><math><mn><span></p>a"
4639                 errors: 2
4640                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <math math>\n|         <math mn>\n|           <span>\n|             <p>\n|             \"a\"\n"
4641         }, {
4642                 name: "tests19.dat #89"
4643                 html: "<!doctype html><math></html>"
4644                 errors: 3
4645                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n"
4646         }, {
4647                 name: "tests19.dat #90"
4648                 html: "<!doctype html><meta charset=\"ascii\">"
4649                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <meta>\n|       charset=\"ascii\"\n|   <body>\n"
4650         }, {
4651                 name: "tests19.dat #91"
4652                 html: "<!doctype html><meta http-equiv=\"content-type\" content=\"text/html;charset=ascii\">"
4653                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <meta>\n|       content=\"text/html;charset=ascii\"\n|       http-equiv=\"content-type\"\n|   <body>\n"
4654         }, {
4655                 name: "tests19.dat #92"
4656                 html: "<!doctype html><head><!--aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa--><meta charset=\"utf8\">"
4657                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <!-- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -->\n|     <meta>\n|       charset=\"utf8\"\n|   <body>\n"
4658         }, {
4659                 name: "tests19.dat #93"
4660                 html: "<!doctype html><html a=b><head></head><html c=d>"
4661                 errors: 1
4662                 expected: "| <!DOCTYPE html>\n| <html>\n|   a=\"b\"\n|   c=\"d\"\n|   <head>\n|   <body>\n"
4663         }, {
4664                 name: "tests19.dat #94"
4665                 html: "<!doctype html><image/>"
4666                 errors: 1
4667                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <img>\n"
4668         }, {
4669                 name: "tests19.dat #95"
4670                 html: "<!doctype html>a<i>b<table>c<b>d</i>e</b>f"
4671                 errors: 9
4672                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"a\"\n|     <i>\n|       \"bc\"\n|       <b>\n|         \"de\"\n|       \"f\"\n|       <table>\n"
4673         }, {
4674                 name: "tests19.dat #96"
4675                 html: "<!doctype html><table><i>a<b>b<div>c<a>d</i>e</b>f"
4676                 errors: 17
4677                 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"
4678         }, {
4679                 name: "tests19.dat #97"
4680                 html: "<!doctype html><i>a<b>b<div>c<a>d</i>e</b>f"
4681                 errors: 5
4682                 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"
4683         }, {
4684                 name: "tests19.dat #98"
4685                 html: "<!doctype html><table><i>a<b>b<div>c</i>"
4686                 errors: 9
4687                 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"
4688         }, {
4689                 name: "tests19.dat #99"
4690                 html: "<!doctype html><table><i>a<b>b<div>c<a>d</i>e</b>f"
4691                 errors: 17
4692                 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"
4693         }, {
4694                 name: "tests19.dat #100"
4695                 html: "<!doctype html><table><i>a<div>b<tr>c<b>d</i>e"
4696                 errors: 11
4697                 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"
4698         }, {
4699                 name: "tests19.dat #101"
4700                 html: "<!doctype html><table><td><table><i>a<div>b<b>c</i>d"
4701                 errors: 12
4702                 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"
4703         }, {
4704                 name: "tests19.dat #102"
4705                 html: "<!doctype html><body><bgsound>"
4706                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <bgsound>\n"
4707         }, {
4708                 name: "tests19.dat #103"
4709                 html: "<!doctype html><body><basefont>"
4710                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <basefont>\n"
4711         }, {
4712                 name: "tests19.dat #104"
4713                 html: "<!doctype html><a><b></a><basefont>"
4714                 errors: 1
4715                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <a>\n|       <b>\n|     <basefont>\n"
4716         }, {
4717                 name: "tests19.dat #105"
4718                 html: "<!doctype html><a><b></a><bgsound>"
4719                 errors: 1
4720                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <a>\n|       <b>\n|     <bgsound>\n"
4721         }, {
4722                 name: "tests19.dat #106"
4723                 html: "<!doctype html><figcaption><article></figcaption>a"
4724                 errors: 1
4725                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <figcaption>\n|       <article>\n|     \"a\"\n"
4726         }, {
4727                 name: "tests19.dat #107"
4728                 html: "<!doctype html><summary><article></summary>a"
4729                 errors: 1
4730                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <summary>\n|       <article>\n|     \"a\"\n"
4731         }, {
4732                 name: "tests19.dat #108"
4733                 html: "<!doctype html><p><a><plaintext>b"
4734                 errors: 2
4735                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <a>\n|     <plaintext>\n|       <a>\n|         \"b\"\n"
4736         }, {
4737                 name: "tests19.dat #109"
4738                 html: "<!DOCTYPE html><div>a<a></div>b<p>c</p>d"
4739                 errors: 2
4740                 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"
4741         }, {
4742                 name: "tests1.dat #1"
4743                 html: "Test"
4744                 errors: 1
4745                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"Test\"\n"
4746         }, {
4747                 name: "tests1.dat #2"
4748                 html: "<p>One<p>Two"
4749                 errors: 1
4750                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       \"One\"\n|     <p>\n|       \"Two\"\n"
4751         }, {
4752                 name: "tests1.dat #3"
4753                 html: "Line1<br>Line2<br>Line3<br>Line4"
4754                 errors: 1
4755                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"Line1\"\n|     <br>\n|     \"Line2\"\n|     <br>\n|     \"Line3\"\n|     <br>\n|     \"Line4\"\n"
4756         }, {
4757                 name: "tests1.dat #4"
4758                 html: "<html>"
4759                 errors: 1
4760                 expected: "| <html>\n|   <head>\n|   <body>\n"
4761         }, {
4762                 name: "tests1.dat #5"
4763                 html: "<head>"
4764                 errors: 1
4765                 expected: "| <html>\n|   <head>\n|   <body>\n"
4766         }, {
4767                 name: "tests1.dat #6"
4768                 html: "<body>"
4769                 errors: 1
4770                 expected: "| <html>\n|   <head>\n|   <body>\n"
4771         }, {
4772                 name: "tests1.dat #7"
4773                 html: "<html><head>"
4774                 errors: 1
4775                 expected: "| <html>\n|   <head>\n|   <body>\n"
4776         }, {
4777                 name: "tests1.dat #8"
4778                 html: "<html><head></head>"
4779                 errors: 1
4780                 expected: "| <html>\n|   <head>\n|   <body>\n"
4781         }, {
4782                 name: "tests1.dat #9"
4783                 html: "<html><head></head><body>"
4784                 errors: 1
4785                 expected: "| <html>\n|   <head>\n|   <body>\n"
4786         }, {
4787                 name: "tests1.dat #10"
4788                 html: "<html><head></head><body></body>"
4789                 errors: 1
4790                 expected: "| <html>\n|   <head>\n|   <body>\n"
4791         }, {
4792                 name: "tests1.dat #11"
4793                 html: "<html><head><body></body></html>"
4794                 errors: 1
4795                 expected: "| <html>\n|   <head>\n|   <body>\n"
4796         }, {
4797                 name: "tests1.dat #12"
4798                 html: "<html><head></body></html>"
4799                 errors: 1
4800                 expected: "| <html>\n|   <head>\n|   <body>\n"
4801         }, {
4802                 name: "tests1.dat #13"
4803                 html: "<html><head><body></html>"
4804                 errors: 1
4805                 expected: "| <html>\n|   <head>\n|   <body>\n"
4806         }, {
4807                 name: "tests1.dat #14"
4808                 html: "<html><body></html>"
4809                 errors: 1
4810                 expected: "| <html>\n|   <head>\n|   <body>\n"
4811         }, {
4812                 name: "tests1.dat #15"
4813                 html: "<body></html>"
4814                 errors: 1
4815                 expected: "| <html>\n|   <head>\n|   <body>\n"
4816         }, {
4817                 name: "tests1.dat #16"
4818                 html: "<head></html>"
4819                 errors: 1
4820                 expected: "| <html>\n|   <head>\n|   <body>\n"
4821         }, {
4822                 name: "tests1.dat #17"
4823                 html: "</head>"
4824                 errors: 1
4825                 expected: "| <html>\n|   <head>\n|   <body>\n"
4826         }, {
4827                 name: "tests1.dat #18"
4828                 html: "</body>"
4829                 errors: 1
4830                 expected: "| <html>\n|   <head>\n|   <body>\n"
4831         }, {
4832                 name: "tests1.dat #19"
4833                 html: "</html>"
4834                 errors: 1
4835                 expected: "| <html>\n|   <head>\n|   <body>\n"
4836         }, {
4837                 name: "tests1.dat #20"
4838                 html: "<b><table><td><i></table>"
4839                 errors: 4
4840                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <table>\n|         <tbody>\n|           <tr>\n|             <td>\n|               <i>\n"
4841         }, {
4842                 name: "tests1.dat #21"
4843                 html: "<b><table><td></b><i></table>X"
4844                 errors: 5
4845                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <table>\n|         <tbody>\n|           <tr>\n|             <td>\n|               <i>\n|       \"X\"\n"
4846         }, {
4847                 name: "tests1.dat #22"
4848                 html: "<h1>Hello<h2>World"
4849                 errors: 3
4850                 expected: "| <html>\n|   <head>\n|   <body>\n|     <h1>\n|       \"Hello\"\n|     <h2>\n|       \"World\"\n"
4851         }, {
4852                 name: "tests1.dat #23"
4853                 html: "<a><p>X<a>Y</a>Z</p></a>"
4854                 errors: 4
4855                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|     <p>\n|       <a>\n|         \"X\"\n|       <a>\n|         \"Y\"\n|       \"Z\"\n"
4856         }, {
4857                 name: "tests1.dat #24"
4858                 html: "<b><button>foo</b>bar"
4859                 errors: 3
4860                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|     <button>\n|       <b>\n|         \"foo\"\n|       \"bar\"\n"
4861         }, {
4862                 name: "tests1.dat #25"
4863                 html: "<!DOCTYPE html><span><button>foo</span>bar"
4864                 errors: 2
4865                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <span>\n|       <button>\n|         \"foobar\"\n"
4866         }, {
4867                 name: "tests1.dat #26"
4868                 html: "<p><b><div><marquee></p></b></div>X"
4869                 errors: 6
4870                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <b>\n|     <div>\n|       <b>\n|         <marquee>\n|           <p>\n|           \"X\"\n"
4871         }, {
4872                 name: "tests1.dat #27"
4873                 html: "<script><div></script></div><title><p></title><p><p>"
4874                 errors: 2
4875                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"<div>\"\n|     <title>\n|       \"<p>\"\n|   <body>\n|     <p>\n|     <p>\n"
4876         }, {
4877                 name: "tests1.dat #28"
4878                 html: "<!--><div>--<!-->"
4879                 errors: 4
4880                 expected: "| <!--  -->\n| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"--\"\n|       <!--  -->\n"
4881         }, {
4882                 name: "tests1.dat #29"
4883                 html: "<p><hr></p>"
4884                 errors: 2
4885                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <hr>\n|     <p>\n"
4886         }, {
4887                 name: "tests1.dat #30"
4888                 html: "<select><b><option><select><option></b></select>X"
4889                 errors: 6
4890                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n|     <option>\n|       \"X\"\n"
4891         }, {
4892                 name: "tests1.dat #31"
4893                 html: "<a><table><td><a><table></table><a></tr><a></table><b>X</b>C<a>Y"
4894                 errors: 9
4895                 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"
4896         }, {
4897                 name: "tests1.dat #32"
4898                 html: "<a X>0<b>1<a Y>2"
4899                 errors: 4
4900                 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"
4901         }, {
4902                 name: "tests1.dat #33"
4903                 html: "<!-----><font><div>hello<table>excite!<b>me!<th><i>please!</tr><!--X-->"
4904                 errors: 16
4905                 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"
4906         }, {
4907                 name: "tests1.dat #34"
4908                 html: "<!DOCTYPE html><li>hello<li>world<ul>how<li>do</ul>you</body><!--do-->"
4909                 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"
4910         }, {
4911                 name: "tests1.dat #35"
4912                 html: "<!DOCTYPE html>A<option>B<optgroup>C<select>D</option>E"
4913                 errors: 2
4914                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"A\"\n|     <option>\n|       \"B\"\n|     <optgroup>\n|       \"C\"\n|       <select>\n|         \"DE\"\n"
4915         }, {
4916                 name: "tests1.dat #36"
4917                 html: "<"
4918                 errors: 2
4919                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"<\"\n"
4920         }, {
4921                 name: "tests1.dat #37"
4922                 html: "<#"
4923                 errors: 2
4924                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"<#\"\n"
4925         }, {
4926                 name: "tests1.dat #38"
4927                 html: "</"
4928                 errors: 2
4929                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"</\"\n"
4930         }, {
4931                 name: "tests1.dat #39"
4932                 html: "</#"
4933                 errors: 2
4934                 expected: "| <!-- # -->\n| <html>\n|   <head>\n|   <body>\n"
4935         }, {
4936                 name: "tests1.dat #40"
4937                 html: "<?"
4938                 errors: 2
4939                 expected: "| <!-- ? -->\n| <html>\n|   <head>\n|   <body>\n"
4940         }, {
4941                 name: "tests1.dat #41"
4942                 html: "<?#"
4943                 errors: 2
4944                 expected: "| <!-- ?# -->\n| <html>\n|   <head>\n|   <body>\n"
4945         }, {
4946                 name: "tests1.dat #42"
4947                 html: "<!"
4948                 errors: 2
4949                 expected: "| <!--  -->\n| <html>\n|   <head>\n|   <body>\n"
4950         }, {
4951                 name: "tests1.dat #43"
4952                 html: "<!#"
4953                 errors: 2
4954                 expected: "| <!-- # -->\n| <html>\n|   <head>\n|   <body>\n"
4955         }, {
4956                 name: "tests1.dat #44"
4957                 html: "<?COMMENT?>"
4958                 errors: 2
4959                 expected: "| <!-- ?COMMENT? -->\n| <html>\n|   <head>\n|   <body>\n"
4960         }, {
4961                 name: "tests1.dat #45"
4962                 html: "<!COMMENT>"
4963                 errors: 2
4964                 expected: "| <!-- COMMENT -->\n| <html>\n|   <head>\n|   <body>\n"
4965         }, {
4966                 name: "tests1.dat #46"
4967                 html: "</ COMMENT >"
4968                 errors: 2
4969                 expected: "| <!--  COMMENT  -->\n| <html>\n|   <head>\n|   <body>\n"
4970         }, {
4971                 name: "tests1.dat #47"
4972                 html: "<?COM--MENT?>"
4973                 errors: 2
4974                 expected: "| <!-- ?COM--MENT? -->\n| <html>\n|   <head>\n|   <body>\n"
4975         }, {
4976                 name: "tests1.dat #48"
4977                 html: "<!COM--MENT>"
4978                 errors: 2
4979                 expected: "| <!-- COM--MENT -->\n| <html>\n|   <head>\n|   <body>\n"
4980         }, {
4981                 name: "tests1.dat #49"
4982                 html: "</ COM--MENT >"
4983                 errors: 2
4984                 expected: "| <!--  COM--MENT  -->\n| <html>\n|   <head>\n|   <body>\n"
4985         }, {
4986                 name: "tests1.dat #50"
4987                 html: "<!DOCTYPE html><style> EOF"
4988                 errors: 1
4989                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <style>\n|       \" EOF\"\n|   <body>\n"
4990         }, {
4991                 name: "tests1.dat #51"
4992                 html: "<!DOCTYPE html><script> <!-- </script> --> </script> EOF"
4993                 errors: 1
4994                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \" <!-- \"\n|     \" \"\n|   <body>\n|     \"-->  EOF\"\n"
4995         }, {
4996                 name: "tests1.dat #52"
4997                 html: "<b><p></b>TEST"
4998                 errors: 2
4999                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|     <p>\n|       <b>\n|       \"TEST\"\n"
5000         }, {
5001                 name: "tests1.dat #53"
5002                 html: "<p id=a><b><p id=b></b>TEST"
5003                 errors: 3
5004                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       id=\"a\"\n|       <b>\n|     <p>\n|       id=\"b\"\n|       \"TEST\"\n"
5005         }, {
5006                 name: "tests1.dat #54"
5007                 html: "<b id=a><p><b id=b></p></b>TEST"
5008                 errors: 4
5009                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       id=\"a\"\n|       <p>\n|         <b>\n|           id=\"b\"\n|       \"TEST\"\n"
5010         }, {
5011                 name: "tests1.dat #55"
5012                 html: "<!DOCTYPE html><title>U-test</title><body><div><p>Test<u></p></div></body>"
5013                 errors: 1
5014                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <title>\n|       \"U-test\"\n|   <body>\n|     <div>\n|       <p>\n|         \"Test\"\n|         <u>\n"
5015         }, {
5016                 name: "tests1.dat #56"
5017                 html: "<!DOCTYPE html><font><table></font></table></font>"
5018                 errors: 2
5019                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <font>\n|       <table>\n"
5020         }, {
5021                 name: "tests1.dat #57"
5022                 html: "<font><p>hello<b>cruel</font>world"
5023                 errors: 4
5024                 expected: "| <html>\n|   <head>\n|   <body>\n|     <font>\n|     <p>\n|       <font>\n|         \"hello\"\n|         <b>\n|           \"cruel\"\n|       <b>\n|         \"world\"\n"
5025         }, {
5026                 name: "tests1.dat #58"
5027                 html: "<b>Test</i>Test"
5028                 errors: 3
5029                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       \"TestTest\"\n"
5030         }, {
5031                 name: "tests1.dat #59"
5032                 html: "<b>A<cite>B<div>C"
5033                 errors: 2
5034                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       \"A\"\n|       <cite>\n|         \"B\"\n|         <div>\n|           \"C\"\n"
5035         }, {
5036                 name: "tests1.dat #60"
5037                 html: "<b>A<cite>B<div>C</cite>D"
5038                 errors: 3
5039                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       \"A\"\n|       <cite>\n|         \"B\"\n|         <div>\n|           \"CD\"\n"
5040         }, {
5041                 name: "tests1.dat #61"
5042                 html: "<b>A<cite>B<div>C</b>D"
5043                 errors: 3
5044                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       \"A\"\n|       <cite>\n|         \"B\"\n|     <div>\n|       <b>\n|         \"C\"\n|       \"D\"\n"
5045         }, {
5046                 name: "tests1.dat #62"
5047                 html: ""
5048                 errors: 1
5049                 expected: "| <html>\n|   <head>\n|   <body>\n"
5050         }, {
5051                 name: "tests1.dat #63"
5052                 html: "<DIV>"
5053                 errors: 2
5054                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n"
5055         }, {
5056                 name: "tests1.dat #64"
5057                 html: "<DIV> abc"
5058                 errors: 2
5059                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc\"\n"
5060         }, {
5061                 name: "tests1.dat #65"
5062                 html: "<DIV> abc <B>"
5063                 errors: 2
5064                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n"
5065         }, {
5066                 name: "tests1.dat #66"
5067                 html: "<DIV> abc <B> def"
5068                 errors: 2
5069                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n|         \" def\"\n"
5070         }, {
5071                 name: "tests1.dat #67"
5072                 html: "<DIV> abc <B> def <I>"
5073                 errors: 2
5074                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n|         \" def \"\n|         <i>\n"
5075         }, {
5076                 name: "tests1.dat #68"
5077                 html: "<DIV> abc <B> def <I> ghi"
5078                 errors: 2
5079                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n|         \" def \"\n|         <i>\n|           \" ghi\"\n"
5080         }, {
5081                 name: "tests1.dat #69"
5082                 html: "<DIV> abc <B> def <I> ghi <P>"
5083                 errors: 2
5084                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n|         \" def \"\n|         <i>\n|           \" ghi \"\n|           <p>\n"
5085         }, {
5086                 name: "tests1.dat #70"
5087                 html: "<DIV> abc <B> def <I> ghi <P> jkl"
5088                 errors: 2
5089                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \" abc \"\n|       <b>\n|         \" def \"\n|         <i>\n|           \" ghi \"\n|           <p>\n|             \" jkl\"\n"
5090         }, {
5091                 name: "tests1.dat #71"
5092                 html: "<DIV> abc <B> def <I> ghi <P> jkl </B>"
5093                 errors: 3
5094                 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"
5095         }, {
5096                 name: "tests1.dat #72"
5097                 html: "<DIV> abc <B> def <I> ghi <P> jkl </B> mno"
5098                 errors: 3
5099                 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"
5100         }, {
5101                 name: "tests1.dat #73"
5102                 html: "<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I>"
5103                 errors: 4
5104                 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"
5105         }, {
5106                 name: "tests1.dat #74"
5107                 html: "<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I> pqr"
5108                 errors: 4
5109                 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"
5110         }, {
5111                 name: "tests1.dat #75"
5112                 html: "<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I> pqr </P>"
5113                 errors: 4
5114                 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"
5115         }, {
5116                 name: "tests1.dat #76"
5117                 html: "<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I> pqr </P> stu"
5118                 errors: 4
5119                 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"
5120         }, {
5121                 name: "tests1.dat #77"
5122                 html: "<test attribute---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->"
5123                 errors: 2
5124                 expected: "| <html>\n|   <head>\n|   <body>\n|     <test>\n|       attribute----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------=\"\"\n"
5125         }, {
5126                 name: "tests1.dat #78"
5127                 html: "<a href=\"blah\">aba<table><a href=\"foo\">br<tr><td></td></tr>x</table>aoe"
5128                 errors: 8
5129                 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"
5130         }, {
5131                 name: "tests1.dat #79"
5132                 html: "<a href=\"blah\">aba<table><tr><td><a href=\"foo\">br</td></tr>x</table>aoe"
5133                 errors: 4
5134                 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"
5135         }, {
5136                 name: "tests1.dat #80"
5137                 html: "<table><a href=\"blah\">aba<tr><td><a href=\"foo\">br</td></tr>x</table>aoe"
5138                 errors: 8
5139                 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"
5140         }, {
5141                 name: "tests1.dat #81"
5142                 html: "<a href=a>aa<marquee>aa<a href=b>bb</marquee>aa"
5143                 errors: 3
5144                 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"
5145         }, {
5146                 name: "tests1.dat #82"
5147                 html: "<wbr><strike><code></strike><code><strike></code>"
5148                 errors: 4
5149                 expected: "| <html>\n|   <head>\n|   <body>\n|     <wbr>\n|     <strike>\n|       <code>\n|     <code>\n|       <code>\n|         <strike>\n"
5150         }, {
5151                 name: "tests1.dat #83"
5152                 html: "<!DOCTYPE html><spacer>foo"
5153                 errors: 1
5154                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <spacer>\n|       \"foo\"\n"
5155         }, {
5156                 name: "tests1.dat #84"
5157                 html: "<title><meta></title><link><title><meta></title>"
5158                 errors: 1
5159                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"<meta>\"\n|     <link>\n|     <title>\n|       \"<meta>\"\n|   <body>\n"
5160         }, {
5161                 name: "tests1.dat #85"
5162                 html: "<style><!--</style><meta><script>--><link></script>"
5163                 errors: 1
5164                 expected: "| <html>\n|   <head>\n|     <style>\n|       \"<!--\"\n|     <meta>\n|     <script>\n|       \"--><link>\"\n|   <body>\n"
5165         }, {
5166                 name: "tests1.dat #86"
5167                 html: "<head><meta></head><link>"
5168                 errors: 2
5169                 expected: "| <html>\n|   <head>\n|     <meta>\n|     <link>\n|   <body>\n"
5170         }, {
5171                 name: "tests1.dat #87"
5172                 html: "<table><tr><tr><td><td><span><th><span>X</table>"
5173                 errors: 3
5174                 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"
5175         }, {
5176                 name: "tests1.dat #88"
5177                 html: "<body><body><base><link><meta><title><p></title><body><p></body>"
5178                 errors: 3
5179                 expected: "| <html>\n|   <head>\n|   <body>\n|     <base>\n|     <link>\n|     <meta>\n|     <title>\n|       \"<p>\"\n|     <p>\n"
5180         }, {
5181                 name: "tests1.dat #89"
5182                 html: "<textarea><p></textarea>"
5183                 errors: 1
5184                 expected: "| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"<p>\"\n"
5185         }, {
5186                 name: "tests1.dat #90"
5187                 html: "<p><image></p>"
5188                 errors: 2
5189                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <img>\n"
5190         }, {
5191                 name: "tests1.dat #91"
5192                 html: "<a><table><a></table><p><a><div><a>"
5193                 errors: 10
5194                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       <a>\n|       <table>\n|     <p>\n|       <a>\n|     <div>\n|       <a>\n"
5195         }, {
5196                 name: "tests1.dat #92"
5197                 html: "<head></p><meta><p>"
5198                 errors: 2
5199                 expected: "| <html>\n|   <head>\n|     <meta>\n|   <body>\n|     <p>\n"
5200         }, {
5201                 name: "tests1.dat #93"
5202                 html: "<head></html><meta><p>"
5203                 errors: 2
5204                 expected: "| <html>\n|   <head>\n|   <body>\n|     <meta>\n|     <p>\n"
5205         }, {
5206                 name: "tests1.dat #94"
5207                 html: "<b><table><td><i></table>"
5208                 errors: 4
5209                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <table>\n|         <tbody>\n|           <tr>\n|             <td>\n|               <i>\n"
5210         }, {
5211                 name: "tests1.dat #95"
5212                 html: "<b><table><td></b><i></table>"
5213                 errors: 5
5214                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <table>\n|         <tbody>\n|           <tr>\n|             <td>\n|               <i>\n"
5215         }, {
5216                 name: "tests1.dat #96"
5217                 html: "<h1><h2>"
5218                 errors: 3
5219                 expected: "| <html>\n|   <head>\n|   <body>\n|     <h1>\n|     <h2>\n"
5220         }, {
5221                 name: "tests1.dat #97"
5222                 html: "<a><p><a></a></p></a>"
5223                 errors: 4
5224                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|     <p>\n|       <a>\n|       <a>\n"
5225         }, {
5226                 name: "tests1.dat #98"
5227                 html: "<b><button></b></button></b>"
5228                 errors: 3
5229                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|     <button>\n|       <b>\n"
5230         }, {
5231                 name: "tests1.dat #99"
5232                 html: "<p><b><div><marquee></p></b></div>"
5233                 errors: 6
5234                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <b>\n|     <div>\n|       <b>\n|         <marquee>\n|           <p>\n"
5235         }, {
5236                 name: "tests1.dat #100"
5237                 html: "<script></script></div><title></title><p><p>"
5238                 errors: 2
5239                 expected: "| <html>\n|   <head>\n|     <script>\n|     <title>\n|   <body>\n|     <p>\n|     <p>\n"
5240         }, {
5241                 name: "tests1.dat #101"
5242                 html: "<p><hr></p>"
5243                 errors: 2
5244                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <hr>\n|     <p>\n"
5245         }, {
5246                 name: "tests1.dat #102"
5247                 html: "<select><b><option><select><option></b></select>"
5248                 errors: 6
5249                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n|     <option>\n"
5250         }, {
5251                 name: "tests1.dat #103"
5252                 html: "<html><head><title></title><body></body></html>"
5253                 errors: 1
5254                 expected: "| <html>\n|   <head>\n|     <title>\n|   <body>\n"
5255         }, {
5256                 name: "tests1.dat #104"
5257                 html: "<a><table><td><a><table></table><a></tr><a></table><a>"
5258                 errors: 10
5259                 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"
5260         }, {
5261                 name: "tests1.dat #105"
5262                 html: "<ul><li></li><div><li></div><li><li><div><li><address><li><b><em></b><li></ul>"
5263                 errors: 4
5264                 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"
5265         }, {
5266                 name: "tests1.dat #106"
5267                 html: "<ul><li><ul></li><li>a</li></ul></li></ul>"
5268                 errors: 2
5269                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ul>\n|       <li>\n|         <ul>\n|           <li>\n|             \"a\"\n"
5270         }, {
5271                 name: "tests1.dat #107"
5272                 html: "<frameset><frame><frameset><frame></frameset><noframes></noframes></frameset>"
5273                 errors: 1
5274                 expected: "| <html>\n|   <head>\n|   <frameset>\n|     <frame>\n|     <frameset>\n|       <frame>\n|     <noframes>\n"
5275         }, {
5276                 name: "tests1.dat #108"
5277                 html: "<h1><table><td><h3></table><h3></h1>"
5278                 errors: 5
5279                 expected: "| <html>\n|   <head>\n|   <body>\n|     <h1>\n|       <table>\n|         <tbody>\n|           <tr>\n|             <td>\n|               <h3>\n|     <h3>\n"
5280         }, {
5281                 name: "tests1.dat #109"
5282                 html: "<table><colgroup><col><colgroup><col><col><col><colgroup><col><col><thead><tr><td></table>"
5283                 errors: 1
5284                 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"
5285         }, {
5286                 name: "tests1.dat #110"
5287                 html: "<table><col><tbody><col><tr><col><td><col></table><col>"
5288                 errors: 3
5289                 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"
5290         }, {
5291                 name: "tests1.dat #111"
5292                 html: "<table><colgroup><tbody><colgroup><tr><colgroup><td><colgroup></table><colgroup>"
5293                 errors: 3
5294                 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"
5295         }, {
5296                 name: "tests1.dat #112"
5297                 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>"
5298                 errors: 85
5299                 expected: "| <html>\n|   <head>\n|   <body>\n|     <br>\n|     <p>\n"
5300         }, {
5301                 name: "tests1.dat #113"
5302                 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>"
5303                 errors: 111
5304                 expected: "| <html>\n|   <head>\n|   <body>\n|     <br>\n|     <table>\n|       <tbody>\n|         <tr>\n|     <p>\n"
5305         }, {
5306                 name: "tests1.dat #114"
5307                 html: "<frameset>"
5308                 errors: 2
5309                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
5310         }, {
5311                 name: "tests20.dat #1"
5312                 html: "<!doctype html><p><button><button>"
5313                 errors: 2
5314                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|       <button>\n"
5315         }, {
5316                 name: "tests20.dat #2"
5317                 html: "<!doctype html><p><button><address>"
5318                 errors: 1
5319                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <address>\n"
5320         }, {
5321                 name: "tests20.dat #3"
5322                 html: "<!doctype html><p><button><blockquote>"
5323                 errors: 1
5324                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <blockquote>\n"
5325         }, {
5326                 name: "tests20.dat #4"
5327                 html: "<!doctype html><p><button><menu>"
5328                 errors: 1
5329                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <menu>\n"
5330         }, {
5331                 name: "tests20.dat #5"
5332                 html: "<!doctype html><p><button><p>"
5333                 errors: 1
5334                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <p>\n"
5335         }, {
5336                 name: "tests20.dat #6"
5337                 html: "<!doctype html><p><button><ul>"
5338                 errors: 1
5339                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <ul>\n"
5340         }, {
5341                 name: "tests20.dat #7"
5342                 html: "<!doctype html><p><button><h1>"
5343                 errors: 1
5344                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <h1>\n"
5345         }, {
5346                 name: "tests20.dat #8"
5347                 html: "<!doctype html><p><button><h6>"
5348                 errors: 1
5349                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <h6>\n"
5350         }, {
5351                 name: "tests20.dat #9"
5352                 html: "<!doctype html><p><button><listing>"
5353                 errors: 1
5354                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <listing>\n"
5355         }, {
5356                 name: "tests20.dat #10"
5357                 html: "<!doctype html><p><button><pre>"
5358                 errors: 1
5359                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <pre>\n"
5360         }, {
5361                 name: "tests20.dat #11"
5362                 html: "<!doctype html><p><button><form>"
5363                 errors: 1
5364                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <form>\n"
5365         }, {
5366                 name: "tests20.dat #12"
5367                 html: "<!doctype html><p><button><li>"
5368                 errors: 1
5369                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <li>\n"
5370         }, {
5371                 name: "tests20.dat #13"
5372                 html: "<!doctype html><p><button><dd>"
5373                 errors: 1
5374                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <dd>\n"
5375         }, {
5376                 name: "tests20.dat #14"
5377                 html: "<!doctype html><p><button><dt>"
5378                 errors: 1
5379                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <dt>\n"
5380         }, {
5381                 name: "tests20.dat #15"
5382                 html: "<!doctype html><p><button><plaintext>"
5383                 errors: 1
5384                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <plaintext>\n"
5385         }, {
5386                 name: "tests20.dat #16"
5387                 html: "<!doctype html><p><button><table>"
5388                 errors: 1
5389                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <table>\n"
5390         }, {
5391                 name: "tests20.dat #17"
5392                 html: "<!doctype html><p><button><hr>"
5393                 errors: 1
5394                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <hr>\n"
5395         }, {
5396                 name: "tests20.dat #18"
5397                 html: "<!doctype html><p><button><xmp>"
5398                 errors: 2
5399                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <xmp>\n"
5400         }, {
5401                 name: "tests20.dat #19"
5402                 html: "<!doctype html><p><button></p>"
5403                 errors: 2
5404                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <button>\n|         <p>\n"
5405         }, {
5406                 name: "tests20.dat #20"
5407                 html: "<!doctype html><address><button></address>a"
5408                 errors: 1
5409                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <address>\n|       <button>\n|     \"a\"\n"
5410         }, {
5411                 name: "tests20.dat #21"
5412                 html: "<!doctype html><address><button></address>a"
5413                 errors: 1
5414                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <address>\n|       <button>\n|     \"a\"\n"
5415         }, {
5416                 name: "tests20.dat #22"
5417                 html: "<p><table></p>"
5418                 errors: 4
5419                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <p>\n|       <table>\n"
5420         }, {
5421                 name: "tests20.dat #23"
5422                 html: "<!doctype html><svg>"
5423                 errors: 1
5424                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n"
5425         }, {
5426                 name: "tests20.dat #24"
5427                 html: "<!doctype html><p><figcaption>"
5428                 errors: 1
5429                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <figcaption>\n"
5430         }, {
5431                 name: "tests20.dat #25"
5432                 html: "<!doctype html><p><summary>"
5433                 errors: 1
5434                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <summary>\n"
5435         }, {
5436                 name: "tests20.dat #26"
5437                 html: "<!doctype html><form><table><form>"
5438                 errors: 2
5439                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <form>\n|       <table>\n"
5440         }, {
5441                 name: "tests20.dat #27"
5442                 html: "<!doctype html><table><form><form>"
5443                 errors: 3
5444                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <form>\n"
5445         }, {
5446                 name: "tests20.dat #28"
5447                 html: "<!doctype html><table><form></table><form>"
5448                 errors: 2
5449                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <form>\n"
5450         }, {
5451                 name: "tests20.dat #29"
5452                 html: "<!doctype html><svg><foreignObject><p>"
5453                 errors: 1
5454                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg foreignObject>\n|         <p>\n"
5455         }, {
5456                 name: "tests20.dat #30"
5457                 html: "<!doctype html><svg><title>abc"
5458                 errors: 1
5459                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg title>\n|         \"abc\"\n"
5460         }, {
5461                 name: "tests20.dat #31"
5462                 html: "<option><span><option>"
5463                 errors: 2
5464                 expected: "| <html>\n|   <head>\n|   <body>\n|     <option>\n|       <span>\n|         <option>\n"
5465         }, {
5466                 name: "tests20.dat #32"
5467                 html: "<option><option>"
5468                 errors: 2
5469                 expected: "| <html>\n|   <head>\n|   <body>\n|     <option>\n|     <option>\n"
5470         }, {
5471                 name: "tests20.dat #33"
5472                 html: "<math><annotation-xml><div>"
5473                 errors: 3
5474                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|     <div>\n"
5475         }, {
5476                 name: "tests20.dat #34"
5477                 html: "<math><annotation-xml encoding=\"application/svg+xml\"><div>"
5478                 errors: 3
5479                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         encoding=\"application/svg+xml\"\n|     <div>\n"
5480         }, {
5481                 name: "tests20.dat #35"
5482                 html: "<math><annotation-xml encoding=\"application/xhtml+xml\"><div>"
5483                 errors: 2
5484                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         encoding=\"application/xhtml+xml\"\n|         <div>\n"
5485         }, {
5486                 name: "tests20.dat #36"
5487                 html: "<math><annotation-xml encoding=\"aPPlication/xhtmL+xMl\"><div>"
5488                 errors: 2
5489                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         encoding=\"aPPlication/xhtmL+xMl\"\n|         <div>\n"
5490         }, {
5491                 name: "tests20.dat #37"
5492                 html: "<math><annotation-xml encoding=\"text/html\"><div>"
5493                 errors: 2
5494                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         encoding=\"text/html\"\n|         <div>\n"
5495         }, {
5496                 name: "tests20.dat #38"
5497                 html: "<math><annotation-xml encoding=\"Text/htmL\"><div>"
5498                 errors: 2
5499                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         encoding=\"Text/htmL\"\n|         <div>\n"
5500         }, {
5501                 name: "tests20.dat #39"
5502                 html: "<math><annotation-xml encoding=\" text/html \"><div>"
5503                 errors: 3
5504                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         encoding=\" text/html \"\n|     <div>\n"
5505         }, {
5506                 name: "tests21.dat #1"
5507                 html: "<svg><![CDATA[foo]]>"
5508                 errors: 2
5509                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"foo\"\n"
5510         }, {
5511                 name: "tests21.dat #2"
5512                 html: "<math><![CDATA[foo]]>"
5513                 errors: 2
5514                 expected: "| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       \"foo\"\n"
5515         }, {
5516                 name: "tests21.dat #3"
5517                 html: "<div><![CDATA[foo]]>"
5518                 errors: 3
5519                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <!-- [CDATA[foo]] -->\n"
5520         }, {
5521                 name: "tests21.dat #4"
5522                 html: "<svg><![CDATA[foo"
5523                 errors: 2
5524                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"foo\"\n"
5525         }, {
5526                 name: "tests21.dat #5"
5527                 html: "<svg><![CDATA[foo"
5528                 errors: 2
5529                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"foo\"\n"
5530         }, {
5531                 name: "tests21.dat #6"
5532                 html: "<svg><![CDATA["
5533                 errors: 2
5534                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n"
5535         }, {
5536                 name: "tests21.dat #7"
5537                 html: "<svg><![CDATA[]]>"
5538                 errors: 2
5539                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n"
5540         }, {
5541                 name: "tests21.dat #8"
5542                 html: "<svg><![CDATA[]] >]]>"
5543                 errors: 2
5544                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"]] >\"\n"
5545         }, {
5546                 name: "tests21.dat #9"
5547                 html: "<svg><![CDATA[]] >]]>"
5548                 errors: 2
5549                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"]] >\"\n"
5550         }, {
5551                 name: "tests21.dat #10"
5552                 html: "<svg><![CDATA[]]"
5553                 errors: 2
5554                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"]]\"\n"
5555         }, {
5556                 name: "tests21.dat #11"
5557                 html: "<svg><![CDATA[]"
5558                 errors: 2
5559                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"]\"\n"
5560         }, {
5561                 name: "tests21.dat #12"
5562                 html: "<svg><![CDATA[]>a"
5563                 errors: 2
5564                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"]>a\"\n"
5565         }, {
5566                 name: "tests21.dat #13"
5567                 html: "<!DOCTYPE html><svg><![CDATA[foo]]]>"
5568                 errors: 1
5569                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"foo]\"\n"
5570         }, {
5571                 name: "tests21.dat #14"
5572                 html: "<!DOCTYPE html><svg><![CDATA[foo]]]]>"
5573                 errors: 1
5574                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"foo]]\"\n"
5575         }, {
5576                 name: "tests21.dat #15"
5577                 html: "<!DOCTYPE html><svg><![CDATA[foo]]]]]>"
5578                 errors: 1
5579                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"foo]]]\"\n"
5580         }, {
5581                 name: "tests21.dat #16"
5582                 html: "<svg><foreignObject><div><![CDATA[foo]]>"
5583                 errors: 3
5584                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg foreignObject>\n|         <div>\n|           <!-- [CDATA[foo]] -->\n"
5585         }, {
5586                 name: "tests21.dat #17"
5587                 html: "<svg><![CDATA[<svg>]]>"
5588                 errors: 2
5589                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"<svg>\"\n"
5590         }, {
5591                 name: "tests21.dat #18"
5592                 html: "<svg><![CDATA[</svg>a]]>"
5593                 errors: 2
5594                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"</svg>a\"\n"
5595         }, {
5596                 name: "tests21.dat #19"
5597                 html: "<svg><![CDATA[<svg>a"
5598                 errors: 2
5599                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"<svg>a\"\n"
5600         }, {
5601                 name: "tests21.dat #20"
5602                 html: "<svg><![CDATA[</svg>a"
5603                 errors: 2
5604                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"</svg>a\"\n"
5605         }, {
5606                 name: "tests21.dat #21"
5607                 html: "<svg><![CDATA[<svg>]]><path>"
5608                 errors: 2
5609                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"<svg>\"\n|       <svg path>\n"
5610         }, {
5611                 name: "tests21.dat #22"
5612                 html: "<svg><![CDATA[<svg>]]></path>"
5613                 errors: 4
5614                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"<svg>\"\n"
5615         }, {
5616                 name: "tests21.dat #23"
5617                 html: "<svg><![CDATA[<svg>]]><!--path-->"
5618                 errors: 2
5619                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"<svg>\"\n|       <!-- path -->\n"
5620         }, {
5621                 name: "tests21.dat #24"
5622                 html: "<svg><![CDATA[<svg>]]>path"
5623                 errors: 2
5624                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"<svg>path\"\n"
5625         }, {
5626                 name: "tests21.dat #25"
5627                 html: "<svg><![CDATA[<!--svg-->]]>"
5628                 errors: 2
5629                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       \"<!--svg-->\"\n"
5630         }, {
5631                 name: "tests22.dat #1"
5632                 html: "<a><b><big><em><strong><div>X</a>"
5633                 errors: 3
5634                 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"
5635         }, {
5636                 name: "tests22.dat #2"
5637                 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>"
5638                 errors: 10
5639                 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"
5640         }, {
5641                 name: "tests22.dat #3"
5642                 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>"
5643                 errors: 10
5644                 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"
5645         }, {
5646                 name: "tests22.dat #4"
5647                 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>"
5648                 errors: 10
5649                 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"
5650         }, {
5651                 name: "tests22.dat #5"
5652                 html: "<cite><b><cite><i><cite><i><cite><i><div>X</b>TEST"
5653                 errors: 3
5654                 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"
5655         }, {
5656                 name: "tests23.dat #1"
5657                 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"
5658                 errors: 3
5659                 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"
5660         }, {
5661                 name: "tests23.dat #2"
5662                 html: "<p><font size=4><font size=4><font size=4><font size=4><p>X"
5663                 errors: 3
5664                 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"
5665         }, {
5666                 name: "tests23.dat #3"
5667                 html: "<p><font size=4><font size=4><font size=4><font size=\"5\"><font size=4><p>X"
5668                 errors: 3
5669                 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"
5670         }, {
5671                 name: "tests23.dat #4"
5672                 html: "<p><font size=4 id=a><font size=4 id=b><font size=4><font size=4><p>X"
5673                 errors: 3
5674                 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"
5675         }, {
5676                 name: "tests23.dat #5"
5677                 html: "<p><b id=a><b id=a><b id=a><b><object><b id=a><b id=a>X</object><p>Y"
5678                 errors: 4
5679                 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"
5680         }, {
5681                 name: "tests24.dat #1"
5682                 html: "<!DOCTYPE html>&NotEqualTilde;"
5683                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"≂̸\"\n"
5684         }, {
5685                 name: "tests24.dat #2"
5686                 html: "<!DOCTYPE html>&NotEqualTilde;A"
5687                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"≂̸A\"\n"
5688         }, {
5689                 name: "tests24.dat #3"
5690                 html: "<!DOCTYPE html>&ThickSpace;"
5691                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"  \"\n"
5692         }, {
5693                 name: "tests24.dat #4"
5694                 html: "<!DOCTYPE html>&ThickSpace;A"
5695                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"  A\"\n"
5696         }, {
5697                 name: "tests24.dat #5"
5698                 html: "<!DOCTYPE html>&NotSubset;"
5699                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"⊂⃒\"\n"
5700         }, {
5701                 name: "tests24.dat #6"
5702                 html: "<!DOCTYPE html>&NotSubset;A"
5703                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"⊂⃒A\"\n"
5704         }, {
5705                 name: "tests24.dat #7"
5706                 html: "<!DOCTYPE html>&Gopf;"
5707                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"𝔾\"\n"
5708         }, {
5709                 name: "tests24.dat #8"
5710                 html: "<!DOCTYPE html>&Gopf;A"
5711                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"𝔾A\"\n"
5712         }, {
5713                 name: "tests25.dat #1"
5714                 html: "<!DOCTYPE html><body><foo>A"
5715                 errors: 1
5716                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <foo>\n|       \"A\"\n"
5717         }, {
5718                 name: "tests25.dat #2"
5719                 html: "<!DOCTYPE html><body><area>A"
5720                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <area>\n|     \"A\"\n"
5721         }, {
5722                 name: "tests25.dat #3"
5723                 html: "<!DOCTYPE html><body><base>A"
5724                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <base>\n|     \"A\"\n"
5725         }, {
5726                 name: "tests25.dat #4"
5727                 html: "<!DOCTYPE html><body><basefont>A"
5728                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <basefont>\n|     \"A\"\n"
5729         }, {
5730                 name: "tests25.dat #5"
5731                 html: "<!DOCTYPE html><body><bgsound>A"
5732                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <bgsound>\n|     \"A\"\n"
5733         }, {
5734                 name: "tests25.dat #6"
5735                 html: "<!DOCTYPE html><body><br>A"
5736                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <br>\n|     \"A\"\n"
5737         }, {
5738                 name: "tests25.dat #7"
5739                 html: "<!DOCTYPE html><body><col>A"
5740                 errors: 1
5741                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"A\"\n"
5742         }, {
5743                 name: "tests25.dat #8"
5744                 html: "<!DOCTYPE html><body><command>A"
5745                 errors: 1
5746                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <command>\n|       \"A\"\n"
5747         }, {
5748                 name: "tests25.dat #9"
5749                 html: "<!DOCTYPE html><body><menuitem>A"
5750                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <menuitem>\n|     \"A\"\n"
5751         }, {
5752                 name: "tests25.dat #10"
5753                 html: "<!DOCTYPE html><body><embed>A"
5754                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <embed>\n|     \"A\"\n"
5755         }, {
5756                 name: "tests25.dat #11"
5757                 html: "<!DOCTYPE html><body><frame>A"
5758                 errors: 1
5759                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"A\"\n"
5760         }, {
5761                 name: "tests25.dat #12"
5762                 html: "<!DOCTYPE html><body><hr>A"
5763                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <hr>\n|     \"A\"\n"
5764         }, {
5765                 name: "tests25.dat #13"
5766                 html: "<!DOCTYPE html><body><img>A"
5767                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <img>\n|     \"A\"\n"
5768         }, {
5769                 name: "tests25.dat #14"
5770                 html: "<!DOCTYPE html><body><input>A"
5771                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <input>\n|     \"A\"\n"
5772         }, {
5773                 name: "tests25.dat #15"
5774                 html: "<!DOCTYPE html><body><keygen>A"
5775                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <keygen>\n|     \"A\"\n"
5776         }, {
5777                 name: "tests25.dat #16"
5778                 html: "<!DOCTYPE html><body><link>A"
5779                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <link>\n|     \"A\"\n"
5780         }, {
5781                 name: "tests25.dat #17"
5782                 html: "<!DOCTYPE html><body><meta>A"
5783                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <meta>\n|     \"A\"\n"
5784         }, {
5785                 name: "tests25.dat #18"
5786                 html: "<!DOCTYPE html><body><param>A"
5787                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <param>\n|     \"A\"\n"
5788         }, {
5789                 name: "tests25.dat #19"
5790                 html: "<!DOCTYPE html><body><source>A"
5791                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <source>\n|     \"A\"\n"
5792         }, {
5793                 name: "tests25.dat #20"
5794                 html: "<!DOCTYPE html><body><track>A"
5795                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <track>\n|     \"A\"\n"
5796         }, {
5797                 name: "tests25.dat #21"
5798                 html: "<!DOCTYPE html><body><wbr>A"
5799                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <wbr>\n|     \"A\"\n"
5800         }, {
5801                 name: "tests26.dat #1"
5802                 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>"
5803                 errors: 10
5804                 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"
5805         }, {
5806                 name: "tests26.dat #2"
5807                 html: "<!DOCTYPE html><body><b><nobr>1<nobr></b><i><nobr>2<nobr></i>3"
5808                 errors: 7
5809                 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"
5810         }, {
5811                 name: "tests26.dat #3"
5812                 html: "<!DOCTYPE html><body><b><nobr>1<table><nobr></b><i><nobr>2<nobr></i>3"
5813                 errors: 14
5814                 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"
5815         }, {
5816                 name: "tests26.dat #4"
5817                 html: "<!DOCTYPE html><body><b><nobr>1<table><tr><td><nobr></b><i><nobr>2<nobr></i>3"
5818                 errors: 6
5819                 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"
5820         }, {
5821                 name: "tests26.dat #5"
5822                 html: "<!DOCTYPE html><body><b><nobr>1<div><nobr></b><i><nobr>2<nobr></i>3"
5823                 errors: 9
5824                 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"
5825         }, {
5826                 name: "tests26.dat #6"
5827                 html: "<!DOCTYPE html><body><b><nobr>1<nobr></b><div><i><nobr>2<nobr></i>3"
5828                 errors: 7
5829                 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"
5830         }, {
5831                 name: "tests26.dat #7"
5832                 html: "<!DOCTYPE html><body><b><nobr>1<nobr><ins></b><i><nobr>"
5833                 errors: 5
5834                 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"
5835         }, {
5836                 name: "tests26.dat #8"
5837                 html: "<!DOCTYPE html><body><b><nobr>1<ins><nobr></b><i>2"
5838                 errors: 4
5839                 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"
5840         }, {
5841                 name: "tests26.dat #9"
5842                 html: "<!DOCTYPE html><body><b>1<nobr></b><i><nobr>2</i>"
5843                 errors: 4
5844                 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"
5845         }, {
5846                 name: "tests26.dat #10"
5847                 html: "<p><code x</code></p>\n"
5848                 errors: 5
5849                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <code>\n|         code=\"\"\n|         x<=\"\"\n|     <code>\n|       code=\"\"\n|       x<=\"\"\n|       \"\n\"\n"
5850         }, {
5851                 name: "tests26.dat #11"
5852                 html: "<!DOCTYPE html><svg><foreignObject><p><i></p>a"
5853                 errors: 2
5854                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg foreignObject>\n|         <p>\n|           <i>\n|         <i>\n|           \"a\"\n"
5855         }, {
5856                 name: "tests26.dat #12"
5857                 html: "<!DOCTYPE html><table><tr><td><svg><foreignObject><p><i></p>a"
5858                 errors: 2
5859                 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"
5860         }, {
5861                 name: "tests26.dat #13"
5862                 html: "<!DOCTYPE html><math><mtext><p><i></p>a"
5863                 errors: 2
5864                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mtext>\n|         <p>\n|           <i>\n|         <i>\n|           \"a\"\n"
5865         }, {
5866                 name: "tests26.dat #14"
5867                 html: "<!DOCTYPE html><table><tr><td><math><mtext><p><i></p>a"
5868                 errors: 2
5869                 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"
5870         }, {
5871                 name: "tests26.dat #15"
5872                 html: "<!DOCTYPE html><body><div><!/div>a"
5873                 errors: 2
5874                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <!-- /div -->\n|       \"a\"\n"
5875         }, {
5876                 name: "tests26.dat #16"
5877                 html: "<button><p><button>"
5878                 errors: 3
5879                 expected: "| <html>\n|   <head>\n|   <body>\n|     <button>\n|       <p>\n|     <button>\n"
5880         }, {
5881                 name: "tests2.dat #1"
5882                 html: "<!DOCTYPE html>Test"
5883                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"Test\"\n"
5884         }, {
5885                 name: "tests2.dat #2"
5886                 html: "<textarea>test</div>test"
5887                 errors: 2
5888                 expected: "| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"test</div>test\"\n"
5889         }, {
5890                 name: "tests2.dat #3"
5891                 html: "<table><td>"
5892                 errors: 3
5893                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n"
5894         }, {
5895                 name: "tests2.dat #4"
5896                 html: "<table><td>test</tbody></table>"
5897                 errors: 2
5898                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             \"test\"\n"
5899         }, {
5900                 name: "tests2.dat #5"
5901                 html: "<frame>test"
5902                 errors: 2
5903                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"test\"\n"
5904         }, {
5905                 name: "tests2.dat #6"
5906                 html: "<!DOCTYPE html><frameset>test"
5907                 errors: 5
5908                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
5909         }, {
5910                 name: "tests2.dat #7"
5911                 html: "<!DOCTYPE html><frameset> te st"
5912                 errors: 5
5913                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|     \"  \"\n"
5914         }, {
5915                 name: "tests2.dat #8"
5916                 html: "<!DOCTYPE html><frameset></frameset> te st"
5917                 errors: 4
5918                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n|   \"  \"\n"
5919         }, {
5920                 name: "tests2.dat #9"
5921                 html: "<!DOCTYPE html><frameset><!DOCTYPE html>"
5922                 errors: 2
5923                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
5924         }, {
5925                 name: "tests2.dat #10"
5926                 html: "<!DOCTYPE html><font><p><b>test</font>"
5927                 errors: 2
5928                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <font>\n|     <p>\n|       <font>\n|         <b>\n|           \"test\"\n"
5929         }, {
5930                 name: "tests2.dat #11"
5931                 html: "<!DOCTYPE html><dt><div><dd>"
5932                 errors: 1
5933                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <dt>\n|       <div>\n|     <dd>\n"
5934         }, {
5935                 name: "tests2.dat #12"
5936                 html: "<script></x"
5937                 errors: 2
5938                 expected: "| <html>\n|   <head>\n|     <script>\n|       \"</x\"\n|   <body>\n"
5939         }, {
5940                 name: "tests2.dat #13"
5941                 html: "<table><plaintext><td>"
5942                 errors: 7
5943                 expected: "| <html>\n|   <head>\n|   <body>\n|     <plaintext>\n|       \"<td>\"\n|     <table>\n"
5944         }, {
5945                 name: "tests2.dat #14"
5946                 html: "<plaintext></plaintext>"
5947                 errors: 2
5948                 expected: "| <html>\n|   <head>\n|   <body>\n|     <plaintext>\n|       \"</plaintext>\"\n"
5949         }, {
5950                 name: "tests2.dat #15"
5951                 html: "<!DOCTYPE html><table><tr>TEST"
5952                 errors: 5
5953                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"TEST\"\n|     <table>\n|       <tbody>\n|         <tr>\n"
5954         }, {
5955                 name: "tests2.dat #16"
5956                 html: "<!DOCTYPE html><body t1=1><body t2=2><body t3=3 t4=4>"
5957                 errors: 2
5958                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     t1=\"1\"\n|     t2=\"2\"\n|     t3=\"3\"\n|     t4=\"4\"\n"
5959         }, {
5960                 name: "tests2.dat #17"
5961                 html: "</b test"
5962                 errors: 2
5963                 expected: "| <html>\n|   <head>\n|   <body>\n"
5964         }, {
5965                 name: "tests2.dat #18"
5966                 html: "<!DOCTYPE html></b test<b &=&amp>X"
5967                 errors: 4
5968                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"X\"\n"
5969         }, {
5970                 name: "tests2.dat #19"
5971                 html: "<!doctypehtml><scrIPt type=text/x-foobar;baz>X</SCRipt"
5972                 errors: 2
5973                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       type=\"text/x-foobar;baz\"\n|       \"X</SCRipt\"\n|   <body>\n"
5974         }, {
5975                 name: "tests2.dat #20"
5976                 html: "&"
5977                 errors: 1
5978                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"&\"\n"
5979         }, {
5980                 name: "tests2.dat #21"
5981                 html: "&#"
5982                 errors: 2
5983                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"&#\"\n"
5984         }, {
5985                 name: "tests2.dat #22"
5986                 html: "&#X"
5987                 errors: 2
5988                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"&#X\"\n"
5989         }, {
5990                 name: "tests2.dat #23"
5991                 html: "&#x"
5992                 errors: 2
5993                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"&#x\"\n"
5994         }, {
5995                 name: "tests2.dat #24"
5996                 html: "&#45"
5997                 errors: 2
5998                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"-\"\n"
5999         }, {
6000                 name: "tests2.dat #25"
6001                 html: "&x-test"
6002                 errors: 1
6003                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"&x-test\"\n"
6004         }, {
6005                 name: "tests2.dat #26"
6006                 html: "<!doctypehtml><p><li>"
6007                 errors: 1
6008                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <li>\n"
6009         }, {
6010                 name: "tests2.dat #27"
6011                 html: "<!doctypehtml><p><dt>"
6012                 errors: 1
6013                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <dt>\n"
6014         }, {
6015                 name: "tests2.dat #28"
6016                 html: "<!doctypehtml><p><dd>"
6017                 errors: 1
6018                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <dd>\n"
6019         }, {
6020                 name: "tests2.dat #29"
6021                 html: "<!doctypehtml><p><form>"
6022                 errors: 2
6023                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <form>\n"
6024         }, {
6025                 name: "tests2.dat #30"
6026                 html: "<!DOCTYPE html><p></P>X"
6027                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     \"X\"\n"
6028         }, {
6029                 name: "tests2.dat #31"
6030                 html: "&AMP"
6031                 errors: 2
6032                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"&\"\n"
6033         }, {
6034                 name: "tests2.dat #32"
6035                 html: "&AMp;"
6036                 errors: 2
6037                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"&AMp;\"\n"
6038         }, {
6039                 name: "tests2.dat #33"
6040                 html: "<!DOCTYPE html><html><head></head><body><thisISasillyTESTelementNameToMakeSureCrazyTagNamesArePARSEDcorrectLY>"
6041                 errors: 1
6042                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <thisisasillytestelementnametomakesurecrazytagnamesareparsedcorrectly>\n"
6043         }, {
6044                 name: "tests2.dat #34"
6045                 html: "<!DOCTYPE html>X</body>X"
6046                 errors: 1
6047                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"XX\"\n"
6048         }, {
6049                 name: "tests2.dat #35"
6050                 html: "<!DOCTYPE html><!-- X"
6051                 errors: 1
6052                 expected: "| <!DOCTYPE html>\n| <!--  X -->\n| <html>\n|   <head>\n|   <body>\n"
6053         }, {
6054                 name: "tests2.dat #36"
6055                 html: "<!DOCTYPE html><table><caption>test TEST</caption><td>test"
6056                 errors: 2
6057                 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"
6058         }, {
6059                 name: "tests2.dat #37"
6060                 html: "<!DOCTYPE html><select><option><optgroup>"
6061                 errors: 1
6062                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n|       <optgroup>\n"
6063         }, {
6064                 name: "tests2.dat #38"
6065                 html: "<!DOCTYPE html><select><optgroup><option></optgroup><option><select><option>"
6066                 errors: 2
6067                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <optgroup>\n|         <option>\n|       <option>\n|     <option>\n"
6068         }, {
6069                 name: "tests2.dat #39"
6070                 html: "<!DOCTYPE html><select><optgroup><option><optgroup>"
6071                 errors: 1
6072                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <optgroup>\n|         <option>\n|       <optgroup>\n"
6073         }, {
6074                 name: "tests2.dat #40"
6075                 html: "<!DOCTYPE html><datalist><option>foo</datalist>bar"
6076                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <datalist>\n|       <option>\n|         \"foo\"\n|     \"bar\"\n"
6077         }, {
6078                 name: "tests2.dat #41"
6079                 html: "<!DOCTYPE html><font><input><input></font>"
6080                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <font>\n|       <input>\n|       <input>\n"
6081         }, {
6082                 name: "tests2.dat #42"
6083                 html: "<!DOCTYPE html><!-- XXX - XXX -->"
6084                 expected: "| <!DOCTYPE html>\n| <!--  XXX - XXX  -->\n| <html>\n|   <head>\n|   <body>\n"
6085         }, {
6086                 name: "tests2.dat #43"
6087                 html: "<!DOCTYPE html><!-- XXX - XXX"
6088                 errors: 1
6089                 expected: "| <!DOCTYPE html>\n| <!--  XXX - XXX -->\n| <html>\n|   <head>\n|   <body>\n"
6090         }, {
6091                 name: "tests2.dat #44"
6092                 html: "<!DOCTYPE html><!-- XXX - XXX - XXX -->"
6093                 expected: "| <!DOCTYPE html>\n| <!--  XXX - XXX - XXX  -->\n| <html>\n|   <head>\n|   <body>\n"
6094         }, {
6095                 name: "tests2.dat #45"
6096                 html: "<isindex test=x name=x>"
6097                 errors: 2
6098                 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"
6099         }, {
6100                 name: "tests2.dat #46"
6101                 html: "test\ntest"
6102                 errors: 1
6103                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"test\ntest\"\n"
6104         }, {
6105                 name: "tests2.dat #47"
6106                 html: "<!DOCTYPE html><body><title>test</body></title>"
6107                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <title>\n|       \"test</body>\"\n"
6108         }, {
6109                 name: "tests2.dat #48"
6110                 html: "<!DOCTYPE html><body><title>X</title><meta name=z><link rel=foo><style>\nx { content:\"</style\" } </style>"
6111                 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"
6112         }, {
6113                 name: "tests2.dat #49"
6114                 html: "<!DOCTYPE html><select><optgroup></optgroup></select>"
6115                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <optgroup>\n"
6116         }, {
6117                 name: "tests2.dat #50"
6118                 html: " \n "
6119                 errors: 1
6120                 expected: "| <html>\n|   <head>\n|   <body>\n"
6121         }, {
6122                 name: "tests2.dat #51"
6123                 html: "<!DOCTYPE html>  <html>"
6124                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
6125         }, {
6126                 name: "tests2.dat #52"
6127                 html: "<!DOCTYPE html><script>\n</script>  <title>x</title>  </head>"
6128                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <script>\n|       \"\n\"\n|     \"  \"\n|     <title>\n|       \"x\"\n|     \"  \"\n|   <body>\n"
6129         }, {
6130                 name: "tests2.dat #53"
6131                 html: "<!DOCTYPE html><html><body><html id=x>"
6132                 errors: 1
6133                 expected: "| <!DOCTYPE html>\n| <html>\n|   id=\"x\"\n|   <head>\n|   <body>\n"
6134         }, {
6135                 name: "tests2.dat #54"
6136                 html: "<!DOCTYPE html>X</body><html id=\"x\">"
6137                 errors: 1
6138                 expected: "| <!DOCTYPE html>\n| <html>\n|   id=\"x\"\n|   <head>\n|   <body>\n|     \"X\"\n"
6139         }, {
6140                 name: "tests2.dat #55"
6141                 html: "<!DOCTYPE html><head><html id=x>"
6142                 errors: 1
6143                 expected: "| <!DOCTYPE html>\n| <html>\n|   id=\"x\"\n|   <head>\n|   <body>\n"
6144         }, {
6145                 name: "tests2.dat #56"
6146                 html: "<!DOCTYPE html>X</html>X"
6147                 errors: 1
6148                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"XX\"\n"
6149         }, {
6150                 name: "tests2.dat #57"
6151                 html: "<!DOCTYPE html>X</html> "
6152                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"X \"\n"
6153         }, {
6154                 name: "tests2.dat #58"
6155                 html: "<!DOCTYPE html>X</html><p>X"
6156                 errors: 1
6157                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"X\"\n|     <p>\n|       \"X\"\n"
6158         }, {
6159                 name: "tests2.dat #59"
6160                 html: "<!DOCTYPE html>X<p/x/y/z>"
6161                 errors: 3
6162                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"X\"\n|     <p>\n|       x=\"\"\n|       y=\"\"\n|       z=\"\"\n"
6163         }, {
6164                 name: "tests2.dat #60"
6165                 html: "<!DOCTYPE html><!--x--"
6166                 errors: 1
6167                 expected: "| <!DOCTYPE html>\n| <!-- x -->\n| <html>\n|   <head>\n|   <body>\n"
6168         }, {
6169                 name: "tests2.dat #61"
6170                 html: "<!DOCTYPE html><table><tr><td></p></table>"
6171                 errors: 1
6172                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <p>\n"
6173         }, {
6174                 name: "tests2.dat #62"
6175                 html: "<!DOCTYPE <!DOCTYPE HTML>><!--<!--x-->-->"
6176                 errors: 3
6177                 expected: "| <!DOCTYPE <!doctype>\n| <html>\n|   <head>\n|   <body>\n|     \">\"\n|     <!-- <!--x -->\n|     \"-->\"\n"
6178         }, {
6179                 name: "tests2.dat #63"
6180                 html: "<!doctype html><div><form></form><div></div></div>"
6181                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <form>\n|       <div>\n"
6182         }, {
6183                 name: "tests3.dat #1"
6184                 html: "<head></head><style></style>"
6185                 errors: 2
6186                 expected: "| <html>\n|   <head>\n|     <style>\n|   <body>\n"
6187         }, {
6188                 name: "tests3.dat #2"
6189                 html: "<head></head><script></script>"
6190                 errors: 2
6191                 expected: "| <html>\n|   <head>\n|     <script>\n|   <body>\n"
6192         }, {
6193                 name: "tests3.dat #3"
6194                 html: "<head></head><!-- --><style></style><!-- --><script></script>"
6195                 errors: 3
6196                 expected: "| <html>\n|   <head>\n|     <style>\n|     <script>\n|   <!--   -->\n|   <!--   -->\n|   <body>\n"
6197         }, {
6198                 name: "tests3.dat #4"
6199                 html: "<head></head><!-- -->x<style></style><!-- --><script></script>"
6200                 errors: 1
6201                 expected: "| <html>\n|   <head>\n|   <!--   -->\n|   <body>\n|     \"x\"\n|     <style>\n|     <!--   -->\n|     <script>\n"
6202         }, {
6203                 name: "tests3.dat #5"
6204                 html: "<!DOCTYPE html><html><head></head><body><pre>\n</pre></body></html>"
6205                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n"
6206         }, {
6207                 name: "tests3.dat #6"
6208                 html: "<!DOCTYPE html><html><head></head><body><pre>\nfoo</pre></body></html>"
6209                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"foo\"\n"
6210         }, {
6211                 name: "tests3.dat #7"
6212                 html: "<!DOCTYPE html><html><head></head><body><pre>\n\nfoo</pre></body></html>"
6213                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"\nfoo\"\n"
6214         }, {
6215                 name: "tests3.dat #8"
6216                 html: "<!DOCTYPE html><html><head></head><body><pre>\nfoo\n</pre></body></html>"
6217                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"foo\n\"\n"
6218         }, {
6219                 name: "tests3.dat #9"
6220                 html: "<!DOCTYPE html><html><head></head><body><pre>x</pre><span>\n</span></body></html>"
6221                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"x\"\n|     <span>\n|       \"\n\"\n"
6222         }, {
6223                 name: "tests3.dat #10"
6224                 html: "<!DOCTYPE html><html><head></head><body><pre>x\ny</pre></body></html>"
6225                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"x\ny\"\n"
6226         }, {
6227                 name: "tests3.dat #11"
6228                 html: "<!DOCTYPE html><html><head></head><body><pre>x<div>\ny</pre></body></html>"
6229                 errors: 1
6230                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"x\"\n|       <div>\n|         \"\ny\"\n"
6231         }, {
6232                 name: "tests3.dat #12"
6233                 html: "<!DOCTYPE html><pre>&#x0a;&#x0a;A</pre>"
6234                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <pre>\n|       \"\nA\"\n"
6235         }, {
6236                 name: "tests3.dat #13"
6237                 html: "<!DOCTYPE html><HTML><META><HEAD></HEAD></HTML>"
6238                 errors: 1
6239                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <meta>\n|   <body>\n"
6240         }, {
6241                 name: "tests3.dat #14"
6242                 html: "<!DOCTYPE html><HTML><HEAD><head></HEAD></HTML>"
6243                 errors: 1
6244                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
6245         }, {
6246                 name: "tests3.dat #15"
6247                 html: "<textarea>foo<span>bar</span><i>baz"
6248                 errors: 2
6249                 expected: "| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"foo<span>bar</span><i>baz\"\n"
6250         }, {
6251                 name: "tests3.dat #16"
6252                 html: "<title>foo<span>bar</em><i>baz"
6253                 errors: 2
6254                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"foo<span>bar</em><i>baz\"\n|   <body>\n"
6255         }, {
6256                 name: "tests3.dat #17"
6257                 html: "<!DOCTYPE html><textarea>\n</textarea>"
6258                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n"
6259         }, {
6260                 name: "tests3.dat #18"
6261                 html: "<!DOCTYPE html><textarea>\nfoo</textarea>"
6262                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"foo\"\n"
6263         }, {
6264                 name: "tests3.dat #19"
6265                 html: "<!DOCTYPE html><textarea>\n\nfoo</textarea>"
6266                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \"\nfoo\"\n"
6267         }, {
6268                 name: "tests3.dat #20"
6269                 html: "<!DOCTYPE html><html><head></head><body><ul><li><div><p><li></ul></body></html>"
6270                 errors: 1
6271                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <ul>\n|       <li>\n|         <div>\n|           <p>\n|       <li>\n"
6272         }, {
6273                 name: "tests3.dat #21"
6274                 html: "<!doctype html><nobr><nobr><nobr>"
6275                 errors: 3
6276                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <nobr>\n|     <nobr>\n|     <nobr>\n"
6277         }, {
6278                 name: "tests3.dat #22"
6279                 html: "<!doctype html><nobr><nobr></nobr><nobr>"
6280                 errors: 2
6281                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <nobr>\n|     <nobr>\n|     <nobr>\n"
6282         }, {
6283                 name: "tests3.dat #23"
6284                 html: "<!doctype html><html><body><p><table></table></body></html>"
6285                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <table>\n"
6286         }, {
6287                 name: "tests3.dat #24"
6288                 html: "<p><table></table>"
6289                 errors: 1
6290                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <table>\n"
6291         }, {
6292                 name: "tests4.dat #1"
6293                 html: "direct div content"
6294                 fragment: "div"
6295                 expected: "| \"direct div content\"\n"
6296         }, {
6297                 name: "tests4.dat #2"
6298                 html: "direct textarea content"
6299                 fragment: "textarea"
6300                 expected: "| \"direct textarea content\"\n"
6301         }, {
6302                 name: "tests4.dat #3"
6303                 html: "textarea content with <em>pseudo</em> <foo>markup"
6304                 fragment: "textarea"
6305                 expected: "| \"textarea content with <em>pseudo</em> <foo>markup\"\n"
6306         }, {
6307                 name: "tests4.dat #4"
6308                 html: "this is &#x0043;DATA inside a <style> element"
6309                 fragment: "style"
6310                 expected: "| \"this is &#x0043;DATA inside a <style> element\"\n"
6311         }, {
6312                 name: "tests4.dat #5"
6313                 html: "</plaintext>"
6314                 fragment: "plaintext"
6315                 expected: "| \"</plaintext>\"\n"
6316         }, {
6317                 name: "tests4.dat #6"
6318                 html: "setting html's innerHTML"
6319                 fragment: "html"
6320                 expected: "| <head>\n| <body>\n|   \"setting html's innerHTML\"\n"
6321         }, {
6322                 name: "tests4.dat #7"
6323                 html: "<title>setting head's innerHTML</title>"
6324                 fragment: "head"
6325                 expected: "| <title>\n|   \"setting head's innerHTML\"\n"
6326         }, {
6327                 name: "tests5.dat #1"
6328                 html: "<style> <!-- </style>x"
6329                 errors: 1
6330                 expected: "| <html>\n|   <head>\n|     <style>\n|       \" <!-- \"\n|   <body>\n|     \"x\"\n"
6331         }, {
6332                 name: "tests5.dat #2"
6333                 html: "<style> <!-- </style> --> </style>x"
6334                 errors: 2
6335                 expected: "| <html>\n|   <head>\n|     <style>\n|       \" <!-- \"\n|     \" \"\n|   <body>\n|     \"--> x\"\n"
6336         }, {
6337                 name: "tests5.dat #3"
6338                 html: "<style> <!--> </style>x"
6339                 errors: 1
6340                 expected: "| <html>\n|   <head>\n|     <style>\n|       \" <!--> \"\n|   <body>\n|     \"x\"\n"
6341         }, {
6342                 name: "tests5.dat #4"
6343                 html: "<style> <!---> </style>x"
6344                 errors: 1
6345                 expected: "| <html>\n|   <head>\n|     <style>\n|       \" <!---> \"\n|   <body>\n|     \"x\"\n"
6346         }, {
6347                 name: "tests5.dat #5"
6348                 html: "<iframe> <!---> </iframe>x"
6349                 errors: 1
6350                 expected: "| <html>\n|   <head>\n|   <body>\n|     <iframe>\n|       \" <!---> \"\n|     \"x\"\n"
6351         }, {
6352                 name: "tests5.dat #6"
6353                 html: "<iframe> <!--- </iframe>->x</iframe> --> </iframe>x"
6354                 errors: 3
6355                 expected: "| <html>\n|   <head>\n|   <body>\n|     <iframe>\n|       \" <!--- \"\n|     \"->x --> x\"\n"
6356         }, {
6357                 name: "tests5.dat #7"
6358                 html: "<script> <!-- </script> --> </script>x"
6359                 errors: 2
6360                 expected: "| <html>\n|   <head>\n|     <script>\n|       \" <!-- \"\n|     \" \"\n|   <body>\n|     \"--> x\"\n"
6361         }, {
6362                 name: "tests5.dat #8"
6363                 html: "<title> <!-- </title> --> </title>x"
6364                 errors: 2
6365                 expected: "| <html>\n|   <head>\n|     <title>\n|       \" <!-- \"\n|     \" \"\n|   <body>\n|     \"--> x\"\n"
6366         }, {
6367                 name: "tests5.dat #9"
6368                 html: "<textarea> <!--- </textarea>->x</textarea> --> </textarea>x"
6369                 errors: 3
6370                 expected: "| <html>\n|   <head>\n|   <body>\n|     <textarea>\n|       \" <!--- \"\n|     \"->x --> x\"\n"
6371         }, {
6372                 name: "tests5.dat #10"
6373                 html: "<style> <!</-- </style>x"
6374                 errors: 1
6375                 expected: "| <html>\n|   <head>\n|     <style>\n|       \" <!</-- \"\n|   <body>\n|     \"x\"\n"
6376         }, {
6377                 name: "tests5.dat #11"
6378                 html: "<p><xmp></xmp>"
6379                 errors: 1
6380                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|     <xmp>\n"
6381         }, {
6382                 name: "tests5.dat #12"
6383                 html: "<xmp> <!-- > --> </xmp>"
6384                 errors: 1
6385                 expected: "| <html>\n|   <head>\n|   <body>\n|     <xmp>\n|       \" <!-- > --> \"\n"
6386         }, {
6387                 name: "tests5.dat #13"
6388                 html: "<title>&amp;</title>"
6389                 errors: 1
6390                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"&\"\n|   <body>\n"
6391         }, {
6392                 name: "tests5.dat #14"
6393                 html: "<title><!--&amp;--></title>"
6394                 errors: 1
6395                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"<!--&-->\"\n|   <body>\n"
6396         }, {
6397                 name: "tests5.dat #15"
6398                 html: "<title><!--</title>"
6399                 errors: 1
6400                 expected: "| <html>\n|   <head>\n|     <title>\n|       \"<!--\"\n|   <body>\n"
6401         }, {
6402                 name: "tests5.dat #16"
6403                 html: "<noscript><!--</noscript>--></noscript>"
6404                 scripting: true
6405                 errors: 2
6406                 expected: "| <html>\n|   <head>\n|     <noscript>\n|       \"<!--\"\n|   <body>\n|     \"-->\"\n"
6407         }, {
6408                 name: "tests5.dat #17"
6409                 html: "<noscript><!--</noscript>--></noscript>"
6410                 scripting: false
6411                 errors: 1
6412                 expected: "| <html>\n|   <head>\n|     <noscript>\n|       <!-- </noscript> -->\n|   <body>\n"
6413         }, {
6414                 name: "tests6.dat #1"
6415                 html: "<!doctype html></head> <head>"
6416                 errors: 1
6417                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   \" \"\n|   <body>\n"
6418         }, {
6419                 name: "tests6.dat #2"
6420                 html: "<!doctype html><form><div></form><div>"
6421                 errors: 2
6422                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <form>\n|       <div>\n|         <div>\n"
6423         }, {
6424                 name: "tests6.dat #3"
6425                 html: "<!doctype html><title>&amp;</title>"
6426                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <title>\n|       \"&\"\n|   <body>\n"
6427         }, {
6428                 name: "tests6.dat #4"
6429                 html: "<!doctype html><title><!--&amp;--></title>"
6430                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <title>\n|       \"<!--&-->\"\n|   <body>\n"
6431         }, {
6432                 name: "tests6.dat #5"
6433                 html: "<!doctype>"
6434                 errors: 3
6435                 expected: "| <!DOCTYPE >\n| <html>\n|   <head>\n|   <body>\n"
6436         }, {
6437                 name: "tests6.dat #6"
6438                 html: "<!---x"
6439                 errors: 2
6440                 expected: "| <!-- -x -->\n| <html>\n|   <head>\n|   <body>\n"
6441         }, {
6442                 name: "tests6.dat #7"
6443                 html: "<body>\n<div>"
6444                 errors: 2,"document-fragment":"div"
6445                 expected: "| \"\n\"\n| <div>\n"
6446         }, {
6447                 name: "tests6.dat #8"
6448                 html: "<frameset></frameset>\nfoo"
6449                 errors: 4
6450                 expected: "| <html>\n|   <head>\n|   <frameset>\n|   \"\n\"\n"
6451         }, {
6452                 name: "tests6.dat #9"
6453                 html: "<frameset></frameset>\n<noframes>"
6454                 errors: 2
6455                 expected: "| <html>\n|   <head>\n|   <frameset>\n|   \"\n\"\n|   <noframes>\n"
6456         }, {
6457                 name: "tests6.dat #10"
6458                 html: "<frameset></frameset>\n<div>"
6459                 errors: 2
6460                 expected: "| <html>\n|   <head>\n|   <frameset>\n|   \"\n\"\n"
6461         }, {
6462                 name: "tests6.dat #11"
6463                 html: "<frameset></frameset>\n</html>"
6464                 errors: 1
6465                 expected: "| <html>\n|   <head>\n|   <frameset>\n|   \"\n\"\n"
6466         }, {
6467                 name: "tests6.dat #12"
6468                 html: "<frameset></frameset>\n</div>"
6469                 errors: 2
6470                 expected: "| <html>\n|   <head>\n|   <frameset>\n|   \"\n\"\n"
6471         }, {
6472                 name: "tests6.dat #13"
6473                 html: "<form><form>"
6474                 errors: 3
6475                 expected: "| <html>\n|   <head>\n|   <body>\n|     <form>\n"
6476         }, {
6477                 name: "tests6.dat #14"
6478                 html: "<button><button>"
6479                 errors: 3
6480                 expected: "| <html>\n|   <head>\n|   <body>\n|     <button>\n|     <button>\n"
6481         }, {
6482                 name: "tests6.dat #15"
6483                 html: "<table><tr><td></th>"
6484                 errors: 3
6485                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n"
6486         }, {
6487                 name: "tests6.dat #16"
6488                 html: "<table><caption><td>"
6489                 errors: 3
6490                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|       <tbody>\n|         <tr>\n|           <td>\n"
6491         }, {
6492                 name: "tests6.dat #17"
6493                 html: "<table><caption><div>"
6494                 errors: 2
6495                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <div>\n"
6496         }, {
6497                 name: "tests6.dat #18"
6498                 html: "</caption><div>"
6499                 errors: 2,"document-fragment":"caption"
6500                 expected: "| <div>\n"
6501         }, {
6502                 name: "tests6.dat #19"
6503                 html: "<table><caption><div></caption>"
6504                 errors: 3
6505                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <div>\n"
6506         }, {
6507                 name: "tests6.dat #20"
6508                 html: "<table><caption></table>"
6509                 errors: 1
6510                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n"
6511         }, {
6512                 name: "tests6.dat #21"
6513                 html: "</table><div>"
6514                 errors: 2,"document-fragment":"caption"
6515                 expected: "| <div>\n"
6516         }, {
6517                 name: "tests6.dat #22"
6518                 html: "<table><caption></body></col></colgroup></html></tbody></td></tfoot></th></thead></tr>"
6519                 errors: 12
6520                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n"
6521         }, {
6522                 name: "tests6.dat #23"
6523                 html: "<table><caption><div></div>"
6524                 errors: 2
6525                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <caption>\n|         <div>\n"
6526         }, {
6527                 name: "tests6.dat #24"
6528                 html: "<table><tr><td></body></caption></col></colgroup></html>"
6529                 errors: 7
6530                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n"
6531         }, {
6532                 name: "tests6.dat #25"
6533                 html: "</table></tbody></tfoot></thead></tr><div>"
6534                 errors: 6,"document-fragment":"td"
6535                 expected: "| <div>\n"
6536         }, {
6537                 name: "tests6.dat #26"
6538                 html: "<table><colgroup>foo"
6539                 errors: 5
6540                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"foo\"\n|     <table>\n|       <colgroup>\n"
6541         }, {
6542                 name: "tests6.dat #27"
6543                 html: "foo<col>"
6544                 errors: 3,"document-fragment":"colgroup"
6545                 expected: "| <col>\n"
6546         }, {
6547                 name: "tests6.dat #28"
6548                 html: "<table><colgroup></col>"
6549                 errors: 3
6550                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <colgroup>\n"
6551         }, {
6552                 name: "tests6.dat #29"
6553                 html: "<frameset><div>"
6554                 errors: 3
6555                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
6556         }, {
6557                 name: "tests6.dat #30"
6558                 html: "</frameset><frame>"
6559                 errors: 1,"document-fragment":"frameset"
6560                 expected: "| <frame>\n"
6561         }, {
6562                 name: "tests6.dat #31"
6563                 html: "<frameset></div>"
6564                 errors: 3
6565                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
6566         }, {
6567                 name: "tests6.dat #32"
6568                 html: "</body><div>"
6569                 errors: 2,"document-fragment":"body"
6570                 expected: "| <div>\n"
6571         }, {
6572                 name: "tests6.dat #33"
6573                 html: "<table><tr><div>"
6574                 errors: 3
6575                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|     <table>\n|       <tbody>\n|         <tr>\n"
6576         }, {
6577                 name: "tests6.dat #34"
6578                 html: "</tr><td>"
6579                 errors: 1,"document-fragment":"tr"
6580                 expected: "| <td>\n"
6581         }, {
6582                 name: "tests6.dat #35"
6583                 html: "</tbody></tfoot></thead><td>"
6584                 errors: 3,"document-fragment":"tr"
6585                 expected: "| <td>\n"
6586         }, {
6587                 name: "tests6.dat #36"
6588                 html: "<table><tr><div><td>"
6589                 errors: 3
6590                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n"
6591         }, {
6592                 name: "tests6.dat #37"
6593                 html: "<caption><col><colgroup><tbody><tfoot><thead><tr>"
6594                 errors: 6,"document-fragment":"tbody"
6595                 expected: "| <tr>\n"
6596         }, {
6597                 name: "tests6.dat #38"
6598                 html: "<table><tbody></thead>"
6599                 errors: 3
6600                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n"
6601         }, {
6602                 name: "tests6.dat #39"
6603                 html: "</table><tr>"
6604                 errors: 1,"document-fragment":"tbody"
6605                 expected: "| <tr>\n"
6606         }, {
6607                 name: "tests6.dat #40"
6608                 html: "<table><tbody></body></caption></col></colgroup></html></td></th></tr>"
6609                 errors: 10
6610                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n"
6611         }, {
6612                 name: "tests6.dat #41"
6613                 html: "<table><tbody></div>"
6614                 errors: 4
6615                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n"
6616         }, {
6617                 name: "tests6.dat #42"
6618                 html: "<table><table>"
6619                 errors: 3
6620                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|     <table>\n"
6621         }, {
6622                 name: "tests6.dat #43"
6623                 html: "<table></body></caption></col></colgroup></html></tbody></td></tfoot></th></thead></tr>"
6624                 errors: 13
6625                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n"
6626         }, {
6627                 name: "tests6.dat #44"
6628                 html: "</table><tr>"
6629                 errors: 1,"document-fragment":"table"
6630                 expected: "| <tbody>\n|   <tr>\n"
6631         }, {
6632                 name: "tests6.dat #45"
6633                 html: "<body></body></html>"
6634                 errors: 1,"document-fragment":"html"
6635                 expected: "| <head>\n| <body>\n"
6636         }, {
6637                 name: "tests6.dat #46"
6638                 html: "<html><frameset></frameset></html> "
6639                 errors: 1
6640                 expected: "| <html>\n|   <head>\n|   <frameset>\n|   \" \"\n"
6641         }, {
6642                 name: "tests6.dat #47"
6643                 html: "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\"><html></html>"
6644                 expected: "| <!DOCTYPE html \"-//W3C//DTD HTML 4.01//EN\" \"\">\n| <html>\n|   <head>\n|   <body>\n"
6645         }, {
6646                 name: "tests6.dat #48"
6647                 html: "<param><frameset></frameset>"
6648                 errors: 2
6649                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
6650         }, {
6651                 name: "tests6.dat #49"
6652                 html: "<source><frameset></frameset>"
6653                 errors: 2
6654                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
6655         }, {
6656                 name: "tests6.dat #50"
6657                 html: "<track><frameset></frameset>"
6658                 errors: 2
6659                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
6660         }, {
6661                 name: "tests6.dat #51"
6662                 html: "</html><frameset></frameset>"
6663                 errors: 3
6664                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
6665         }, {
6666                 name: "tests6.dat #52"
6667                 html: "</body><frameset></frameset>"
6668                 errors: 3
6669                 expected: "| <html>\n|   <head>\n|   <frameset>\n"
6670         }, {
6671                 name: "tests7.dat #1"
6672                 html: "<!doctype html><body><title>X</title>"
6673                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <title>\n|       \"X\"\n"
6674         }, {
6675                 name: "tests7.dat #2"
6676                 html: "<!doctype html><table><title>X</title></table>"
6677                 errors: 1
6678                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <title>\n|       \"X\"\n|     <table>\n"
6679         }, {
6680                 name: "tests7.dat #3"
6681                 html: "<!doctype html><head></head><title>X</title>"
6682                 errors: 1
6683                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <title>\n|       \"X\"\n|   <body>\n"
6684         }, {
6685                 name: "tests7.dat #4"
6686                 html: "<!doctype html></head><title>X</title>"
6687                 errors: 1
6688                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|     <title>\n|       \"X\"\n|   <body>\n"
6689         }, {
6690                 name: "tests7.dat #5"
6691                 html: "<!doctype html><table><meta></table>"
6692                 errors: 1
6693                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <meta>\n|     <table>\n"
6694         }, {
6695                 name: "tests7.dat #6"
6696                 html: "<!doctype html><table>X<tr><td><table> <meta></table></table>"
6697                 errors: 2
6698                 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"
6699         }, {
6700                 name: "tests7.dat #7"
6701                 html: "<!doctype html><html> <head>"
6702                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
6703         }, {
6704                 name: "tests7.dat #8"
6705                 html: "<!doctype html> <head>"
6706                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
6707         }, {
6708                 name: "tests7.dat #9"
6709                 html: "<!doctype html><table><style> <tr>x </style> </table>"
6710                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <style>\n|         \" <tr>x \"\n|       \" \"\n"
6711         }, {
6712                 name: "tests7.dat #10"
6713                 html: "<!doctype html><table><TBODY><script> <tr>x </script> </table>"
6714                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <script>\n|           \" <tr>x \"\n|         \" \"\n"
6715         }, {
6716                 name: "tests7.dat #11"
6717                 html: "<!doctype html><p><applet><p>X</p></applet>"
6718                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       <applet>\n|         <p>\n|           \"X\"\n"
6719         }, {
6720                 name: "tests7.dat #12"
6721                 html: "<!doctype html><p><object type=\"application/x-non-existant-plugin\"><p>X</p></object>"
6722                 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"
6723         }, {
6724                 name: "tests7.dat #13"
6725                 html: "<!doctype html><listing>\nX</listing>"
6726                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <listing>\n|       \"X\"\n"
6727         }, {
6728                 name: "tests7.dat #14"
6729                 html: "<!doctype html><select><input>X"
6730                 errors: 1
6731                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|     <input>\n|     \"X\"\n"
6732         }, {
6733                 name: "tests7.dat #15"
6734                 html: "<!doctype html><select><select>X"
6735                 errors: 1
6736                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|     \"X\"\n"
6737         }, {
6738                 name: "tests7.dat #16"
6739                 html: "<!doctype html><table><input type=hidDEN></table>"
6740                 errors: 1
6741                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <input>\n|         type=\"hidDEN\"\n"
6742         }, {
6743                 name: "tests7.dat #17"
6744                 html: "<!doctype html><table>X<input type=hidDEN></table>"
6745                 errors: 2
6746                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     \"X\"\n|     <table>\n|       <input>\n|         type=\"hidDEN\"\n"
6747         }, {
6748                 name: "tests7.dat #18"
6749                 html: "<!doctype html><table>  <input type=hidDEN></table>"
6750                 errors: 1
6751                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       \"  \"\n|       <input>\n|         type=\"hidDEN\"\n"
6752         }, {
6753                 name: "tests7.dat #19"
6754                 html: "<!doctype html><table>  <input type='hidDEN'></table>"
6755                 errors: 1
6756                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <table>\n|       \"  \"\n|       <input>\n|         type=\"hidDEN\"\n"
6757         }, {
6758                 name: "tests7.dat #20"
6759                 html: "<!doctype html><table><input type=\" hidden\"><input type=hidDEN></table>"
6760                 errors: 2
6761                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <input>\n|       type=\" hidden\"\n|     <table>\n|       <input>\n|         type=\"hidDEN\"\n"
6762         }, {
6763                 name: "tests7.dat #21"
6764                 html: "<!doctype html><table><select>X<tr>"
6765                 errors: 3
6766                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       \"X\"\n|     <table>\n|       <tbody>\n|         <tr>\n"
6767         }, {
6768                 name: "tests7.dat #22"
6769                 html: "<!doctype html><select>X</select>"
6770                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       \"X\"\n"
6771         }, {
6772                 name: "tests7.dat #23"
6773                 html: "<!DOCTYPE hTmL><html></html>"
6774                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
6775         }, {
6776                 name: "tests7.dat #24"
6777                 html: "<!DOCTYPE HTML><html></html>"
6778                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n"
6779         }, {
6780                 name: "tests7.dat #25"
6781                 html: "<body>X</body></body>"
6782                 errors: 1,"document-fragment":"html"
6783                 expected: "| <head>\n| <body>\n|   \"X\"\n"
6784         }, {
6785                 name: "tests7.dat #26"
6786                 html: "<div><p>a</x> b"
6787                 errors: 3
6788                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <p>\n|         \"a b\"\n"
6789         }, {
6790                 name: "tests7.dat #27"
6791                 html: "<table><tr><td><code></code> </table>"
6792                 errors: 1
6793                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             <code>\n|             \" \"\n"
6794         }, {
6795                 name: "tests7.dat #28"
6796                 html: "<table><b><tr><td>aaa</td></tr>bbb</table>ccc"
6797                 errors: 6
6798                 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"
6799         }, {
6800                 name: "tests7.dat #29"
6801                 html: "A<table><tr> B</tr> B</table>"
6802                 errors: 5
6803                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"A B B\"\n|     <table>\n|       <tbody>\n|         <tr>\n"
6804         }, {
6805                 name: "tests7.dat #30"
6806                 html: "A<table><tr> B</tr> </em>C</table>"
6807                 errors: 6
6808                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"A BC\"\n|     <table>\n|       <tbody>\n|         <tr>\n|         \" \"\n"
6809         }, {
6810                 name: "tests7.dat #31"
6811                 html: "<select><keygen>"
6812                 errors: 2
6813                 expected: "| <html>\n|   <head>\n|   <body>\n|     <select>\n|     <keygen>\n"
6814         }, {
6815                 name: "tests8.dat #1"
6816                 html: "<div>\n<div></div>\n</span>x"
6817                 errors: 3
6818                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"\n\"\n|       <div>\n|       \"\nx\"\n"
6819         }, {
6820                 name: "tests8.dat #2"
6821                 html: "<div>x<div></div>\n</span>x"
6822                 errors: 3
6823                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"x\"\n|       <div>\n|       \"\nx\"\n"
6824         }, {
6825                 name: "tests8.dat #3"
6826                 html: "<div>x<div></div>x</span>x"
6827                 errors: 3
6828                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"x\"\n|       <div>\n|       \"xx\"\n"
6829         }, {
6830                 name: "tests8.dat #4"
6831                 html: "<div>x<div></div>y</span>z"
6832                 errors: 3
6833                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"x\"\n|       <div>\n|       \"yz\"\n"
6834         }, {
6835                 name: "tests8.dat #5"
6836                 html: "<table><div>x<div></div>x</span>x"
6837                 errors: 10
6838                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"x\"\n|       <div>\n|       \"xx\"\n|     <table>\n"
6839         }, {
6840                 name: "tests8.dat #6"
6841                 html: "x<table>x"
6842                 errors: 3
6843                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"xx\"\n|     <table>\n"
6844         }, {
6845                 name: "tests8.dat #7"
6846                 html: "x<table><table>x"
6847                 errors: 4
6848                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"x\"\n|     <table>\n|     \"x\"\n|     <table>\n"
6849         }, {
6850                 name: "tests8.dat #8"
6851                 html: "<b>a<div></div><div></b>y"
6852                 errors: 3
6853                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       \"a\"\n|       <div>\n|     <div>\n|       <b>\n|       \"y\"\n"
6854         }, {
6855                 name: "tests8.dat #9"
6856                 html: "<a><div><p></a>"
6857                 errors: 4
6858                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|     <div>\n|       <a>\n|       <p>\n|         <a>\n"
6859         }, {
6860                 name: "tests9.dat #1"
6861                 html: "<!DOCTYPE html><math></math>"
6862                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n"
6863         }, {
6864                 name: "tests9.dat #2"
6865                 html: "<!DOCTYPE html><body><math></math>"
6866                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n"
6867         }, {
6868                 name: "tests9.dat #3"
6869                 html: "<!DOCTYPE html><math><mi>"
6870                 errors: 1
6871                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mi>\n"
6872         }, {
6873                 name: "tests9.dat #4"
6874                 html: "<!DOCTYPE html><math><annotation-xml><svg><u>"
6875                 errors: 2
6876                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math annotation-xml>\n|         <svg svg>\n|     <u>\n"
6877         }, {
6878                 name: "tests9.dat #5"
6879                 html: "<!DOCTYPE html><body><select><math></math></select>"
6880                 errors: 2
6881                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n"
6882         }, {
6883                 name: "tests9.dat #6"
6884                 html: "<!DOCTYPE html><body><select><option><math></math></option></select>"
6885                 errors: 2
6886                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       <option>\n"
6887         }, {
6888                 name: "tests9.dat #7"
6889                 html: "<!DOCTYPE html><body><table><math></math></table>"
6890                 errors: 1
6891                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|     <table>\n"
6892         }, {
6893                 name: "tests9.dat #8"
6894                 html: "<!DOCTYPE html><body><table><math><mi>foo</mi></math></table>"
6895                 errors: 4
6896                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <math math>\n|       <math mi>\n|         \"foo\"\n|     <table>\n"
6897         }, {
6898                 name: "tests9.dat #9"
6899                 html: "<!DOCTYPE html><body><table><math><mi>foo</mi><mi>bar</mi></math></table>"
6900                 errors: 7
6901                 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"
6902         }, {
6903                 name: "tests9.dat #10"
6904                 html: "<!DOCTYPE html><body><table><tbody><math><mi>foo</mi><mi>bar</mi></math></tbody></table>"
6905                 errors: 7
6906                 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"
6907         }, {
6908                 name: "tests9.dat #11"
6909                 html: "<!DOCTYPE html><body><table><tbody><tr><math><mi>foo</mi><mi>bar</mi></math></tr></tbody></table>"
6910                 errors: 7
6911                 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"
6912         }, {
6913                 name: "tests9.dat #12"
6914                 html: "<!DOCTYPE html><body><table><tbody><tr><td><math><mi>foo</mi><mi>bar</mi></math></td></tr></tbody></table>"
6915                 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"
6916         }, {
6917                 name: "tests9.dat #13"
6918                 html: "<!DOCTYPE html><body><table><tbody><tr><td><math><mi>foo</mi><mi>bar</mi></math><p>baz</td></tr></tbody></table>"
6919                 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"
6920         }, {
6921                 name: "tests9.dat #14"
6922                 html: "<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi></math><p>baz</caption></table>"
6923                 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"
6924         }, {
6925                 name: "tests9.dat #15"
6926                 html: "<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux"
6927                 errors: 1
6928                 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"
6929         }, {
6930                 name: "tests9.dat #16"
6931                 html: "<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi>baz</table><p>quux"
6932                 errors: 2
6933                 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"
6934         }, {
6935                 name: "tests9.dat #17"
6936                 html: "<!DOCTYPE html><body><table><colgroup><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux"
6937                 errors: 12
6938                 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"
6939         }, {
6940                 name: "tests9.dat #18"
6941                 html: "<!DOCTYPE html><body><table><tr><td><select><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux"
6942                 errors: 7
6943                 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"
6944         }, {
6945                 name: "tests9.dat #19"
6946                 html: "<!DOCTYPE html><body><table><select><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux"
6947                 errors: 8
6948                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <select>\n|       \"foobarbaz\"\n|     <table>\n|     <p>\n|       \"quux\"\n"
6949         }, {
6950                 name: "tests9.dat #20"
6951                 html: "<!DOCTYPE html><body></body></html><math><mi>foo</mi><mi>bar</mi><p>baz"
6952                 errors: 2
6953                 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"
6954         }, {
6955                 name: "tests9.dat #21"
6956                 html: "<!DOCTYPE html><body></body><math><mi>foo</mi><mi>bar</mi><p>baz"
6957                 errors: 2
6958                 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"
6959         }, {
6960                 name: "tests9.dat #22"
6961                 html: "<!DOCTYPE html><frameset><math><mi></mi><mi></mi><p><span>"
6962                 errors: 8
6963                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
6964         }, {
6965                 name: "tests9.dat #23"
6966                 html: "<!DOCTYPE html><frameset></frameset><math><mi></mi><mi></mi><p><span>"
6967                 errors: 7
6968                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
6969         }, {
6970                 name: "tests9.dat #24"
6971                 html: "<!DOCTYPE html><body xlink:href=foo><math xlink:href=foo></math>"
6972                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     xlink:href=\"foo\"\n|     <math math>\n|       xlink href=\"foo\"\n"
6973         }, {
6974                 name: "tests9.dat #25"
6975                 html: "<!DOCTYPE html><body xlink:href=foo xml:lang=en><math><mi xml:lang=en xlink:href=foo></mi></math>"
6976                 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"
6977         }, {
6978                 name: "tests9.dat #26"
6979                 html: "<!DOCTYPE html><body xlink:href=foo xml:lang=en><math><mi xml:lang=en xlink:href=foo /></math>"
6980                 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"
6981         }, {
6982                 name: "tests9.dat #27"
6983                 html: "<!DOCTYPE html><body xlink:href=foo xml:lang=en><math><mi xml:lang=en xlink:href=foo />bar</math>"
6984                 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"
6985         }, {
6986                 name: "tests_innerHTML_1.dat #1"
6987                 html: "<body><span>"
6988                 errors: 2,"document-fragment":"body"
6989                 expected: "| <span>\n"
6990         }, {
6991                 name: "tests_innerHTML_1.dat #2"
6992                 html: "<span><body>"
6993                 errors: 2,"document-fragment":"body"
6994                 expected: "| <span>\n"
6995         }, {
6996                 name: "tests_innerHTML_1.dat #3"
6997                 html: "<span><body>"
6998                 errors: 2,"document-fragment":"div"
6999                 expected: "| <span>\n"
7000         }, {
7001                 name: "tests_innerHTML_1.dat #4"
7002                 html: "<body><span>"
7003                 errors: 1,"document-fragment":"html"
7004                 expected: "| <head>\n| <body>\n|   <span>\n"
7005         }, {
7006                 name: "tests_innerHTML_1.dat #5"
7007                 html: "<frameset><span>"
7008                 errors: 2,"document-fragment":"body"
7009                 expected: "| <span>\n"
7010         }, {
7011                 name: "tests_innerHTML_1.dat #6"
7012                 html: "<span><frameset>"
7013                 errors: 2,"document-fragment":"body"
7014                 expected: "| <span>\n"
7015         }, {
7016                 name: "tests_innerHTML_1.dat #7"
7017                 html: "<span><frameset>"
7018                 errors: 2,"document-fragment":"div"
7019                 expected: "| <span>\n"
7020         }, {
7021                 name: "tests_innerHTML_1.dat #8"
7022                 html: "<frameset><span>"
7023                 errors: 2,"document-fragment":"html"
7024                 expected: "| <head>\n| <frameset>\n"
7025         }, {
7026                 name: "tests_innerHTML_1.dat #9"
7027                 html: "<table><tr>"
7028                 errors: 1,"document-fragment":"table"
7029                 expected: "| <tbody>\n|   <tr>\n"
7030         }, {
7031                 name: "tests_innerHTML_1.dat #10"
7032                 html: "</table><tr>"
7033                 errors: 1,"document-fragment":"table"
7034                 expected: "| <tbody>\n|   <tr>\n"
7035         }, {
7036                 name: "tests_innerHTML_1.dat #11"
7037                 html: "<a>"
7038                 errors: 2,"document-fragment":"table"
7039                 expected: "| <a>\n"
7040         }, {
7041                 name: "tests_innerHTML_1.dat #12"
7042                 html: "<a>"
7043                 errors: 2,"document-fragment":"table"
7044                 expected: "| <a>\n"
7045         }, {
7046                 name: "tests_innerHTML_1.dat #13"
7047                 html: "<a><caption>a"
7048                 errors: 2,"document-fragment":"table"
7049                 expected: "| <a>\n| <caption>\n|   \"a\"\n"
7050         }, {
7051                 name: "tests_innerHTML_1.dat #14"
7052                 html: "<a><colgroup><col>"
7053                 errors: 2,"document-fragment":"table"
7054                 expected: "| <a>\n| <colgroup>\n|   <col>\n"
7055         }, {
7056                 name: "tests_innerHTML_1.dat #15"
7057                 html: "<a><tbody><tr>"
7058                 errors: 1,"document-fragment":"table"
7059                 expected: "| <a>\n| <tbody>\n|   <tr>\n"
7060         }, {
7061                 name: "tests_innerHTML_1.dat #16"
7062                 html: "<a><tfoot><tr>"
7063                 errors: 1,"document-fragment":"table"
7064                 expected: "| <a>\n| <tfoot>\n|   <tr>\n"
7065         }, {
7066                 name: "tests_innerHTML_1.dat #17"
7067                 html: "<a><thead><tr>"
7068                 errors: 1,"document-fragment":"table"
7069                 expected: "| <a>\n| <thead>\n|   <tr>\n"
7070         }, {
7071                 name: "tests_innerHTML_1.dat #18"
7072                 html: "<a><tr>"
7073                 errors: 1,"document-fragment":"table"
7074                 expected: "| <a>\n| <tbody>\n|   <tr>\n"
7075         }, {
7076                 name: "tests_innerHTML_1.dat #19"
7077                 html: "<a><th>"
7078                 errors: 2,"document-fragment":"table"
7079                 expected: "| <a>\n| <tbody>\n|   <tr>\n|     <th>\n"
7080         }, {
7081                 name: "tests_innerHTML_1.dat #20"
7082                 html: "<a><td>"
7083                 errors: 2,"document-fragment":"table"
7084                 expected: "| <a>\n| <tbody>\n|   <tr>\n|     <td>\n"
7085         }, {
7086                 name: "tests_innerHTML_1.dat #21"
7087                 html: "<table></table><tbody>"
7088                 errors: 1,"document-fragment":"caption"
7089                 expected: "| <table>\n"
7090         }, {
7091                 name: "tests_innerHTML_1.dat #22"
7092                 html: "</table><span>"
7093                 errors: 2,"document-fragment":"caption"
7094                 expected: "| <span>\n"
7095         }, {
7096                 name: "tests_innerHTML_1.dat #23"
7097                 html: "<span></table>"
7098                 errors: 2,"document-fragment":"caption"
7099                 expected: "| <span>\n"
7100         }, {
7101                 name: "tests_innerHTML_1.dat #24"
7102                 html: "</caption><span>"
7103                 errors: 2,"document-fragment":"caption"
7104                 expected: "| <span>\n"
7105         }, {
7106                 name: "tests_innerHTML_1.dat #25"
7107                 html: "<span></caption><span>"
7108                 errors: 2,"document-fragment":"caption"
7109                 expected: "| <span>\n|   <span>\n"
7110         }, {
7111                 name: "tests_innerHTML_1.dat #26"
7112                 html: "<span><caption><span>"
7113                 errors: 2,"document-fragment":"caption"
7114                 expected: "| <span>\n|   <span>\n"
7115         }, {
7116                 name: "tests_innerHTML_1.dat #27"
7117                 html: "<span><col><span>"
7118                 errors: 2,"document-fragment":"caption"
7119                 expected: "| <span>\n|   <span>\n"
7120         }, {
7121                 name: "tests_innerHTML_1.dat #28"
7122                 html: "<span><colgroup><span>"
7123                 errors: 2,"document-fragment":"caption"
7124                 expected: "| <span>\n|   <span>\n"
7125         }, {
7126                 name: "tests_innerHTML_1.dat #29"
7127                 html: "<span><html><span>"
7128                 errors: 2,"document-fragment":"caption"
7129                 expected: "| <span>\n|   <span>\n"
7130         }, {
7131                 name: "tests_innerHTML_1.dat #30"
7132                 html: "<span><tbody><span>"
7133                 errors: 2,"document-fragment":"caption"
7134                 expected: "| <span>\n|   <span>\n"
7135         }, {
7136                 name: "tests_innerHTML_1.dat #31"
7137                 html: "<span><td><span>"
7138                 errors: 2,"document-fragment":"caption"
7139                 expected: "| <span>\n|   <span>\n"
7140         }, {
7141                 name: "tests_innerHTML_1.dat #32"
7142                 html: "<span><tfoot><span>"
7143                 errors: 2,"document-fragment":"caption"
7144                 expected: "| <span>\n|   <span>\n"
7145         }, {
7146                 name: "tests_innerHTML_1.dat #33"
7147                 html: "<span><thead><span>"
7148                 errors: 2,"document-fragment":"caption"
7149                 expected: "| <span>\n|   <span>\n"
7150         }, {
7151                 name: "tests_innerHTML_1.dat #34"
7152                 html: "<span><th><span>"
7153                 errors: 2,"document-fragment":"caption"
7154                 expected: "| <span>\n|   <span>\n"
7155         }, {
7156                 name: "tests_innerHTML_1.dat #35"
7157                 html: "<span><tr><span>"
7158                 errors: 2,"document-fragment":"caption"
7159                 expected: "| <span>\n|   <span>\n"
7160         }, {
7161                 name: "tests_innerHTML_1.dat #36"
7162                 html: "<span></table><span>"
7163                 errors: 2,"document-fragment":"caption"
7164                 expected: "| <span>\n|   <span>\n"
7165         }, {
7166                 name: "tests_innerHTML_1.dat #37"
7167                 html: "</colgroup><col>"
7168                 errors: 1,"document-fragment":"colgroup"
7169                 expected: "| <col>\n"
7170         }, {
7171                 name: "tests_innerHTML_1.dat #38"
7172                 html: "<a><col>"
7173                 errors: 1,"document-fragment":"colgroup"
7174                 expected: "| <col>\n"
7175         }, {
7176                 name: "tests_innerHTML_1.dat #39"
7177                 html: "<caption><a>"
7178                 errors: 3,"document-fragment":"tbody"
7179                 expected: "| <a>\n"
7180         }, {
7181                 name: "tests_innerHTML_1.dat #40"
7182                 html: "<col><a>"
7183                 errors: 3,"document-fragment":"tbody"
7184                 expected: "| <a>\n"
7185         }, {
7186                 name: "tests_innerHTML_1.dat #41"
7187                 html: "<colgroup><a>"
7188                 errors: 3,"document-fragment":"tbody"
7189                 expected: "| <a>\n"
7190         }, {
7191                 name: "tests_innerHTML_1.dat #42"
7192                 html: "<tbody><a>"
7193                 errors: 3,"document-fragment":"tbody"
7194                 expected: "| <a>\n"
7195         }, {
7196                 name: "tests_innerHTML_1.dat #43"
7197                 html: "<tfoot><a>"
7198                 errors: 3,"document-fragment":"tbody"
7199                 expected: "| <a>\n"
7200         }, {
7201                 name: "tests_innerHTML_1.dat #44"
7202                 html: "<thead><a>"
7203                 errors: 3,"document-fragment":"tbody"
7204                 expected: "| <a>\n"
7205         }, {
7206                 name: "tests_innerHTML_1.dat #45"
7207                 html: "</table><a>"
7208                 errors: 3,"document-fragment":"tbody"
7209                 expected: "| <a>\n"
7210         }, {
7211                 name: "tests_innerHTML_1.dat #46"
7212                 html: "<a><tr>"
7213                 errors: 1,"document-fragment":"tbody"
7214                 expected: "| <a>\n| <tr>\n"
7215         }, {
7216                 name: "tests_innerHTML_1.dat #47"
7217                 html: "<a><td>"
7218                 errors: 2,"document-fragment":"tbody"
7219                 expected: "| <a>\n| <tr>\n|   <td>\n"
7220         }, {
7221                 name: "tests_innerHTML_1.dat #48"
7222                 html: "<a><td>"
7223                 errors: 2,"document-fragment":"tbody"
7224                 expected: "| <a>\n| <tr>\n|   <td>\n"
7225         }, {
7226                 name: "tests_innerHTML_1.dat #49"
7227                 html: "<a><td>"
7228                 errors: 2,"document-fragment":"tbody"
7229                 expected: "| <a>\n| <tr>\n|   <td>\n"
7230         }, {
7231                 name: "tests_innerHTML_1.dat #50"
7232                 html: "<td><table><tbody><a><tr>"
7233                 errors: 3,"document-fragment":"tbody"
7234                 expected: "| <tr>\n|   <td>\n|     <a>\n|     <table>\n|       <tbody>\n|         <tr>\n"
7235         }, {
7236                 name: "tests_innerHTML_1.dat #51"
7237                 html: "</tr><td>"
7238                 errors: 1,"document-fragment":"tr"
7239                 expected: "| <td>\n"
7240         }, {
7241                 name: "tests_innerHTML_1.dat #52"
7242                 html: "<td><table><a><tr></tr><tr>"
7243                 errors: 2,"document-fragment":"tr"
7244                 expected: "| <td>\n|   <a>\n|   <table>\n|     <tbody>\n|       <tr>\n|       <tr>\n"
7245         }, {
7246                 name: "tests_innerHTML_1.dat #53"
7247                 html: "<caption><td>"
7248                 errors: 1,"document-fragment":"tr"
7249                 expected: "| <td>\n"
7250         }, {
7251                 name: "tests_innerHTML_1.dat #54"
7252                 html: "<col><td>"
7253                 errors: 1,"document-fragment":"tr"
7254                 expected: "| <td>\n"
7255         }, {
7256                 name: "tests_innerHTML_1.dat #55"
7257                 html: "<colgroup><td>"
7258                 errors: 1,"document-fragment":"tr"
7259                 expected: "| <td>\n"
7260         }, {
7261                 name: "tests_innerHTML_1.dat #56"
7262                 html: "<tbody><td>"
7263                 errors: 1,"document-fragment":"tr"
7264                 expected: "| <td>\n"
7265         }, {
7266                 name: "tests_innerHTML_1.dat #57"
7267                 html: "<tfoot><td>"
7268                 errors: 1,"document-fragment":"tr"
7269                 expected: "| <td>\n"
7270         }, {
7271                 name: "tests_innerHTML_1.dat #58"
7272                 html: "<thead><td>"
7273                 errors: 1,"document-fragment":"tr"
7274                 expected: "| <td>\n"
7275         }, {
7276                 name: "tests_innerHTML_1.dat #59"
7277                 html: "<tr><td>"
7278                 errors: 1,"document-fragment":"tr"
7279                 expected: "| <td>\n"
7280         }, {
7281                 name: "tests_innerHTML_1.dat #60"
7282                 html: "</table><td>"
7283                 errors: 1,"document-fragment":"tr"
7284                 expected: "| <td>\n"
7285         }, {
7286                 name: "tests_innerHTML_1.dat #61"
7287                 html: "<td><table></table><td>"
7288                 fragment: "tr"
7289                 expected: "| <td>\n|   <table>\n| <td>\n"
7290         }, {
7291                 name: "tests_innerHTML_1.dat #62"
7292                 html: "<td><table></table><td>"
7293                 fragment: "tr"
7294                 expected: "| <td>\n|   <table>\n| <td>\n"
7295         }, {
7296                 name: "tests_innerHTML_1.dat #63"
7297                 html: "<caption><a>"
7298                 errors: 2,"document-fragment":"td"
7299                 expected: "| <a>\n"
7300         }, {
7301                 name: "tests_innerHTML_1.dat #64"
7302                 html: "<col><a>"
7303                 errors: 2,"document-fragment":"td"
7304                 expected: "| <a>\n"
7305         }, {
7306                 name: "tests_innerHTML_1.dat #65"
7307                 html: "<colgroup><a>"
7308                 errors: 2,"document-fragment":"td"
7309                 expected: "| <a>\n"
7310         }, {
7311                 name: "tests_innerHTML_1.dat #66"
7312                 html: "<tbody><a>"
7313                 errors: 2,"document-fragment":"td"
7314                 expected: "| <a>\n"
7315         }, {
7316                 name: "tests_innerHTML_1.dat #67"
7317                 html: "<tfoot><a>"
7318                 errors: 2,"document-fragment":"td"
7319                 expected: "| <a>\n"
7320         }, {
7321                 name: "tests_innerHTML_1.dat #68"
7322                 html: "<th><a>"
7323                 errors: 2,"document-fragment":"td"
7324                 expected: "| <a>\n"
7325         }, {
7326                 name: "tests_innerHTML_1.dat #69"
7327                 html: "<thead><a>"
7328                 errors: 2,"document-fragment":"td"
7329                 expected: "| <a>\n"
7330         }, {
7331                 name: "tests_innerHTML_1.dat #70"
7332                 html: "<tr><a>"
7333                 errors: 2,"document-fragment":"td"
7334                 expected: "| <a>\n"
7335         }, {
7336                 name: "tests_innerHTML_1.dat #71"
7337                 html: "</table><a>"
7338                 errors: 2,"document-fragment":"td"
7339                 expected: "| <a>\n"
7340         }, {
7341                 name: "tests_innerHTML_1.dat #72"
7342                 html: "</tbody><a>"
7343                 errors: 2,"document-fragment":"td"
7344                 expected: "| <a>\n"
7345         }, {
7346                 name: "tests_innerHTML_1.dat #73"
7347                 html: "</td><a>"
7348                 errors: 2,"document-fragment":"td"
7349                 expected: "| <a>\n"
7350         }, {
7351                 name: "tests_innerHTML_1.dat #74"
7352                 html: "</tfoot><a>"
7353                 errors: 2,"document-fragment":"td"
7354                 expected: "| <a>\n"
7355         }, {
7356                 name: "tests_innerHTML_1.dat #75"
7357                 html: "</thead><a>"
7358                 errors: 2,"document-fragment":"td"
7359                 expected: "| <a>\n"
7360         }, {
7361                 name: "tests_innerHTML_1.dat #76"
7362                 html: "</th><a>"
7363                 errors: 2,"document-fragment":"td"
7364                 expected: "| <a>\n"
7365         }, {
7366                 name: "tests_innerHTML_1.dat #77"
7367                 html: "</tr><a>"
7368                 errors: 2,"document-fragment":"td"
7369                 expected: "| <a>\n"
7370         }, {
7371                 name: "tests_innerHTML_1.dat #78"
7372                 html: "<table><td><td>"
7373                 errors: 2,"document-fragment":"td"
7374                 expected: "| <table>\n|   <tbody>\n|     <tr>\n|       <td>\n|       <td>\n"
7375         }, {
7376                 name: "tests_innerHTML_1.dat #79"
7377                 html: "</select><option>"
7378                 errors: 2,"document-fragment":"select"
7379                 expected: "| <option>\n"
7380         }, {
7381                 name: "tests_innerHTML_1.dat #80"
7382                 html: "<input><option>"
7383                 errors: 2,"document-fragment":"select"
7384                 expected: "| <option>\n"
7385         }, {
7386                 name: "tests_innerHTML_1.dat #81"
7387                 html: "<keygen><option>"
7388                 errors: 2,"document-fragment":"select"
7389                 expected: "| <option>\n"
7390         }, {
7391                 name: "tests_innerHTML_1.dat #82"
7392                 html: "<textarea><option>"
7393                 errors: 2,"document-fragment":"select"
7394                 expected: "| <option>\n"
7395         }, {
7396                 name: "tests_innerHTML_1.dat #83"
7397                 html: "</html><!--abc-->"
7398                 errors: 1,"document-fragment":"html"
7399                 expected: "| <head>\n| <body>\n| <!-- abc -->\n"
7400         }, {
7401                 name: "tests_innerHTML_1.dat #84"
7402                 html: "</frameset><frame>"
7403                 errors: 1,"document-fragment":"frameset"
7404                 expected: "| <frame>\n"
7405         }, {
7406                 name: "tests_innerHTML_1.dat #85"
7407                 html: ""
7408                 fragment: "html"
7409                 expected: "| <head>\n| <body>\n"
7410         }, {
7411                 name: "tricky01.dat #1"
7412                 html: "<b><p>Bold </b> Not bold</p>\nAlso not bold."
7413                 errors: 2
7414                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|     <p>\n|       <b>\n|         \"Bold \"\n|       \" Not bold\"\n|     \"\nAlso not bold.\"\n"
7415         }, {
7416                 name: "tricky01.dat #2"
7417                 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"
7418                 errors: 6
7419                 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"
7420         }, {
7421                 name: "tricky01.dat #3"
7422                 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>"
7423                 errors: 5
7424                 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"
7425         }, {
7426                 name: "tricky01.dat #4"
7427                 html: "<html>\n<dl>\n<dt><b>Boo\n<dd>Goo?\n</dl>\n</html>"
7428                 errors: 4
7429                 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"
7430         }, {
7431                 name: "tricky01.dat #5"
7432                 html: "<html><body>\n<label><a><div>Hello<div>World</div></a></label>  \n</body></html>"
7433                 errors: 4
7434                 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"
7435         }, {
7436                 name: "tricky01.dat #6"
7437                 html: "<table><center> <font>a</center> <img> <tr><td> </td> </tr> </table>"
7438                 errors: 9
7439                 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"
7440         }, {
7441                 name: "tricky01.dat #7"
7442                 html: "<table><tr><p><a><p>You should see this text."
7443                 errors: 31
7444                 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"
7445         }, {
7446                 name: "tricky01.dat #8"
7447                 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."
7448                 errors: 10
7449                 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"
7450         }, {
7451                 name: "tricky01.dat #9"
7452                 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>"
7453                 errors: 4
7454                 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"
7455         }, {
7456                 name: "webkit01.dat #1"
7457                 html: "Test"
7458                 errors: 1
7459                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"Test\"\n"
7460         }, {
7461                 name: "webkit01.dat #2"
7462                 html: "<div></div>"
7463                 errors: 1
7464                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n"
7465         }, {
7466                 name: "webkit01.dat #3"
7467                 html: "<div>Test</div>"
7468                 errors: 1
7469                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       \"Test\"\n"
7470         }, {
7471                 name: "webkit01.dat #4"
7472                 html: "<di"
7473                 errors: 2
7474                 expected: "| <html>\n|   <head>\n|   <body>\n"
7475         }, {
7476                 name: "webkit01.dat #5"
7477                 html: "<div>Hello</div>\n<script>\nconsole.log(\"PASS\");\n</script>\n<div>Bye</div>"
7478                 errors: 1
7479                 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"
7480         }, {
7481                 name: "webkit01.dat #6"
7482                 html: "<div foo=\"bar\">Hello</div>"
7483                 errors: 1
7484                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       foo=\"bar\"\n|       \"Hello\"\n"
7485         }, {
7486                 name: "webkit01.dat #7"
7487                 html: "<div>Hello</div>\n<script>\nconsole.log(\"FOO<span>BAR</span>BAZ\");\n</script>\n<div>Bye</div>"
7488                 errors: 1
7489                 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"
7490         }, {
7491                 name: "webkit01.dat #8"
7492                 html: "<foo bar=\"baz\"></foo><potato quack=\"duck\"></potato>"
7493                 errors: 1
7494                 expected: "| <html>\n|   <head>\n|   <body>\n|     <foo>\n|       bar=\"baz\"\n|     <potato>\n|       quack=\"duck\"\n"
7495         }, {
7496                 name: "webkit01.dat #9"
7497                 html: "<foo bar=\"baz\"><potato quack=\"duck\"></potato></foo>"
7498                 errors: 1
7499                 expected: "| <html>\n|   <head>\n|   <body>\n|     <foo>\n|       bar=\"baz\"\n|       <potato>\n|         quack=\"duck\"\n"
7500         }, {
7501                 name: "webkit01.dat #10"
7502                 html: "<foo></foo bar=\"baz\"><potato></potato quack=\"duck\">"
7503                 errors: 3
7504                 expected: "| <html>\n|   <head>\n|   <body>\n|     <foo>\n|     <potato>\n"
7505         }, {
7506                 name: "webkit01.dat #11"
7507                 html: "</ tttt>"
7508                 errors: 2
7509                 expected: "| <!--  tttt -->\n| <html>\n|   <head>\n|   <body>\n"
7510         }, {
7511                 name: "webkit01.dat #12"
7512                 html: "<div FOO ><img><img></div>"
7513                 errors: 1
7514                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       foo=\"\"\n|       <img>\n|       <img>\n"
7515         }, {
7516                 name: "webkit01.dat #13"
7517                 html: "<p>Test</p<p>Test2</p>"
7518                 errors: 2
7519                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       \"TestTest2\"\n"
7520         }, {
7521                 name: "webkit01.dat #14"
7522                 html: "<rdar://problem/6869687>"
7523                 errors: 5
7524                 expected: "| <html>\n|   <head>\n|   <body>\n|     <rdar:>\n|       6869687=\"\"\n|       problem=\"\"\n"
7525         }, {
7526                 name: "webkit01.dat #15"
7527                 html: "<A>test< /A>"
7528                 errors: 3
7529                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|       \"test< /A>\"\n"
7530         }, {
7531                 name: "webkit01.dat #16"
7532                 html: "&lt;"
7533                 errors: 1
7534                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"<\"\n"
7535         }, {
7536                 name: "webkit01.dat #17"
7537                 html: "<body foo='bar'><body foo='baz' yo='mama'>"
7538                 errors: 2
7539                 expected: "| <html>\n|   <head>\n|   <body>\n|     foo=\"bar\"\n|     yo=\"mama\"\n"
7540         }, {
7541                 name: "webkit01.dat #18"
7542                 html: "<body></br foo=\"bar\"></body>"
7543                 errors: 3
7544                 expected: "| <html>\n|   <head>\n|   <body>\n|     <br>\n"
7545         }, {
7546                 name: "webkit01.dat #19"
7547                 html: "<bdy><br foo=\"bar\"></body>"
7548                 errors: 2
7549                 expected: "| <html>\n|   <head>\n|   <body>\n|     <bdy>\n|       <br>\n|         foo=\"bar\"\n"
7550         }, {
7551                 name: "webkit01.dat #20"
7552                 html: "<body></body></br foo=\"bar\">"
7553                 errors: 4
7554                 expected: "| <html>\n|   <head>\n|   <body>\n|     <br>\n"
7555         }, {
7556                 name: "webkit01.dat #21"
7557                 html: "<bdy></body><br foo=\"bar\">"
7558                 errors: 4
7559                 expected: "| <html>\n|   <head>\n|   <body>\n|     <bdy>\n|       <br>\n|         foo=\"bar\"\n"
7560         }, {
7561                 name: "webkit01.dat #22"
7562                 html: "<html><body></body></html><!-- Hi there -->"
7563                 errors: 1
7564                 expected: "| <html>\n|   <head>\n|   <body>\n| <!--  Hi there  -->\n"
7565         }, {
7566                 name: "webkit01.dat #23"
7567                 html: "<html><body></body></html>x<!-- Hi there -->"
7568                 errors: 2
7569                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"x\"\n|     <!--  Hi there  -->\n"
7570         }, {
7571                 name: "webkit01.dat #24"
7572                 html: "<html><body></body></html>x<!-- Hi there --></html><!-- Again -->"
7573                 errors: 2
7574                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"x\"\n|     <!--  Hi there  -->\n| <!--  Again  -->\n"
7575         }, {
7576                 name: "webkit01.dat #25"
7577                 html: "<html><body></body></html>x<!-- Hi there --></body></html><!-- Again -->"
7578                 errors: 2
7579                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"x\"\n|     <!--  Hi there  -->\n| <!--  Again  -->\n"
7580         }, {
7581                 name: "webkit01.dat #26"
7582                 html: "<html><body><ruby><div><rp>xx</rp></div></ruby></body></html>"
7583                 errors: 2
7584                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <div>\n|         <rp>\n|           \"xx\"\n"
7585         }, {
7586                 name: "webkit01.dat #27"
7587                 html: "<html><body><ruby><div><rt>xx</rt></div></ruby></body></html>"
7588                 errors: 2
7589                 expected: "| <html>\n|   <head>\n|   <body>\n|     <ruby>\n|       <div>\n|         <rt>\n|           \"xx\"\n"
7590         }, {
7591                 name: "webkit01.dat #28"
7592                 html: "<html><frameset><!--1--><noframes>A</noframes><!--2--></frameset><!--3--><noframes>B</noframes><!--4--></html><!--5--><noframes>C</noframes><!--6-->"
7593                 errors: 1
7594                 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"
7595         }, {
7596                 name: "webkit01.dat #29"
7597                 html: "<select><option>A<select><option>B<select><option>C<select><option>D<select><option>E<select><option>F<select><option>G<select>"
7598                 errors: 6
7599                 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"
7600         }, {
7601                 name: "webkit01.dat #30"
7602                 html: "<dd><dd><dt><dt><dd><li><li>"
7603                 errors: 1
7604                 expected: "| <html>\n|   <head>\n|   <body>\n|     <dd>\n|     <dd>\n|     <dt>\n|     <dt>\n|     <dd>\n|       <li>\n|       <li>\n"
7605         }, {
7606                 name: "webkit01.dat #31"
7607                 html: "<div><b></div><div><nobr>a<nobr>"
7608                 errors: 4
7609                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <b>\n|     <div>\n|       <b>\n|         <nobr>\n|           \"a\"\n|         <nobr>\n"
7610         }, {
7611                 name: "webkit01.dat #32"
7612                 html: "<head></head>\n<body></body>"
7613                 errors: 1
7614                 expected: "| <html>\n|   <head>\n|   \"\n\"\n|   <body>\n"
7615         }, {
7616                 name: "webkit01.dat #33"
7617                 html: "<head></head> <style></style>ddd"
7618                 errors: 2
7619                 expected: "| <html>\n|   <head>\n|     <style>\n|   \" \"\n|   <body>\n|     \"ddd\"\n"
7620         }, {
7621                 name: "webkit01.dat #34"
7622                 html: "<kbd><table></kbd><col><select><tr>"
7623                 errors: 6
7624                 expected: "| <html>\n|   <head>\n|   <body>\n|     <kbd>\n|       <select>\n|       <table>\n|         <colgroup>\n|           <col>\n|         <tbody>\n|           <tr>\n"
7625         }, {
7626                 name: "webkit01.dat #35"
7627                 html: "<kbd><table></kbd><col><select><tr></table><div>"
7628                 errors: 6
7629                 expected: "| <html>\n|   <head>\n|   <body>\n|     <kbd>\n|       <select>\n|       <table>\n|         <colgroup>\n|           <col>\n|         <tbody>\n|           <tr>\n|       <div>\n"
7630         }, {
7631                 name: "webkit01.dat #36"
7632                 html: "<a><li><style></style><title></title></a>"
7633                 errors: 2
7634                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|     <li>\n|       <a>\n|         <style>\n|         <title>\n"
7635         }, {
7636                 name: "webkit01.dat #37"
7637                 html: "<font></p><p><meta><title></title></font>"
7638                 errors: 3
7639                 expected: "| <html>\n|   <head>\n|   <body>\n|     <font>\n|       <p>\n|     <p>\n|       <font>\n|         <meta>\n|         <title>\n"
7640         }, {
7641                 name: "webkit01.dat #38"
7642                 html: "<a><center><title></title><a>"
7643                 errors: 4
7644                 expected: "| <html>\n|   <head>\n|   <body>\n|     <a>\n|     <center>\n|       <a>\n|         <title>\n|       <a>\n"
7645         }, {
7646                 name: "webkit01.dat #39"
7647                 html: "<svg><title><div>"
7648                 errors: 2
7649                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg title>\n|         <div>\n"
7650         }, {
7651                 name: "webkit01.dat #40"
7652                 html: "<svg><title><rect><div>"
7653                 errors: 2
7654                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg title>\n|         <rect>\n|           <div>\n"
7655         }, {
7656                 name: "webkit01.dat #41"
7657                 html: "<svg><title><svg><div>"
7658                 errors: 3
7659                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg title>\n|         <svg svg>\n|         <div>\n"
7660         }, {
7661                 name: "webkit01.dat #42"
7662                 html: "<img <=\"\" FAIL>"
7663                 errors: 2
7664                 expected: "| <html>\n|   <head>\n|   <body>\n|     <img>\n|       <=\"\"\n|       fail=\"\"\n"
7665         }, {
7666                 name: "webkit01.dat #43"
7667                 html: "<ul><li><div id='foo'/>A</li><li>B<div>C</div></li></ul>"
7668                 errors: 3
7669                 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"
7670         }, {
7671                 name: "webkit01.dat #44"
7672                 html: "<svg><em><desc></em>"
7673                 errors: 3
7674                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|     <em>\n|       <desc>\n"
7675         }, {
7676                 name: "webkit01.dat #45"
7677                 html: "<table><tr><td><svg><desc><td></desc><circle>"
7678                 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"
7679         }, {
7680                 name: "webkit01.dat #46"
7681                 html: "<svg><tfoot></mi><td>"
7682                 errors: 4
7683                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg tfoot>\n|         <svg td>\n"
7684         }, {
7685                 name: "webkit01.dat #47"
7686                 html: "<math><mrow><mrow><mn>1</mn></mrow><mi>a</mi></mrow></math>"
7687                 errors: 1
7688                 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"
7689         }, {
7690                 name: "webkit01.dat #48"
7691                 html: "<!doctype html><input type=\"hidden\"><frameset>"
7692                 errors: 2
7693                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <frameset>\n"
7694         }, {
7695                 name: "webkit01.dat #49"
7696                 html: "<!doctype html><input type=\"button\"><frameset>"
7697                 errors: 1
7698                 expected: "| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <input>\n|       type=\"button\"\n"
7699         }, {
7700                 name: "webkit02.dat #1"
7701                 html: "<foo bar=qux/>"
7702                 errors: 2
7703                 expected: "| <html>\n|   <head>\n|   <body>\n|     <foo>\n|       bar=\"qux/\"\n"
7704         }, {
7705                 name: "webkit02.dat #2"
7706                 html: "<p id=\"status\"><noscript><strong>A</strong></noscript><span>B</span></p>"
7707                 scripting: true
7708                 errors: 1
7709                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       id=\"status\"\n|       <noscript>\n|         \"<strong>A</strong>\"\n|       <span>\n|         \"B\"\n"
7710         }, {
7711                 name: "webkit02.dat #3"
7712                 html: "<p id=\"status\"><noscript><strong>A</strong></noscript><span>B</span></p>"
7713                 scripting: false
7714                 errors: 1
7715                 expected: "| <html>\n|   <head>\n|   <body>\n|     <p>\n|       id=\"status\"\n|       <noscript>\n|         <strong>\n|           \"A\"\n|       <span>\n|         \"B\"\n"
7716         }, {
7717                 name: "webkit02.dat #4"
7718                 html: "<div><sarcasm><div></div></sarcasm></div>"
7719                 errors: 1
7720                 expected: "| <html>\n|   <head>\n|   <body>\n|     <div>\n|       <sarcasm>\n|         <div>\n"
7721         }, {
7722                 name: "webkit02.dat #5"
7723                 html: "<html><body><img src=\"\" border=\"0\" alt=\"><div>A</div></body></html>"
7724                 errors: 2
7725                 expected: "| <html>\n|   <head>\n|   <body>\n"
7726         }, {
7727                 name: "webkit02.dat #6"
7728                 html: "<table><td></tbody>A"
7729                 errors: 4
7730                 expected: "| <html>\n|   <head>\n|   <body>\n|     \"A\"\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n"
7731         }, {
7732                 name: "webkit02.dat #7"
7733                 html: "<table><td></thead>A"
7734                 errors: 4
7735                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             \"A\"\n"
7736         }, {
7737                 name: "webkit02.dat #8"
7738                 html: "<table><td></tfoot>A"
7739                 errors: 4
7740                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <tbody>\n|         <tr>\n|           <td>\n|             \"A\"\n"
7741         }, {
7742                 name: "webkit02.dat #9"
7743                 html: "<table><thead><td></tbody>A"
7744                 errors: 4
7745                 expected: "| <html>\n|   <head>\n|   <body>\n|     <table>\n|       <thead>\n|         <tr>\n|           <td>\n|             \"A\"\n"
7746         }, {
7747                 name: "webkit02.dat #10"
7748                 html: "<legend>test</legend>"
7749                 expected: "| <html>\n|   <head>\n|   <body>\n|     <legend>\n|       \"test\"\n"
7750         }, {
7751                 name: "webkit02.dat #11"
7752                 html: "<table><input>"
7753                 expected: "| <html>\n|   <head>\n|   <body>\n|     <input>\n|     <table>\n"
7754         }, {
7755                 name: "webkit02.dat #12"
7756                 html: "<b><em><foo><foo><aside></b>"
7757                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <em>\n|         <foo>\n|           <foo>\n|     <em>\n|       <aside>\n|         <b>\n"
7758         }, {
7759                 name: "webkit02.dat #13"
7760                 html: "<b><em><foo><foo><aside></b></em>"
7761                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <em>\n|         <foo>\n|           <foo>\n|     <em>\n|     <aside>\n|       <em>\n|         <b>\n"
7762         }, {
7763                 name: "webkit02.dat #14"
7764                 html: "<b><em><foo><foo><foo><aside></b>"
7765                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <em>\n|         <foo>\n|           <foo>\n|             <foo>\n|     <aside>\n|       <b>\n"
7766         }, {
7767                 name: "webkit02.dat #15"
7768                 html: "<b><em><foo><foo><foo><aside></b></em>"
7769                 expected: "| <html>\n|   <head>\n|   <body>\n|     <b>\n|       <em>\n|         <foo>\n|           <foo>\n|             <foo>\n|     <aside>\n|       <b>\n"
7770         }, {
7771                 name: "webkit02.dat #16"
7772                 html: "<b><em><foo><foo><foo><foo><foo><foo><foo><foo><foo><foo><aside></b></em>"
7773                 fragment: "div"
7774                 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"
7775         }, {
7776                 name: "webkit02.dat #17"
7777                 html: "<b><em><foo><foob><foob><foob><foob><fooc><fooc><fooc><fooc><food><aside></b></em>"
7778                 fragment: "div"
7779                 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"
7780         }, {
7781                 name: "webkit02.dat #18"
7782                 html: "<isindex action=\"x\">"
7783                 fragment: "table"
7784                 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"
7785         }, {
7786                 name: "webkit02.dat #19"
7787                 html: "<option><XH<optgroup></optgroup>"
7788                 fragment: "select"
7789                 expected: "| <option>\n"
7790         }, {
7791                 name: "webkit02.dat #20"
7792                 html: "<svg><foreignObject><div>foo</div><plaintext></foreignObject></svg><div>bar</div>"
7793                 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"
7794         }, {
7795                 name: "webkit02.dat #21"
7796                 html: "<svg><foreignObject></foreignObject><title></svg>foo"
7797                 expected: "| <html>\n|   <head>\n|   <body>\n|     <svg svg>\n|       <svg foreignObject>\n|       <svg title>\n|     \"foo\"\n"
7798         }, {
7799                 name: "webkit02.dat #22"
7800                 html: "</foreignObject><plaintext><div>foo</div>"
7801                 expected: "| <html>\n|   <head>\n|   <body>\n|     <plaintext>\n|       \"<div>foo</div>\"\n"
7802         }
7803 ]
7804
7805 if window?.wheic?
7806         wheic = window.wheic
7807 else
7808         wheic = require './wheic.js'
7809
7810 serialize_els = (els, prefix = '| ') ->
7811         ret = ''
7812         for el in els
7813                 switch el.type
7814                         when wheic.TYPE_TAG
7815                                 ret += "#{prefix}<"
7816                                 if el.namespace is wheic.NS_MATHML
7817                                         ret += "math "
7818                                 if el.namespace is wheic.NS_SVG
7819                                         ret += "svg "
7820                                 ret += "#{el.name}>\n"
7821                                 attr_keys = []
7822                                 for k of el.attrs
7823                                         attr_keys.push k
7824                                 attr_keys.sort() # TODO this should be "lexicographically by UTF-16 code unit"
7825                                 for k in attr_keys
7826                                         ret += "#{prefix}  #{k}=\"#{el.attrs[k]}\"\n"
7827                                 if el.name is 'template' # ?check ns
7828                                         ret += "#{prefix}  content\n"
7829                                         ret += serialize_els el.children, "#{prefix}    "
7830                                 else
7831                                         ret += serialize_els el.children, "#{prefix}  "
7832                         when wheic.TYPE_TEXT
7833                                 ret += "#{prefix}\"#{el.text}\"\n"
7834                         when wheic.TYPE_COMMENT
7835                                 ret += "#{prefix}<!-- #{el.text} -->\n"
7836                         when wheic.TYPE_DOCTYPE
7837                                 ret += "#{prefix}<!DOCTYPE #{el.name}"
7838                                 if (el.public_identifier? and el.public_identifier.length > 0) or (el.system_identifier? and el.system_identifier.length > 0)
7839                                         ret += " \"#{el.public_identifier ? ''}\""
7840                                         ret += " \"#{el.system_identifier ? ''}\""
7841                                 ret += ">\n"
7842                         else
7843                                 ret += "#{prefix}UNKNOWN TAG TYPE #{el.type}"
7844         return ret
7845
7846 test_results = passed: 0, failed: 0, fragment: 0
7847 test_parser = (args) ->
7848         if args.fragment? # hide fragment tests for now
7849                 test_results.fragment += 1
7850                 return
7851         wheic.debug_log_reset()
7852         parse_errors = []
7853         args.error_cb = (i) ->
7854                 parse_errors.push i
7855         prev_node_id = 0 # reset counter
7856         parsed = wheic.parse_html args
7857         serialized = serialize_els parsed
7858         if serialized isnt args.expected
7859                 #wheic.debug_log_each (str) ->
7860                 #       console.log str
7861                 console.log "FAILED: \"#{args.name}\""
7862                 console.log "      Input: #{args.html}"
7863                 if args.fragment?
7864                         console.log "   Fragment: #{args.fragment}"
7865                 console.log "    Correct: #{args.expected}"
7866                 console.log "     Output: #{serialized}"
7867                 if parse_errors.length > 0
7868                         console.log " parse errs: #{JSON.stringify parse_errors}"
7869                 else
7870                         console.log "   No parse errors"
7871                 test_results.failed += 1
7872         else
7873                 console.log "passed \"#{args.name}\""
7874                 test_results.passed += 1
7875 test_summary = ->
7876         console.log "Tests passed: #{test_results.passed}, Failed: #{test_results.failed}, ignored: #{test_results.fragment}"
7877
7878
7879 next_test = 0
7880 run_tests_and_breathe = ->
7881         start_time = new Date()
7882         loop
7883                 if next_test >= tests.length
7884                         test_summary()
7885                         return
7886                 test_parser tests[next_test]
7887                 next_test += 1
7888                 now = new Date()
7889                 if now - start_time > 100 # miliseconds
7890                         break
7891         setTimeout run_tests_and_breathe, 1
7892 run_tests_and_breathe()