Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / editing / undo / undo-paste-when-caret-is-not-in-range.html
index 318f5dd..b9a0447 100644 (file)
@@ -4,14 +4,14 @@ if (window.testRunner)
     window.testRunner.dumpAsText();
 edit = document.getElementById("edit");
 var s = window.getSelection();
-s.setPosition(edit, 3);
+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.setPosition(edit, 4);
+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>