| /* 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="bottom-bar"></div> |
| <div id="ignored-right"></div> |
| <div id="ignored-center"></div> |
| description("Test that scrolling backward by page excludes the area taken by fixed element covering the full 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(' ', ['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 - 120))); |
| window.addEventListener("scroll", function() { |
| if (window.scrollY == 1000 - (window.innerHeight - 120)) { |
| testPassed("Scrolled to " + window.scrollY); |
| clearTimeout(failTimeoutId); |
| window.addEventListener("load", test); |
| <script src="../resources/js-test-post.js"></script> |