| <!DOCTYPE html> |
| <html> |
| <head> |
| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| var step = 0; |
| |
| onscroll = function() { |
| document.getElementById('log').innerText += 'x'; |
| |
| switch (step) { |
| case 0: |
| if (window.eventSender) |
| eventSender.keyDown('pageUp'); |
| break; |
| case 1: |
| document.getElementById('results').innerText = 'PASS'; |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| break; |
| } |
| |
| step++; |
| } |
| |
| function runTest() |
| { |
| if (window.eventSender) |
| eventSender.keyDown('pageDown'); |
| } |
| </script> |
| </head> |
| <body onload="runTest()"> |
| <span id="log" style="position:fixed"></span> |
| <div>This test simulates hitting page up and page down once each. Both keypresses should generate exactly one scroll event. If running manually, press the keys now.</div> |
| <div id="results">FAIL</div> |
| <div style="height:50000px">(just here to force scrollbars)</div> |
| <script> |
| </script> |
| </body> |
| </html> |