<body>
<script>
if (window.testRunner)
    testRunner.dumpAsText();
</script>
<table id=inner></table>
Test error handling for incomplete tables inside a document fragment. These should not crash or hang.
<br><br>
<div id=console></div>
<script>

var inner = document.getElementById('inner');
var console = document.getElementById('console');

function log(t)
{
    var line = document.createElement('div');
    line.appendChild(document.createTextNode(t));
    console.appendChild(line);
}

inner.innerHTML = "<tbody>text";
log(inner.innerHTML);
inner.innerHTML = "<thead>text";
log(inner.innerHTML);
inner.innerHTML = "<tfoot>text";
log(inner.innerHTML);
inner.innerHTML = "<tr>text";
log(inner.innerHTML);
inner.innerHTML = "<td>text";
log(inner.innerHTML);
inner.innerHTML = "<th>text";
log(inner.innerHTML);
inner.innerHTML = "<tbody>text";
log(inner.innerHTML);
inner.innerHTML = "<tbody><tr>text";
log(inner.innerHTML);
inner.innerHTML = "<tbody><td>text";
log(inner.innerHTML);
inner.innerHTML = "<tbody><th>text";
log(inner.innerHTML);
inner.innerHTML = "<tr><tbody>text";
log(inner.innerHTML);
inner.innerHTML = "<th><tbody>text";
log(inner.innerHTML);
inner.innerHTML = "<td><tbody>text";
log(inner.innerHTML);

inner.innerHTML = "<tbody><div>";
log(inner.innerHTML);
inner.innerHTML = "<thead><div>";
log(inner.innerHTML);
inner.innerHTML = "<tfoot><div>";
log(inner.innerHTML);
inner.innerHTML = "<tr><div>";
log(inner.innerHTML);
inner.innerHTML = "<td><div>";
log(inner.innerHTML);
inner.innerHTML = "<th><div>";
log(inner.innerHTML);
inner.innerHTML = "<tbody><div>";
log(inner.innerHTML);
inner.innerHTML = "<tbody><tr><div>";
log(inner.innerHTML);
inner.innerHTML = "<tbody><td><div>";
log(inner.innerHTML);
inner.innerHTML = "<tbody><th><div>";
log(inner.innerHTML);
inner.innerHTML = "<tr><tbody><div>";
log(inner.innerHTML);
inner.innerHTML = "<th><tbody><div>";
log(inner.innerHTML);
inner.innerHTML = "<td><tbody><div>";
log(inner.innerHTML);
</script>
