OLD | NEW |
(Empty) | |
| 1 "use strict"; |
| 2 |
| 3 importScripts("/resources/testharness.js"); |
| 4 importScripts("/resources/WebIDLParser.js", "/resources/idlharness.js"); |
| 5 |
| 6 function doTest([untested, tested]) { |
| 7 var idlArray = new IdlArray(); |
| 8 idlArray.add_untested_idls(untested); |
| 9 idlArray.add_idls(tested); |
| 10 |
| 11 idlArray.add_objects({ |
| 12 WorkerNavigator: ['self.navigator'], |
| 13 WebSocket: ['new WebSocket("ws://foo")'], |
| 14 CloseEvent: ['new CloseEvent("close")'], |
| 15 Worker: [], |
| 16 MessageEvent: ['new MessageEvent("message", { data: 5 })'], |
| 17 DedicatedWorkerGlobalScope: ['self'], |
| 18 }); |
| 19 |
| 20 idlArray.test(); |
| 21 }; |
| 22 |
| 23 function fetchData(url) { |
| 24 return fetch(url).then((response) => response.text()); |
| 25 } |
| 26 |
| 27 promise_test(function() { |
| 28 return Promise.all([fetchData("resources/untested-interfaces.idl"), |
| 29 fetchData("resources/interfaces.idl")]) |
| 30 .then(doTest); |
| 31 }, "Test driver"); |
| 32 |
| 33 done(); |
OLD | NEW |