1 <div id=
"edit" contentEditable=
"true">abc
</div>
4 window
.testRunner
.dumpAsText();
5 edit
= document
.getElementById("edit");
6 var s
= window
.getSelection();
7 s
.collapse(edit
, edit
.childNodes
.length
);
8 document
.execCommand("InsertText", false, " ");
9 s
.setBaseAndExtent(edit
.firstChild
, 0, edit
.firstChild
, 3);
10 document
.execCommand("Copy");
11 document
.execCommand("InsertText", false, "def");
12 s
.setBaseAndExtent(edit
.firstChild
, 0, edit
.firstChild
, 3);
13 document
.execCommand("Paste");
14 s
.collapse(edit
, edit
.childNodes
.length
);
15 document
.execCommand("Undo");
16 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>";