Update web-platform-tests to revision c2e5b9fbaa17424f05ca2bb04609790a3b61d5c2

This commit is contained in:
WPT Sync Bot 2019-03-17 21:51:47 -04:00 committed by Josh Matthews
parent db7bb2a510
commit f2c1b70e4a
138 changed files with 2799 additions and 851 deletions

View file

@ -7,16 +7,18 @@
<body>
<script id="iframe" type="text/plain">
let iframeWakeLock, iframeRequest;
let iframeWakeLock;
const controller = new AbortController();
const signal = controller.signal;
window.onmessage = async message => {
switch(message.data) {
case "ACQUIRED":
iframeWakeLock = await navigator.getWakeLock("screen");
iframeRequest = iframeWakeLock.createRequest();
iframeWakeLock = new WakeLock("screen");
await iframeWakeLock.request({ signal });
parent.postMessage(iframeWakeLock.active, "*");
break;
case "RELEASED":
iframeRequest.cancel();
controller.abort();
parent.postMessage(iframeWakeLock.active, "*");
break;
default:
@ -49,7 +51,7 @@ function wait_for_message(iframe) {
}
promise_test(async t => {
const wakeLock = await navigator.getWakeLock("screen");
const wakeLock = await new WakeLock("screen");
const iframe = await load_iframe();
const eventWatcher = new EventWatcher(t, wakeLock, "activechange");