Back out 023218047be5 (bug 1175606) for depending on the backed out bug 1192416
authorPhil Ringnalda <philringnalda@gmail.com>
Fri, 07 Aug 2015 22:06:51 -0700
changeset 288594 c56e7866445c15389b4a54c805b252345f22ced3
parent 288593 7bbb28b68b0dbd8d067ed71c8c4017cd50b5dbaa
child 288595 222f1e42ebd97748645b81c8bd1f8bcd2af7210b
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1175606, 1192416
milestone42.0a1
backs out023218047be543bafd11bed9c14c4f65ddb28d9c
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
Back out 023218047be5 (bug 1175606) for depending on the backed out bug 1192416
browser/components/privatebrowsing/content/aboutPrivateBrowsing.js
browser/components/privatebrowsing/test/browser/browser.ini
browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about.js
modules/libpref/init/all.js
--- a/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js
+++ b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js
@@ -55,16 +55,28 @@ document.addEventListener("DOMContentLoa
                         .getService(Ci.nsIURLFormatter).formatURLPref;
   document.getElementById("startTour").setAttribute("href",
                      formatURLPref("privacy.trackingprotection.introURL"));
   document.getElementById("learnMore").setAttribute("href",
                      formatURLPref("app.support.baseURL") + "private-browsing");
 
   // Update state that depends on preferences.
   prefObserver.observe();
+
+  // This check can be removed when Tracking Protection is always available.
+  let tpUIEnabled = false;
+  try {
+    tpUIEnabled = Services.prefs.getBoolPref("privacy.trackingprotection.ui.enabled");
+  } catch (ex) {
+    // The preference is not available.
+  }
+  if (!tpUIEnabled) {
+    document.getElementById("trackingProtectionSection")
+            .setAttribute("hidden", "true");
+  }
 }, false);
 
 function openPrivateWindow() {
   // Ask chrome to open a private window
   document.dispatchEvent(
     new CustomEvent("AboutPrivateBrowsingOpenWindow", {bubbles:true}));
 }
 
--- a/browser/components/privatebrowsing/test/browser/browser.ini
+++ b/browser/components/privatebrowsing/test/browser/browser.ini
@@ -12,17 +12,16 @@ support-files =
   browser_privatebrowsing_protocolhandler_page.html
   browser_privatebrowsing_windowtitle_page.html
   head.js
   popup.html
   title.sjs
 
 [browser_privatebrowsing_DownloadLastDirWithCPS.js]
 [browser_privatebrowsing_about.js]
-tags = trackingprotection
 [browser_privatebrowsing_aboutHomeButtonAfterWindowClose.js]
 [browser_privatebrowsing_aboutSessionRestore.js]
 [browser_privatebrowsing_cache.js]
 [browser_privatebrowsing_certexceptionsui.js]
 [browser_privatebrowsing_concurrent.js]
 [browser_privatebrowsing_cookieacceptdialog.js]
 [browser_privatebrowsing_crh.js]
 [browser_privatebrowsing_downloadLastDir.js]
--- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about.js
+++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about.js
@@ -41,22 +41,24 @@ function* testLinkOpensUrl({ win, tab, e
      `Clicking ${elementId} opened ${expectedUrl} in the same tab.`);
 }
 
 /**
  * Tests the links in "about:privatebrowsing".
  */
 add_task(function* test_links() {
   // Use full version and change the remote URLs to prevent network access.
+  Services.prefs.setBoolPref("privacy.trackingprotection.ui.enabled", true);
   Services.prefs.setCharPref("app.support.baseURL", "https://example.com/");
   Services.prefs.setCharPref("privacy.trackingprotection.introURL",
                              "https://example.com/tour");
   registerCleanupFunction(function () {
     Services.prefs.clearUserPref("privacy.trackingprotection.introURL");
     Services.prefs.clearUserPref("app.support.baseURL");
+    Services.prefs.clearUserPref("privacy.trackingprotection.ui.enabled");
   });
 
   let { win, tab } = yield openAboutPrivateBrowsing();
 
   yield testLinkOpensTab({ win, tab,
     elementId: "learnMore",
     expectedUrl: "https://example.com/private-browsing",
   });
@@ -70,20 +72,22 @@ add_task(function* test_links() {
 });
 
 /**
  * Tests the action to disable and re-enable Tracking Protection in
  * "about:privatebrowsing".
  */
 add_task(function* test_toggleTrackingProtection() {
   // Use tour version but disable Tracking Protection.
+  Services.prefs.setBoolPref("privacy.trackingprotection.ui.enabled", true);
   Services.prefs.setBoolPref("privacy.trackingprotection.pbmode.enabled",
                              true);
   registerCleanupFunction(function () {
     Services.prefs.clearUserPref("privacy.trackingprotection.pbmode.enabled");
+    Services.prefs.clearUserPref("privacy.trackingprotection.ui.enabled");
   });
 
   let { win, tab } = yield openAboutPrivateBrowsing();
 
   // Set up the observer for the preference change before triggering the action.
   let prefBranch =
       Services.prefs.getBranch("privacy.trackingprotection.pbmode.");
   let waitForPrefChanged = () => new Promise(resolve => {
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -1082,17 +1082,17 @@ pref("content.sink.pending_event_mode", 
 //   2 = openAbused
 pref("privacy.popups.disable_from_plugins", 2);
 
 // send "do not track" HTTP header, disabled by default
 pref("privacy.donottrackheader.enabled",    false);
 // Enforce tracking protection in all modes
 pref("privacy.trackingprotection.enabled",  false);
 // Enforce tracking protection in Private Browsing mode
-pref("privacy.trackingprotection.pbmode.enabled",  true);
+pref("privacy.trackingprotection.pbmode.enabled",  false);
 
 pref("dom.event.contextmenu.enabled",       true);
 pref("dom.event.clipboardevents.enabled",   true);
 #if defined(XP_WIN) && !defined(RELEASE_BUILD)
 pref("dom.event.highrestimestamp.enabled",  true);
 #else
 pref("dom.event.highrestimestamp.enabled",  false);
 #endif