Change fast/e* files to use pre and post js files in LayoutTests/resources.
[WebKit-https.git] / LayoutTests / fast / events / wheelevent-constructor.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <link rel="help" href="http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEvent">
5 <script src="../../resources/js-test-pre.js"></script>
6 </head>
7 <body>
8 <script>
9 description("Tests the constructor of the standard wheel event");
10
11 var testEvent;
12 shouldNotThrow("testEvent = new WheelEvent('wheel')");
13 shouldBe("testEvent.__proto__", "WheelEvent.prototype");
14 shouldBe("testEvent.deltaX", "0");
15 shouldBe("testEvent.deltaY", "0");
16 shouldBe("testEvent.deltaZ", "0");
17 shouldBe("testEvent.deltaMode", "WheelEvent.DOM_DELTA_PIXEL");
18
19 shouldNotThrow("testEvent = new WheelEvent('wheel', { deltaX: 10.2, deltaY: 20.3, deltaZ: 30.4, deltaMode: WheelEvent.DOM_DELTA_PAGE })");
20 shouldBe("testEvent.__proto__", "WheelEvent.prototype");
21 shouldBe("testEvent.deltaX", "10.2");
22 shouldBe("testEvent.deltaY", "20.3");
23 shouldBe("testEvent.deltaZ", "30.4");
24 shouldBe("testEvent.deltaMode", "WheelEvent.DOM_DELTA_PAGE");
25
26 </script>
27 <script src="../../resources/js-test-post.js"></script>
28 </body>
29 </html>