Bug 1267293 - Turn the DOM panel off by default;r=bgrins,a=ritu
authorJan Odvarko <odvarko@gmail.com>
Mon, 25 Apr 2016 18:04:47 +0200
changeset 332626 6e453fe828bf9054b6db0307ffb034d3acceb9c9
parent 332625 91cd25848c032866d7cca41df8d074795b594ea7
child 332627 97a2906dfe598bd6a307f137cf3668858eb53422
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrins, ritu
bugs1267293
milestone48.0a2
Bug 1267293 - Turn the DOM panel off by default;r=bgrins,a=ritu MozReview-Commit-ID: DOYF2vTUEqq
devtools/client/debugger/test/mochitest/browser_dbg_addon-panels.js
devtools/client/dom/test/head.js
devtools/client/preferences/devtools.js
--- a/devtools/client/debugger/test/mochitest/browser_dbg_addon-panels.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_addon-panels.js
@@ -21,17 +21,17 @@ function test() {
     // Store and enable all optional dev tools panels
     yield pushPrefs(...PREFS);
 
     let addon = yield addAddon(ADDON_URL);
     let addonDebugger = yield initAddonDebugger(ADDON_URL);
 
     // Check only valid tabs are shown
     let tabs = addonDebugger.frame.contentDocument.getElementById("toolbox-tabs").children;
-    let expectedTabs = ["webconsole", "jsdebugger", "scratchpad", "dom"];
+    let expectedTabs = ["webconsole", "jsdebugger", "scratchpad"];
 
     is(tabs.length, expectedTabs.length, "displaying only " + expectedTabs.length + " tabs in addon debugger");
     Array.forEach(tabs, (tab, i) => {
       let toolName = expectedTabs[i];
       is(tab.getAttribute("toolid"), toolName, "displaying " + toolName);
     });
 
     // Check no toolbox buttons are shown
--- a/devtools/client/dom/test/head.js
+++ b/devtools/client/dom/test/head.js
@@ -12,21 +12,25 @@ const FRAME_SCRIPT_UTILS_URL =
 // shared-head.js handles imports, constants, and utility functions
 Services.scriptloader.loadSubScript(
   "chrome://mochitests/content/browser/devtools/client/framework/test/shared-head.js", this);
 
 // DOM panel actions.
 const constants = require("devtools/client/dom/content/constants");
 
 // Uncomment this pref to dump all devtools emitted events to the console.
-// Services.prefs.setBoolPref("devtools.dump.emit", true);
+// Services.prefs.setBoolPref("devtools.dom.enabled", true);
+
+// Enable the DOM panel
+Services.prefs.setBoolPref("devtools.dom.enabled", true);
 
 registerCleanupFunction(() => {
   info("finish() was called, cleaning up...");
   Services.prefs.clearUserPref("devtools.dump.emit");
+  Services.prefs.clearUserPref("devtools.dom.enabled");
 });
 
 /**
  * Add a new test tab in the browser and load the given url.
  * @param {String} url
  *        The url to be loaded in the new tab
  * @return a promise that resolves to the tab object when
  *        the url is loaded
--- a/devtools/client/preferences/devtools.js
+++ b/devtools/client/preferences/devtools.js
@@ -208,16 +208,19 @@ pref("devtools.shadereditor.enabled", fa
 pref("devtools.canvasdebugger.enabled", false);
 
 // Enable the Web Audio Editor
 pref("devtools.webaudioeditor.enabled", false);
 
 // Enable Scratchpad
 pref("devtools.scratchpad.enabled", false);
 
+// Make sure the DOM panel is hidden by default
+pref("devtools.dom.enabled", false);
+
 // Web Audio Editor Inspector Width should be a preference
 pref("devtools.webaudioeditor.inspectorWidth", 300);
 
 // Default theme ("dark" or "light")
 #ifdef MOZ_DEV_EDITION
 sticky_pref("devtools.theme", "dark");
 #else
 sticky_pref("devtools.theme", "light");