1 description("Tests that the window.DeviceMotionEvent and window.ondevicemotion properties are present.");
3 function hasDeviceMotionEventProperty()
5 for (var property in window) {
6 if (property == "DeviceMotionEvent")
12 shouldBeTrue("typeof window.DeviceMotionEvent == 'object'");
13 shouldBeFalse("typeof window.DeviceMotionEvent == 'function'");
14 shouldBeTrue("hasDeviceMotionEventProperty()");
15 shouldBeTrue("'DeviceMotionEvent' in window");
16 shouldBeTrue("window.hasOwnProperty('DeviceMotionEvent')");
18 function hasOnDeviceMotionProperty()
20 for (var property in window) {
21 if (property == "ondevicemotion")
27 shouldBeTrue("typeof window.ondevicemotion == 'object'");
28 shouldBeTrue("hasOnDeviceMotionProperty()");
29 shouldBeTrue("'ondevicemotion' in window");
30 shouldBeTrue("window.hasOwnProperty('ondevicemotion')");