blob: 1099d19f479ebcab85a192a410fb07382ff20bb0 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script src="../../resources/js-test.js"></script>
<script>
description("Tests that DeviceOrientationEvent.requestPermission() requires a user gesture.");
jsTestIsAsync = true;
DeviceOrientationEvent.requestPermission().then((result) => {
testFailed("requestPermission promise was not rejected");
finishJSTest();
}, (_e) => {
e = _e;
console.log(e);
shouldBeEqualToString("e.name", "NotAllowedError");
finishJSTest();
});
</script>
</body>
</html>