blob: b9a0447857b2050bd6e7f0dc5003581200ab9da8 [file] [log] [blame]
<div id="edit" contentEditable="true">abc </div>
<script>
if (window.testRunner)
window.testRunner.dumpAsText();
edit = document.getElementById("edit");
var s = window.getSelection();
s.collapse(edit, edit.childNodes.length);
document.execCommand("InsertText", false, " ");
s.setBaseAndExtent(edit.firstChild, 0, edit.firstChild, 3);
document.execCommand("Copy");
document.execCommand("InsertText", false, "def");
s.setBaseAndExtent(edit.firstChild, 0, edit.firstChild, 3);
document.execCommand("Paste");
s.collapse(edit, edit.childNodes.length);
document.execCommand("Undo");
document.body.innerHTML = "<div>This tests an assertion failure when undoing a paste operation when the caret is outside of the range to be undone. This test should not crash with debug build.</div>";
</script>