Video is not started even if play button has been pressed.
[framework/web/webkit-efl.git] / LayoutTests / fast / events / platform-wheelevent-paging-xy-in-scrolling-page.html
1 <html>
2     <head>
3         <link rel="stylesheet" href="../js/resources/js-test-style.css">
4         <script src="../js/resources/js-test-pre.js"></script>
5         <script>
6             var givenScrollTop = 2; // Only one page per event, so this should be interpreted as 1
7             var givenScrollLeft = 2;
8             var expectedScrollTop = 511; // Window is 800x600. 15 pixel scrollbars. Scroll 87.5% of visible.
9             var expectedScrollLeft = 686;
10             var event;
11             var div;
12
13             if (window.testRunner)
14                 testRunner.waitUntilDone();
15
16             function dispatchWheelEvent()
17             {
18                 document.body.addEventListener("mousewheel", mousewheelHandler, false);
19
20                 if (window.eventSender) {
21                     eventSender.mouseMoveTo(100, 110);
22                     eventSender.continuousMouseScrollBy(-window.givenScrollLeft, -window.givenScrollTop, true);
23                 }
24
25                 setTimeout('checkOffsets();', 100);
26             }
27
28             function checkOffsets()
29             {
30                 shouldBe("document.body.scrollTop", "window.expectedScrollTop");
31                 shouldBe("document.body.scrollLeft", "window.expectedScrollLeft");
32
33                 if (window.testRunner)
34                     window.testRunner.notifyDone();
35             }
36
37             function mousewheelHandler(e)
38             {
39                 event = e;
40                 shouldBe("event.wheelDeltaY", "window.givenScrollTop * -3");
41                 shouldBe("event.wheelDeltaX", "window.givenScrollLeft * -3");
42
43                 if (e.wheelDeltaY)
44                     shouldBe("event.wheelDelta", "window.givenScrollTop * -3");
45                 else
46                     shouldBe("event.wheelDelta", "window.givenScrollLeft * -3");
47             }
48         </script>
49     </head>
50
51     <body style="margin:0" onload="setTimeout('dispatchWheelEvent();', 100)">
52         <div style="height:900px;width:2400px">
53           <div style="background-color:red;height:900px;width:1200px;position:relative;left:0px;top:0px"></div>
54           <div style="background-color:green;height:900px;width:1200px;position:relative;left:1200px;top:-900px"></div>
55         </div>
56         <div style="height:900px;width:2400px">
57           <div style="background-color:blue;height:900px;width:1200px;position:relative;left:0px;top:0px"></div>
58           <div style="background-color:yellow;height:900px;width:1200px;position:relative;left:1200px;top:-900px"></div>
59         </div>
60         <div id="console"></div>
61     </body>
62 </html>