OLD | NEW |
| (Empty) |
1 <head> | |
2 <script> | |
3 function test() | |
4 { | |
5 if (window.testRunner) | |
6 testRunner.dumpAsText(); | |
7 var ta = document.getElementById('ta') | |
8 var res = document.getElementById('res'); | |
9 | |
10 // Send caret to bottom of textarea | |
11 ta.focus(); | |
12 ta.setSelectionRange(ta.value.length, ta.value.length); | |
13 ta.blur(); | |
14 | |
15 ta.focus(); | |
16 // click | |
17 if (window.eventSender) { | |
18 eventSender.mouseMoveTo(90, 20); | |
19 eventSender.mouseDown(); | |
20 eventSender.mouseUp(); | |
21 if (ta.selectionEnd == 17) | |
22 res.innerHTML = "Test Succeeded"; | |
23 else | |
24 res.innerHTML = "Test Failed: caret is at " + ta.selectionEnd; | |
25 } else { | |
26 res.innerHTML = "Test can't run without event sender (part of DumpRender
Tree). " | |
27 + "To test manually, click at the middle of the line marked 9 and ch
eck that the caret appears after the 9."; | |
28 } | |
29 } | |
30 </script> | |
31 </head> | |
32 <body onload="test()"> | |
33 <textarea id="ta"> | |
34 1 | |
35 2 | |
36 3 | |
37 4 | |
38 5 | |
39 6 | |
40 7 | |
41 8 | |
42 9 | |
43 10</textarea> | |
44 <div id="res"></div> | |
45 </body> | |
OLD | NEW |