Bug 1586715 - Making the test 'browser/components/originattributes/test/browser/browser_sharedworker.js' working in Fission. r=baku
authorTim Huang <tihuang@mozilla.com>
Tue, 15 Oct 2019 14:25:02 +0000
changeset 498336 0793db7c027025ed3f44e899f65fd26e676158d5
parent 498335 f7440da54d66a2a29ba5333256274637ab039834
child 498337 71818704a2cacc8e7f2fc23534ae00527a73a3b4
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
bugs1586715
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 1586715 - Making the test 'browser/components/originattributes/test/browser/browser_sharedworker.js' working in Fission. r=baku Depends on D49251 Differential Revision: https://phabricator.services.mozilla.com/D49252
browser/components/originattributes/test/browser/browser.ini
browser/components/originattributes/test/browser/browser_sharedworker.js
--- a/browser/components/originattributes/test/browser/browser.ini
+++ b/browser/components/originattributes/test/browser/browser.ini
@@ -81,17 +81,16 @@ skip-if = fission # Crashes: @ mozilla::
 skip-if = fission
 [browser_firstPartyIsolation_saveAs.js]
 skip-if = fission
 [browser_localStorageIsolation.js]
 [browser_blobURLIsolation.js]
 skip-if = (verify && debug && (os == 'win'))
 [browser_imageCacheIsolation.js]
 [browser_sharedworker.js]
-fail-if = fission
 [browser_httpauth.js]
 [browser_clientAuth.js]
 skip-if = verify
 [browser_cacheAPI.js]
 [browser_permissions.js]
 [browser_postMessage.js]
 [browser_sanitize.js]
 skip-if = (os == 'win') || (os == "mac" && os_version == "10.14") || (os == "linux" && bits == 64) #Bug 1544810
--- a/browser/components/originattributes/test/browser/browser_sharedworker.js
+++ b/browser/components/originattributes/test/browser/browser_sharedworker.js
@@ -3,23 +3,23 @@
  */
 
 const TEST_DOMAIN = "http://example.net/";
 const TEST_PATH =
   TEST_DOMAIN + "browser/browser/components/originattributes/test/browser/";
 const TEST_PAGE = TEST_PATH + "file_sharedworker.html";
 
 async function getResultFromSharedworker(aBrowser) {
-  let response = await ContentTask.spawn(aBrowser, null, async function() {
+  let response = await SpecialPowers.spawn(aBrowser, [], async function() {
     let worker = new content.SharedWorker(
       "file_sharedworker.js",
       "isolationSharedWorkerTest"
     );
 
-    let result = await new Promise(resolve => {
+    let result = await new content.Promise(resolve => {
       worker.port.onmessage = function(e) {
         // eslint-disable-next-line no-unsanitized/property
         content.document.getElementById("display").innerHTML = e.data;
         resolve(e.data);
       };
     });
 
     return result;