Revision 40dc6ae8bbd4d1ce358402dd518c8ec26439913b authored by Timothy Gu on 31 July 2018, 19:10:11 UTC, committed by Timothy Gu on 31 July 2018, 19:10:11 UTC
1 parent 5f82b15
Raw File
wakelock-promise.https.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>navigator.getWakeLock() for the same Document always return same WakeLock promise</title>
<link rel="help" href="https://w3c.github.io/wake-lock/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
promise_test(async t => {
  const wakeLock1 = await navigator.getWakeLock("screen");
  const wakeLock2 = await navigator.getWakeLock("screen");
  assert_equals(wakeLock1, wakeLock2);
}, "navigator.getWakeLock() for the same Document always return same WakeLock promise");
</script>
back to top