Bug 1300590 - Use DevToolsShim in the devtools.inspectedWindow.eval bindings tests. r=jdescottes,ochameau
authorLuca Greco <lgreco@mozilla.com>
Fri, 26 May 2017 17:09:45 +0200
changeset 362154 0403297b318b4a77d9b9b4eccc28e20249ac3d0b
parent 362153 99c6dd76dbc8eeff4f94df562e8f08a5fd30819f
child 362194 64c3afa3fabf81d5246676bccd559ff8db1be66e
push id44032
push userluca.greco@alcacoop.it
push dateSat, 03 Jun 2017 17:38:27 +0000
treeherderautoland@0403297b318b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes, ochameau
bugs1300590
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 1300590 - Use DevToolsShim in the devtools.inspectedWindow.eval bindings tests. r=jdescottes,ochameau MozReview-Commit-ID: 8IYjIfBp5mB
browser/components/extensions/test/browser/browser_ext_devtools_inspectedWindow_eval_bindings.js
--- a/browser/components/extensions/test/browser/browser_ext_devtools_inspectedWindow_eval_bindings.js
+++ b/browser/components/extensions/test/browser/browser_ext_devtools_inspectedWindow_eval_bindings.js
@@ -1,16 +1,14 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
-XPCOMUtils.defineLazyModuleGetter(this, "gDevTools",
-                                  "resource://devtools/client/framework/gDevTools.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "devtools",
-                                  "resource://devtools/shared/Loader.jsm");
+XPCOMUtils.defineLazyModuleGetter(this, "DevToolsShim",
+                                  "chrome://devtools-shim/content/DevToolsShim.jsm");
 
 /**
  * this test file ensures that:
  *
  * - devtools.inspectedWindow.eval provides the expected $0 and inspect bindings
  */
 add_task(async function test_devtools_inspectedWindow_eval_bindings() {
   const TEST_TARGET_URL = "http://mochi.test:8888/";
@@ -51,17 +49,19 @@ add_task(async function test_devtools_in
        </body>
       </html>`,
       "devtools_page.js": devtools_page,
     },
   });
 
   await extension.startup();
 
-  const target = devtools.TargetFactory.forTab(tab);
+  const {gDevTools} = DevToolsShim;
+
+  const target = gDevTools.getTargetForTab(tab);
   // Open the toolbox on the styleeditor, so that the inspector and the
   // console panel have not been explicitly activated yet.
   const toolbox = await gDevTools.showToolbox(target, "styleeditor");
   info("Developer toolbox opened");
 
   // Test $0 binding with no selected node
   info("Test inspectedWindow.eval $0 binding with no selected node");