[
    /* Test count: 34 */
    /* Test number: 1 */
    {
        "data": $DATA{ ,12}
            <!doctype html><body><title>X</title>
        $DATA,
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
              <body>
                <title>
                  "X"
        $DATA
    },
    /* Test number: 2 */
    {
        "data": $DATA{ ,12}
            <!doctype html><table><title>X</title></table>
        $DATA,
        "errors": [
            {"line": 1, "col": 29, "id": "unexpected-start-tag-implies-table-voodoo"}
        ],
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
              <body>
                <title>
                  "X"
                <table>
        $DATA
    },
    /* Test number: 3 */
    {
        "data": $DATA{ ,12}
            <!doctype html><head></head><title>X</title>
        $DATA,
        "errors": [
            {"line": 1, "col": 35, "id": "unexpected-start-tag-out-of-my-head"}
        ],
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
                <title>
                  "X"
              <body>
        $DATA
    },
    /* Test number: 4 */
    {
        "data": $DATA{ ,12}
            <!doctype html></head><title>X</title>
        $DATA,
        "errors": [
            {"line": 1, "col": 29, "id": "unexpected-start-tag-out-of-my-head"}
        ],
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
                <title>
                  "X"
              <body>
        $DATA
    },
    /* Test number: 5 */
    {
        "data": $DATA{ ,12}
            <!doctype html></head><base>X
        $DATA,
        "errors": [
            {"line": 1, "col": 28, "id": "unexpected-start-tag-out-of-my-head"}
        ],
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
                <base>
              <body>
                "X"
        $DATA
    },
    /* Test number: 6 */
    {
        "data": $DATA{ ,12}
            <!doctype html></head><basefont>X
        $DATA,
        "errors": [
            {"line": 1, "col": 32, "id": "unexpected-start-tag-out-of-my-head"}
        ],
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
                <basefont>
              <body>
                "X"
        $DATA
    },
    /* Test number: 7 */
    {
        "data": $DATA{ ,12}
            <!doctype html></head><bgsound>X
        $DATA,
        "errors": [
            {"line": 1, "col": 31, "id": "unexpected-start-tag-out-of-my-head"}
        ],
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
                <bgsound>
              <body>
                "X"
        $DATA
    },
    /* Test number: 8 */
    {
        "data": $DATA{ ,12}
            <!doctype html><table><meta></table>
        $DATA,
        "errors": [
            {"line": 1, "col": 28, "id": "unexpected-start-tag-implies-table-voodoo"}
        ],
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
              <body>
                <meta>
                <table>
        $DATA
    },
    /* Test number: 9 */
    {
        "data": $DATA{ ,12}
            <!doctype html><table>X<tr><td><table> <meta></table></table>
        $DATA,
        "errors": [
            {"line": 0, "col": 0, "id": "unexpected text in table"},
            {"line": 1, "col": 45, "id": "unexpected-start-tag-implies-table-voodoo"}
        ],
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
              <body>
                "X"
                <table>
                  <tbody>
                    <tr>
                      <td>
                        <meta>
                        <table>
                          " "
        $DATA
    },
    /* Test number: 10 */
    {
        "data": $DATA{ ,12}
            <!doctype html><html> <head>
        $DATA,
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
              <body>
        $DATA
    },
    /* Test number: 11 */
    {
        "data": $DATA{ ,12}
            <!doctype html> <head>
        $DATA,
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
              <body>
        $DATA
    },
    /* Test number: 12 */
    {
        "data": $DATA{ ,12}
            <!doctype html><table><style> <tr>x </style> </table>
        $DATA,
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
              <body>
                <table>
                  <style>
                    " <tr>x "
                  " "
        $DATA
    },
    /* Test number: 13 */
    {
        "data": $DATA{ ,12}
            <!doctype html><table><TBODY><script> <tr>x </script> </table>
        $DATA,
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
              <body>
                <table>
                  <tbody>
                    <script>
                      " <tr>x "
                    " "
        $DATA
    },
    /* Test number: 14 */
    {
        "data": $DATA{ ,12}
            <!doctype html><p><applet><p>X</p></applet>
        $DATA,
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
              <body>
                <p>
                  <applet>
                    <p>
                      "X"
        $DATA
    },
    /* Test number: 15 */
    {
        "data": $DATA{ ,12}
            <!doctype html><p><object type="application/x-non-existant-plugin"><p>X</p></object>
        $DATA,
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
              <body>
                <p>
                  <object type="application/x-non-existant-plugin">
                    <p>
                      "X"
        $DATA
    },
    /* Test number: 16 */
    {
        "data": $DATA{ ,12}
            <!doctype html><listing>
            X</listing>
        $DATA,
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
              <body>
                <listing>
                  "X"
        $DATA
    },
    /* Test number: 17 */
    {
        "data": $DATA{ ,12}
            <!doctype html><select><input>X
        $DATA,
        "errors": [
            {"line": 0, "col": 0, "id": "1:32: ERROR: Premature end of file. Currently open tags: html, body, select."}
        ],
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
              <body>
                <select>
                <input>
                "X"
        $DATA
    },
    /* Test number: 18 */
    {
        "data": $DATA{ ,12}
            <!doctype html><select><select>X
        $DATA,
        "errors": [
            {"line": 0, "col": 0, "id": "1:24: ERROR: Start tag 'select' isn't allowed here. Currently open tags: html, body, select."}
        ],
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
              <body>
                <select>
                "X"
        $DATA
    },
    /* Test number: 19 */
    {
        "data": $DATA{ ,12}
            <!doctype html><table><input type=hidDEN></table>
        $DATA,
        "errors": [
            {"line": 1, "col": 41, "id": "unexpected-hidden-input-in-table"}
        ],
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
              <body>
                <table>
                  <input type="hidDEN">
        $DATA
    },
    /* Test number: 20 */
    {
        "data": $DATA{ ,12}
            <!doctype html><table>X<input type=hidDEN></table>
        $DATA,
        "errors": [
            {"line": 1, "col": 23, "id": "foster-parenting-character"},
            {"line": 1, "col": 42, "id": "unexpected-hidden-input-in-table"}
        ],
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
              <body>
                "X"
                <table>
                  <input type="hidDEN">
        $DATA
    },
    /* Test number: 21 */
    {
        "data": $DATA{ ,12}
            <!doctype html><table>  <input type=hidDEN></table>
        $DATA,
        "errors": [
            {"line": 1, "col": 43, "id": "unexpected-hidden-input-in-table"}
        ],
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
              <body>
                <table>
                  "  "
                  <input type="hidDEN">
        $DATA
    },
    /* Test number: 22 */
    {
        "data": $DATA{ ,12}
            <!doctype html><table>  <input type='hidDEN'></table>
        $DATA,
        "errors": [
            {"line": 1, "col": 45, "id": "unexpected-hidden-input-in-table"}
        ],
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
              <body>
                <table>
                  "  "
                  <input type="hidDEN">
        $DATA
    },
    /* Test number: 23 */
    {
        "data": $DATA{ ,12}
            <!doctype html><table><input type=" hidden"><input type=hidDEN></table>
        $DATA,
        "errors": [
            {"line": 1, "col": 44, "id": "unexpected-start-tag-implies-table-voodoo"},
            {"line": 1, "col": 63, "id": "unexpected-hidden-input-in-table"}
        ],
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
              <body>
                <input type=" hidden">
                <table>
                  <input type="hidDEN">
        $DATA
    },
    /* Test number: 24 */
    {
        "data": $DATA{ ,12}
            <!doctype html><table><select>X<tr>
        $DATA,
        "errors": [
            {"line": 1, "col": 30, "id": "unexpected-start-tag-implies-table-voodoo"},
            {"line": 1, "col": 35, "id": "unexpected-table-element-start-tag-in-select-in-table"},
            {"line": 1, "col": 35, "id": "eof-in-table"}
        ],
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
              <body>
                <select>
                  "X"
                <table>
                  <tbody>
                    <tr>
        $DATA
    },
    /* Test number: 25 */
    {
        "data": $DATA{ ,12}
            <!doctype html><select>X</select>
        $DATA,
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
              <body>
                <select>
                  "X"
        $DATA
    },
    /* Test number: 26 */
    {
        "data": $DATA{ ,12}
            <!DOCTYPE hTmL><html></html>
        $DATA,
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
              <body>
        $DATA
    },
    /* Test number: 27 */
    {
        "data": $DATA{ ,12}
            <!DOCTYPE HTML><html></html>
        $DATA,
        "result": $DATA{ ,12}
            <!DOCTYPE html>
            <html>
              <head>
              <body>
        $DATA
    },
    /* Test number: 28 */
    {
        "data": $DATA{ ,12}
            <body>X</body></body>
        $DATA,
        "errors": [
            {"line": 1, "col": 21, "id": "unexpected-end-tag-after-body"}
        ],
        "fragment": {"tag": "html", "ns": "html"},
        "result": $DATA{ ,12}
            <head>
            <body>
              "X"
        $DATA
    },
    /* Test number: 29 */
    {
        "data": $DATA{ ,12}
            <div><p>a</x> b
        $DATA,
        "errors": [
            {"line": 1, "col": 5, "id": "expected-doctype-but-got-start-tag"},
            {"line": 1, "col": 13, "id": "unexpected-end-tag"},
            {"line": 1, "col": 15, "id": "expected-closing-tag-but-got-eof"}
        ],
        "result": $DATA{ ,12}
            <html>
              <head>
              <body>
                <div>
                  <p>
                    "a b"
        $DATA
    },
    /* Test number: 30 */
    {
        "data": $DATA{ ,12}
            <table><tr><td><code></code> </table>
        $DATA,
        "errors": [
            {"line": 1, "col": 7, "id": "expected-doctype-but-got-start-tag"}
        ],
        "result": $DATA{ ,12}
            <html>
              <head>
              <body>
                <table>
                  <tbody>
                    <tr>
                      <td>
                        <code>
                        " "
        $DATA
    },
    /* Test number: 31 */
    {
        "data": $DATA{ ,12}
            <table><b><tr><td>aaa</td></tr>bbb</table>ccc
        $DATA,
        "errors": [
            {"line": 1, "col": 7, "id": "expected-doctype-but-got-start-tag"},
            {"line": 1, "col": 10, "id": "foster-parenting-start-tag"},
            {"line": 1, "col": 32, "id": "foster-parenting-character"},
            {"line": 1, "col": 33, "id": "foster-parenting-character"},
            {"line": 1, "col": 34, "id": "foster-parenting-character"},
            {"line": 1, "col": 45, "id": "expected-closing-tag-but-got-eof"}
        ],
        "result": $DATA{ ,12}
            <html>
              <head>
              <body>
                <b>
                <b>
                  "bbb"
                <table>
                  <tbody>
                    <tr>
                      <td>
                        "aaa"
                <b>
                  "ccc"
        $DATA
    },
    /* Test number: 32 */
    {
        "data": $DATA{ ,12}
            A<table><tr> B</tr> B</table>
        $DATA,
        "errors": [
            {"line": 1, "col": 1, "id": "expected-doctype-but-got-chars"},
            {"line": 1, "col": 13, "id": "foster-parenting-character"},
            {"line": 1, "col": 14, "id": "foster-parenting-character"},
            {"line": 1, "col": 20, "id": "foster-parenting-character"},
            {"line": 1, "col": 21, "id": "foster-parenting-character"}
        ],
        "result": $DATA{ ,12}
            <html>
              <head>
              <body>
                "A B B"
                <table>
                  <tbody>
                    <tr>
        $DATA
    },
    /* Test number: 33 */
    {
        "data": $DATA{ ,12}
            A<table><tr> B</tr> </em>C</table>
        $DATA,
        "errors": [
            {"line": 1, "col": 1, "id": "expected-doctype-but-got-chars"},
            {"line": 1, "col": 13, "id": "foster-parenting-character"},
            {"line": 1, "col": 14, "id": "foster-parenting-character"},
            {"line": 1, "col": 25, "id": "unexpected-end-tag"},
            {"line": 1, "col": 25, "id": "unexpected-end-tag-in-special-element"},
            {"line": 1, "col": 26, "id": "foster-parenting-character"}
        ],
        "result": $DATA{ ,12}
            <html>
              <head>
              <body>
                "A BC"
                <table>
                  <tbody>
                    <tr>
                    " "
        $DATA
    },
    /* Test number: 34 */
    {
        "data": $DATA{ ,12}
            <select><keygen>
        $DATA,
        "errors": [
            {"line": 0, "col": 0, "id": "1:1: ERROR: Expected a doctype token"},
            {"line": 0, "col": 0, "id": "1:17: ERROR: Premature end of file. Currently open tags: html, body, select."}
        ],
        "result": $DATA{ ,12}
            <html>
              <head>
              <body>
                <select>
                  <keygen>
        $DATA
    },
]