blob: f194539eda565f13fc9f44b86b9f98f7d6c11e74 [file] [log] [blame]
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
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')");
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>