diff options
Diffstat (limited to 'testing/web-platform/tests/screen-wake-lock/wakelock-screen-type-on-worker.https.worker.js')
-rw-r--r-- | testing/web-platform/tests/screen-wake-lock/wakelock-screen-type-on-worker.https.worker.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/testing/web-platform/tests/screen-wake-lock/wakelock-screen-type-on-worker.https.worker.js b/testing/web-platform/tests/screen-wake-lock/wakelock-screen-type-on-worker.https.worker.js new file mode 100644 index 0000000000..0201294e23 --- /dev/null +++ b/testing/web-platform/tests/screen-wake-lock/wakelock-screen-type-on-worker.https.worker.js @@ -0,0 +1,8 @@ +//META: title=Screen wake lock should not be allowed in dedicated worker +importScripts("/resources/testharness.js"); + +promise_test(t => { + return promise_rejects_dom(t, "NotAllowedError", navigator.wakeLock.request('screen')); +}, "Screen wake lock should not be allowed in dedicated worker"); + +done(); |