Bug 1482241 [wpt PR 12386] - Rewrite secure-contexts/idlharness.any.js to use idl_test, a=testonly
authorPhilip Jägenstedt <philip@foolip.org>
Wed, 15 Aug 2018 01:01:12 +0000
changeset 486811 1dd1dd6c2a2c417638d2c86f5805e23f3bc47332
parent 486810 4e0dfd2db07ecaa226ddb4df3cc845b3490feb51
child 486812 bb9b9e349c199ecf6081232a7af2abd31ecec5d1
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1482241, 12386, 12378
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/secure-contexts/idlharness.any.js
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -627513,17 +627513,17 @@
    "76c28a36e4f47f7b01441e74fd4837a2cfd9040d",
    "testharness"
   ],
   "secure-contexts/basic-shared-worker.https.html": [
    "e7c78383a8266bd160dcfc9747b69ebe56530295",
    "testharness"
   ],
   "secure-contexts/idlharness.any.js": [
-   "88341f3b215dd80a164d4144a13ecdf74c1d4ef5",
+   "5bd1d44d6f7d9c299ff41c241802652924ce77b2",
    "testharness"
   ],
   "secure-contexts/postMessage-helper.html": [
    "8971c86b279b3134ee56f74c5414cc3a207e3d41",
    "support"
   ],
   "secure-contexts/postMessage-helper.https.html": [
    "8971c86b279b3134ee56f74c5414cc3a207e3d41",
--- a/testing/web-platform/tests/secure-contexts/idlharness.any.js
+++ b/testing/web-platform/tests/secure-contexts/idlharness.any.js
@@ -1,20 +1,19 @@
 // META: global=window,worker
 // META: script=/resources/WebIDLParser.js
 // META: script=/resources/idlharness.js
 
 // https://w3c.github.io/webappsec-secure-contexts/
 
 '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'] });
+    }
+  }
+);