Bug 1414053 - Adds the boundary crossing callback to DevTools.jsm. r=mconley
authorgrenewode <grenewodemiller@gmail.com>
Thu, 02 Nov 2017 16:30:14 -0400
changeset 443608 13763ec9100053bc33afc138cb2bdabafbf299d9
parent 443607 43aea4af4a2005f96c4b4deb6b1dd5942b91c13a
child 443609 66212b8b4315fafb91f0178c39962a995114b7a7
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1414053, 1403686, 1412357
milestone58.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 1414053 - Adds the boundary crossing callback to DevTools.jsm. r=mconley Also, once this lands, it should clean up some of the failing tests on Bugs #1403686 and #1412357. MozReview-Commit-ID: 5rCjjlzuavq
browser/tools/mozscreenshots/mozscreenshots/extension/configurations/DevTools.jsm
--- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/DevTools.jsm
+++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/DevTools.jsm
@@ -16,48 +16,52 @@ let { devtools } = Cu.import("resource:/
 let TargetFactory = devtools.TargetFactory;
 
 function getTargetForSelectedTab() {
   let browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
   let target = TargetFactory.forTab(browserWindow.gBrowser.selectedTab);
   return target;
 }
 
+function selectToolbox() {
+  return gDevTools.getToolbox(getTargetForSelectedTab()).win.document.querySelector("#toolbox-container");
+}
+
 this.DevTools = {
   init(libDir) {
     let panels = ["options", "webconsole", "jsdebugger", "styleeditor",
                   "performance", "netmonitor"];
 
     panels.forEach(panel => {
       this.configurations[panel] = {};
-      this.configurations[panel].selectors = ["#toolbox-container"];
+      this.configurations[panel].selectors = [selectToolbox];
       this.configurations[panel].applyConfig = async function() {
         await gDevTools.showToolbox(getTargetForSelectedTab(), panel, "bottom");
         await new Promise(resolve => setTimeout(resolve, 500));
       };
     });
   },
 
   configurations: {
     bottomToolbox: {
-      selectors: ["#toolbox-container"],
+      selectors: [selectToolbox],
       async applyConfig() {
         await gDevTools.showToolbox(getTargetForSelectedTab(), "inspector", "bottom");
         await new Promise(resolve => setTimeout(resolve, 1000));
       },
     },
     sideToolbox: {
-      selectors: ["#toolbox-container"],
+      selectors: [selectToolbox],
       async applyConfig() {
         await gDevTools.showToolbox(getTargetForSelectedTab(), "inspector", "side");
         await new Promise(resolve => setTimeout(resolve, 500));
       },
     },
     undockedToolbox: {
-      selectors: ["#toolbox-container"],
+      selectors: [selectToolbox],
       windowType: "devtools:toolbox",
       async applyConfig() {
         await gDevTools.showToolbox(getTargetForSelectedTab(), "inspector", "window");
         await new Promise(resolve => setTimeout(resolve, 500));
       },
     }
   },
 };