blob: 541ed81858c4a6c657055cfb8d61065441e399ae [file] [log] [blame]
<p>This tests character insertion on a line with an unrendered text node. You should see 'Hello' and then 'World' below.</p>
<div id="div" contenteditable="true"><table border="1"><tr><td>Hello</td></tr></table><br></div>
<script>
if (window.testRunner)
window.testRunner.dumpAsText();
var div = document.getElementById("div");
children = div.childNodes;
br = children[1];
text = document.createTextNode('\n');
div.insertBefore(text, br);
sel = window.getSelection();
sel.collapse(div, 1);
document.execCommand("InsertText", false, "World");
</script>