2 <div contenteditable=
"true" id=
"div"></div>
6 div
= document
.getElementById("div");
7 sel
= window
.getSelection();
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();
19 document
.execCommand("InsertText", false, "To run this test manually. Delete all this text and then option-delete. Safari shouldn't hang.");