Skip to content

Commit 4ada870

Browse files
lukebjerringfoolip
authored andcommitted
Use add_dependency_idls in gamepad idlharness test (web-platform-tests#11076)
1 parent f7b5bce commit 4ada870

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

gamepad/idlharness.html

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,22 @@
99
<script src="/resources/WebIDLParser.js"></script>
1010
<script src="/resources/idlharness.js"></script>
1111
<script>
12-
"use strict";
12+
"use strict";
1313

14-
promise_test(async () => {
15-
const idl_array = new IdlArray();
16-
const gamepad_idl = await fetch("/interfaces/gamepad.idl").then(r => r.text());
17-
const dom = await fetch("/interfaces/dom.idl").then(r => r.text());
14+
promise_test(async () => {
15+
const idl_array = new IdlArray();
16+
const gamepad_idl = await fetch("/interfaces/gamepad.idl").then(r => r.text());
17+
const dom = await fetch("/interfaces/dom.idl").then(r => r.text());
18+
const html = await fetch("/interfaces/html.idl").then(r => r.text());
1819

19-
idl_array.add_untested_idls(dom, {only: ['Event', 'EventInit']});
20-
idl_array.add_untested_idls('interface Navigator {};');
21-
idl_array.add_idls(gamepad_idl);
20+
idl_array.add_idls(gamepad_idl);
21+
idl_array.add_dependency_idls(dom);
22+
idl_array.add_dependency_idls(html);
2223

23-
idl_array.add_objects({
24-
GamepadEvent: [new GamepadEvent("something")],
25-
Navigator: ["navigator"]
26-
});
27-
idl_array.test();
28-
}, "Test IDL implementation of Gamepad API");
24+
idl_array.add_objects({
25+
GamepadEvent: [new GamepadEvent("something")],
26+
Navigator: ["navigator"]
27+
});
28+
idl_array.test();
29+
}, "Test IDL implementation of Gamepad API");
2930
</script>

0 commit comments

Comments
 (0)