blob: f3fede6e104bdcd041caf758608eaf72fc89b628 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
<!DOCTYPE html>
<html>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script>
'use strict';
promise_test(async t => {
await test_driver.set_permission({name: 'screen-wake-lock'}, 'denied');
return promise_rejects_dom(t, "NotAllowedError", navigator.wakeLock.request('screen'));
}, 'Denied requests should abort with NotAllowedError');
</script>
</body>
</html>
|