blob: 839486aff5c75001834825eb369aaa2e5e6f31c5 [file] [log] [blame]
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description('Tests that the window.DeviceOrientationEvent and window.ondeviceorientation properties are present.');
shouldBeTrue("typeof window.DeviceOrientationEvent == 'object'");
shouldBeFalse("typeof window.DeviceOrientationEvent == 'function'");
shouldBeFalse("window.propertyIsEnumerable('DeviceOrientationEvent')");
shouldBeTrue("'DeviceOrientationEvent' in window");
shouldBeTrue("window.hasOwnProperty('DeviceOrientationEvent')");
function hasOnDeviceOrientationProperty()
{
for (var property in window) {
if (property == 'ondeviceorientation')
return true;
}
return false;
}
shouldBeTrue("typeof window.ondeviceorientation == 'object'");
shouldBeTrue("hasOnDeviceOrientationProperty()");
shouldBeTrue("'ondeviceorientation' in window");
shouldBeTrue("window.hasOwnProperty('ondeviceorientation')");
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>