Backed out 4 changesets (bug 1309699) for failures in browser_thumbnails_bg_no_cookies_stored.js
authorPhil Ringnalda <philringnalda@gmail.com>
Thu, 13 Oct 2016 18:53:29 -0700
changeset 350691 688d16cc31ada89128bcf1ee0fd81391757f46ac
parent 350690 6efc0964ec62bc4abfdc4cb1dc7cc461c3238634
child 350692 c216304c306bda09e8b8766f692885fa378ddb3c
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1309699
milestone50.0
backs out6efc0964ec62bc4abfdc4cb1dc7cc461c3238634
a072309812bd8e2f72f963f70090d424e3fe2bca
2a05cc73a28ad6b6ce4e4f87b83a9cc3c0a94396
b4314d810229e959aad4afc84e61b2d5ae21bc74
Backed out 4 changesets (bug 1309699) for failures in browser_thumbnails_bg_no_cookies_stored.js Backed out changeset 6efc0964ec62 (bug 1309699) Backed out changeset a072309812bd (bug 1309699) Backed out changeset 2a05cc73a28a (bug 1309699) Backed out changeset b4314d810229 (bug 1309699)
browser/app/profile/firefox.js
toolkit/components/thumbnails/BackgroundPageThumbs.jsm
toolkit/components/thumbnails/test/browser_thumbnails_bg_no_cookies_stored.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1386,21 +1386,19 @@ pref("privacy.trackingprotection.ui.enab
 #endif
 pref("privacy.trackingprotection.introCount", 0);
 pref("privacy.trackingprotection.introURL", "https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/tracking-protection/start/");
 
 // Enable Contextual Identity Containers
 #ifdef NIGHTLY_BUILD
 pref("privacy.userContext.enabled", true);
 pref("privacy.userContext.ui.enabled", true);
-pref("privacy.usercontext.about_newtab_segregation.enabled", true);
 #else
 pref("privacy.userContext.enabled", false);
 pref("privacy.userContext.ui.enabled", false);
-pref("privacy.usercontext.about_newtab_segregation.enabled", false);
 #endif
 
 #ifndef RELEASE_BUILD
 // At the moment, autostart.2 is used, while autostart.1 is unused.
 // We leave it here set to false to reset users' defaults and allow
 // us to change everybody to true in the future, when desired.
 pref("browser.tabs.remote.autostart.1", false);
 pref("browser.tabs.remote.autostart.2", true);
--- a/toolkit/components/thumbnails/BackgroundPageThumbs.jsm
+++ b/toolkit/components/thumbnails/BackgroundPageThumbs.jsm
@@ -10,18 +10,16 @@ const DEFAULT_CAPTURE_TIMEOUT = 30000; /
 const DESTROY_BROWSER_TIMEOUT = 60000; // ms
 const FRAME_SCRIPT_URL = "chrome://global/content/backgroundPageThumbsContent.js";
 
 const TELEMETRY_HISTOGRAM_ID_PREFIX = "FX_THUMBNAILS_BG_";
 
 const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
 const HTML_NS = "http://www.w3.org/1999/xhtml";
 
-const ABOUT_NEWTAB_SEGREGATION_PREF = "privacy.usercontext.about_newtab_segregation.enabled";
-
 const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
 Cu.import("resource://gre/modules/PageThumbs.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/Task.jsm");
 
 // possible FX_THUMBNAILS_BG_CAPTURE_DONE_REASON_2 telemetry values
@@ -193,22 +191,20 @@ const BackgroundPageThumbs = {
     if (this._thumbBrowser)
       return;
 
     let browser = this._parentWin.document.createElementNS(XUL_NS, "browser");
     browser.setAttribute("type", "content");
     browser.setAttribute("remote", "true");
     browser.setAttribute("disableglobalhistory", "true");
 
-    if (Services.prefs.getBoolPref(ABOUT_NEWTAB_SEGREGATION_PREF)) {
-      // Use the private container for thumbnails.
-      let privateIdentity =
-        ContextualIdentityService.getPrivateIdentity("userContextIdInternal.thumbnail");
-      browser.setAttribute("usercontextid", privateIdentity.userContextId);
-    }
+    // Use the private container for thumbnails.
+    let privateIdentity =
+      ContextualIdentityService.getPrivateIdentity("userContextIdInternal.thumbnail");
+    browser.setAttribute("usercontextid", privateIdentity.userContextId);
 
     // Size the browser.  Make its aspect ratio the same as the canvases' that
     // the thumbnails are drawn into; the canvases' aspect ratio is the same as
     // the screen's, so use that.  Aim for a size in the ballpark of 1024x768.
     let [swidth, sheight] = [{}, {}];
     Cc["@mozilla.org/gfx/screenmanager;1"].
       getService(Ci.nsIScreenManager).
       primaryScreen.
@@ -426,23 +422,21 @@ Capture.prototype = {
         try {
           callback.call(options, this.url);
         }
         catch (err) {
           Cu.reportError(err);
         }
       }
 
-      if (Services.prefs.getBoolPref(ABOUT_NEWTAB_SEGREGATION_PREF)) {
-        // Clear the data in the private container for thumbnails.
-        let privateIdentity =
-          ContextualIdentityService.getPrivateIdentity("userContextIdInternal.thumbnail");
-        Services.obs.notifyObservers(null, "clear-origin-data",
+      // Clear the data in the private container for thumbnails.
+      let privateIdentity =
+        ContextualIdentityService.getPrivateIdentity("userContextIdInternal.thumbnail");
+      Services.obs.notifyObservers(null, "clear-origin-data",
           JSON.stringify({ userContextId: privateIdentity.userContextId }));
-      }
     };
 
     if (!data) {
       done();
       return;
     }
 
     PageThumbs._store(this.url, data.finalURL, data.imageData, true)
--- a/toolkit/components/thumbnails/test/browser_thumbnails_bg_no_cookies_stored.js
+++ b/toolkit/components/thumbnails/test/browser_thumbnails_bg_no_cookies_stored.js
@@ -1,18 +1,14 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // check that if a page captured in the background attempts to set a cookie,
 // that cookie is not saved for subsequent requests.
 function* runTests() {
-  yield SpecialPowers.pushPrefEnv({
-    set: [["privacy.usercontext.about_newtab_segregation.enabled", true]]
-  });
-
   let url = bgTestPageURL({
     setRedCookie: true,
     iframe: bgTestPageURL({ setRedCookie: true}),
     xhr: bgTestPageURL({ setRedCookie: true})
   });
   ok(!thumbnailExists(url), "Thumbnail file should not exist before capture.");
   yield bgCapture(url);
   ok(thumbnailExists(url), "Thumbnail file should exist after capture.");