mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update web-platform-tests to revision 7a767a52741f628430ffbbed46e7f3df68ba3534
Fixes #15648.
This commit is contained in:
parent
a1e4c547f0
commit
4fadf9b0b6
1184 changed files with 22551 additions and 9856 deletions
33
tests/wpt/web-platform-tests/html/dom/interfaces.worker.js
Normal file
33
tests/wpt/web-platform-tests/html/dom/interfaces.worker.js
Normal file
|
@ -0,0 +1,33 @@
|
|||
"use strict";
|
||||
|
||||
importScripts("/resources/testharness.js");
|
||||
importScripts("/resources/WebIDLParser.js", "/resources/idlharness.js");
|
||||
|
||||
function doTest([untested, tested]) {
|
||||
var idlArray = new IdlArray();
|
||||
idlArray.add_untested_idls(untested);
|
||||
idlArray.add_idls(tested);
|
||||
|
||||
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("resources/untested-interfaces.idl"),
|
||||
fetchData("resources/interfaces.idl")])
|
||||
.then(doTest);
|
||||
}, "Test driver");
|
||||
|
||||
done();
|
Loading…
Add table
Add a link
Reference in a new issue