1 Tests the optional properties of DeviceOrientationEvent. Each property should be null if not set, or set to null or undefined.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 event = document.createEvent('DeviceOrientationEvent')
7 PASS event.alpha == null is true
8 PASS event.beta == null is true
9 PASS event.gamma == null is true
10 PASS event.absolute == null is true
11 event.initDeviceOrientationEvent('', false, false, 0, 1, 2)
12 PASS event.alpha == 0 is true
13 PASS event.beta == 1 is true
14 PASS event.gamma == 2 is true
15 event.initDeviceOrientationEvent('', false, false, 0, 1, 2, true)
16 PASS event.alpha == 0 is true
17 PASS event.beta == 1 is true
18 PASS event.gamma == 2 is true
19 PASS event.absolute is true
20 event.initDeviceOrientationEvent()
21 PASS event.alpha == null is true
22 PASS event.beta == null is true
23 PASS event.gamma == null is true
24 event.initDeviceOrientationEvent('', false, false, [], [], [])
25 PASS event.alpha == 0 is true
26 PASS event.beta == 0 is true
27 PASS event.gamma == 0 is true
28 event.initDeviceOrientationEvent('', false, false, undefined, undefined, undefined)
29 PASS event.alpha == null is true
30 PASS event.beta == null is true
31 PASS event.gamma == null is true
32 event.initDeviceOrientationEvent('', false, false, '', '', '')
33 PASS event.alpha == 0 is true
34 PASS event.beta == 0 is true
35 PASS event.gamma == 0 is true
36 event.initDeviceOrientationEvent('', false, false, null, null, null)
37 PASS event.alpha == null is true
38 PASS event.beta == null is true
39 PASS event.gamma == null is true
40 PASS successfullyParsed is true