Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / platform-wheelevent-paging-x-in-non-scrolling-div.html
blob8a348d1f2c2845de846f0223e7d22b1aaea29fe7
1 <html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 <script>
5 var givenScrollTop = 0;
6 var givenScrollLeft = 2;
7 var expectedScrollTop = 0;
8 var expectedScrollLeft = 0;
9 var event;
10 var div;
12 if (window.testRunner)
13 testRunner.waitUntilDone();
15 function dispatchWheelEvent()
17 var overflowElement = document.getElementById("overflow");
18 if (overflowElement)
19 overflowElement.addEventListener("mousewheel", mousewheelHandler, false);
21 if (window.eventSender) {
22 eventSender.mouseMoveTo(100, 110);
23 eventSender.continuousMouseScrollBy(-window.givenScrollLeft, -window.givenScrollTop, true);
26 setTimeout('checkOffsets();', 100);
29 function checkOffsets()
31 div = document.getElementById("overflow");
32 shouldBe("div.scrollTop", "window.expectedScrollTop");
33 shouldBe("div.scrollLeft", "window.expectedScrollLeft");
35 if (window.testRunner)
36 window.testRunner.notifyDone();
39 function mousewheelHandler(e)
41 event = e;
42 shouldBe("event.wheelDeltaY", "0");
43 shouldBe("event.wheelDeltaX", "window.givenScrollLeft*-3");
45 if (e.wheelDeltaY)
46 shouldBe("event.wheelDelta", "0");
47 else
48 shouldBe("event.wheelDelta", "window.givenScrollLeft*-3");
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="border:0px;background-color:red;height:300px;width:185px;"></div>
56 <div style="border:0px;background-color:green;height:300px;width:185px;"></div>
57 </div>
58 <div id="console"></div>
59 </body>
60 </html>