Bug 1584931 - Replace ContentTask.spawn with SpecialPowers.spawn for flash blocking testcases. r=gcp
authorDimiDL <dlee@mozilla.com>
Wed, 16 Oct 2019 07:38:34 +0000
changeset 559304 bd12db83e34285e04e1822a0ea894cc8f3839f0e
parent 559303 8adbff6372abb498ced4e66f904abc516e76d101
child 559305 843409fd89e639b0e08cba8737b3945dd27b2b08
push id12177
push usercsabou@mozilla.com
push dateMon, 21 Oct 2019 14:52:16 +0000
treeherdermozilla-beta@1918a9cd33bc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgcp
bugs1584931
milestone71.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 1584931 - Replace ContentTask.spawn with SpecialPowers.spawn for flash blocking testcases. r=gcp To make us pass flash blocking testcases when fission is enabled, we should use SpecialPowers.spawn instead of ContentTask.spawn because the iframes in the testcases may be cross-origin iframes. Differential Revision: https://phabricator.services.mozilla.com/D49388
toolkit/components/url-classifier/tests/browser/classifierTester.js
--- a/toolkit/components/url-classifier/tests/browser/classifierTester.js
+++ b/toolkit/components/url-classifier/tests/browser/classifierTester.js
@@ -315,40 +315,40 @@ var classifierTester = {
           "rand=" +
           Math.random();
         let domainLoaded = BrowserTestUtils.browserLoaded(
           tab.linkedBrowser,
           true,
           url
         );
 
-        ContentTask.spawn(
+        await SpecialPowers.spawn(
           tab.linkedBrowser,
-          { iframeId: classifierTester.IFRAME_ID, url, depth },
-          async function({ iframeId, url, depth }) {
+          [classifierTester.IFRAME_ID, url, depth],
+          (iframeId, url, depth) => {
             let doc = content.document;
             for (let i = 0; i < depth; ++i) {
               doc = doc.getElementById(iframeId).contentDocument;
             }
             doc.getElementById(iframeId).src = url;
           }
         );
 
         await domainLoaded;
         ++depth;
       }
       return tab;
     })();
   },
 
   getPluginInfo(browser, depth) {
-    return ContentTask.spawn(
+    return SpecialPowers.spawn(
       browser,
-      { iframeId: classifierTester.IFRAME_ID, depth },
-      async function({ iframeId, depth }) {
+      [classifierTester.IFRAME_ID, depth],
+      (iframeId, depth) => {
         let doc = content.document;
         let win = content.window;
         for (let i = 0; i < depth; ++i) {
           let frame = doc.getElementById(iframeId);
           doc = frame.contentDocument;
           win = frame.contentWindow;
         }