Bug 1535337 - Part 3: Don't set prefs inside browser_blockingServiceWorkers.js from the content process and just pass them through extraPrefs; r=baku
authorEhsan Akhgari <ehsan@mozilla.com>
Sat, 16 Mar 2019 02:42:42 +0000
changeset 464476 3c2169f7665e
parent 464475 81d4d461ab15
child 464477 2717903072b6
push id35716
push useraciure@mozilla.com
push dateSun, 17 Mar 2019 09:42:17 +0000
treeherdermozilla-central@8ee97c045359 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1535337
milestone67.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 1535337 - Part 3: Don't set prefs inside browser_blockingServiceWorkers.js from the content process and just pass them through extraPrefs; r=baku Depends on D23509 Differential Revision: https://phabricator.services.mozilla.com/D23510
toolkit/components/antitracking/test/browser/browser_blockingServiceWorkers.js
--- a/toolkit/components/antitracking/test/browser/browser_blockingServiceWorkers.js
+++ b/toolkit/components/antitracking/test/browser/browser_blockingServiceWorkers.js
@@ -15,23 +15,16 @@ AntiTracking.runTest("ServiceWorkers",
   },
   [["dom.serviceWorkers.exemptFromPerDomainMax", true],
    ["dom.ipc.processCount", 1],
    ["dom.serviceWorkers.enabled", true],
    ["dom.serviceWorkers.testing.enabled", true]]);
 
 AntiTracking.runTest("ServiceWorkers and Storage Access API",
   async _ => {
-    await SpecialPowers.pushPrefEnv({"set": [
-       ["dom.serviceWorkers.exemptFromPerDomainMax", true],
-       ["dom.ipc.processCount", 1],
-       ["dom.serviceWorkers.enabled", true],
-       ["dom.serviceWorkers.testing.enabled", true],
-    ]});
-
     /* import-globals-from storageAccessAPIHelpers.js */
     await noStorageAccessInitially();
 
     await navigator.serviceWorker.register("empty.js").then(
       _ => { ok(false, "ServiceWorker cannot be used!"); },
       _ => { ok(true, "ServiceWorker cannot be used!"); }).
       catch(e => ok(false, "Promise rejected: " + e));
 
@@ -48,23 +41,16 @@ AntiTracking.runTest("ServiceWorkers and
         reg => { ok(true, "ServiceWorker can be used!"); return reg; },
         _ => { ok(false, "ServiceWorker cannot be used! " + _); }).then(
         reg => reg.unregister(),
         _ => { ok(false, "unregister failed"); }).
         catch(e => ok(false, "Promise rejected: " + e));
     }
   },
   async _ => {
-    await SpecialPowers.pushPrefEnv({"set": [
-       ["dom.serviceWorkers.exemptFromPerDomainMax", true],
-       ["dom.ipc.processCount", 1],
-       ["dom.serviceWorkers.enabled", true],
-       ["dom.serviceWorkers.testing.enabled", true],
-    ]});
-
     /* import-globals-from storageAccessAPIHelpers.js */
     if (allowListed) {
       await hasStorageAccessInitially();
     } else {
       await noStorageAccessInitially();
     }
 
     await navigator.serviceWorker.register("empty.js").then(