6 background-color: blue;
9 <script src=
"../../resources/js-test.js"></script>
10 <div id=
"content"></div>
11 <div id=
"console"></div>
20 internals
.settings
.setScrollAnimatorEnabled(true);
22 window
.addEventListener("scroll", onWindowScroll
);
24 testRunner
.layoutAndPaintAsyncThen(function() {
25 window
.eventSender
.keyDown('end');
29 function onWindowScroll() {
30 if (typeof prevScrollY
=== 'undefined') {
31 shouldNotBe("window.scrollY",
32 "document.body.scrollHeight - window.innerHeight");
33 shouldBeGreaterThan("window.scrollY", "0");
34 prevScrollY
= window
.scrollY
;
36 if (window
.scrollY
=== document
.body
.scrollHeight
- window
.innerHeight
) {
37 // We wont get another scroll event. The failure was reported above
38 // but return early to prevent a timeout.
42 shouldBeGreaterThan("window.scrollY", "prevScrollY");
47 description("Tests that overflow scrolls on the root frame are animated.");
49 if (window
.eventSender
)
52 debug("FAIL: This test requires window.eventSender.");