b98289fdacb9722c4e9b6a71e31876a978da8e87
[WebKit-https.git] / LayoutTests / editing / deleting / smart-editing-disabled.html
1 <html> 
2 <head>
3 <script>
4
5 if (window.layoutTestController) {
6     layoutTestController.dumpAsText();
7     layoutTestController.setSmartInsertDeleteEnabled(false);
8 }
9
10 function editingTest() {
11     var div = document.getElementById("div");
12     var sel = window.getSelection();
13     
14     sel.setPosition(div, 0);
15     sel.modify("move", "forward", "word");
16     sel.modify("move", "forward", "word");
17     sel.modify("extend", "backward", "word");
18     layoutTestController.execCommand("DeleteForward");
19 }
20
21 </script>
22 <title>Editing Test</title> 
23 </head> 
24 <body>
25 This test verifies that smart insert and delete can be disabled at test time.<br>
26 If viewing in a browser, you should see the words "foo bar baz".<br>
27 If using a version of LayoutTestController with this functionality, you should see "foo  baz". (two spaces between the words)<br>
28 If using a version of LayoutTestController without this functionality, you should see "foo baz". (one space between the words)<br>
29 </div>
30 </div>
31
32 <div contenteditable="true" id="div">
33 foo bar baz     
34 </div>
35
36 <script>
37 editingTest();
38 </script>
39
40 </body>
41 </html>