| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <title>Pan Scrolling Test</title> | |
| 4 </head> | |
| 5 <body> | |
| 6 <script> | |
| 7 if (window.testRunner) { | |
| 8 testRunner.dumpAsText(); | |
| 9 testRunner.waitUntilDone(); | |
| 10 } | |
| 11 | |
| 12 addEventListener('mousedown', | |
| 13 function(event) { | |
| 14 console.log("Mousedown with " + event.button); | |
| 15 } | |
| 16 , false); | |
| 17 </script> | |
| 18 <div id="overflow" style="width:500px; height:150px; overflow:auto; bord
er:2px solid red; padding:10px"> | |
| 19 <h1>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=32303"
>bug 32303</a> This tests that pan | |
| 20 scrolling works without event.preventDefault and the middle button m
ousedown event is fired. | |
| 21 To test manually, try to pan scroll inside this div.</h1> | |
| 22 </div> | |
| 23 <p> | |
| 24 <div id="console"></div> | |
| 25 <script> | |
| 26 if (window.eventSender) | |
| 27 { | |
| 28 eventSender.mouseMoveTo(50, 50); | |
| 29 eventSender.mouseDown(1); | |
| 30 eventSender.mouseUp(1); | |
| 31 eventSender.mouseMoveTo(50, 200); | |
| 32 setTimeout(finished, 500); | |
| 33 } | |
| 34 | |
| 35 function finished() | |
| 36 { | |
| 37 if (document.getElementById('overflow').scrollTop) | |
| 38 document.getElementById('console').innerHTML = "Success! Div
with overflow was scrolled"; | |
| 39 else | |
| 40 document.getElementById('console').innerHTML = "Fail! Div wi
th overflow was not scrolled"; | |
| 41 | |
| 42 window.testRunner.notifyDone(); | |
| 43 } | |
| 44 </script> | |
| 45 </body> | |
| 46 </html> | |
| OLD | NEW |