<body>
<script>
if (window.testRunner)
    testRunner.dumpAsText();
</script>
<div id=inner></div>
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><table>";
log(inner.innerHTML);
inner.innerHTML = "<thead><table>";
log(inner.innerHTML);
inner.innerHTML = "<tfoot><table>";
log(inner.innerHTML);
inner.innerHTML = "<tr><table>";
log(inner.innerHTML);
inner.innerHTML = "<td><table>";
log(inner.innerHTML);
inner.innerHTML = "<th><table>";
log(inner.innerHTML);
inner.innerHTML = "<tbody><tr><table>";
log(inner.innerHTML);
inner.innerHTML = "<tbody><th><table>";
log(inner.innerHTML);
inner.innerHTML = "<tbody><td><table>";
log(inner.innerHTML);
inner.innerHTML = "<tr><tbody><table>";
log(inner.innerHTML);
inner.innerHTML = "<th><tbody><table>";
log(inner.innerHTML);
inner.innerHTML = "<td><tbody><table>";
log(inner.innerHTML);
inner.innerHTML = "<tbody><option><table>";
log(inner.innerHTML);
inner.innerHTML = "<table><option><table>";
log(inner.innerHTML);
</script>
