Bug 1493682 - Part 2: Fix the image cache tests r=baku
☠☠ backed out by 79125b42f1be ☠ ☠
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 25 Sep 2018 05:40:14 +0000
changeset 492711 bf1fb942d5ccc1588a7053429c86e15d20ba930e
parent 492710 26775fc457272e9ad5320b70f590b8f96b6929af
child 492712 ed8bf630148784ce92932e138e8cff676794956d
push id1815
push userffxbld-merge
push dateMon, 15 Oct 2018 10:40:45 +0000
treeherdermozilla-release@18d4c09e9378 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1493682
milestone63.0
Bug 1493682 - Part 2: Fix the image cache tests r=baku The first line which this patch is fixing was clobbering the object that the tests were setting up, so all these tests were testing was the blocking callback of the default runTest() path before this patch. Depends on D6747 Differential Revision: https://phabricator.services.mozilla.com/D6748
toolkit/components/antitracking/test/browser/head.js
--- a/toolkit/components/antitracking/test/browser/head.js
+++ b/toolkit/components/antitracking/test/browser/head.js
@@ -40,17 +40,17 @@ this.AntiTracking = {
       runInPrivateWindow,
     });
     this._createCleanupTask(cleanupFunction);
 
     if (callbackNonTracking) {
       let runExtraTests = true;
       let options = {};
       if (typeof callbackNonTracking == "object") {
-        callbackNonTracking = callbackNonTracking.callback;
+        options.callback = callbackNonTracking.callback;
         runExtraTests = callbackNonTracking.runExtraTests;
         if ("cookieBehavior" in callbackNonTracking) {
           options.cookieBehavior = callbackNonTracking.cookieBehavior;
         } else {
           options.cookieBehavior = BEHAVIOR_ACCEPT;
         }
         if ("blockingByContentBlocking" in callbackNonTracking) {
           options.blockingByContentBlocking =
@@ -71,16 +71,17 @@ this.AntiTracking = {
           options.blockingByContentBlockingRTUI = false;
         }
         if ("blockingByAllowList" in callbackNonTracking) {
           options.blockingByAllowList =
             callbackNonTracking.blockingByAllowList;
         } else {
           options.blockingByAllowList = false;
         }
+        callbackNonTracking = options.callback;
       }
 
       // Phase 1: Here we want to test that a 3rd party context is not blocked if pref is off.
       if (runExtraTests) {
         // There are six ways in which the third-party context may not be blocked:
         //   * If the cookieBehavior pref causes it to not be blocked.
         //   * If the contentBlocking pref causes it to not be blocked.
         //   * If the contentBlocking UI pref causes it to not be blocked.