Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / selection / word-granularity.html
blob6410c59998916c2fb972bb905849a1ae3414cf6f
1 <html>
2 <head>
3 <script>
4 if (window.testRunner)
5 testRunner.dumpEditingCallbacks();
6 </script>
9 <script>
11 function editingTest() {
12 var start = document.getElementById("start");
14 x = start.offsetLeft + 2;
15 y = start.offsetTop + 10;
17 eventSender.mouseMoveTo(x, y);
18 eventSender.mouseDown();
19 eventSender.mouseUp();
20 eventSender.mouseDown();
22 var end = document.getElementById("end");
24 x = end.offsetLeft + end.offsetWidth + 2;
25 y = end.offsetTop + 10;
27 eventSender.mouseMoveTo(x, y);
28 eventSender.mouseUp();
31 </script>
32 </head>
33 <body>
34 <p>This tests modifying a selection created with a double click. The new selection should use word granularity.</p>
35 <p style="color:green">This test does not run interactively. It uses the testRunners eventSender to do mouse clicks. To run it manually, double click on the blue 'g', then drag down to the red 'g'. As you drag, watch the selection that is created, it should always start and end on word boundaries.</p>
36 <div>
37 This is a para<span style="color:blue;" id="start">g</span>raph.<br>
38 Some text<br>
39 Some text<br>
40 Some text<br>
41 Some text<br>
42 This is a para<span style="color:red;" id="end">g</span>raph.
43 </div>
44 </body>
45 <script>
46 editingTest();
47 </script>
48 </html>