mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Update web-platform-tests to revision 192193581b6912818a0e3f2408f40f033a451a79
This commit is contained in:
parent
2cf9a00c99
commit
13bbfdb3eb
46 changed files with 1499 additions and 144 deletions
|
@ -3,34 +3,19 @@
|
|||
importScripts("/resources/testharness.js");
|
||||
importScripts("/resources/WebIDLParser.js", "/resources/idlharness.js");
|
||||
|
||||
function doTest([html, dom, cssom, touchevents, uievents]) {
|
||||
var idlArray = new IdlArray();
|
||||
idlArray.add_untested_idls(dom + cssom + touchevents + uievents);
|
||||
idlArray.add_idls(html);
|
||||
|
||||
idlArray.add_objects({
|
||||
WorkerNavigator: ['self.navigator'],
|
||||
WebSocket: ['new WebSocket("ws://foo")'],
|
||||
CloseEvent: ['new CloseEvent("close")'],
|
||||
Worker: [],
|
||||
MessageEvent: ['new MessageEvent("message", { data: 5 })'],
|
||||
DedicatedWorkerGlobalScope: ['self'],
|
||||
});
|
||||
|
||||
idlArray.test();
|
||||
};
|
||||
|
||||
function fetchData(url) {
|
||||
return fetch(url).then((response) => response.text());
|
||||
}
|
||||
|
||||
promise_test(function() {
|
||||
return Promise.all([fetchData("/interfaces/html.idl"),
|
||||
fetchData("/interfaces/dom.idl"),
|
||||
fetchData("/interfaces/cssom.idl"),
|
||||
fetchData("/interfaces/touch-events.idl"),
|
||||
fetchData("/interfaces/uievents.idl")])
|
||||
.then(doTest);
|
||||
}, "Test driver");
|
||||
idl_test(
|
||||
["html"],
|
||||
["dom", "cssom", "touch-events", "uievents"],
|
||||
idlArray => {
|
||||
idlArray.add_objects({
|
||||
WorkerNavigator: ['self.navigator'],
|
||||
WebSocket: ['new WebSocket("ws://foo")'],
|
||||
CloseEvent: ['new CloseEvent("close")'],
|
||||
Worker: [],
|
||||
MessageEvent: ['new MessageEvent("message", { data: 5 })'],
|
||||
DedicatedWorkerGlobalScope: ['self'],
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
done();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue