Bug 1482241 [wpt PR 12386] - Rewrite secure-contexts/idlharness.any.js to use idl_test, a=testonly

Automatic update from web-platform-testsRewrite secure-contexts/idlharness.any.js to use idl_test (#12386)

Fixes https://github.com/web-platform-tests/wpt/issues/12378, by adding
the right depencies and the right global object depending on context.
--

wpt-commits: d125b8f074d63d145f2b2f52262283add46bbc04
wpt-pr: 12386
This commit is contained in:
Philip Jägenstedt 2018-08-15 01:01:12 +00:00 committed by moz-wptsync-bot
parent 59db5f63c2
commit 3b6ee74efd
2 changed files with 12 additions and 13 deletions

View File

@ -627518,7 +627518,7 @@
"testharness"
],
"secure-contexts/idlharness.any.js": [
"88341f3b215dd80a164d4144a13ecdf74c1d4ef5",
"5bd1d44d6f7d9c299ff41c241802652924ce77b2",
"testharness"
],
"secure-contexts/postMessage-helper.html": [

View File

@ -6,15 +6,14 @@
'use strict';
promise_test(async () => {
const idl = await fetch("/interfaces/secure-contexts.idl").then(r => r.text());
const workers = await fetch("/interfaces/dedicated-workers.idl").then(r => r.text());
const idl_array = new IdlArray();
idl_array.add_idls(idl);
idl_array.add_dependency_idls(workers);
idl_array.add_objects({
WindowOrWorkerGlobalScope: ["self"],
});
idl_array.test();
}, "Test IDL implementation of Secure Contexts");
idl_test(
['secure-contexts'],
['html', 'dom'],
idl_array => {
if (self.Window) {
idl_array.add_objects({ Window: ['self'] });
} else {
idl_array.add_objects({ WorkerGlobalScope: ['self'] });
}
}
);