Revision 0c81c3f6f4d031c8b977d9c6cacf2f8ed8c936eb authored by Robert Ma on 15 March 2018, 21:39:41 UTC, committed by Michael[tm] Smith on 16 March 2018, 02:43:19 UTC
1 parent b73f249
idlharness-manual.html
<!doctype html>
<title>Manual Gamepad IDL tests</title>
<link rel="help" href="https://w3c.github.io/gamepad/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<p id="instructions">This test requires a gamepad. Connect one and press any button to start the test.</p>
<script>
"use strict";
setup({explicit_timeout: true});
promise_test(async t => {
const eventWatcher = new EventWatcher(t, window, "gamepadconnected");
let e = await eventWatcher.wait_for("gamepadconnected");
const idl_array = new IdlArray();
const gamepad_idl = await fetch("/interfaces/gamepad.idl").then(r => r.text());
idl_array.add_untested_idls('interface Event {};');
idl_array.add_untested_idls('interface Navigator {};');
idl_array.add_idls(gamepad_idl);
idl_array.add_objects({
GamepadEvent: [e],
Gamepad: [e.gamepad],
GamepadButton: [e.gamepad.buttons[0]],
Navigator: ["navigator"]
});
idl_array.test();
}, "Test IDL implementation of Gamepad API");
</script>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...