blob: e192029aa74dc82cb5640d0bb28222b837364aa9 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<div id="test" contenteditable="true"><div style="border: 1px solid red;">This x</div><div style="border: 1px solid blue;">x it.</div></div>
<script src="../../resources/dump-as-markup.js"></script>
<script>
if (window.testRunner)
testRunner.dumpEditingCallbacks();
if (window.internals)
internals.settings.setEditingBehavior("mac");
Markup.description('Pasting a paragraph or less into a selection that spans multiple blocks should insert content into the block containing the start of the selection.');
var s = window.getSelection();
var e = document.getElementById("test");
s.setPosition(e, 0);
s.modify("move", "forward", "word");
s.modify("move", "forward", "character");
s.modify("extend", "forward", "word");
s.modify("extend", "forward", "word");
document.execCommand("InsertHTML", false, "<div><div>text should have a red border around</div></div>");
Markup.dump('test');
</script>
</body>
</html>