mirror of
https://github.com/servo/servo.git
synced 2025-07-02 04:53:39 +01:00
29 lines
968 B
HTML
29 lines
968 B
HTML
<title>Input Event IDL tests</title>
|
|
<link rel="help" href="https://w3c.github.io/input-events/#h-interface-inputevent"/>
|
|
<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";
|
|
|
|
function doTest([input_events]) {
|
|
const idl_array = new IdlArray();
|
|
idl_array.add_untested_idls('interface InputEvent {};');
|
|
idl_array.add_untested_idls('dictionary InputEventInit {};');
|
|
idl_array.add_idls(input_events);
|
|
idl_array.add_objects({
|
|
InputEvent: ['new InputEvent("foo")'],
|
|
});
|
|
idl_array.test();
|
|
}
|
|
|
|
function fetchText(url) {
|
|
return fetch(url).then((response) => response.text());
|
|
}
|
|
|
|
promise_test(() => {
|
|
return Promise.all(["/interfaces/input-events.idl"].map(fetchText))
|
|
.then(doTest);
|
|
}, "Test IDL implementation of Input Events");
|
|
</script>
|