Bug 1586705 - Making the test 'browser/components/originattributes/test/browser/browser_broadcastChannel.js' working in Fission. r=baku
authorTim Huang <tihuang@mozilla.com>
Tue, 15 Oct 2019 14:22:55 +0000
changeset 498328 378ad463733f2e088de5ebd575122f2c644784fd
parent 498327 1160e60081d1a1d02289e2af57ad816aaad12b56
child 498329 927d973202e90eaba209af8d3bf9d37b965f85d0
push id36717
push usernbeleuzu@mozilla.com
push dateMon, 21 Oct 2019 21:51:55 +0000
treeherdermozilla-central@563f437f24b9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1586705
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 1586705 - Making the test 'browser/components/originattributes/test/browser/browser_broadcastChannel.js' working in Fission. r=baku Depends on D49243 Differential Revision: https://phabricator.services.mozilla.com/D49244
browser/components/originattributes/test/browser/browser.ini
browser/components/originattributes/test/browser/browser_broadcastChannel.js
--- a/browser/components/originattributes/test/browser/browser.ini
+++ b/browser/components/originattributes/test/browser/browser.ini
@@ -58,17 +58,16 @@ support-files =
   window2.html
   window3.html
   window_redirect.html
   worker_blobify.js
   worker_deblobify.js
   !/toolkit/content/tests/browser/common/mockTransfer.js
 
 [browser_broadcastChannel.js]
-fail-if = fission
 [browser_cache.js]
 fail-if = fission
 skip-if = verify
 [browser_cookieIsolation.js]
 fail-if = fission
 [browser_favicon_firstParty.js]
 fail-if = fission
 [browser_favicon_userContextId.js]
--- a/browser/components/originattributes/test/browser/browser_broadcastChannel.js
+++ b/browser/components/originattributes/test/browser/browser_broadcastChannel.js
@@ -3,17 +3,17 @@
  */
 
 const TEST_DOMAIN = "http://example.net/";
 const TEST_PATH =
   TEST_DOMAIN + "browser/browser/components/originattributes/test/browser/";
 const TEST_PAGE = TEST_PATH + "file_broadcastChannel.html";
 
 async function doTest(aBrowser) {
-  let response = await ContentTask.spawn(aBrowser, null, async function() {
+  let response = await SpecialPowers.spawn(aBrowser, [], async function() {
     let displayItem = content.document.getElementById("display");
 
     // If there is nothing in the 'display', we will try to send a message to
     // the broadcast channel and wait until this message has been delivered.
     // The way that how we make sure the message is delivered is based on an
     // iframe which will reply everything it receives from the broadcast channel
     // to the current window through the postMessage. So, we can know that the
     // boradcast message is sent successfully when the window receives a message
@@ -28,17 +28,17 @@ async function doTest(aBrowser) {
         };
 
         let bc = new content.BroadcastChannel("testBroadcastChannel");
 
         content.addEventListener("message", listenFunc);
         bc.postMessage(data);
       });
 
-      is(receivedData, data, "The value should be the same.");
+      Assert.equal(receivedData, data, "The value should be the same.");
 
       return receivedData;
     }
 
     return displayItem.innerHTML;
   });
 
   return response;