blob: 4d4d2acc2ef54beb02d9b1baa939f3bd3fc6d952 [file] [log] [blame]
<html>
<head>
<script>
function log(msg)
{
document.getElementById('console').appendChild(document.createTextNode(msg + '\n'));
}
function test()
{
if (window.testRunner)
testRunner.dumpAsText();
var td = document.getElementById("td");
var text = td.firstChild;
var s = window.getSelection();
s.setBaseAndExtent(text, 3, text, 4);
document.execCommand("InsertHTML", true, "bar");
var tables = document.getElementsByTagName("table");
if (tables.length == 1)
log("Test Passed");
else
log ("Test Failed");
}
</script>
</head>
<body onload="test()">
<p>This tests that inserting html inside a table still works and doesn't break the table apart, even when in quoted content.</p>
<div contenteditable="true">
<blockquote type="cite"><table border="1" id="tb"><tr><td id="td">foo baz</td></tr></table></blockquote>
</div>
<pre id="console"></pre>
</body>
</html>