blob: 580fcf00374aba6c5d7966f671d9ca67fe5794b0 [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 forward 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("DeleteForward");
}
</script>