| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <title>Pan Scrolling Test</title> | |
| 4 </head> | |
| 5 <body> | |
| 6 <script> | |
| 7 if (testRunner) { | |
| 8 testRunner.dumpAsText(); | |
| 9 testRunner.waitUntilDone(); | |
| 10 } | |
| 11 </script> | |
| 12 <div id="overflow" style="width:500px; height:300px; overflow:auto; bord
er:2px solid red; padding:10px"> | |
| 13 <div style="height:200px; position:relative;"> | |
| 14 <div style="height:150px; border:1px blue solid; overflow:auto;"
> | |
| 15 Panscrolling starting in the blue box should scroll the oute
r div. | |
| 16 </div> | |
| 17 Panscrolling outside the blue boxes should scroll the outer div. | |
| 18 </div> | |
| 19 <div style="height:200px; position:relative;"> | |
| 20 <div style="height:150px; border:1px blue solid; overflow:auto;"
> | |
| 21 Panscrolling starting in the blue box should scroll the oute
r div. | |
| 22 </div> | |
| 23 </div> | |
| 24 </div> | |
| 25 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=28023">bug
28023</a> This tests that pan scrolling | |
| 26 propogates correctly up the DOM tree. On success, our scroll offset shou
ld be non-zero.</p> | |
| 27 <div id="console"></div> | |
| 28 <script> | |
| 29 if (eventSender) | |
| 30 { | |
| 31 eventSender.mouseMoveTo(50, 50); | |
| 32 eventSender.mouseDown(1); | |
| 33 eventSender.mouseUp(1); | |
| 34 eventSender.mouseMoveTo(50, 200); | |
| 35 setTimeout(finished, 500); | |
| 36 } | |
| 37 | |
| 38 function finished() | |
| 39 { | |
| 40 if (document.getElementById('overflow').scrollTop) | |
| 41 document.getElementById('console').innerHTML = "Success! Div
with overflow was scrolled"; | |
| 42 else | |
| 43 document.getElementById('console').innerHTML = "Fail! Div wi
th overflow was not scrolled"; | |
| 44 | |
| 45 window.testRunner.notifyDone(); | |
| 46 } | |
| 47 </script> | |
| 48 </body> | |
| 49 </html> | |
| OLD | NEW |