Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / platform-wheelevent-in-scrolling-div.html
blobf2a8a624d6c63eebe42ef273d7f53ecbc245955f
1 <html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 <script>
5 var expectedScrollTop = 5;
6 var expectedScrollLeft = 3;
7 var pixelsPerWheelTick = 40;
8 var event;
9 var div;
11 if (window.testRunner)
12 testRunner.waitUntilDone();
14 function dispatchWheelEvent()
16 var overflowElement = document.getElementById("overflow");
17 if (overflowElement)
18 overflowElement.addEventListener("mousewheel", mousewheelHandler, false);
20 if (window.eventSender) {
21 eventSender.mouseMoveTo(100, 110);
22 eventSender.mouseScrollBy(-window.expectedScrollLeft, -window.expectedScrollTop);
25 setTimeout('checkOffsets();', 100);
28 function checkOffsets()
30 div = document.getElementById("overflow");
31 shouldBe("div.scrollTop", "window.expectedScrollTop*window.pixelsPerWheelTick");
32 shouldBe("div.scrollLeft", "window.expectedScrollLeft*window.pixelsPerWheelTick");
34 if (window.testRunner)
35 window.testRunner.notifyDone();
38 function mousewheelHandler(e)
40 event = e;
41 shouldBe("event.wheelDeltaY", "window.expectedScrollTop*-120");
42 shouldBe("event.wheelDeltaX", "window.expectedScrollLeft*-120");
44 if (e.wheelDeltaY)
45 shouldBe("event.wheelDelta", "window.expectedScrollTop*-120");
46 else
47 shouldBe("event.wheelDelta", "window.expectedScrollLeft*-120");
49 </script>
50 </head>
52 <body style="margin:0" onload="setTimeout('dispatchWheelEvent();', 100)">
53 <div id="overflow" style="border:2px solid black;overflow:auto;height:200px;width:200px;">
54 <div style="background-color:red;height:200px;width:400px;"></div>
55 <div style="background-color:green;height:200px;width:400px;"></div>
56 <div style="background-color:red;height:200px;width:400px;"></div>
57 </div>
58 <div id="console"></div>
59 </body>
60 </html>