| <html> |
| <head> |
| <script> |
| |
| if (window.layoutTestController) { |
| layoutTestController.dumpAsText(); |
| layoutTestController.setSmartInsertDeleteEnabled(false); |
| } |
| |
| function editingTest() { |
| 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> |
| <title>Editing Test</title> |
| </head> |
| <body> |
| This test verifies that smart insert and delete can be disabled at test time.<br> |
| If viewing in a browser, you should see the words "foo bar baz".<br> |
| If using a version of LayoutTestController with this functionality, you should see "foo baz". (two spaces between the words)<br> |
| If using a version of LayoutTestController without this functionality, you should see "foo baz". (one space between the words)<br> |
| </div> |
| </div> |
| |
| <div contenteditable="true" id="div"> |
| foo bar baz |
| </div> |
| |
| <script> |
| editingTest(); |
| </script> |
| |
| </body> |
| </html> |