OLD | NEW |
1 Tests the optional properties of DeviceMotionEvent. Each property should be null
if not set, or set to null or undefined. | 1 Tests the optional properties of DeviceMotionEvent. Each property should be null
if not set, or set to null or undefined. |
2 | 2 |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
4 | 4 |
5 | 5 |
6 event = document.createEvent('DeviceMotionEvent') | 6 event = document.createEvent('DeviceMotionEvent') |
7 PASS event.acceleration == null is true | 7 PASS event.acceleration == null is true |
8 PASS event.accelerationIncludingGravity == null is true | 8 PASS event.accelerationIncludingGravity == null is true |
9 PASS event.rotationRate == null is true | 9 PASS event.rotationRate == null is true |
10 PASS event.interval == null is true | 10 PASS event.interval == null is true |
11 event.initDeviceMotionEvent('', false, false, {x: 0, y: 1, z: 2}, {x: 3, y: 4, z
: 5}, {alpha: 6, beta: 7, gamma: 8}, 9) | 11 event = new DeviceMotionEvent('', {acceleration: {x: 0, y: 1, z: 2}, acceleratio
nIncludingGravity: {x: 3, y: 4, z: 5}, rotationRate: {alpha: 6, beta: 7, gamma:
8}, interval: 9}) |
12 PASS event.acceleration.x == 0 is true | 12 PASS event.acceleration.x == 0 is true |
13 PASS event.acceleration.y == 1 is true | 13 PASS event.acceleration.y == 1 is true |
14 PASS event.acceleration.z == 2 is true | 14 PASS event.acceleration.z == 2 is true |
15 PASS event.accelerationIncludingGravity.x == 3 is true | 15 PASS event.accelerationIncludingGravity.x == 3 is true |
16 PASS event.accelerationIncludingGravity.y == 4 is true | 16 PASS event.accelerationIncludingGravity.y == 4 is true |
17 PASS event.accelerationIncludingGravity.z == 5 is true | 17 PASS event.accelerationIncludingGravity.z == 5 is true |
18 PASS event.rotationRate.alpha == 6 is true | 18 PASS event.rotationRate.alpha == 6 is true |
19 PASS event.rotationRate.beta == 7 is true | 19 PASS event.rotationRate.beta == 7 is true |
20 PASS event.rotationRate.gamma == 8 is true | 20 PASS event.rotationRate.gamma == 8 is true |
21 PASS event.interval == 9 is true | 21 PASS event.interval == 9 is true |
22 PASS event.initDeviceMotionEvent('', false, false, objectThrowingException, {x:
3, z: 5}, {gamma: 8, beta: 7}, 9) threw exception Error: x getter exception. | 22 PASS event = new DeviceMotionEvent('', {acceleration: objectThrowingException, a
ccelerationIncludingGravity: {x: 3, z: 5}, rotationRate: {gamma: 8, beta: 7}, in
terval: 9}) threw exception Error: x getter exception. |
23 PASS event.initDeviceMotionEvent('', false, false, {x: 0, y: 1, z: 2}, objectThr
owingException, {gamma: 8, beta: 7}, 9) threw exception Error: x getter exceptio
n. | 23 PASS event = new DeviceMotionEvent('', {acceleration: {x: 0, y: 1, z: 2}, accele
rationIncludingGravity: objectThrowingException, rotationRate: {gamma: 8, beta:
7}, interval: 9}) threw exception Error: x getter exception. |
24 PASS event.initDeviceMotionEvent('', false, false, {x: 0, y: 1, z: 2}, {x: 3, z:
5}, objectThrowingException, 9) threw exception Error: alpha getter exception. | 24 PASS event = new DeviceMotionEvent('', {acceleration: {x: 0, y: 1, z: 2}, accele
rationIncludingGravity: {x: 3, z: 5}, rotationRate: objectThrowingException, int
erval: 9}) threw exception Error: alpha getter exception. |
25 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 excepti
on Error: valueOf threw exception. | 25 PASS event = new DeviceMotionEvent('', {acceleration: {x: objectThrowingExceptio
n, y: 1, z: 2}, accelerationIncludingGravity: {x: 3, y: 4, z: 5}, rotationRate:
{alpha: 6, beta: 7, gamma: 8}, interval: 9}) threw exception Error: valueOf thre
w exception. |
26 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 excepti
on Error: valueOf threw exception. | 26 PASS event = new DeviceMotionEvent('', {acceleration: {x: 0, y: 1, z: 2}, accele
rationIncludingGravity: {x: 3, y: objectThrowingException, z: 5}, rotationRate:
{alpha: 6, beta: 7, gamma: 8}, interval: 9}) threw exception Error: valueOf thre
w exception. |
27 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 excepti
on Error: valueOf threw exception. | 27 PASS event = new DeviceMotionEvent('', {acceleration: {x: 0, y: 1, z: 2}, accele
rationIncludingGravity: {x: 3, y: 4, z: 5}, rotationRate: {alpha: 6, beta: 7, ga
mma: objectThrowingException}, interval: 9}) threw exception Error: valueOf thre
w exception. |
28 event.initDeviceMotionEvent('', false, false, {y: 1, x: 0}, {x: 3, z: 5}, {gamma
: 8, beta: 7}, 9) | 28 event = new DeviceMotionEvent('', {acceleration: {y: 1, x: 0}, accelerationInclu
dingGravity: {x: 3, z: 5}, rotationRate: {gamma: 8, beta: 7}, interval: 9}) |
29 PASS event.acceleration.x == 0 is true | 29 PASS event.acceleration.x == 0 is true |
30 PASS event.acceleration.y == 1 is true | 30 PASS event.acceleration.y == 1 is true |
31 PASS event.acceleration.z == null is true | 31 PASS event.acceleration.z == null is true |
32 PASS event.accelerationIncludingGravity.x == 3 is true | 32 PASS event.accelerationIncludingGravity.x == 3 is true |
33 PASS event.accelerationIncludingGravity.y == null is true | 33 PASS event.accelerationIncludingGravity.y == null is true |
34 PASS event.accelerationIncludingGravity.z == 5 is true | 34 PASS event.accelerationIncludingGravity.z == 5 is true |
35 PASS event.rotationRate.alpha == null is true | 35 PASS event.rotationRate.alpha == null is true |
36 PASS event.rotationRate.beta == 7 is true | 36 PASS event.rotationRate.beta == 7 is true |
37 PASS event.rotationRate.gamma == 8 is true | 37 PASS event.rotationRate.gamma == 8 is true |
38 PASS event.interval == 9 is true | 38 PASS event.interval == 9 is true |
39 event.initDeviceMotionEvent() | 39 event = new DeviceMotionEvent('') |
40 PASS event.acceleration == null is true | 40 PASS event.acceleration == null is true |
41 PASS event.accelerationIncludingGravity == null is true | 41 PASS event.accelerationIncludingGravity == null is true |
42 PASS event.rotationRate == null is true | 42 PASS event.rotationRate == null is true |
43 PASS event.interval == null is true | 43 PASS event.interval == null is true |
44 event.initDeviceMotionEvent('', false, false, [], [], [], []) | 44 event = new DeviceMotionEvent('', {acceleration: [], accelerationIncludingGravit
y: [], rotationRate: [], interval: []}) |
45 PASS event.acceleration == null is true | 45 PASS event.acceleration.x == null is true |
| 46 PASS event.acceleration.y == null is true |
| 47 PASS event.acceleration.z == null is true |
| 48 PASS event.accelerationIncludingGravity.x == null is true |
| 49 PASS event.accelerationIncludingGravity.y == null is true |
| 50 PASS event.accelerationIncludingGravity.z == null is true |
| 51 PASS event.rotationRate.alpha == null is true |
| 52 PASS event.rotationRate.beta == null is true |
| 53 PASS event.rotationRate.gamma == null is true |
| 54 PASS event.interval == 0 is true |
| 55 event = new DeviceMotionEvent('', {acceleration: [], accelerationIncludingGravit
y: undefined, rotationRate: undefined, interval: undefined}) |
| 56 PASS event.acceleration.x == null is true |
| 57 PASS event.acceleration.y == null is true |
| 58 PASS event.acceleration.z == null is true |
46 PASS event.accelerationIncludingGravity == null is true | 59 PASS event.accelerationIncludingGravity == null is true |
47 PASS event.rotationRate == null is true | 60 PASS event.rotationRate == null is true |
48 PASS event.interval == 0 is true | 61 PASS event.interval == null is true |
49 event.initDeviceMotionEvent('', false, false, undefined, undefined, undefined, u
ndefined) | 62 event = new DeviceMotionEvent('', {acceleration: null, accelerationIncludingGrav
ity: null, rotationRate: null, interval: null}) |
50 PASS event.acceleration == null is true | 63 PASS event.acceleration == null is true |
51 PASS event.accelerationIncludingGravity == null is true | 64 PASS event.accelerationIncludingGravity == null is true |
52 PASS event.rotationRate == null is true | 65 PASS event.rotationRate == null is true |
53 PASS event.interval == null is true | 66 PASS event.interval == null is true |
54 event.initDeviceMotionEvent('', false, false, '', '', '', '') | 67 event = new DeviceMotionEvent('', {acceleration: {x: null, y: null, z: null}, ac
celerationIncludingGravity: {x: null, y: null, z: null}, rotationRate: {alpha: n
ull, beta: null, gamma: null}, interval: null}) |
55 PASS event.acceleration == null is true | 68 PASS event.acceleration.x == null is true |
56 PASS event.accelerationIncludingGravity == null is true | 69 PASS event.acceleration.y == null is true |
57 PASS event.rotationRate == null is true | 70 PASS event.acceleration.z == null is true |
58 PASS event.interval == 0 is true | 71 PASS event.accelerationIncludingGravity.x == null is true |
59 event.initDeviceMotionEvent('', false, false, null, null, null, null) | 72 PASS event.accelerationIncludingGravity.y == null is true |
60 PASS event.acceleration == null is true | 73 PASS event.accelerationIncludingGravity.z == null is true |
61 PASS event.accelerationIncludingGravity == null is true | 74 PASS event.rotationRate.alpha == null is true |
62 PASS event.rotationRate == null is true | 75 PASS event.rotationRate.beta == null is true |
| 76 PASS event.rotationRate.gamma == null is true |
63 PASS event.interval == null is true | 77 PASS event.interval == null is true |
64 event.initDeviceMotionEvent('', false, false, {x: null, y: null, z: null}, {x: n
ull, y: null, z: null}, {alpha: null, beta: null, gamma: null}, null) | 78 event = new DeviceMotionEvent('', {acceleration: {x: null, y: null, z: 1}, accel
erationIncludingGravity: {x: null, y: null, z: 2}, rotationRate: {alpha: null, b
eta: null, gamma: 3}, interval: null}) |
65 PASS event.acceleration == null is true | |
66 PASS event.accelerationIncludingGravity == null is true | |
67 PASS event.rotationRate == null is true | |
68 PASS event.interval == null is true | |
69 event.initDeviceMotionEvent('', false, false, {x: null, y: null, z: 1}, {x: null
, y: null, z: 2}, {alpha: null, beta: null, gamma: 3}, null) | |
70 PASS event.acceleration.x == null is true | 79 PASS event.acceleration.x == null is true |
71 PASS event.acceleration.y == null is true | 80 PASS event.acceleration.y == null is true |
72 PASS event.acceleration.z == 1 is true | 81 PASS event.acceleration.z == 1 is true |
73 PASS event.accelerationIncludingGravity.x == null is true | 82 PASS event.accelerationIncludingGravity.x == null is true |
74 PASS event.accelerationIncludingGravity.y == null is true | 83 PASS event.accelerationIncludingGravity.y == null is true |
75 PASS event.accelerationIncludingGravity.z == 2 is true | 84 PASS event.accelerationIncludingGravity.z == 2 is true |
76 PASS event.rotationRate.alpha == null is true | 85 PASS event.rotationRate.alpha == null is true |
77 PASS event.rotationRate.beta == null is true | 86 PASS event.rotationRate.beta == null is true |
78 PASS event.rotationRate.gamma == 3 is true | 87 PASS event.rotationRate.gamma == 3 is true |
79 PASS event.interval == null is true | 88 PASS event.interval == null is true |
80 event.initDeviceMotionEvent('', false, false, {x: undefined, y: undefined, z: un
defined}, {x: undefined, y: undefined, z: undefined}, {alpha: undefined, beta: u
ndefined, gamma: undefined}, undefined) | 89 event = new DeviceMotionEvent('', {acceleration: {x: undefined, y: undefined, z:
undefined}, accelerationIncludingGravity: {x: undefined, y: undefined, z: undef
ined}, rotationRate: {alpha: undefined, beta: undefined, gamma: undefined}, inte
rval: undefined}) |
81 PASS event.acceleration == null is true | 90 PASS event.acceleration.x == null is true |
82 PASS event.accelerationIncludingGravity == null is true | 91 PASS event.acceleration.y == null is true |
83 PASS event.rotationRate == null is true | 92 PASS event.acceleration.z == null is true |
| 93 PASS event.accelerationIncludingGravity.x == null is true |
| 94 PASS event.accelerationIncludingGravity.y == null is true |
| 95 PASS event.accelerationIncludingGravity.z == null is true |
| 96 PASS event.rotationRate.alpha == null is true |
| 97 PASS event.rotationRate.beta == null is true |
| 98 PASS event.rotationRate.gamma == null is true |
84 PASS event.interval == null is true | 99 PASS event.interval == null is true |
85 event.initDeviceMotionEvent('', false, false, {x: undefined, y: undefined, z: 1}
, {x: undefined, y: undefined, z: 2}, {alpha: undefined, beta: undefined, gamma:
3}, undefined) | 100 event = new DeviceMotionEvent('', {acceleration: {x: undefined, y: undefined, z:
1}, accelerationIncludingGravity: {x: undefined, y: undefined, z: 2}, rotationR
ate: {alpha: undefined, beta: undefined, gamma: 3}, interval: undefined}) |
86 PASS event.acceleration.x == null is true | 101 PASS event.acceleration.x == null is true |
87 PASS event.acceleration.y == null is true | 102 PASS event.acceleration.y == null is true |
88 PASS event.acceleration.z == 1 is true | 103 PASS event.acceleration.z == 1 is true |
89 PASS event.accelerationIncludingGravity.x == null is true | 104 PASS event.accelerationIncludingGravity.x == null is true |
90 PASS event.accelerationIncludingGravity.y == null is true | 105 PASS event.accelerationIncludingGravity.y == null is true |
91 PASS event.accelerationIncludingGravity.z == 2 is true | 106 PASS event.accelerationIncludingGravity.z == 2 is true |
92 PASS event.rotationRate.alpha == null is true | 107 PASS event.rotationRate.alpha == null is true |
93 PASS event.rotationRate.beta == null is true | 108 PASS event.rotationRate.beta == null is true |
94 PASS event.rotationRate.gamma == 3 is true | 109 PASS event.rotationRate.gamma == 3 is true |
95 PASS event.interval == null is true | 110 PASS event.interval == null is true |
96 PASS successfullyParsed is true | 111 PASS successfullyParsed is true |
97 | 112 |
98 TEST COMPLETE | 113 TEST COMPLETE |
99 | 114 |
OLD | NEW |