Editing tests should use testRunner instead of layoutTestController
[WebKit-https.git] / LayoutTests / editing / input / select-all-clear-input-method.html
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <p>This tests selecting all with an open input method composition.
5 To manually test, type some letter in the editable region below and then select all.
6 WebKit should not delete contents.</p>
7 <div id="container"><div contenteditable>PAS</div></div>
8 <script src="../../resources/dump-as-markup.js"></script>
9 <script>
10
11 if (window.testRunner) {
12     var container = document.getElementById('container');
13     container.firstChild.focus();
14     getSelection().setPosition(container.firstChild.firstChild, 5);
15     if (window.textInputController) {
16         Markup.description(document.getElementsByTagName('p')[0].textContent);
17
18         textInputController.setMarkedText("S", 0, 1);
19         document.execCommand('selectAll', false, null);
20
21         Markup.dump(container);
22     } else
23         Markup.description('FAIL - This test requires textInputController');
24 }
25
26 </script>
27 </body>
28 </html>