blob: 23c81acb948196de1b9a5e734c9a3acaf4cafa4e [file] [log] [blame]
<div></div>
<div contenteditable="true" id="div"></div>
<div></div>
<script>
div = document.getElementById("div");
sel = window.getSelection();
sel.setPosition(div, 0);
if (window.layoutTestController) {
// Test to see if deleteWordBackward: hangs.
layoutTestController.execCommand("DeleteWordBackward");
document.execCommand("InsertText", false, "Success FAIL");
// Delete 'FAIL' with deleteWordBackward: to verify that it's not a no-op.
layoutTestController.execCommand("DeleteWordBackward");
layoutTestController.execCommand("DeleteBackward");
} else {
document.execCommand("InsertText", false, "To run this test manually. Delete all this text and then option-delete. Safari shouldn't hang.");
}
</script>