Bug 1586714 - Making the test 'browser/components/originattributes/test/browser/browser_sanitize.js' working in Fission. r=baku
authorTim Huang <tihuang@mozilla.com>
Tue, 15 Oct 2019 14:24:50 +0000
changeset 498335 f7440da54d66a2a29ba5333256274637ab039834
parent 498334 63396eab4b66da57b6c47582bbd5dbd785232d59
child 498336 0793db7c027025ed3f44e899f65fd26e676158d5
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
bugs1586714
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 1586714 - Making the test 'browser/components/originattributes/test/browser/browser_sanitize.js' working in Fission. r=baku Depends on D49250 Differential Revision: https://phabricator.services.mozilla.com/D49251
browser/components/originattributes/test/browser/browser.ini
browser/components/originattributes/test/browser/browser_sanitize.js
--- a/browser/components/originattributes/test/browser/browser.ini
+++ b/browser/components/originattributes/test/browser/browser.ini
@@ -89,12 +89,11 @@ skip-if = (verify && debug && (os == 'wi
 fail-if = fission
 [browser_httpauth.js]
 [browser_clientAuth.js]
 skip-if = verify
 [browser_cacheAPI.js]
 [browser_permissions.js]
 [browser_postMessage.js]
 [browser_sanitize.js]
-fail-if = fission
 skip-if = (os == 'win') || (os == "mac" && os_version == "10.14") || (os == "linux" && bits == 64) #Bug 1544810
 [browser_windowOpenerRestriction.js]
 fail-if = fission
--- a/browser/components/originattributes/test/browser/browser_sanitize.js
+++ b/browser/components/originattributes/test/browser/browser_sanitize.js
@@ -7,18 +7,18 @@ if (Services.prefs.getBoolPref("fission.
 }
 
 const CC = Components.Constructor;
 
 const TEST_DOMAIN = "http://example.net/";
 
 const { Sanitizer } = ChromeUtils.import("resource:///modules/Sanitizer.jsm");
 
-function setCookies(aBrowser) {
-  ContentTask.spawn(aBrowser, null, function() {
+async function setCookies(aBrowser) {
+  await SpecialPowers.spawn(aBrowser, [], function() {
     content.document.cookie = "key=value";
   });
 }
 
 function cacheDataForContext(loadContextInfo) {
   return new Promise(resolve => {
     let cachedURIs = [];
     let cacheVisitor = {
@@ -33,19 +33,19 @@ function cacheDataForContext(loadContext
     };
     // Visiting the disk cache also visits memory storage so we do not
     // need to use Services.cache2.memoryCacheStorage() here.
     let storage = Services.cache2.diskCacheStorage(loadContextInfo, false);
     storage.asyncVisitStorage(cacheVisitor, true);
   });
 }
 
-function checkCookiesSanitized(aBrowser) {
-  ContentTask.spawn(aBrowser, null, function() {
-    is(
+async function checkCookiesSanitized(aBrowser) {
+  await SpecialPowers.spawn(aBrowser, [], function() {
+    Assert.equal(
       content.document.cookie,
       "",
       "Cookies of all origin attributes should be cleared."
     );
   });
 }
 
 function checkCacheExists(aShouldExist) {