Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / platform-wheelevent-paging-xy-in-scrolling-div.html
blobc98c221ebae8f1a7111abcd68bb19ad0a6d88fa2
1 <html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 <script>
5 var givenScrollTop = 1;
6 var givenScrollLeft = 2;
7 var expectedScrollTop = 161;
8 var expectedScrollLeft = 322;
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", "window.givenScrollTop * -3");
43 shouldBe("event.wheelDeltaX", "window.givenScrollLeft * -3");
45 if (e.wheelDeltaY)
46 shouldBe("event.wheelDelta", "window.givenScrollTop * -3");
47 else
48 shouldBe("event.wheelDelta", "window.givenScrollLeft * -3");
50 </script>
51 </head>
53 <body style="margin:0" onload="setTimeout('dispatchWheelEvent();', 100)">
54 <!-- This div is 200 pixels high. The content results in scrool bars on
55 both edges, resulting in an effective content area of 185 x 185 on
56 linux. The paging context overlap is 24 pixels. So one page of scroll
57 moves the content by 185 - 24 -= 161 pixels. -->
58 <div id="overflow" style="border:2px solid black;overflow:auto;height:200px;width:200px;">
59 <div style="height:300px;width:600px">
60 <div style="background-color:red;height:300px;width:300px;position:relative;left:0px;top:0px"></div>
61 <div style="background-color:green;height:300px;width:300px;position:relative;left:300px;top:-300px"></div>
62 </div>
63 <div style="height:300px;width:600px">
64 <div style="background-color:blue;height:300px;width:300px;position:relative;left:0px;top:0px"></div>
65 <div style="background-color:yellow;height:300px;width:300px;position:relative;left:300px;top:-300px"></div>
66 </div>
67 </div>
68 <div id="console"></div>
69 </body>
70 </html>