Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / scroll-behavior / overflow-scroll-animates.html
blobb32b60611dad6d2eed66172c1f4b849c7e0e1be0
1 <!DOCTYPE html>
2 <style>
4 #container {
5 width: 200px;
6 height: 200px;
7 overflow: scroll;
10 #content {
11 width: 750px;
12 height: 10000px;
13 background-color: blue;
16 </style>
17 <script src="../../resources/js-test.js"></script>
18 <div id="container">
19 <div id="content"></div>
20 </div>
21 <div id="console"></div>
22 <script>
24 jsTestIsAsync = true;
25 element = document.getElementById("container");
27 var prevScrollTop;
28 var scrollStart;
30 function runTest() {
31 internals.settings.setScrollAnimatorEnabled(true);
33 element.addEventListener("scroll", onElementScroll);
35 testRunner.layoutAndPaintAsyncThen(function() {
36 // Give the container focus.
37 eventSender.mouseMoveTo(100, 100);
38 eventSender.mouseDown();
39 eventSender.mouseUp();
41 eventSender.keyDown('end');
42 });
45 function onElementScroll() {
46 if (prevScrollTop === undefined) {
47 shouldNotBe("element.scrollTop",
48 "element.scrollHeight - element.clientHeight");
49 shouldBeGreaterThan("element.scrollTop", "0");
50 prevScrollTop = element.scrollTop;
51 } else {
52 shouldBeGreaterThan("element.scrollTop", "prevScrollTop");
53 finishJSTest();
57 description("Tests that overflow scrolls are animated.");
59 if (window.eventSender)
60 runTest();
61 else
62 debug("FAIL: This test requires window.eventSender.");
64 </script>