mirror of
https://github.com/servo/servo.git
synced 2025-10-04 02:29:12 +01:00
28 lines
1.1 KiB
HTML
28 lines
1.1 KiB
HTML
<!doctype html>
|
|
<title>Gamepad IDL tests</title>
|
|
<link rel="help" href="https://w3c.github.io/gamepad/#gamepad-interface">
|
|
<link rel="help" href="https://w3c.github.io/gamepad/#gamepadbutton-interface">
|
|
<link rel="help" href="https://w3c.github.io/gamepad/#gamepadevent-interface">
|
|
<link rel="help" href="https://w3c.github.io/gamepad/#navigator-interface-extension">
|
|
<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 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: [new GamepadEvent("something")],
|
|
Navigator: ["navigator"]
|
|
});
|
|
idl_array.test();
|
|
}, "Test IDL implementation of Gamepad API");
|
|
</script>
|