Bug 1442067 - Revert 1428108 set browser.newtabpage.activity-stream.debug by default in local builds. r=Mardak
authorAndrei Oprea <andrei.br92@gmail.com>
Fri, 20 Apr 2018 12:08:46 +0200
changeset 468909 804f8b73b13a0bcf3432df7a7eb692759a292d15
parent 468908 ea15ffd7e5e84f409827184173fae6f6abda1add
child 468910 de7eb5f97eced4c71a8dc6a9077db34b82e7f7c3
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMardak
bugs1442067, 1428108
milestone61.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 1442067 - Revert 1428108 set browser.newtabpage.activity-stream.debug by default in local builds. r=Mardak This reverts commit e997d3b39179176d04e9745e697712204655c507. MozReview-Commit-ID: HS40TQryCjg
browser/app/profile/firefox.js
browser/components/newtab/tests/xpcshell/test_AboutNewTabService.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1268,21 +1268,17 @@ pref("prompts.tab_modal.enabled", true);
 pref("browser.newtab.preload", true);
 
 // Indicates if about:newtab shows content (enabled) or just blank
 pref("browser.newtabpage.enabled", true);
 
 // Activity Stream prefs that control to which page to redirect
 pref("browser.newtabpage.activity-stream.prerender", true);
 #ifndef RELEASE_OR_BETA
-#ifdef MOZILLA_OFFICIAL
 pref("browser.newtabpage.activity-stream.debug", false);
-#else
-pref("browser.newtabpage.activity-stream.debug", true);
-#endif
 #endif
 
 pref("browser.library.activity-stream.enabled", true);
 
 // Enable the DOM fullscreen API.
 pref("full-screen-api.enabled", true);
 
 // Startup Crash Tracking
--- a/browser/components/newtab/tests/xpcshell/test_AboutNewTabService.js
+++ b/browser/components/newtab/tests/xpcshell/test_AboutNewTabService.js
@@ -8,17 +8,16 @@ ChromeUtils.import("resource://gre/modul
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 XPCOMUtils.defineLazyServiceGetter(this, "aboutNewTabService",
                                    "@mozilla.org/browser/aboutnewtab-service;1",
                                    "nsIAboutNewTabService");
 
 const IS_RELEASE_OR_BETA = AppConstants.RELEASE_OR_BETA;
-const MOZILLA_OFFICIAL = AppConstants.MOZILLA_OFFICIAL;
 
 const ACTIVITY_STREAM_PRERENDER_URL = "resource://activity-stream/prerendered/en-US/activity-stream-prerendered.html";
 const ACTIVITY_STREAM_PRERENDER_DEBUG_URL = "resource://activity-stream/prerendered/static/activity-stream-prerendered-debug.html";
 const ACTIVITY_STREAM_URL = "resource://activity-stream/prerendered/en-US/activity-stream.html";
 const ACTIVITY_STREAM_DEBUG_URL = "resource://activity-stream/prerendered/static/activity-stream-debug.html";
 
 const DOWNLOADS_URL = "chrome://browser/content/downloads/contentAreaDownloadsView.xul";
 const ACTIVITY_STREAM_PRERENDER_PREF = "browser.newtabpage.activity-stream.prerender";
@@ -130,26 +129,16 @@ add_task(async function test_default_url
   cleanup();
 });
 
 add_task(function test_locale() {
   Assert.equal(aboutNewTabService.activityStreamLocale, "en-US",
     "The locale for testing should be en-US");
 });
 
-add_task(async function test_debug_mode() {
-  if (!IS_RELEASE_OR_BETA && !MOZILLA_OFFICIAL) { // Check if local build
-    Assert.equal(aboutNewTabService.activityStreamDebug, true,
-      "Debug mode is set for builds that are not official");
-  } else {
-    Assert.equal(aboutNewTabService.activityStreamDebug, false,
-      "Debug mode is not set for any other builds");
-  }
-});
-
 /**
  * Tests reponse to updates to prefs
  */
 add_task(async function test_updates() {
   /*
    * Simulates a "cold-boot" situation, with some pref already set before testing a series
    * of changes.
    */
@@ -201,19 +190,16 @@ function setBoolPrefAndWaitForChange(pre
     }, "newtab-url-changed");
 
     Services.prefs.setBoolPref(pref, value);
   });
 }
 
 
 function setupASPrerendered() {
-  // Don't run in debug mode regardless of build type
-  Services.prefs.setBoolPref(ACTIVITY_STREAM_DEBUG_PREF, false);
-
   if (Services.prefs.getBoolPref(ACTIVITY_STREAM_PRERENDER_PREF)) {
     return Promise.resolve();
   }
 
   let notificationPromise = nextChangeNotificationPromise("about:newtab");
   Services.prefs.setBoolPref(ACTIVITY_STREAM_PRERENDER_PREF, true);
   return notificationPromise;
 }