Bug 1296498 - Enable new RDM UI for Nightly. r=ntim
authorJ. Ryan Stinnett <jryans@gmail.com>
Mon, 26 Sep 2016 15:19:15 -0500
changeset 315746 e943b4729dceec311c041aa0ccecac3a7cdaeac7
parent 315607 b67dc49095dcdb6f806cff7c303496e0d7e3efa4
child 315747 f6c5daab390c0772cd67dc624359e50ba539c6b4
push id20634
push usercbook@mozilla.com
push dateFri, 30 Sep 2016 10:10:13 +0000
treeherderfx-team@afe79b010d13 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersntim
bugs1296498
milestone52.0a1
Bug 1296498 - Enable new RDM UI for Nightly. r=ntim MozReview-Commit-ID: Iiu9tf4o9Df
devtools/client/preferences/devtools.js
devtools/client/responsivedesign/responsivedesign.jsm
devtools/client/responsivedesign/test/head.js
--- a/devtools/client/preferences/devtools.js
+++ b/devtools/client/preferences/devtools.js
@@ -345,11 +345,15 @@ pref("devtools.telemetry.tools.opened.ve
 // Enable the JSON View tool (an inspector for application/json documents) on
 // Nightly and Dev. Edition.
 #ifdef RELEASE_BUILD
 pref("devtools.jsonview.enabled", false);
 #else
 pref("devtools.jsonview.enabled", true);
 #endif
 
-// Disable the HTML responsive design tool by default.  Currently disabled until
-// ready to replace the legacy XUL version.
+// Enable the HTML responsive design tool in Nightly only.  Disabled by default for all
+// other channels.
+#ifdef NIGHTLY_BUILD
+pref("devtools.responsive.html.enabled", true);
+#else
 pref("devtools.responsive.html.enabled", false);
+#endif
--- a/devtools/client/responsivedesign/responsivedesign.jsm
+++ b/devtools/client/responsivedesign/responsivedesign.jsm
@@ -126,20 +126,22 @@ var Manager = {
         this.toggle(aWindow, aTab);
       default:
     }
   })
 };
 
 EventEmitter.decorate(Manager);
 
-// If the experimental HTML UI is enabled, delegate the ResponsiveUIManager API
-// over to that tool instead.  Performing this delegation here allows us to
-// contain the pref check to a single place.
-if (Services.prefs.getBoolPref("devtools.responsive.html.enabled")) {
+// If the new HTML RDM UI is enabled and e10s is enabled by default (e10s is required for
+// the new HTML RDM UI to function), delegate the ResponsiveUIManager API over to that
+// tool instead.  Performing this delegation here allows us to contain the pref check to a
+// single place.
+if (Services.prefs.getBoolPref("devtools.responsive.html.enabled") &&
+    Services.appinfo.browserTabsRemoteAutostart) {
   let { ResponsiveUIManager } =
     require("devtools/client/responsive.html/manager");
   this.ResponsiveUIManager = ResponsiveUIManager;
 } else {
   this.ResponsiveUIManager = Manager;
 }
 
 var defaultPresets = [
--- a/devtools/client/responsivedesign/test/head.js
+++ b/devtools/client/responsivedesign/test/head.js
@@ -8,18 +8,21 @@ let testDir = gTestPath.substr(0, gTestP
 let sharedHeadURI = testDir + "../../../framework/test/shared-head.js";
 Services.scriptloader.loadSubScript(sharedHeadURI, this);
 
 // Import the GCLI test helper
 let gcliHelpersURI = testDir + "../../../commandline/test/helpers.js";
 Services.scriptloader.loadSubScript(gcliHelpersURI, this);
 
 flags.testing = true;
+Services.prefs.setBoolPref("devtools.responsive.html.enabled", false);
+
 registerCleanupFunction(() => {
   flags.testing = false;
+  Services.prefs.clearUserPref("devtools.responsive.html.enabled");
   Services.prefs.clearUserPref("devtools.responsiveUI.currentPreset");
   Services.prefs.clearUserPref("devtools.responsiveUI.customHeight");
   Services.prefs.clearUserPref("devtools.responsiveUI.customWidth");
   Services.prefs.clearUserPref("devtools.responsiveUI.presets");
   Services.prefs.clearUserPref("devtools.responsiveUI.rotate");
 });
 
 SimpleTest.requestCompleteLog();