blob: 926992ad4358dd73bcc952a708481e52dd6e5cf1 [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");
}, (_e) => {
e = _e;
console.log(e);
shouldBeEqualToString("e.name", "NotAllowedError");
finishJSTest();
});
</script>
</body>
</html>