Bug 1523562 [wpt PR 14842] - Use idl_test for HTML's interfaces.worker.js., a=testonly

Automatic update from web-platform-tests
Use idl_test for HTML's interfaces.worker.js.

--

wpt-commits: a25e9bf8a57c9cc0946f21487f4a8b180c6cb11b
wpt-pr: 14842
This commit is contained in:
Ms2ger 2019-01-31 18:54:49 +00:00 коммит произвёл James Graham
Родитель c7a3a87ad6
Коммит 8fb5643fe0
1 изменённых файлов: 14 добавлений и 29 удалений

Просмотреть файл

@ -3,34 +3,19 @@
importScripts("/resources/testharness.js"); importScripts("/resources/testharness.js");
importScripts("/resources/WebIDLParser.js", "/resources/idlharness.js"); importScripts("/resources/WebIDLParser.js", "/resources/idlharness.js");
function doTest([html, dom, cssom, touchevents, uievents]) { idl_test(
var idlArray = new IdlArray(); ["html"],
idlArray.add_untested_idls(dom + cssom + touchevents + uievents); ["dom", "cssom", "touch-events", "uievents"],
idlArray.add_idls(html); idlArray => {
idlArray.add_objects({
idlArray.add_objects({ WorkerNavigator: ['self.navigator'],
WorkerNavigator: ['self.navigator'], WebSocket: ['new WebSocket("ws://foo")'],
WebSocket: ['new WebSocket("ws://foo")'], CloseEvent: ['new CloseEvent("close")'],
CloseEvent: ['new CloseEvent("close")'], Worker: [],
Worker: [], MessageEvent: ['new MessageEvent("message", { data: 5 })'],
MessageEvent: ['new MessageEvent("message", { data: 5 })'], DedicatedWorkerGlobalScope: ['self'],
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");
done(); done();