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