mirror of
https://github.com/servo/servo.git
synced 2025-08-13 01:15:34 +01:00
Update web-platform-tests to revision 3f9178031eec5374c9a7d5709a7e11ba4a1955ed
This commit is contained in:
parent
4997ec26c2
commit
a5af9a106a
192 changed files with 3943 additions and 1927 deletions
20
tests/wpt/web-platform-tests/selection/idlharness.window.js
Normal file
20
tests/wpt/web-platform-tests/selection/idlharness.window.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
// META: script=/resources/WebIDLParser.js
|
||||
// META: script=/resources/idlharness.js
|
||||
|
||||
'use strict';
|
||||
|
||||
// https://w3c.github.io/selection-api/
|
||||
|
||||
idl_test(
|
||||
['selection-api'],
|
||||
['dom', 'html'],
|
||||
idlArray => {
|
||||
idlArray.add_objects({
|
||||
Window: ['window'],
|
||||
Document: ['document'],
|
||||
Selection: ['getSelection()'],
|
||||
GlobalEventHandlers: ['self'],
|
||||
});
|
||||
},
|
||||
'selection-api interfaces'
|
||||
);
|
|
@ -1,33 +0,0 @@
|
|||
<!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>
|
Loading…
Add table
Add a link
Reference in a new issue