Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / deleting / 5300379.html
blobce1b379b5e857b5ab29525ebb9044de318e97690
1 <div></div>
2 <div contenteditable="true" id="div"></div>
3 <div></div>
4 <script>
6 div = document.getElementById("div");
7 sel = window.getSelection();
8 sel.collapse(div, 0);
9 if (window.testRunner) {
10 // Test to see if deleteWordBackward: hangs.
11 testRunner.execCommand("DeleteWordBackward");
12 document.execCommand("InsertText", false, "Success FAIL");
13 // Delete 'FAIL' with deleteWordBackward: to verify that it's not a no-op.
14 testRunner.execCommand("DeleteWordBackward");
15 testRunner.execCommand("DeleteBackward");
16 document.execCommand("InsertText", false, "\nThis tests that deleting backward by word in an empty div doesn't hang, and that it deletes exactly one word. You should see 'Success' above.");
17 window.testRunner.dumpAsText();
18 } else {
19 document.execCommand("InsertText", false, "To run this test manually. Delete all this text and then option-delete. Safari shouldn't hang.");
21 </script>