OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script> | 3 <script> |
4 function test() | 4 function test() |
5 { | 5 { |
6 if (window.testRunner) { | 6 if (window.testRunner) { |
7 testRunner.waitUntilDone(); | 7 testRunner.waitUntilDone(); |
8 setTimeout(autoscrollTestPart1, 0); | 8 setTimeout(autoscrollTestPart1, 0); |
9 } | 9 } |
10 } | 10 } |
11 function autoscrollTestPart1() | 11 function autoscrollTestPart1() |
12 { | 12 { |
13 var ta = document.getElementById('ta'); | 13 var ta = document.getElementById('ta'); |
14 if (window.eventSender) { | 14 if (window.eventSender) { |
15 ta.scrollIntoView(); | 15 ta.scrollIntoView(); |
16 var h = ta.offsetTop - document.body.scrollTop + 10; | 16 var h = ta.offsetTop - document.scrollingElement.scrollTop +
10; |
17 eventSender.dragMode = false; | 17 eventSender.dragMode = false; |
18 eventSender.mouseMoveTo(20, h); | 18 eventSender.mouseMoveTo(20, h); |
19 eventSender.mouseDown(); | 19 eventSender.mouseDown(); |
20 eventSender.mouseMoveTo(20, h); | 20 eventSender.mouseMoveTo(20, h); |
21 eventSender.mouseMoveTo(100, h); | 21 eventSender.mouseMoveTo(100, h); |
22 } | 22 } |
23 setTimeout(autoscrollTestPart2, 100); | 23 setTimeout(autoscrollTestPart2, 100); |
24 } | 24 } |
25 function autoscrollTestPart2() | 25 function autoscrollTestPart2() |
26 { | 26 { |
(...skipping 10 matching lines...) Expand all Loading... |
37 </script> | 37 </script> |
38 </head> | 38 </head> |
39 <body onload="test()"> | 39 <body onload="test()"> |
40 <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=12331">bug 1
2331</a>.</p> | 40 <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=12331">bug 1
2331</a>.</p> |
41 <p>To test manually, scroll down until you find the input element. Selec
t some text. If the bug occurs, the page will scroll back up to the top.</p> | 41 <p>To test manually, scroll down until you find the input element. Selec
t some text. If the bug occurs, the page will scroll back up to the top.</p> |
42 <div style="height:3000px"></div> | 42 <div style="height:3000px"></div> |
43 <input id="ta" value="select some of this text"></input> | 43 <input id="ta" value="select some of this text"></input> |
44 <p>If the bug does not occur, you'll be left down here at the bottom.</p
> | 44 <p>If the bug does not occur, you'll be left down here at the bottom.</p
> |
45 </body> | 45 </body> |
46 </html> | 46 </html> |
OLD | NEW |