blob: 257388461f39b3a90e92b3ff52111efcba9c5842 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>
'use strict';
promise_test(async t => {
await internals.setPermission({name: 'screen-wake-lock'}, 'granted',
location.origin, location.origin);
const lock = await navigator.wakeLock.request('screen');
await lock.release();
}, "Screen wake locks available.");
promise_test(async t => {
await internals.setPermission({name: 'system-wake-lock'}, 'granted',
location.origin, location.origin);
const lock = await navigator.wakeLock.request('system');
await lock.release();
}, "System wake locks available.");
</script>
</body>
</html>