Index: trunk/LayoutTests/html5lib/runner-expected-html5.txt
===================================================================
--- trunk/LayoutTests/html5lib/runner-expected.txt	(revision 62584)
+++ trunk/LayoutTests/html5lib/runner-expected-html5.txt	(revision 62584)
@@ -3,79 +3,21 @@
 CONSOLE MESSAGE: line 2: PASS
 CONSOLE MESSAGE: line 2: FOO<span>BAR</span>BAZ
+Content-Type: text/plain
 resources/tests1.dat:
-25
-29
 30
 32
 33
-34
 50
-51
-52
-53
-54
-57
-59
+56
 78
 79
 80
-81
-82
-87
+86
 90
-91
-92
-96
-98
-101
+103
 104
-106
 109
-113
-
-Test 25 of 113 in resources/tests1.dat failed. Input:
-<p><b><div><marquee></p></b></div>X
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <p>
-|       <b>
-|     <b>
-|     <div>
-|       <b>
-|       <marquee>
-|         <b>
-|           <p>
-|     "X"
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <p>
-|       <b>
-|     <div>
-|       <b>
-|         <marquee>
-|           <p>
-|           "X"
-
-Test 29 of 113 in resources/tests1.dat failed. Input:
-<select><b><option><select><option></b></select>X
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <select>
-|       <option>
-|     "X"
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <select>
-|       <option>
-|     <option>
-|       "X"
+110
+112
 
 Test 30 of 113 in resources/tests1.dat failed. Input:
@@ -86,5 +28,4 @@
 |   <body>
 |     <a>
-|       <a>
 |       <table>
 |         <tbody>
@@ -94,9 +35,11 @@
 |                 <table>
 |               <a>
-|       <b>
-|         "X"
-|       "C"
-|     <a>
-|       "Y"
+|           <a>
+|       <a>
+|         <b>
+|           "X"
+|         "C"
+|       <a>
+|         "Y"
 Expected:
 | <html>
@@ -129,8 +72,8 @@
 |       <div>
 |         "hello"
-|         "excite!"
-|         <b>
-|           "me!"
 |         <table>
+|           "excite!"
+|           <b>
+|             "me!"
 |           <tbody>
 |             <tr>
@@ -166,12 +109,12 @@
 |     <li>
 |       "hello"
-|     <li>
-|       "world"
-|       <ul>
-|         "how"
-|         <li>
-|           "do"
-|       "you"
-|       <!-- do -->
+|       <li>
+|         "world"
+|         <ul>
+|           "how"
+|           <li>
+|             "do"
+|         "you"
+|   <!-- do -->
 Expected:
 | <!DOCTYPE html>
@@ -190,30 +133,4 @@
 |   <!-- do -->
 
-Test 34 of 113 in resources/tests1.dat failed. Input:
-<!DOCTYPE html>A<option>B<optgroup>C<select>D</option>E
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     "A"
-|     "B"
-|     "C"
-|     <select>
-|       "D"
-|       "E"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     "A"
-|     <option>
-|       "B"
-|     <optgroup>
-|       "C"
-|       <select>
-|         "DE"
-
 Test 50 of 113 in resources/tests1.dat failed. Input:
 <!DOCTYPE html><script> <!-- </script> --> </script> EOF
@@ -225,6 +142,5 @@
 |       " <!-- "
 |   <body>
-|     " --> "
-|     " EOF"
+|     " -->  EOF"
 Expected:
 | <!DOCTYPE html>
@@ -237,137 +153,29 @@
 |     "-->  EOF"
 
-Test 51 of 113 in resources/tests1.dat failed. Input:
-<b><p></b>TEST
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <b>
+Test 56 of 113 in resources/tests1.dat failed. Input:
+<font><p>hello<b>cruel</font>world
+Got:
+| <html>
+|   <head>
+|   <body>
+|     <font>
 |     <p>
-|       "TEST"
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <b>
+|       <font>
+|         "hello"
+|         <b>
+|           "cruel"
+|       "world"
+Expected:
+| <html>
+|   <head>
+|   <body>
+|     <font>
 |     <p>
+|       <font>
+|         "hello"
+|         <b>
+|           "cruel"
 |       <b>
-|       "TEST"
-
-Test 52 of 113 in resources/tests1.dat failed. Input:
-<p id=a><b><p id=b></b>TEST
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <p>
-|       id="a"
-|       <b>
-|     <b>
-|     <p>
-|       id="b"
-|       "TEST"
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <p>
-|       id="a"
-|       <b>
-|     <p>
-|       id="b"
-|       "TEST"
-
-Test 53 of 113 in resources/tests1.dat failed. Input:
-<b id=a><p><b id=b></p></b>TEST
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <b>
-|       id="a"
-|       <p>
-|         <b>
-|           id="b"
-|       <b>
-|         id="b"
-|       "TEST"
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <b>
-|       id="a"
-|       <p>
-|         <b>
-|           id="b"
-|       "TEST"
-
-Test 54 of 113 in resources/tests1.dat failed. Input:
-<!DOCTYPE html><title>U-test</title><body><div><p>Test<u></p></div></body>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|     <title>
-|       "U-test"
-|   <body>
-|     <div>
-|       <p>
-|         "Test"
-|         <u>
-|       <u>
-|     <u>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|     <title>
-|       "U-test"
-|   <body>
-|     <div>
-|       <p>
-|         "Test"
-|         <u>
-
-Test 57 of 113 in resources/tests1.dat failed. Input:
-<b>Test</i>Test
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <b>
-|       "Test"
-|       "Test"
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <b>
-|       "TestTest"
-
-Test 59 of 113 in resources/tests1.dat failed. Input:
-<b>A<cite>B<div>C</cite>D
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <b>
-|       "A"
-|       <cite>
-|         "B"
-|         <div>
-|           "C"
-|           "D"
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <b>
-|       "A"
-|       <cite>
-|         "B"
-|         <div>
-|           "CD"
+|         "world"
 
 Test 78 of 113 in resources/tests1.dat failed. Input:
@@ -380,13 +188,13 @@
 |       href="blah"
 |       "aba"
-|       <a>
-|         href="foo"
-|         "br"
-|       "x"
 |       <table>
+|         <a>
+|           href="foo"
+|           "br"
 |         <tbody>
 |           <tr>
 |             <td>
-|       "aoe"
+|           "x"
+|     "aoe"
 Expected:
 | <html>
@@ -419,5 +227,4 @@
 |       href="blah"
 |       "aba"
-|       "x"
 |       <table>
 |         <tbody>
@@ -427,4 +234,5 @@
 |                 href="foo"
 |                 "br"
+|           "x"
 |       "aoe"
 Expected:
@@ -450,9 +258,8 @@
 |   <head>
 |   <body>
-|     <a>
-|       href="blah"
-|       "aba"
-|     "x"
-|     <table>
+|     <table>
+|       <a>
+|         href="blah"
+|         "aba"
 |       <tbody>
 |         <tr>
@@ -461,4 +268,5 @@
 |               href="foo"
 |               "br"
+|         "x"
 |     "aoe"
 Expected:
@@ -483,83 +291,31 @@
 |       "aoe"
 
-Test 81 of 113 in resources/tests1.dat failed. Input:
-<a href=a>aa<marquee>aa<a href=b>bb</marquee>aa
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <a>
-|       href="a"
-|       "aa"
-|     <marquee>
-|       <a>
-|         href="a"
-|         "aa"
-|       <a>
-|         href="b"
-|         "bb"
-|     <a>
-|       href="b"
-|       "aa"
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <a>
-|       href="a"
-|       "aa"
-|       <marquee>
-|         "aa"
-|         <a>
-|           href="b"
-|           "bb"
-|       "aa"
-
-Test 82 of 113 in resources/tests1.dat failed. Input:
-<wbr><strike><code></strike><code><strike></code>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <wbr>
-|     <strike>
-|       <code>
-|     <code>
-|       <code>
-|         <strike>
-|       <strike>
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <wbr>
-|     <strike>
-|       <code>
-|     <code>
-|       <code>
-|         <strike>
-
-Test 87 of 113 in resources/tests1.dat failed. Input:
-<body><body><base><link><meta><title><p></title><body><p></body>
-Got:
-| <html>
-|   <head>
-|     <base>
-|     <meta>
-|     <title>
-|       "<p>"
-|   <body>
-|     <link>
-|     <p>
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <base>
-|     <link>
-|     <meta>
-|     <title>
-|       "<p>"
-|     <p>
+Test 86 of 113 in resources/tests1.dat failed. Input:
+<table><tr><tr><td><td><span><th><span>X</table>
+Got:
+| <html>
+|   <head>
+|   <body>
+|     <table>
+|       <tbody>
+|         <tr>
+|           <td>
+|             <span>
+|               <span>
+|                 "X"
+Expected:
+| <html>
+|   <head>
+|   <body>
+|     <table>
+|       <tbody>
+|         <tr>
+|         <tr>
+|           <td>
+|           <td>
+|             <span>
+|           <th>
+|             <span>
+|               "X"
 
 Test 90 of 113 in resources/tests1.dat failed. Input:
@@ -570,10 +326,8 @@
 |   <body>
 |     <a>
-|       <a>
 |       <table>
-|         <tbody>
+|         <a>
 |     <p>
 |       <a>
-|     <a>
 |     <div>
 |       <a>
@@ -590,37 +344,6 @@
 |       <a>
 
-Test 91 of 113 in resources/tests1.dat failed. Input:
-<head></p><meta><p>
-Got:
-| <html>
-|   <head>
-|     <meta>
-|   <body>
-|     <p>
-|     <p>
-Expected:
-| <html>
-|   <head>
-|     <meta>
-|   <body>
-|     <p>
-
-Test 92 of 113 in resources/tests1.dat failed. Input:
-<head></html><meta><p>
-Got:
-| <html>
-|   <head>
-|     <meta>
-|   <body>
-|     <p>
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <meta>
-|     <p>
-
-Test 96 of 113 in resources/tests1.dat failed. Input:
-<a><p><a></a></p></a>
+Test 103 of 113 in resources/tests1.dat failed. Input:
+<a><table><td><a><table></table><a></tr><a></table><a>
 Got:
 | <html>
@@ -628,5 +351,12 @@
 |   <body>
 |     <a>
-|     <p>
+|       <table>
+|         <tbody>
+|           <tr>
+|             <td>
+|               <a>
+|                 <table>
+|               <a>
+|           <a>
 |       <a>
 Expected:
@@ -635,48 +365,13 @@
 |   <body>
 |     <a>
-|     <p>
 |       <a>
-|       <a>
-
-Test 98 of 113 in resources/tests1.dat failed. Input:
-<p><b><div><marquee></p></b></div>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <p>
-|       <b>
-|     <b>
-|     <div>
-|       <b>
-|       <marquee>
-|         <b>
-|           <p>
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <p>
-|       <b>
-|     <div>
-|       <b>
-|         <marquee>
-|           <p>
-
-Test 101 of 113 in resources/tests1.dat failed. Input:
-<select><b><option><select><option></b></select>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <select>
-|       <option>
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <select>
-|       <option>
-|     <option>
+|       <table>
+|         <tbody>
+|           <tr>
+|             <td>
+|               <a>
+|                 <table>
+|               <a>
+|     <a>
 
 Test 104 of 113 in resources/tests1.dat failed. Input:
@@ -691,15 +386,12 @@
 |         <li>
 |       <li>
-|       <li>
-|         <div>
-|           <li>
-|             <address>
-|           <li>
-|             <b>
-|               <em>
-|             <em>
-|           <em>
+|         <li>
+|           <div>
 |             <li>
-|     <em>
+|               <address>
+|                 <li>
+|                   <b>
+|                     <em>
+|                   <li>
 Expected:
 | <html>
@@ -720,21 +412,4 @@
 |       <li>
 
-Test 106 of 113 in resources/tests1.dat failed. Input:
-<frameset><frame><frameset><frame></frameset><noframes></noframes></frameset>
-Got:
-| <html>
-|   <frameset>
-|     <frame>
-|     <frameset>
-|       <frame>
-Expected:
-| <html>
-|   <head>
-|   <frameset>
-|     <frame>
-|     <frameset>
-|       <frame>
-|     <noframes>
-
 Test 109 of 113 in resources/tests1.dat failed. Input:
 <table><col><tbody><col><tr><col><td><col></table><col>
@@ -743,8 +418,14 @@
 |   <head>
 |   <body>
-|     <col>
-|     <col>
-|     <table>
-|       <col>
+|     <table>
+|       <colgroup>
+|         <col>
+|       <tbody>
+|       <colgroup>
+|         <col>
+|       <tbody>
+|         <tr>
+|       <colgroup>
+|         <col>
 |       <tbody>
 |         <tr>
@@ -770,74 +451,63 @@
 |         <col>
 
-Test 113 of 113 in resources/tests1.dat failed. Input:
-<frameset>
-Got:
-| <html>
-|   <frameset>
-Expected:
-| <html>
-|   <head>
-|   <frameset>
+Test 110 of 113 in resources/tests1.dat failed. Input:
+<table><colgroup><tbody><colgroup><tr><colgroup><td><colgroup></table><colgroup>
+Got:
+| <html>
+|   <head>
+|   <body>
+|     <table>
+|       <colgroup>
+|       <tbody>
+|       <colgroup>
+|       <tbody>
+|         <tr>
+|       <colgroup>
+|       <tbody>
+|         <tr>
+|           <td>
+Expected:
+| <html>
+|   <head>
+|   <body>
+|     <table>
+|       <colgroup>
+|       <tbody>
+|       <colgroup>
+|       <tbody>
+|         <tr>
+|       <colgroup>
+|       <tbody>
+|         <tr>
+|           <td>
+|       <colgroup>
+
+Test 112 of 113 in resources/tests1.dat failed. Input:
+<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>
+Got:
+| <html>
+|   <head>
+|   <body>
+|     <table>
+|       <tbody>
+|         <tr>
+|     <p>
+Expected:
+| <html>
+|   <head>
+|   <body>
+|     <br>
+|     <table>
+|       <tbody>
+|         <tr>
+|     <p>
 resources/tests2.dat:
-6
-7
-8
 9
 11
-32
+13
 36
-42
-44
-45
-53
-54
-
-Test 6 of 59 in resources/tests2.dat failed. Input:
-<!DOCTYPE html><frameset>test
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <frameset>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <frameset>
-
-Test 7 of 59 in resources/tests2.dat failed. Input:
-<!DOCTYPE html><frameset><!DOCTYPE html>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <frameset>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <frameset>
-
-Test 8 of 59 in resources/tests2.dat failed. Input:
-<!DOCTYPE html><font><p><b>test</font>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <font>
-|     <p>
-|       <font>
-|         <b>
-|           "test"
-|       <b>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <font>
-|     <p>
-|       <font>
-|         <b>
-|           "test"
+47
+48
+49
 
 Test 9 of 59 in resources/tests2.dat failed. Input:
@@ -866,31 +536,35 @@
 |   <head>
 |   <body>
+|     <table>
+|       <plaintext>
+|         "<td>"
+Expected:
+| <html>
+|   <head>
+|   <body>
 |     <plaintext>
 |       "<td>"
 |     <table>
-|       <tbody>
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <plaintext>
-|       "<td>"
-|     <table>
-
-Test 32 of 59 in resources/tests2.dat failed. Input:
-<!DOCTYPE html>X</body>X
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     "X"
-|     "X"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     "XX"
+
+Test 13 of 59 in resources/tests2.dat failed. Input:
+<!DOCTYPE html><table><tr>TEST
+Got:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <table>
+|       <tbody>
+|         <tr>
+|           "TEST"
+Expected:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     "TEST"
+|     <table>
+|       <tbody>
+|         <tr>
 
 Test 36 of 59 in resources/tests2.dat failed. Input:
@@ -905,4 +579,5 @@
 |         <option>
 |         <option>
+|     <option>
 Expected:
 | <!DOCTYPE html>
@@ -916,103 +591,59 @@
 |     <option>
 
-Test 42 of 59 in resources/tests2.dat failed. Input:
-<isindex test=x name=x>
-Got:
-| <html>
-|   <head>
-|   <body>
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <form>
-|       <hr>
-|       <label>
-|         "This is a searchable index. Enter search keywords: "
-|         <input>
-|           name="isindex"
-|           test="x"
-|       <hr>
-
-Test 44 of 59 in resources/tests2.dat failed. Input:
-<!DOCTYPE html><body><title>test</body></title>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
+Test 47 of 59 in resources/tests2.dat failed. Input:
+ 
+ 
+Got:
+| <html>
+|   <head>
+|   <body>
+|     " 
+ "
+Expected:
+| <html>
+|   <head>
+|   <body>
+
+Test 48 of 59 in resources/tests2.dat failed. Input:
+<!DOCTYPE html>  <html>
+Got:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     "  "
+Expected:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+
+Test 49 of 59 in resources/tests2.dat failed. Input:
+<!DOCTYPE html><script>
+</script>  <title>x</title>  </head>
+Got:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|     <script>
+|       "
+"
+|   <body>
+|     "  "
 |     <title>
-|       "test</body>"
-|   <body>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
+|       "x"
+|     "  "
+Expected:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|     <script>
+|       "
+"
+|     "  "
 |     <title>
-|       "test</body>"
-
-Test 45 of 59 in resources/tests2.dat failed. Input:
-<!DOCTYPE html><body><title>X</title><meta name=z><link rel=foo><style>
-x { content:"</style" } </style>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|     <title>
-|       "X"
-|     <meta>
-|       name="z"
-|   <body>
-|     <link>
-|       rel="foo"
-|     <style>
-|       "
-x { content:"</style" } "
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <title>
-|       "X"
-|     <meta>
-|       name="z"
-|     <link>
-|       rel="foo"
-|     <style>
-|       "
-x { content:"</style" } "
-
-Test 53 of 59 in resources/tests2.dat failed. Input:
-<!DOCTYPE html>X</html>X
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     "X"
-|     "X"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     "XX"
-
-Test 54 of 59 in resources/tests2.dat failed. Input:
-<!DOCTYPE html>X</html> 
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     "X"
-|     " "
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     "X "
+|       "x"
+|     "  "
+|   <body>
 resources/tests3.dat:
 16
@@ -1020,4 +651,7 @@
 18
 19
+20
+21
+22
 
 Test 16 of 23 in resources/tests3.dat failed. Input:
@@ -1102,4 +736,59 @@
 |           <p>
 |       <li>
+
+Test 20 of 23 in resources/tests3.dat failed. Input:
+<!doctype html><nobr><nobr><nobr>
+Got:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <nobr>
+|       <nobr>
+|         <nobr>
+Expected:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <nobr>
+|     <nobr>
+|     <nobr>
+
+Test 21 of 23 in resources/tests3.dat failed. Input:
+<!doctype html><nobr><nobr></nobr><nobr>
+Got:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <nobr>
+|       <nobr>
+|       <nobr>
+Expected:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <nobr>
+|     <nobr>
+|     <nobr>
+
+Test 22 of 23 in resources/tests3.dat failed. Input:
+<!doctype html><html><body><p><table></table></body></html>
+Got:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <p>
+|       <table>
+Expected:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <p>
+|     <table>
 resources/tests4.dat:
 3
@@ -1145,9 +834,6 @@
 resources/tests5.dat:
 2
-6
 7
 8
-9
-16
 
 Test 2 of 16 in resources/tests5.dat failed. Input:
@@ -1159,6 +845,5 @@
 |       " <!-- "
 |   <body>
-|     " --> "
-|     "x"
+|     " --> x"
 Expected:
 | <html>
@@ -1170,23 +855,4 @@
 |     "--> x"
 
-Test 6 of 16 in resources/tests5.dat failed. Input:
-<iframe> <!--- </iframe>->x</iframe> --> </iframe>x
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <iframe>
-|       " <!--- "
-|     "->x"
-|     " --> "
-|     "x"
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <iframe>
-|       " <!--- "
-|     "->x --> x"
-
 Test 7 of 16 in resources/tests5.dat failed. Input:
 <script> <!-- </script> --> </script>x
@@ -1197,6 +863,5 @@
 |       " <!-- "
 |   <body>
-|     " --> "
-|     "x"
+|     " --> x"
 Expected:
 | <html>
@@ -1216,6 +881,5 @@
 |       " <!-- "
 |   <body>
-|     " --> "
-|     "x"
+|     " --> x"
 Expected:
 | <html>
@@ -1226,39 +890,4 @@
 |   <body>
 |     "--> x"
-
-Test 9 of 16 in resources/tests5.dat failed. Input:
-<textarea> <!--- </textarea>->x</textarea> --> </textarea>x
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <textarea>
-|       " <!--- "
-|     "->x"
-|     " --> "
-|     "x"
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <textarea>
-|       " <!--- "
-|     "->x --> x"
-
-Test 16 of 16 in resources/tests5.dat failed. Input:
-<noscript><!--</noscript>--></noscript>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <noscript>
-|     "-->"
-Expected:
-| <html>
-|   <head>
-|     <noscript>
-|       "<!--"
-|   <body>
-|     "-->"
 resources/tests6.dat:
 1
@@ -1268,17 +897,17 @@
 11
 12
+13
+14
+26
 27
-29
 30
-31
+33
+36
 37
+42
 44
 45
 46
 47
-48
-49
-50
-51
 
 Test 1 of 51 in resources/tests6.dat failed. Input:
@@ -1289,4 +918,5 @@
 |   <head>
 |   <body>
+|     " "
 Expected:
 | <!DOCTYPE html>
@@ -1301,4 +931,5 @@
 Got:
 | <html>
+|   <head>
 |   <frameset>
 Expected:
@@ -1314,4 +945,5 @@
 Got:
 | <html>
+|   <head>
 |   <frameset>
 |   <noframes>
@@ -1329,4 +961,5 @@
 Got:
 | <html>
+|   <head>
 |   <frameset>
 Expected:
@@ -1342,4 +975,5 @@
 Got:
 | <html>
+|   <head>
 |   <frameset>
 Expected:
@@ -1355,4 +989,5 @@
 Got:
 | <html>
+|   <head>
 |   <frameset>
 Expected:
@@ -1363,4 +998,49 @@
 "
 
+Test 13 of 51 in resources/tests6.dat failed. Input:
+<form><form>
+Got:
+| <html>
+|   <head>
+|   <body>
+|     <form>
+|       <form>
+Expected:
+| <html>
+|   <head>
+|   <body>
+|     <form>
+
+Test 14 of 51 in resources/tests6.dat failed. Input:
+<button><button>
+Got:
+| <html>
+|   <head>
+|   <body>
+|     <button>
+|       <button>
+Expected:
+| <html>
+|   <head>
+|   <body>
+|     <button>
+|     <button>
+
+Test 26 of 51 in resources/tests6.dat failed. Input:
+<table><colgroup>foo
+Got:
+| <html>
+|   <head>
+|   <body>
+|     <table>
+|       <colgroup>
+Expected:
+| <html>
+|   <head>
+|   <body>
+|     "foo"
+|     <table>
+|       <colgroup>
+
 Test 27 of 51 in resources/tests6.dat failed. Input:
 foo<col>
@@ -1370,14 +1050,4 @@
 | <col>
 
-Test 29 of 51 in resources/tests6.dat failed. Input:
-<frameset><div>
-Got:
-| <html>
-|   <frameset>
-Expected:
-| <html>
-|   <head>
-|   <frameset>
-
 Test 30 of 51 in resources/tests6.dat failed. Input:
 </frameset><frame>
@@ -1387,13 +1057,41 @@
 | <frame>
 
-Test 31 of 51 in resources/tests6.dat failed. Input:
-<frameset></div>
-Got:
-| <html>
-|   <frameset>
-Expected:
-| <html>
-|   <head>
-|   <frameset>
+Test 33 of 51 in resources/tests6.dat failed. Input:
+<table><tr><div>
+Got:
+| <html>
+|   <head>
+|   <body>
+|     <table>
+|       <tbody>
+|         <tr>
+Expected:
+| <html>
+|   <head>
+|   <body>
+|     <div>
+|     <table>
+|       <tbody>
+|         <tr>
+
+Test 36 of 51 in resources/tests6.dat failed. Input:
+<table><tr><div><td>
+Got:
+| <html>
+|   <head>
+|   <body>
+|     <table>
+|       <tbody>
+|         <tr>
+|           <td>
+Expected:
+| <html>
+|   <head>
+|   <body>
+|     <div>
+|     <table>
+|       <tbody>
+|         <tr>
+|           <td>
 
 Test 37 of 51 in resources/tests6.dat failed. Input:
@@ -1409,4 +1107,18 @@
 | <tr>
 
+Test 42 of 51 in resources/tests6.dat failed. Input:
+<table><table>
+Got:
+| <html>
+|   <head>
+|   <body>
+|     <table>
+Expected:
+| <html>
+|   <head>
+|   <body>
+|     <table>
+|     <table>
+
 Test 44 of 51 in resources/tests6.dat failed. Input:
 </table><tr>
@@ -1429,4 +1141,5 @@
 Got:
 | <html>
+|   <head>
 |   <frameset>
 Expected:
@@ -1448,57 +1161,10 @@
 |   <head>
 |   <body>
-
-Test 48 of 51 in resources/tests6.dat failed. Input:
-<param><frameset></frameset>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     style="display:none"
-|   <frameset>
-Expected:
-| <html>
-|   <head>
-|   <frameset>
-
-Test 49 of 51 in resources/tests6.dat failed. Input:
-<source><frameset></frameset>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     style="display:none"
-|   <frameset>
-Expected:
-| <html>
-|   <head>
-|   <frameset>
-
-Test 50 of 51 in resources/tests6.dat failed. Input:
-</html><frameset></frameset>
-Got:
-| <html>
-|   <frameset>
-Expected:
-| <html>
-|   <head>
-|   <frameset>
-
-Test 51 of 51 in resources/tests6.dat failed. Input:
-</body><frameset></frameset>
-Got:
-| <html>
-|   <frameset>
-Expected:
-| <html>
-|   <head>
-|   <frameset>
 resources/tests7.dat:
-1
 2
 5
 6
-9
-14
+7
+8
 15
 16
@@ -1506,6 +1172,6 @@
 18
 19
+20
 24
-25
 27
 28
@@ -1513,38 +1179,21 @@
 30
 
-Test 1 of 30 in resources/tests7.dat failed. Input:
-<!doctype html><body><title>X</title>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
+Test 2 of 30 in resources/tests7.dat failed. Input:
+<!doctype html><table><title>X</title></table>
+Got:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <table>
+|       <title>
+|         "X"
+Expected:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
 |     <title>
 |       "X"
-|   <body>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <title>
-|       "X"
-
-Test 2 of 30 in resources/tests7.dat failed. Input:
-<!doctype html><table><title>X</title></table>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|     <title>
-|       "X"
-|   <body>
-|     <table>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <title>
-|       "X"
 |     <table>
 
@@ -1555,7 +1204,7 @@
 | <html>
 |   <head>
-|     <meta>
-|   <body>
-|     <table>
+|   <body>
+|     <table>
+|       <meta>
 Expected:
 | <!DOCTYPE html>
@@ -1572,8 +1221,7 @@
 | <html>
 |   <head>
-|     <meta>
-|   <body>
-|     "X"
-|     <table>
+|   <body>
+|     <table>
+|       "X"
 |       <tbody>
 |         <tr>
@@ -1581,4 +1229,5 @@
 |             <table>
 |               " "
+|               <meta>
 Expected:
 | <!DOCTYPE html>
@@ -1595,41 +1244,31 @@
 |               " "
 
-Test 9 of 30 in resources/tests7.dat failed. Input:
-<!doctype html><table><style> <tr>x </style> </table>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|     <style>
-|       " <tr>x "
-|   <body>
-|     <table>
-|       " "
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <table>
-|       <style>
-|         " <tr>x "
-|       " "
-
-Test 14 of 30 in resources/tests7.dat failed. Input:
-<!doctype html><select><select>X
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <select>
-|       "X"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <select>
-|     "X"
+Test 7 of 30 in resources/tests7.dat failed. Input:
+<!doctype html><html> <head>
+Got:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     " "
+Expected:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+
+Test 8 of 30 in resources/tests7.dat failed. Input:
+<!doctype html> <head>
+Got:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     " "
+Expected:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
 
 Test 15 of 30 in resources/tests7.dat failed. Input:
@@ -1640,8 +1279,5 @@
 |   <head>
 |   <body>
-|     <input>
-|       type="hidDEN"
-|     <table>
-|       <tbody>
+|     <table>
 Expected:
 | <!DOCTYPE html>
@@ -1660,9 +1296,6 @@
 |   <head>
 |   <body>
-|     "X"
-|     <input>
-|       type="hidDEN"
-|     <table>
-|       <tbody>
+|     <table>
+|       "X"
 Expected:
 | <!DOCTYPE html>
@@ -1682,9 +1315,6 @@
 |   <head>
 |   <body>
-|     <input>
-|       type="hidDEN"
 |     <table>
 |       "  "
-|       <tbody>
 Expected:
 | <!DOCTYPE html>
@@ -1704,9 +1334,6 @@
 |   <head>
 |   <body>
-|     <input>
-|       type="hidDEN"
 |     <table>
 |       "  "
-|       <tbody>
 Expected:
 | <!DOCTYPE html>
@@ -1726,20 +1353,38 @@
 |   <head>
 |   <body>
+|     <table>
+Expected:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
 |     <input>
 |       type=" hidden"
-|     <input>
-|       type="hidDEN"
-|     <table>
-|       <tbody>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <input>
-|       type=" hidden"
 |     <table>
 |       <input>
 |         type="hidDEN"
+
+Test 20 of 30 in resources/tests7.dat failed. Input:
+<!doctype html><table><select>X<tr>
+Got:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <table>
+|       <select>
+|         "X"
+|       <tbody>
+|         <tr>
+Expected:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <select>
+|       "X"
+|     <table>
+|       <tbody>
+|         <tr>
 
 Test 24 of 30 in resources/tests7.dat failed. Input:
@@ -1752,22 +1397,4 @@
 |   "X"
 
-Test 25 of 30 in resources/tests7.dat failed. Input:
-<div><p>a</x> b
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <div>
-|       <p>
-|         "a"
-|         " b"
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <div>
-|       <p>
-|         "a b"
-
 Test 27 of 30 in resources/tests7.dat failed. Input:
 <table><b><tr><td>aaa</td></tr>bbb</table>ccc
@@ -1776,11 +1403,11 @@
 |   <head>
 |   <body>
-|     <b>
-|     "bbb"
-|     <table>
+|     <table>
+|       <b>
 |       <tbody>
 |         <tr>
 |           <td>
 |             "aaa"
+|         "bbb"
 |     "ccc"
 Expected:
@@ -1806,9 +1433,9 @@
 |   <body>
 |     "A"
-|     " B"
-|     " B"
-|     <table>
-|       <tbody>
-|         <tr>
+|     <table>
+|       <tbody>
+|         <tr>
+|           " B"
+|         " B"
 Expected:
 | <html>
@@ -1827,10 +1454,9 @@
 |   <body>
 |     "A"
-|     " B"
-|     "C"
-|     <table>
-|       <tbody>
-|         <tr>
-|         " "
+|     <table>
+|       <tbody>
+|         <tr>
+|           " B"
+|         " C"
 Expected:
 | <html>
@@ -1850,4 +1476,11 @@
 |   <body>
 |     <select>
+|     <keygen>
+|       <option>
+|         "2048 (High Grade)"
+|       <option>
+|         "1024 (Medium Grade)"
+|       <option>
+|         "512 (Low Grade)"
 Expected:
 | <html>
@@ -1863,6 +1496,5 @@
 5
 6
-8
-9
+7
 
 Test 1 of 9 in resources/tests8.dat failed. Input:
@@ -1878,7 +1510,6 @@
 "
 |       <div>
-|       "
-"
-|       "x"
+|     "
+x"
 Expected:
 | <html>
@@ -1902,7 +1533,6 @@
 |       "x"
 |       <div>
-|       "
-"
-|       "x"
+|     "
+x"
 Expected:
 | <html>
@@ -1924,6 +1554,5 @@
 |       "x"
 |       <div>
-|       "x"
-|       "x"
+|     "xx"
 Expected:
 | <html>
@@ -1944,6 +1573,5 @@
 |       "x"
 |       <div>
-|       "y"
-|       "z"
+|     "yz"
 Expected:
 | <html>
@@ -1961,11 +1589,9 @@
 |   <head>
 |   <body>
-|     <div>
-|       "x"
+|     <table>
 |       <div>
-|       "x"
-|       "x"
-|     <table>
-|       <tbody>
+|         "x"
+|         <div>
+|       "xx"
 Expected:
 | <html>
@@ -1985,54 +1611,30 @@
 |   <body>
 |     "x"
+|     <table>
+|       "x"
+Expected:
+| <html>
+|   <head>
+|   <body>
+|     "xx"
+|     <table>
+
+Test 7 of 9 in resources/tests8.dat failed. Input:
+x<table><table>x
+Got:
+| <html>
+|   <head>
+|   <body>
 |     "x"
 |     <table>
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     "xx"
-|     <table>
-
-Test 8 of 9 in resources/tests8.dat failed. Input:
-<b>a<div></div><div></b>y
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <b>
-|       "a"
-|       <div>
-|     <div>
-|       "y"
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <b>
-|       "a"
-|       <div>
-|     <div>
-|       <b>
-|       "y"
-
-Test 9 of 9 in resources/tests8.dat failed. Input:
-<a><div><p></a>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <a>
-|     <div>
-|       <a>
-|       <p>
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <a>
-|     <div>
-|       <a>
-|       <p>
-|         <a>
+|       "x"
+Expected:
+| <html>
+|   <head>
+|   <body>
+|     "x"
+|     <table>
+|     "x"
+|     <table>
 resources/tests9.dat:
 1
@@ -2049,10 +1651,7 @@
 14
 15
-16
 17
 18
 19
-20
-21
 22
 23
@@ -2097,7 +1696,6 @@
 |   <head>
 |   <body>
-|     <math>
-|     <table>
-|       <tbody>
+|     <table>
+|       <math>
 Expected:
 | <!DOCTYPE html>
@@ -2115,9 +1713,8 @@
 |   <head>
 |   <body>
-|     <math>
-|       <mi>
-|         "foo"
-|     <table>
-|       <tbody>
+|     <table>
+|       <math>
+|         <mi>
+|           "foo"
 Expected:
 | <!DOCTYPE html>
@@ -2137,11 +1734,10 @@
 |   <head>
 |   <body>
-|     <math>
-|       <mi>
-|         "foo"
-|       <mi>
-|         "bar"
-|     <table>
-|       <tbody>
+|     <table>
+|       <math>
+|         <mi>
+|           "foo"
+|         <mi>
+|           "bar"
 Expected:
 | <!DOCTYPE html>
@@ -2163,11 +1759,11 @@
 |   <head>
 |   <body>
-|     <math>
-|       <mi>
-|         "foo"
-|       <mi>
-|         "bar"
-|     <table>
-|       <tbody>
+|     <table>
+|       <tbody>
+|         <math>
+|           <mi>
+|             "foo"
+|           <mi>
+|             "bar"
 Expected:
 | <!DOCTYPE html>
@@ -2190,12 +1786,8 @@
 |   <head>
 |   <body>
-|     <math>
-|       <mi>
-|         "foo"
-|       <mi>
-|         "bar"
-|     <table>
-|       <tbody>
-|         <tr>
+|     <table>
+|       <tbody>
+|         <tr>
+|           "foobar"
 Expected:
 | <!DOCTYPE html>
@@ -2384,4 +1976,62 @@
 |   <head>
 |   <body>
+|     <table>
+|       <colgroup>
+|       <math>
+|         <mi>
+|           "foo"
+|         <mi>
+|           "bar"
+|         <p>
+|           "baz"
+|     <p>
+|       "quux"
+Expected:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <math math>
+|       <math mi>
+|         "foo"
+|       <math mi>
+|         "bar"
+|     <p>
+|       "baz"
+|     <table>
+|       <colgroup>
+|     <p>
+|       "quux"
+
+Test 17 of 25 in resources/tests9.dat failed. Input:
+<!DOCTYPE html><body><table><select><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux
+Got:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <table>
+|       <select>
+|         "foobarbaz"
+|     <p>
+|       "quux"
+Expected:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <select>
+|       "foobarbaz"
+|     <table>
+|     <p>
+|       "quux"
+
+Test 18 of 25 in resources/tests9.dat failed. Input:
+<!DOCTYPE html><body></body></html><math><mi>foo</mi><mi>bar</mi><p>baz
+Got:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
 |     <math>
 |       <mi>
@@ -2391,9 +2041,4 @@
 |       <p>
 |         "baz"
-|     <table>
-|       <colgroup>
-|       <tbody>
-|     <p>
-|       "quux"
 Expected:
 | <!DOCTYPE html>
@@ -2408,68 +2053,7 @@
 |     <p>
 |       "baz"
-|     <table>
-|       <colgroup>
-|     <p>
-|       "quux"
-
-Test 16 of 25 in resources/tests9.dat failed. Input:
-<!DOCTYPE html><body><table><tr><td><select><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <table>
-|       <tbody>
-|         <tr>
-|           <td>
-|             <select>
-|               "foo"
-|               "bar"
-|               "baz"
-|     <p>
-|       "quux"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <table>
-|       <tbody>
-|         <tr>
-|           <td>
-|             <select>
-|               "foobarbaz"
-|     <p>
-|       "quux"
-
-Test 17 of 25 in resources/tests9.dat failed. Input:
-<!DOCTYPE html><body><table><select><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <select>
-|       "foo"
-|       "bar"
-|       "baz"
-|     <table>
-|       <tbody>
-|     <p>
-|       "quux"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <select>
-|       "foobarbaz"
-|     <table>
-|     <p>
-|       "quux"
-
-Test 18 of 25 in resources/tests9.dat failed. Input:
-<!DOCTYPE html><body></body></html><math><mi>foo</mi><mi>bar</mi><p>baz
+
+Test 19 of 25 in resources/tests9.dat failed. Input:
+<!DOCTYPE html><body></body><math><mi>foo</mi><mi>bar</mi><p>baz
 Got:
 | <!DOCTYPE html>
@@ -2496,55 +2080,4 @@
 |     <p>
 |       "baz"
-
-Test 19 of 25 in resources/tests9.dat failed. Input:
-<!DOCTYPE html><body></body><math><mi>foo</mi><mi>bar</mi><p>baz
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <math>
-|       <mi>
-|         "foo"
-|       <mi>
-|         "bar"
-|       <p>
-|         "baz"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <math math>
-|       <math mi>
-|         "foo"
-|       <math mi>
-|         "bar"
-|     <p>
-|       "baz"
-
-Test 20 of 25 in resources/tests9.dat failed. Input:
-<!DOCTYPE html><frameset><math><mi></mi><mi></mi><p><span>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <frameset>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <frameset>
-
-Test 21 of 25 in resources/tests9.dat failed. Input:
-<!DOCTYPE html><frameset></frameset><math><mi></mi><mi></mi><p><span>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <frameset>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <frameset>
 
 Test 22 of 25 in resources/tests9.dat failed. Input:
@@ -2657,10 +2190,7 @@
 14
 15
-16
 17
 18
 19
-20
-21
 22
 23
@@ -2705,7 +2235,6 @@
 |   <head>
 |   <body>
-|     <svg>
-|     <table>
-|       <tbody>
+|     <table>
+|       <svg>
 Expected:
 | <!DOCTYPE html>
@@ -2723,9 +2252,8 @@
 |   <head>
 |   <body>
-|     <svg>
-|       <g>
-|         "foo"
-|     <table>
-|       <tbody>
+|     <table>
+|       <svg>
+|         <g>
+|           "foo"
 Expected:
 | <!DOCTYPE html>
@@ -2745,11 +2273,10 @@
 |   <head>
 |   <body>
-|     <svg>
-|       <g>
-|         "foo"
-|       <g>
-|         "bar"
-|     <table>
-|       <tbody>
+|     <table>
+|       <svg>
+|         <g>
+|           "foo"
+|         <g>
+|           "bar"
 Expected:
 | <!DOCTYPE html>
@@ -2771,11 +2298,11 @@
 |   <head>
 |   <body>
-|     <svg>
-|       <g>
-|         "foo"
-|       <g>
-|         "bar"
-|     <table>
-|       <tbody>
+|     <table>
+|       <tbody>
+|         <svg>
+|           <g>
+|             "foo"
+|           <g>
+|             "bar"
 Expected:
 | <!DOCTYPE html>
@@ -2798,12 +2325,8 @@
 |   <head>
 |   <body>
-|     <svg>
-|       <g>
-|         "foo"
-|       <g>
-|         "bar"
-|     <table>
-|       <tbody>
-|         <tr>
+|     <table>
+|       <tbody>
+|         <tr>
+|           "foobar"
 Expected:
 | <!DOCTYPE html>
@@ -2992,4 +2515,62 @@
 |   <head>
 |   <body>
+|     <table>
+|       <colgroup>
+|       <svg>
+|         <g>
+|           "foo"
+|         <g>
+|           "bar"
+|         <p>
+|           "baz"
+|     <p>
+|       "quux"
+Expected:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <svg svg>
+|       <svg g>
+|         "foo"
+|       <svg g>
+|         "bar"
+|     <p>
+|       "baz"
+|     <table>
+|       <colgroup>
+|     <p>
+|       "quux"
+
+Test 17 of 25 in resources/tests10.dat failed. Input:
+<!DOCTYPE html><body><table><select><svg><g>foo</g><g>bar</g><p>baz</table><p>quux
+Got:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <table>
+|       <select>
+|         "foobarbaz"
+|     <p>
+|       "quux"
+Expected:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <select>
+|       "foobarbaz"
+|     <table>
+|     <p>
+|       "quux"
+
+Test 18 of 25 in resources/tests10.dat failed. Input:
+<!DOCTYPE html><body></body></html><svg><g>foo</g><g>bar</g><p>baz
+Got:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
 |     <svg>
 |       <g>
@@ -2999,9 +2580,4 @@
 |       <p>
 |         "baz"
-|     <table>
-|       <colgroup>
-|       <tbody>
-|     <p>
-|       "quux"
 Expected:
 | <!DOCTYPE html>
@@ -3016,68 +2592,7 @@
 |     <p>
 |       "baz"
-|     <table>
-|       <colgroup>
-|     <p>
-|       "quux"
-
-Test 16 of 25 in resources/tests10.dat failed. Input:
-<!DOCTYPE html><body><table><tr><td><select><svg><g>foo</g><g>bar</g><p>baz</table><p>quux
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <table>
-|       <tbody>
-|         <tr>
-|           <td>
-|             <select>
-|               "foo"
-|               "bar"
-|               "baz"
-|     <p>
-|       "quux"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <table>
-|       <tbody>
-|         <tr>
-|           <td>
-|             <select>
-|               "foobarbaz"
-|     <p>
-|       "quux"
-
-Test 17 of 25 in resources/tests10.dat failed. Input:
-<!DOCTYPE html><body><table><select><svg><g>foo</g><g>bar</g><p>baz</table><p>quux
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <select>
-|       "foo"
-|       "bar"
-|       "baz"
-|     <table>
-|       <tbody>
-|     <p>
-|       "quux"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <select>
-|       "foobarbaz"
-|     <table>
-|     <p>
-|       "quux"
-
-Test 18 of 25 in resources/tests10.dat failed. Input:
-<!DOCTYPE html><body></body></html><svg><g>foo</g><g>bar</g><p>baz
+
+Test 19 of 25 in resources/tests10.dat failed. Input:
+<!DOCTYPE html><body></body><svg><g>foo</g><g>bar</g><p>baz
 Got:
 | <!DOCTYPE html>
@@ -3104,55 +2619,4 @@
 |     <p>
 |       "baz"
-
-Test 19 of 25 in resources/tests10.dat failed. Input:
-<!DOCTYPE html><body></body><svg><g>foo</g><g>bar</g><p>baz
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <svg>
-|       <g>
-|         "foo"
-|       <g>
-|         "bar"
-|       <p>
-|         "baz"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <svg svg>
-|       <svg g>
-|         "foo"
-|       <svg g>
-|         "bar"
-|     <p>
-|       "baz"
-
-Test 20 of 25 in resources/tests10.dat failed. Input:
-<!DOCTYPE html><frameset><svg><g></g><g></g><p><span>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <frameset>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <frameset>
-
-Test 21 of 25 in resources/tests10.dat failed. Input:
-<!DOCTYPE html><frameset></frameset><svg><g></g><g></g><p><span>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <frameset>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <frameset>
 
 Test 22 of 25 in resources/tests10.dat failed. Input:
@@ -4208,12 +3672,12 @@
 |     <p>
 |       "spam"
-|     <table>
-|       <tbody>
-|         <tr>
-|           <td>
-|             <img>
-|     <g>
-|       "quux"
-|     "bar"
+|       <table>
+|         <tbody>
+|           <tr>
+|             <td>
+|               <img>
+|       <g>
+|         "quux"
+|       "bar"
 Expected:
 | <!DOCTYPE html>
@@ -4266,12 +3730,12 @@
 |               <p>
 |                 "spam"
-|               <table>
-|                 <tbody>
-|                   <tr>
-|                     <td>
-|                       <img>
-|           <g>
-|             "quux"
-|     "bar"
+|                 <table>
+|                   <tbody>
+|                     <tr>
+|                       <td>
+|                         <img>
+|                 <g>
+|                   "quux"
+|                 "bar"
 Expected:
 | <!DOCTYPE html>
@@ -4304,41 +3768,74 @@
 
 resources/tests15.dat:
-3
-4
+1
+2
 5
-6
 7
+8
+9
+10
 11
 12
-13
-
-Test 3 of 14 in resources/tests15.dat failed. Input:
-<!doctype html></html> <head>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
+
+Test 1 of 14 in resources/tests15.dat failed. Input:
+<!DOCTYPE html><p><b><i><u></p> <p>X
+Got:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <p>
+|       <b>
+|         <i>
+|           <u>
 |     " "
-
-Test 4 of 14 in resources/tests15.dat failed. Input:
-<!doctype html></body><meta>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|     <meta>
-|   <body>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <meta>
+|     <p>
+|       "X"
+Expected:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <p>
+|       <b>
+|         <i>
+|           <u>
+|     <b>
+|       <i>
+|         <u>
+|           " "
+|           <p>
+|             "X"
+
+Test 2 of 14 in resources/tests15.dat failed. Input:
+<p><b><i><u></p>
+<p>X
+Got:
+| <html>
+|   <head>
+|   <body>
+|     <p>
+|       <b>
+|         <i>
+|           <u>
+|     "
+"
+|     <p>
+|       "X"
+Expected:
+| <html>
+|   <head>
+|   <body>
+|     <p>
+|       <b>
+|         <i>
+|           <u>
+|     <b>
+|       <i>
+|         <u>
+|           "
+"
+|           <p>
+|             "X"
 
 Test 5 of 14 in resources/tests15.dat failed. Input:
@@ -4355,21 +3852,4 @@
 | <!--  foo  -->
 
-Test 6 of 14 in resources/tests15.dat failed. Input:
-<!doctype html></body><title>X</title>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|     <title>
-|       "X"
-|   <body>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <title>
-|       "X"
-
 Test 7 of 14 in resources/tests15.dat failed. Input:
 <!doctype html><table> X<meta></table>
@@ -4378,8 +3858,8 @@
 | <html>
 |   <head>
-|     <meta>
-|   <body>
-|     " X"
-|     <table>
+|   <body>
+|     <table>
+|       " X"
+|       <meta>
 Expected:
 | <!DOCTYPE html>
@@ -4391,4 +3871,59 @@
 |     <table>
 
+Test 8 of 14 in resources/tests15.dat failed. Input:
+<!doctype html><table> x</table>
+Got:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <table>
+|       " x"
+Expected:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     " x"
+|     <table>
+
+Test 9 of 14 in resources/tests15.dat failed. Input:
+<!doctype html><table> x </table>
+Got:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <table>
+|       " x "
+Expected:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     " x "
+|     <table>
+
+Test 10 of 14 in resources/tests15.dat failed. Input:
+<!doctype html><table><tr> x</table>
+Got:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     <table>
+|       <tbody>
+|         <tr>
+|           " x"
+Expected:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     " x"
+|     <table>
+|       <tbody>
+|         <tr>
+
 Test 11 of 14 in resources/tests15.dat failed. Input:
 <!doctype html><table>X<style> <tr>x </style> </table>
@@ -4397,20 +3932,20 @@
 | <html>
 |   <head>
-|     <style>
-|       " <tr>x "
-|   <body>
-|     "X"
-|     <table>
-|       " "
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     "X"
-|     <table>
+|   <body>
+|     <table>
+|       "X"
 |       <style>
 |         " <tr>x "
 |       " "
+Expected:
+| <!DOCTYPE html>
+| <html>
+|   <head>
+|   <body>
+|     "X"
+|     <table>
+|       <style>
+|         " <tr>x "
+|       " "
 
 Test 12 of 14 in resources/tests15.dat failed. Input:
@@ -4422,9 +3957,9 @@
 |   <body>
 |     <div>
-|       <a>
-|         "foo"
 |       <table>
+|         <a>
+|           "foo"
+|         " "
 |         <tbody>
-|           " "
 |           <tr>
 |             <td>
@@ -4446,475 +3981,8 @@
 |               "bar"
 |             " "
-
-Test 13 of 14 in resources/tests15.dat failed. Input:
-<frame></frame></frame><frameset><frame><frameset><frame></frameset><noframes></frameset><noframes>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     style="display:none"
-|   <frameset>
-|     <frame>
-|     <frameset>
-|       <frame>
-Expected:
-| <html>
-|   <head>
-|   <frameset>
-|     <frame>
-|     <frameset>
-|       <frame>
-|     <noframes>
-|       "</frameset><noframes>"
-resources/tests16.dat:
-84
-85
-86
-87
-88
-94
-176
-177
-178
-179
-180
-186
-
-Test 84 of 189 in resources/tests16.dat failed. Input:
-<!doctype html><noscript><!--<noscript></noscript>--></noscript>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <noscript>
-|     "-->"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|     <noscript>
-|       "<!--<noscript>"
-|   <body>
-|     "-->"
-
-Test 85 of 189 in resources/tests16.dat failed. Input:
-<!doctype html><noscript><!--</noscript>X<noscript>--></noscript>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <noscript>
-|     "X"
-|     <noscript>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|     <noscript>
-|       "<!--"
-|   <body>
-|     "X"
-|     <noscript>
-|       "-->"
-
-Test 86 of 189 in resources/tests16.dat failed. Input:
-<!doctype html><noscript><iframe></noscript>X
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <noscript>
-|     "X"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|     <noscript>
-|       "<iframe>"
-|   <body>
-|     "X"
-
-Test 87 of 189 in resources/tests16.dat failed. Input:
-<!doctype html><noframes><!--<noframes></noframes>--></noframes>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <noframes>
-|   <head>
-|   <body>
-|     "-->"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|     <noframes>
-|       "<!--<noframes>"
-|   <body>
-|     "-->"
-
-Test 88 of 189 in resources/tests16.dat failed. Input:
-<!doctype html><noframes><body><script><!--...</script></body></noframes></html>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <noframes>
-|   <head>
-|   <body>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|     <noframes>
-|       "<body><script><!--...</script></body>"
-|   <body>
-
-Test 94 of 189 in resources/tests16.dat failed. Input:
-<!doctype html><noembed><!--<noembed></noembed>--></noembed>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <noembed>
-|     "-->"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <noembed>
-|       "<!--<noembed>"
-|     "-->"
-
-Test 176 of 189 in resources/tests16.dat failed. Input:
-<noscript><!--<noscript></noscript>--></noscript>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <noscript>
-|     "-->"
-Expected:
-| <html>
-|   <head>
-|     <noscript>
-|       "<!--<noscript>"
-|   <body>
-|     "-->"
-
-Test 177 of 189 in resources/tests16.dat failed. Input:
-<noscript><!--</noscript>X<noscript>--></noscript>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <noscript>
-|     "X"
-|     <noscript>
-Expected:
-| <html>
-|   <head>
-|     <noscript>
-|       "<!--"
-|   <body>
-|     "X"
-|     <noscript>
-|       "-->"
-
-Test 178 of 189 in resources/tests16.dat failed. Input:
-<noscript><iframe></noscript>X
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <noscript>
-|     "X"
-Expected:
-| <html>
-|   <head>
-|     <noscript>
-|       "<iframe>"
-|   <body>
-|     "X"
-
-Test 179 of 189 in resources/tests16.dat failed. Input:
-<noframes><!--<noframes></noframes>--></noframes>
-Got:
-| <html>
-|   <noframes>
-|   <head>
-|   <body>
-|     "-->"
-Expected:
-| <html>
-|   <head>
-|     <noframes>
-|       "<!--<noframes>"
-|   <body>
-|     "-->"
-
-Test 180 of 189 in resources/tests16.dat failed. Input:
-<noframes><body><script><!--...</script></body></noframes></html>
-Got:
-| <html>
-|   <noframes>
-|   <head>
-|   <body>
-Expected:
-| <html>
-|   <head>
-|     <noframes>
-|       "<body><script><!--...</script></body>"
-|   <body>
-
-Test 186 of 189 in resources/tests16.dat failed. Input:
-<noembed><!--<noembed></noembed>--></noembed>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <noembed>
-|     "-->"
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <noembed>
-|       "<!--<noembed>"
-|     "-->"
-resources/webkit01.dat:
-15
-17
-20
-22
-24
-26
-27
-28
-29
-30
-31
-
-Test 15 of 31 in resources/webkit01.dat failed. Input:
-<p>Test</p<p>Test2</p>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <p>
-|       "Test"
-|       "Test2"
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <p>
-|       "TestTest2"
-
-Test 17 of 31 in resources/webkit01.dat failed. Input:
-<A>test< /A>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <a>
-|       "test"
-|       "< /A>"
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <a>
-|       "test< /A>"
-
-Test 20 of 31 in resources/webkit01.dat failed. Input:
-<body></br foo="bar"></body>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <br>
-|       foo="bar"
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <br>
-
-Test 22 of 31 in resources/webkit01.dat failed. Input:
-<body></body></br foo="bar">
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <br>
-|       foo="bar"
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <br>
-
-Test 24 of 31 in resources/webkit01.dat failed. Input:
-<html><body></body></html><!-- Hi there -->
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <!--  Hi there  -->
-Expected:
-| <html>
-|   <head>
-|   <body>
-| <!--  Hi there  -->
-
-Test 26 of 31 in resources/webkit01.dat failed. Input:
-<html><body></body></html>x<!-- Hi there --></html><!-- Again -->
-Got:
-| <html>
-|   <head>
-|   <body>
-|     "x"
-|     <!--  Hi there  -->
-|     <!--  Again  -->
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     "x"
-|     <!--  Hi there  -->
-| <!--  Again  -->
-
-Test 27 of 31 in resources/webkit01.dat failed. Input:
-<html><body></body></html>x<!-- Hi there --></body></html><!-- Again -->
-Got:
-| <html>
-|   <head>
-|   <body>
-|     "x"
-|     <!--  Hi there  -->
-|     <!--  Again  -->
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     "x"
-|     <!--  Hi there  -->
-| <!--  Again  -->
-
-Test 28 of 31 in resources/webkit01.dat failed. Input:
-<html><body><ruby><div><rp>xx</rp></div></ruby></body></html>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <ruby>
-|       <div>
-|         <rp>
-|           "xx"
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <ruby>
-|       <div>
-|       <rp>
-|         "xx"
-
-Test 29 of 31 in resources/webkit01.dat failed. Input:
-<html><body><ruby><div><rt>xx</rt></div></ruby></body></html>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <ruby>
-|       <div>
-|         <rt>
-|           "xx"
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <ruby>
-|       <div>
-|       <rt>
-|         "xx"
-
-Test 30 of 31 in resources/webkit01.dat failed. Input:
-<html><frameset><!--1--><noframes>A</noframes><!--2--></frameset><!--3--><noframes>B</noframes><!--4--></html><!--5--><noframes>C</noframes><!--6-->
-Got:
-| <html>
-|   <frameset>
-|     <!-- 1 -->
-|     <!-- 2 -->
-|   <!-- 3 -->
-|   <noframes>
-|   <!-- 4 -->
-|   <!-- 5 -->
-|   <noframes>
-|   <!-- 6 -->
-Expected:
-| <html>
-|   <head>
-|   <frameset>
-|     <!-- 1 -->
-|     <noframes>
-|       "A"
-|     <!-- 2 -->
-|   <!-- 3 -->
-|   <noframes>
-|     "B"
-|   <!-- 4 -->
-|   <noframes>
-|     "C"
-| <!-- 5 -->
-| <!-- 6 -->
-
-Test 31 of 31 in resources/webkit01.dat failed. Input:
-<select><option>A<select><option>B<select><option>C<select><option>D<select><option>E<select><option>F<select><option>G<select>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <select>
-|       <option>
-|         "A"
-|     "B"
-|     <select>
-|       <option>
-|         "C"
-|     "D"
-|     <select>
-|       <option>
-|         "E"
-|     "F"
-|     <select>
-|       <option>
-|         "G"
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <select>
-|       <option>
-|         "A"
-|     <option>
-|       "B"
-|       <select>
-|         <option>
-|           "C"
-|     <option>
-|       "D"
-|       <select>
-|         <option>
-|           "E"
-|     <option>
-|       "F"
-|       <select>
-|         <option>
-|           "G"
+resources/tests16.dat: PASS
+
+resources/webkit01.dat: PASS
+
 resources/doctype01.dat: PASS
 
@@ -4955,12 +4023,11 @@
 
 resources/adoption01.dat:
-1
+3
+4
+5
 6
-7
-8
-9
-
-Test 1 of 9 in resources/adoption01.dat failed. Input:
-<a><p></a></p>
+
+Test 3 of 9 in resources/adoption01.dat failed. Input:
+<a>1<button>2</a>3</button>
 Got:
 | <html>
@@ -4968,5 +4035,7 @@
 |   <body>
 |     <a>
-|     <p>
+|       "1"
+|       <button>
+|         "23"
 Expected:
 | <html>
@@ -4974,20 +4043,75 @@
 |   <body>
 |     <a>
+|       "1"
+|       <button>
+|         "2"
+|     "3"
+
+Test 4 of 9 in resources/adoption01.dat failed. Input:
+<a>1<b>2</a>3</b>
+Got:
+| <html>
+|   <head>
+|   <body>
+|     <a>
+|       "1"
+|       <b>
+|         "2"
+|     "3"
+Expected:
+| <html>
+|   <head>
+|   <body>
+|     <a>
+|       "1"
+|       <b>
+|         "2"
+|     <b>
+|       "3"
+
+Test 5 of 9 in resources/adoption01.dat failed. Input:
+<a>1<div>2<div>3</a>4</div>5</div>
+Got:
+| <html>
+|   <head>
+|   <body>
+|     <a>
+|       "1"
+|     <div>
+|       <a>
+|         "2"
+|       <div>
+|         <a>
+|           "3"
+|         "4"
+|     "5"
+Expected:
+| <html>
+|   <head>
+|   <body>
+|     <a>
+|       "1"
+|     <div>
+|       <a>
+|         "2"
+|       <div>
+|         <a>
+|           "3"
+|         "4"
+|       "5"
+
+Test 6 of 9 in resources/adoption01.dat failed. Input:
+<table><a>1<p>2</a>3</p>
+Got:
+| <html>
+|   <head>
+|   <body>
 |     <p>
 |       <a>
-
-Test 6 of 9 in resources/adoption01.dat failed. Input:
-<table><a>1<p>2</a>3</p>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <a>
-|       "1"
-|       <p>
 |         "2"
-|         "3"
-|     <table>
-|       <tbody>
+|       "3"
+|     <table>
+|       <a>
+|         "1"
 Expected:
 | <html>
@@ -5001,149 +4125,18 @@
 |       "3"
 |     <table>
-
-Test 7 of 9 in resources/adoption01.dat failed. Input:
-<b><b><a><p></a>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <b>
-|       <b>
-|         <a>
-|         <p>
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <b>
-|       <b>
-|         <a>
-|         <p>
-|           <a>
-
-Test 8 of 9 in resources/adoption01.dat failed. Input:
-<b><a><b><p></a>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <b>
-|       <a>
-|         <b>
-|       <b>
-|         <p>
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <b>
-|       <a>
-|         <b>
-|       <b>
-|         <p>
-|           <a>
-
-Test 9 of 9 in resources/adoption01.dat failed. Input:
-<a><b><b><p></a>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <a>
-|       <b>
-|         <b>
-|     <b>
-|       <b>
-|         <p>
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <a>
-|       <b>
-|         <b>
-|     <b>
-|       <b>
-|         <p>
-|           <a>
 resources/inbody01.dat: PASS
 
-resources/isindex.dat:
-1
-2
-3
-
-Test 1 of 3 in resources/isindex.dat failed. Input:
-<isindex>
-Got:
-| <html>
-|   <head>
-|   <body>
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <form>
-|       <hr>
-|       <label>
-|         "This is a searchable index. Enter search keywords: "
-|         <input>
-|           name="isindex"
-|       <hr>
-
-Test 2 of 3 in resources/isindex.dat failed. Input:
-<isindex name="A" action="B" prompt="C" foo="D">
-Got:
-| <html>
-|   <head>
-|   <body>
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <form>
-|       action="B"
-|       <hr>
-|       <label>
-|         "C"
-|         <input>
-|           foo="D"
-|           name="isindex"
-|       <hr>
-
-Test 3 of 3 in resources/isindex.dat failed. Input:
-<form><isindex>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <form>
-|       <div>
-|         <hr>
-|         "This is a searchable index. Enter search keywords: "
-|         <isindex>
-|           type="khtml_isindex"
-|         <hr>
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <form>
+resources/isindex.dat: PASS
+
 resources/tables01.dat:
-3
+4
 7
 8
 9
-
-Test 3 of 14 in resources/tables01.dat failed. Input:
-<table><col foo='bar'>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <table>
-|       <col>
-|         foo="bar"
-Expected:
+10
+
+Test 4 of 14 in resources/tables01.dat failed. Input:
+<table><colgroup></html>foo
+Got:
 | <html>
 |   <head>
@@ -5151,10 +4144,24 @@
 |     <table>
 |       <colgroup>
-|         <col>
-|           foo="bar"
+|       "foo"
+Expected:
+| <html>
+|   <head>
+|   <body>
+|     "foo"
+|     <table>
+|       <colgroup>
 
 Test 7 of 14 in resources/tables01.dat failed. Input:
 <table><select><option>3</select></table>
 Got:
+| <html>
+|   <head>
+|   <body>
+|     <table>
+|       <select>
+|         <option>
+|           "3"
+Expected:
 | <html>
 |   <head>
@@ -5164,5 +4171,50 @@
 |         "3"
 |     <table>
-|       <tbody>
+
+Test 8 of 14 in resources/tables01.dat failed. Input:
+<table><select><table></table></select></table>
+Got:
+| <html>
+|   <head>
+|   <body>
+|     <table>
+|       <select>
+Expected:
+| <html>
+|   <head>
+|   <body>
+|     <select>
+|     <table>
+|     <table>
+
+Test 9 of 14 in resources/tables01.dat failed. Input:
+<table><select></table>
+Got:
+| <html>
+|   <head>
+|   <body>
+|     <table>
+|       <select>
+Expected:
+| <html>
+|   <head>
+|   <body>
+|     <select>
+|     <table>
+
+Test 10 of 14 in resources/tables01.dat failed. Input:
+<table><select><option>A<tr><td>B</td></tr></table>
+Got:
+| <html>
+|   <head>
+|   <body>
+|     <table>
+|       <select>
+|         <option>
+|           "A"
+|       <tbody>
+|         <tr>
+|           <td>
+|             "B"
 Expected:
 | <html>
@@ -5171,38 +4223,9 @@
 |     <select>
 |       <option>
-|         "3"
-|     <table>
-
-Test 8 of 14 in resources/tables01.dat failed. Input:
-<table><select><table></table></select></table>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <select>
-|     <table>
-|       <tbody>
-|     <table>
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <select>
-|     <table>
-|     <table>
-
-Test 9 of 14 in resources/tables01.dat failed. Input:
-<table><select></table>
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <select>
-|     <table>
-|       <tbody>
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <select>
-|     <table>
+|         "A"
+|     <table>
+|       <tbody>
+|         <tr>
+|           <td>
+|             "B"
+#EOF
