| <script src="../resources/js-test-pre.js"></script> |
| description("Test scrolling backward with page granularity by using the space bar."); |
| if (window.eventSender) { |
| // Force the first layout to avoid the suppressed scrollbar cases. |
| scratch = document.documentElement.offsetWidth; |
| // Avoid special cases for being "onload". |
| eventSender.keyDown(' ', ['shiftKey']); |
| failTimeoutId = setTimeout(function() { |
| testFailed("The scrollview failed to scroll in response to the event."); |
| debug("window.scrollY = " + window.scrollY + " excepted value around " + (1000 - (window.innerHeight - 40))); |
| window.addEventListener("scroll", function() { |
| if (window.scrollY == 1000 - (window.innerHeight - 40)) { |
| testPassed("Scrolled to " + window.scrollY); |
| clearTimeout(failTimeoutId); |
| window.addEventListener("load", test); |
| <script src="../resources/js-test-post.js"></script> |