Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / deleting / smart-editing-disabled-mac.html
blob483458357771adc190eec39152794738fac1a8d9
1 <html>
2 <head>
3 <script>
5 if (window.testRunner) {
6 testRunner.dumpAsText();
7 internals.settings.setSmartInsertDeleteEnabled(false);
8 internals.settings.setSelectTrailingWhitespaceEnabled(true);
10 if (window.internals)
11 internals.settings.setEditingBehavior('mac');
13 function editingTest() {
14 var div = document.getElementById("div");
15 var sel = window.getSelection();
17 sel.collapse(div, 0);
18 sel.modify("move", "forward", "word");
19 sel.modify("move", "forward", "word");
20 sel.modify("extend", "backward", "word");
21 testRunner.execCommand("DeleteForward");
24 </script>
25 <title>Editing Test</title>
26 </head>
27 <body>
28 This test verifies that smart insert and delete can be disabled at test time.<br>
29 If viewing in a browser, you should see the words "foo bar baz".<br>
30 If using a version of testRunner with this functionality, you should see "foo baz". (two spaces between the words)<br>
31 If using a version of testRunner without this functionality, you should see "foo baz". (one space between the words)<br>
32 </div>
33 </div>
35 <div contenteditable="true" id="div">
36 foo bar baz
37 </div>
39 <script>
40 editingTest();
41 </script>
43 </body>
44 </html>