summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/dom/DeviceMotion/optional-event-properties-expected.txt
blob: c2230b2922291c2da28be2ee7fadc30628804292 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
Tests the optional properties of DeviceMotionEvent. Each property should be null if not set, or set to null or undefined.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


event = document.createEvent('DeviceMotionEvent')
PASS event.acceleration == null is true
PASS event.accelerationIncludingGravity == null is true
PASS event.rotationRate == null is true
PASS event.interval == null is true
event.initDeviceMotionEvent('', false, false, {x: 0, y: 1, z: 2}, {x: 3, y: 4, z: 5}, {alpha: 6, beta: 7, gamma: 8}, 9)
PASS event.acceleration.x == 0 is true
PASS event.acceleration.y == 1 is true
PASS event.acceleration.z == 2 is true
PASS event.accelerationIncludingGravity.x == 3 is true
PASS event.accelerationIncludingGravity.y == 4 is true
PASS event.accelerationIncludingGravity.z == 5 is true
PASS event.rotationRate.alpha == 6 is true
PASS event.rotationRate.beta == 7 is true
PASS event.rotationRate.gamma == 8 is true
PASS event.interval == 9 is true
PASS event.initDeviceMotionEvent('', false, false, objectThrowingException, {x: 3, z: 5}, {gamma: 8, beta: 7}, 9) threw exception Error: x getter exception.
PASS event.initDeviceMotionEvent('', false, false, {x: 0, y: 1, z: 2}, objectThrowingException, {gamma: 8, beta: 7}, 9) threw exception Error: x getter exception.
PASS event.initDeviceMotionEvent('', false, false, {x: 0, y: 1, z: 2}, {x: 3, z: 5}, objectThrowingException, 9) threw exception Error: alpha getter exception.
PASS event.initDeviceMotionEvent('', false, false, {x: objectThrowingException, y: 1, z: 2}, {x: 3, y: 4, z: 5}, {alpha: 6, beta: 7, gamma: 8}, 9) threw exception Error: valueOf threw exception.
PASS event.initDeviceMotionEvent('', false, false, {x: 0, y: 1, z: 2}, {x: 3, y: objectThrowingException, z: 5}, {alpha: 6, beta: 7, gamma: 8}, 9) threw exception Error: valueOf threw exception.
PASS event.initDeviceMotionEvent('', false, false, {x: 0, y: 1, z: 2}, {x: 3, y: 4, z: 5}, {alpha: 6, beta: 7, gamma: objectThrowingException}, 9) threw exception Error: valueOf threw exception.
event.initDeviceMotionEvent('', false, false, {y: 1, x: 0}, {x: 3, z: 5}, {gamma: 8, beta: 7}, 9)
PASS event.acceleration.x == 0 is true
PASS event.acceleration.y == 1 is true
PASS event.acceleration.z == null is true
PASS event.accelerationIncludingGravity.x == 3 is true
PASS event.accelerationIncludingGravity.y == null is true
PASS event.accelerationIncludingGravity.z == 5 is true
PASS event.rotationRate.alpha == null is true
PASS event.rotationRate.beta == 7 is true
PASS event.rotationRate.gamma == 8 is true
PASS event.interval == 9 is true
event.initDeviceMotionEvent()
PASS event.acceleration == null is true
PASS event.accelerationIncludingGravity == null is true
PASS event.rotationRate == null is true
PASS event.interval == null is true
event.initDeviceMotionEvent('', false, false, [], [], [], [])
PASS event.acceleration == null is true
PASS event.accelerationIncludingGravity == null is true
PASS event.rotationRate == null is true
PASS event.interval == 0 is true
event.initDeviceMotionEvent('', false, false, undefined, undefined, undefined, undefined)
PASS event.acceleration == null is true
PASS event.accelerationIncludingGravity == null is true
PASS event.rotationRate == null is true
PASS event.interval == null is true
event.initDeviceMotionEvent('', false, false, '', '', '', '')
PASS event.acceleration == null is true
PASS event.accelerationIncludingGravity == null is true
PASS event.rotationRate == null is true
PASS event.interval == 0 is true
event.initDeviceMotionEvent('', false, false, null, null, null, null)
PASS event.acceleration == null is true
PASS event.accelerationIncludingGravity == null is true
PASS event.rotationRate == null is true
PASS event.interval == null is true
event.initDeviceMotionEvent('', false, false, {x: null, y: null, z: null}, {x: null, y: null, z: null}, {alpha: null, beta: null, gamma: null}, null)
PASS event.acceleration == null is true
PASS event.accelerationIncludingGravity == null is true
PASS event.rotationRate == null is true
PASS event.interval == null is true
event.initDeviceMotionEvent('', false, false, {x: null, y: null, z: 1}, {x: null, y: null, z: 2}, {alpha: null, beta: null, gamma: 3}, null)
PASS event.acceleration.x == null is true
PASS event.acceleration.y == null is true
PASS event.acceleration.z == 1 is true
PASS event.accelerationIncludingGravity.x == null is true
PASS event.accelerationIncludingGravity.y == null is true
PASS event.accelerationIncludingGravity.z == 2 is true
PASS event.rotationRate.alpha == null is true
PASS event.rotationRate.beta == null is true
PASS event.rotationRate.gamma == 3 is true
PASS event.interval == null is true
event.initDeviceMotionEvent('', false, false, {x: undefined, y: undefined, z: undefined}, {x: undefined, y: undefined, z: undefined}, {alpha: undefined, beta: undefined, gamma: undefined}, undefined)
PASS event.acceleration == null is true
PASS event.accelerationIncludingGravity == null is true
PASS event.rotationRate == null is true
PASS event.interval == null is true
event.initDeviceMotionEvent('', false, false, {x: undefined, y: undefined, z: 1}, {x: undefined, y: undefined, z: 2}, {alpha: undefined, beta: undefined, gamma: 3}, undefined)
PASS event.acceleration.x == null is true
PASS event.acceleration.y == null is true
PASS event.acceleration.z == 1 is true
PASS event.accelerationIncludingGravity.x == null is true
PASS event.accelerationIncludingGravity.y == null is true
PASS event.accelerationIncludingGravity.z == 2 is true
PASS event.rotationRate.alpha == null is true
PASS event.rotationRate.beta == null is true
PASS event.rotationRate.gamma == 3 is true
PASS event.interval == null is true
PASS successfullyParsed is true

TEST COMPLETE