mirror of
https://github.com/servo/servo.git
synced 2025-07-01 04:23:39 +01:00
33 lines
1.2 KiB
HTML
33 lines
1.2 KiB
HTML
<!doctype html>
|
|
<title>Selection interface tests</title>
|
|
<div id=log></div>
|
|
<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([selection, dom, cssom, touchevents, uievents, html]) {
|
|
var idlArray = new IdlArray();
|
|
idlArray.add_untested_idls('interface SVGElement {};');
|
|
idlArray.add_untested_idls(dom + cssom + touchevents + uievents + html);
|
|
idlArray.add_idls(selection);
|
|
idlArray.add_objects({Selection: ['getSelection()']});
|
|
idlArray.test();
|
|
}
|
|
|
|
function fetchData(url) {
|
|
return fetch(url).then((response) => response.text());
|
|
}
|
|
|
|
promise_test(function() {
|
|
return Promise.all([fetchData("/interfaces/selection-api.idl"),
|
|
fetchData("/interfaces/dom.idl"),
|
|
fetchData("/interfaces/cssom.idl"),
|
|
fetchData("/interfaces/touchevents.idl"),
|
|
fetchData("/interfaces/uievents.idl"),
|
|
fetchData("/interfaces/html.idl")])
|
|
.then(doTest);
|
|
}, "Test driver");
|
|
</script>
|