OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script> |
| 4 document.addEventListener('mousedown', function (e) { e.preventDefault(); }); |
| 5 if (window.testRunner) { |
| 6 testRunner.dumpAsText(); |
| 7 } |
| 8 function runTest() |
| 9 { |
| 10 var container = document.getElementById("body"); |
| 11 container.scrollTop = 2; |
| 12 if (window.eventSender) { |
| 13 // Drag scrollbar thumber to top most: |
| 14 eventSender.mouseMoveTo(document.body.clientWidth + 8, 40); |
| 15 eventSender.mouseDown(); |
| 16 eventSender.mouseMoveTo(document.body.clientWidth + 8, 0); |
| 17 eventSender.mouseUp(); |
| 18 document.getElementById('console').innerHTML |
| 19 = container.scrollTop == 0 ? "PASS" : "FAIL"; |
| 20 } |
| 21 } |
| 22 </script> |
| 23 </head> |
| 24 <body onload="runTest();" style="margin: 0; height: 5000px;" id="body"> |
| 25 <p>Test for <a href="crbug.com/358248">bug358248</a>: This tests that mouse clic
ks/releases/drags on main frame scrollbars work properly even if the document pr
event-defaults the mouse events. On success, the scrollTop should be 0.<p/> |
| 26 <div id="console"></div> |
| 27 </body> |
| 28 </html> |
OLD | NEW |