Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / scroll-behavior / overflow-scroll-root-frame-animates.html
blob95f71855e99772958eef73c5299214fd66778880
1 <!DOCTYPE html>
2 <style>
3 #content {
4 width: 750px;
5 height: 10000px;
6 background-color: blue;
8 </style>
9 <script src="../../resources/js-test.js"></script>
10 <div id="content"></div>
11 <div id="console"></div>
12 <script>
14 jsTestIsAsync = true;
16 var prevScrollY;
17 var scrollStart;
19 function runTest() {
20 internals.settings.setScrollAnimatorEnabled(true);
22 window.addEventListener("scroll", onWindowScroll);
24 testRunner.layoutAndPaintAsyncThen(function() {
25 window.eventSender.keyDown('end');
26 });
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.
39 finishJSTest();
41 } else {
42 shouldBeGreaterThan("window.scrollY", "prevScrollY");
43 finishJSTest();
47 description("Tests that overflow scrolls on the root frame are animated.");
49 if (window.eventSender)
50 runTest();
51 else
52 debug("FAIL: This test requires window.eventSender.");
54 </script>