0d4dcdcee81a8c9fb04603a72e49a4e57d81ba99
[WebKit-https.git] / LayoutTests / editing / selection / doubleclick-whitespace.html
1 <html>
2 <head>
3 <script>
4 if (window.layoutTestController) {
5      layoutTestController.dumpAsText();
6      layoutTestController.setSmartInsertDeleteEnabled(false);
7      layoutTestController.setSelectTrailingWhitespaceEnabled(true);
8 }
9 </script>
10 <style>
11 body { margin: 0; padding: 0 }
12 </style>
13 </head>
14 <body>
15 <pre>
16 This tests that double-clicking a word on the Windows platform selects the whitespace after the word.  You should see the word "PASS" below.
17 <p>
18 <script type="text/javascript">
19     if (window.layoutTestController) {
20         eventSender.mouseMoveTo(20, 10);
21         eventSender.mouseDown();
22         eventSender.leapForward(1);
23         eventSender.mouseUp();
24         eventSender.leapForward(100);
25         eventSender.mouseDown();
26         eventSender.leapForward(1);
27         eventSender.mouseUp();
28         var sel = window.getSelection();
29         var range = sel.getRangeAt(0);
30         if (range.toString() != "This ")
31             document.write("FAIL");
32         else
33             document.write("PASS");
34     } else
35         document.write("This test is only expected to pass when run in automated mode, with access to LayoutTestController.");
36 </script>
37 </body>
38 </html>