OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../../resources/js-test.js"></script> |
| 4 </head> |
| 5 <body> |
| 6 <p id="description"></p> |
| 7 <p>To manually test it, first select non-editable content using mouse. Then clic
k within the selected range. Now try to select using key combinations. It should
allow you to do so.</p> |
| 8 <p id="target">Some Text</p> |
| 9 <div id="console"></div> |
| 10 <script> |
| 11 description("This tests caret placement when clicked once on existing selection
in readonly texts to allow further selection using keys.") |
| 12 if (window.testRunner) { |
| 13 testRunner.overridePreference("WebKitEnableCaretBrowsing", false); |
| 14 testRunner.dumpAsText(); |
| 15 |
| 16 target = document.getElementById('target'); |
| 17 target.focus(); |
| 18 |
| 19 eventSender.mouseMoveTo(target.offsetLeft, target.offsetTop); |
| 20 eventSender.mouseDown(); |
| 21 eventSender.mouseMoveTo(target.offsetLeft + target.offsetWidth, target.o
ffsetTop); |
| 22 eventSender.mouseUp(); |
| 23 |
| 24 eventSender.mouseMoveTo(target.offsetLeft + (target.offsetWidth / 3), ta
rget.offsetTop); |
| 25 eventSender.mouseDown(); |
| 26 eventSender.mouseUp(); |
| 27 shouldBeEqualToString("getSelection().type", "Caret"); |
| 28 } |
| 29 </script> |
| 30 </body> |
| 31 </html> |
OLD | NEW |