Bug 1366755 - devtools.panels.create should set invertIconForLightTheme to false by default. r=aswan
authorLuca Greco <lgreco@mozilla.com>
Wed, 07 Jun 2017 16:34:56 +0200
changeset 411154 62c0be1d862980516240e8e186cbab34597ebfbf
parent 411153 8344aaa080f46d8898a77d475503d8652a527daf
child 411155 eaef7cd5e2884314fb81c70d1b9576772a38e415
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaswan
bugs1366755
milestone55.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 1366755 - devtools.panels.create should set invertIconForLightTheme to false by default. r=aswan MozReview-Commit-ID: 1bn3cMngoql
browser/components/extensions/ext-devtools-panels.js
browser/components/extensions/test/browser/browser_ext_devtools_panel.js
--- a/browser/components/extensions/ext-devtools-panels.js
+++ b/browser/components/extensions/ext-devtools-panels.js
@@ -77,17 +77,17 @@ class ParentDevToolsPanel {
     const extensionName = this.context.extension.name;
 
     this.toolbox.addAdditionalTool({
       id: this.id,
       url: "about:blank",
       icon: icon,
       label: title,
       tooltip: `DevTools Panel added by "${extensionName}" add-on.`,
-      invertIconForLightTheme: true,
+      invertIconForLightTheme: false,
       visibilityswitch:  `devtools.webext-${this.id}.enabled`,
       isTargetSupported: target => target.isLocalTab,
       build: (window, toolbox) => {
         if (toolbox !== this.toolbox) {
           throw new Error("Unexpected toolbox received on addAdditionalTool build property");
         }
 
         const destroy = this.buildPanel(window, toolbox);
--- a/browser/components/extensions/test/browser/browser_ext_devtools_panel.js
+++ b/browser/components/extensions/test/browser/browser_ext_devtools_panel.js
@@ -207,17 +207,21 @@ add_task(async function test_devtools_pa
 
   const toolboxAdditionalTools = toolbox.getAdditionalTools();
 
   is(toolboxAdditionalTools.length, 1,
      "Got the expected number of toolbox specific panel registered.");
 
   await testThemeSwitching(extension);
 
-  const panelId = toolboxAdditionalTools[0].id;
+  const panelDef = toolboxAdditionalTools[0];
+  const panelId = panelDef.id;
+
+  is(panelDef.invertIconForLightTheme, false,
+     "devtools.panel.create set invertIconForLightTheme to false by default");
 
   await gDevTools.showToolbox(target, panelId);
   const {devtoolsPageTabId} = await extension.awaitMessage("devtools_panel_shown");
   const devtoolsPanelTabId = await extension.awaitMessage("devtools_panel_inspectedWindow_tabId");
   is(devtoolsPanelTabId, devtoolsPageTabId,
      "Got the same devtools.inspectedWindow.tabId from devtools page and panel");
   is(await extension.awaitMessage("initial_theme_panel"),
     "light",