blob: cebcb072fb00e1290da23165bbc2c330712f12e8 [file] [log] [blame]
<script>
if (window.layoutTestController)
layoutTestController.dumpEditingCallbacks();
</script>
<p>This tests deleting a selection created with a word granularity. To run it manually, double click on 'bar' and hit delete. You should see 'foo bar'.</p>
<div id="div" contenteditable="true">foo bar baz</div>
<script>
if (window.layoutTestController) {
var div = document.getElementById("div");
var sel = window.getSelection();
sel.setPosition(div, 0);
sel.modify("move", "forward", "word");
sel.modify("move", "forward", "word");
sel.modify("extend", "backward", "word");
layoutTestController.execCommand("DeleteBackward");
}
</script>