| /* This fixed element does not cover the entire width and should be ignored. */ |
| /* This fixed element does not cover an edge and should be ignored. */ |
| <script src="../resources/js-test-pre.js"></script> |
| <div id="ignored-left"></div> |
| <div id="ignored-center"></div> |
| description("Test scrolling with page granularity by using the space bar excludes the height of fixed element covering the full page width."); |
| 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(' '); |
| failTimeoutId = setTimeout(function() { |
| testFailed("The scrollview failed to scroll in response to the event."); |
| debug("window.scrollY = " + window.scrollY + " excepted value around " + (window.innerHeight - 120)); |
| window.addEventListener("scroll", function() { |
| if (window.scrollY == window.innerHeight - 120) { |
| testPassed("Scrolled to " + window.scrollY); |
| clearTimeout(failTimeoutId); |
| window.addEventListener("load", test); |
| <script src="../resources/js-test-post.js"></script> |