Editing tests should use testRunner instead of layoutTestController
[WebKit-https.git] / LayoutTests / platform / mac / editing / input / selection-change-closes-typing.html
1 <html>
2 <body>
3 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=32905">bug 32905</a>:
4 With Pinyin Simplified IM, a wrong character is deleted from google.com suggestion.</p>
5 <p>Should say PASS: </p>
6 <input id="test">
7 <script type="text/javascript">
8
9     if (window.testRunner)
10         testRunner.dumpAsText();
11
12     var testInput = document.getElementById("test");
13     testInput.focus();
14
15     if (window.testRunner) {
16         
17         try {
18             textInputController.setMarkedText("P", 1, 0);
19             testInput.value="PAS";
20             eventSender.keyDown("S");
21
22             document.getElementsByTagName("p")[1].innerHTML += testInput.value;
23
24         } catch (ex) {
25             document.write("Exception: " + ex.description);
26         }
27     } else
28         document.write("This test only runs in automated mode<br>");
29 </script>
30 </body>
31 </html>