OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <body> | 3 <body> |
4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 <script> | 5 <script> |
6 description('Tests that document.createEvent() works with DeviceOrientationEvent
.'); | 6 description('Tests that document.createEvent() works with DeviceOrientationEvent
.'); |
7 | 7 |
8 var event = document.createEvent('DeviceOrientationEvent'); | 8 var event = document.createEvent('DeviceOrientationEvent'); |
9 var newEvent = new CustomEvent("deviceorientation", { | 9 var newEvent = new CustomEvent("deviceorientation", { |
10 bubbles: false, cancelable: false, | 10 bubbles: false, cancelable: false, |
11 alpha: 1.0, | 11 alpha: 1.0, |
12 beta: 2.0, | 12 beta: 2.0, |
13 gama: 3.0, | 13 gama: 3.0, |
14 absolute: false | 14 absolute: false |
(...skipping 18 matching lines...) Expand all Loading... |
33 shouldBeTrue("typeof event.gamma == 'object'"); | 33 shouldBeTrue("typeof event.gamma == 'object'"); |
34 shouldBeTrue("typeof event.absolute == 'boolean'"); | 34 shouldBeTrue("typeof event.absolute == 'boolean'"); |
35 | 35 |
36 shouldBeEqualToString("newEvent.type", "deviceorientation"); | 36 shouldBeEqualToString("newEvent.type", "deviceorientation"); |
37 shouldBeFalse("newEvent.bubbles"); | 37 shouldBeFalse("newEvent.bubbles"); |
38 shouldBeFalse("newEvent.cancelable"); | 38 shouldBeFalse("newEvent.cancelable"); |
39 | 39 |
40 </script> | 40 </script> |
41 </body> | 41 </body> |
42 </html> | 42 </html> |
OLD | NEW |