21 lines
474 B
HTML
21 lines
474 B
HTML
<!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>
|