blob: cef29bc06307673a063f3e5f859a233de74b2065 [file] [log] [blame]
<!DOCTYPE>
<html>
<body>
<div id="test" contenteditable="true">There&nbsp; be no line breaks in this sentence.</div>
<script src="../../resources/dump-as-markup.js"></script>
<script>
if (window.testRunner)
testRunner.dumpEditingCallbacks();
if (window.internals)
internals.settings.setEditingBehavior('mac');
Markup.description('This tests inserting a text wrapped in a div inside a text node.');
var sel = window.getSelection();
var e = document.getElementById("test").firstChild;
sel.setPosition(e, 0);
sel.modify("move", "forward", "word");
sel.modify("move", "forward", "character");
document.execCommand("InsertHTML", false, "<div>should</div>");
Markup.dump('test');
</script>
</body>
</html>