| <html> |
| <head> |
| <script> |
| if (window.testRunner) |
| testRunner.dumpEditingCallbacks(); |
| </script> |
| |
| |
| <script> |
| |
| function editingTest() { |
| var elem = document.getElementById("elem"); |
| |
| // x, y should be a position on the second line (after whitespace:pre). |
| x = elem.offsetLeft + elem.offsetWidth - 30; |
| y = elem.offsetTop + elem.offsetHeight / 2 + 10; |
| |
| eventSender.mouseMoveTo(x, y); |
| eventSender.mouseDown(); |
| eventSender.mouseUp(); |
| eventSender.mouseDown(); |
| eventSender.mouseUp(); |
| eventSender.mouseDown(); |
| eventSender.mouseUp(); |
| } |
| |
| </script> |
| </head> |
| <body> |
| <p>This tests modifying a selection created with a double click. The new selection should use word granularity.</p> |
| <p style="color:green">This test does not run interactively. It uses the testRunners eventSender to do mouse clicks. To run it manually, triple click on the second line in the box below (anywhere after "whitespace:pre"). The triple click should select the entire line.</p> |
| <div contenteditable id="elem"> |
| <div style="border:1px solid blue"> |
| <pre id="elem">this text is in |
| whitespace:pre</pre> |
| </div> |
| </div> |
| </body> |
| <script> |
| editingTest(); |
| </script> |
| </html> |