Move platform/mac-wk2/tiled-drawing to tiled-drawing/
[WebKit-https.git] / LayoutTests / tiled-drawing / scrolling / wheel-events-with-no-delta.html
1 <html>
2 <head>
3 <style>
4 body {
5     height: 2000px;
6 }
7 </style>
8
9 <script>
10
11 function mouseWheelFired(e) {
12     if (e.wheelDelta == 0)
13         document.getElementById('log').textContent = "FAIL. We got a wheel event with a delta of 0.";
14
15     if (window.eventSender)
16         testRunner.notifyDone();
17 }
18
19 function scrollTest()
20 {
21     eventSender.mouseMoveTo(20, 20);
22     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'began', 'none');
23     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
24     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
25     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
26     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'begin');
27     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
28     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
29     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
30     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
31     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
32 }
33
34 function loaded()
35 {
36     document.body.addEventListener('mousewheel', mouseWheelFired, false);
37
38     if (window.eventSender) {
39         testRunner.dumpAsText();
40         testRunner.waitUntilDone();
41         setTimeout(scrollTest, 0);
42     }
43 }
44
45 window.addEventListener('load', loaded, false);
46 </script>
47 </head>
48
49 <body>
50
51 <!--To run this test outside of the test harness, just manually scroll and ensure that the success message
52 does not change to a failure message.-->
53 <pre id="log">Success! We didn't get a wheel event with a delta of 0.</pre>
54
55 </body>
56 </html>