Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / wheelevent-in-scrolling-div.html
blob2b935fb13333a8bebbe0f4ad393467220c6066ed
1 <html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 <script>
5 var expectedScrollTop = 200;
6 var expectedScrollLeft = 100;
7 var event;
8 var div;
10 if (window.testRunner)
11 testRunner.waitUntilDone();
13 function dispatchWheelEvent()
15 var overflowElement = document.getElementById("overflow");
16 if (overflowElement) {
17 overflowElement.addEventListener("mousewheel", mousewheelHandler, false);
19 // EventSender uses 40px per tick.
20 eventSender.mouseMoveTo(overflowElement.offsetLeft + 5, overflowElement.offsetTop + 5);
21 eventSender.mouseScrollBy(-2.5, -5);
24 setTimeout('checkOffsets();', 100);
27 function checkOffsets()
29 div = document.getElementById("overflow");
30 shouldBe("div.scrollTop", "window.expectedScrollTop");
31 shouldBe("div.scrollLeft", "window.expectedScrollLeft");
33 if (window.testRunner)
34 window.testRunner.notifyDone();
37 function mousewheelHandler(e)
39 event = e;
40 shouldBe("event.deltaY", "window.expectedScrollTop");
41 shouldBe("event.deltaX", "window.expectedScrollLeft");
42 shouldBe("event.wheelDeltaY", "-5*120");
43 shouldBe("event.wheelDeltaX", "-2.5*120");
45 if (e.wheelDeltaY)
46 shouldBe("event.wheelDelta", "-5*120");
47 else
48 shouldBe("event.wheelDelta", "-2.5*120");
50 </script>
51 </head>
53 <body style="margin:0" onload="setTimeout('dispatchWheelEvent();', 100)">
54 <div id="overflow" style="border:2px solid black;overflow:auto;height:200px;width:200px;">
55 <div style="background-color:red;height:200px;width:400px;"></div>
56 <div style="background-color:green;height:200px;width:400px;"></div>
57 <div style="background-color:red;height:200px;width:400px;"></div>
58 </div>
59 <div id="console"></div>
60 </body>
61 </html>