Revision e57d2a1ed5681d3ea058ea3956583200d2efe9aa authored by Eric Willigers on 15 April 2018, 11:01:13 UTC, committed by Chromium WPT Sync on 15 April 2018, 11:01:13 UTC
Intent: https://groups.google.com/a/chromium.org/d/msg/blink-dev/oBKMVCOX1sY/BLsXXiukAgAJ BUG=804187 Change-Id: I94e79b2b426250c521d0ebae1492571fde078f31 Reviewed-on: https://chromium-review.googlesource.com/1013459 Reviewed-by: Emil A Eklund <eae@chromium.org> Commit-Queue: Eric Willigers <ericwilligers@chromium.org> Cr-Commit-Position: refs/heads/master@{#550915}
1 parent b3c7910
interfaces.https.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>Wake Lock API IDL tests</title>
<link rel="help" href="https://w3c.github.io/wake-lock/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<script>
"use strict";
promise_test(async () => {
const idl_array = new IdlArray();
const dom_idl = await fetch("/interfaces/dom.idl").then(r => r.text());
const wakelock_idl = await fetch("/interfaces/wake-lock.idl").then(r => r.text());
const wakelock = await navigator.getWakeLock("screen");
idl_array.add_untested_idls(dom_idl);
idl_array.add_untested_idls('interface EventHandler {};');
idl_array.add_untested_idls('interface Navigator {};');
idl_array.add_idls(wakelock_idl);
window.wakelock = wakelock;
window.request = wakelock.createRequest();
idl_array.add_objects({
Navigator: ['navigator'],
WakeLock: ['wakelock'],
WakeLockRequest: ['request']
});
idl_array.test();
}, "Test IDL implementation of WakeLock API");
</script>
Computing file changes ...