blob: ea22220452d7cf34af3ecf85a05c8fc3a30af591 [file] [log] [blame]
description("Tests that the window.DeviceMotionEvent and window.ondevicemotion properties are present.");
shouldBeTrue("typeof window.DeviceMotionEvent == 'object'");
shouldBeFalse("typeof window.DeviceMotionEvent == 'function'");
shouldBeFalse("window.propertyIsEnumerable('DeviceMotionEvent')");
shouldBeTrue("'DeviceMotionEvent' in window");
shouldBeTrue("window.hasOwnProperty('DeviceMotionEvent')");
function hasOnDeviceMotionProperty()
{
for (var property in window) {
if (property == "ondevicemotion")
return true;
}
return false;
}
shouldBeTrue("typeof window.ondevicemotion == 'object'");
shouldBeTrue("hasOnDeviceMotionProperty()");
shouldBeTrue("'ondevicemotion' in window");
shouldBeTrue("window.hasOwnProperty('ondevicemotion')");