Bug 1386724 - Force devtools-browser to be loaded in shared-head.js;r=jdescottes
authorBrian Grinstead <bgrinstead@mozilla.com>
Wed, 02 Aug 2017 10:08:16 -0700
changeset 421977 26ce8836a4c88c94c68db5f42bb6d914980a1427
parent 421976 0e4a8e3983e42b0ef9fb2be2d825582f512026c9
child 421978 ea862a5c0067abe1767a0676de9a39d0d11ae8b6
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes
bugs1386724, 1359855
milestone56.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 1386724 - Force devtools-browser to be loaded in shared-head.js;r=jdescottes If a devtools entry point isn't hit in a test (toolbox open, keyboard shortcut, opening the web dev menu, etc), then things like the menu items aren't installed. This is for performance reasons (Bug 1359855), but it means that some tests may fail when run alone. Prevent that from happening by forcing devtools to start up in shared-head.js. This causes certain tests to fail when run alone if they don't open the tools MozReview-Commit-ID: ANuUhYXIbSF
devtools/client/framework/test/shared-head.js
--- a/devtools/client/framework/test/shared-head.js
+++ b/devtools/client/framework/test/shared-head.js
@@ -53,16 +53,19 @@ const KeyShortcuts = require("devtools/c
 
 const TEST_DIR = gTestPath.substr(0, gTestPath.lastIndexOf("/"));
 const CHROME_URL_ROOT = TEST_DIR + "/";
 const URL_ROOT = CHROME_URL_ROOT.replace("chrome://mochitests/content/",
                                          "http://example.com/");
 const URL_ROOT_SSL = CHROME_URL_ROOT.replace("chrome://mochitests/content/",
                                              "https://example.com/");
 
+// Force devtools to be initialized so menu items and keyboard shortcuts get installed
+require("devtools/client/framework/devtools-browser");
+
 // All test are asynchronous
 waitForExplicitFinish();
 
 var EXPECTED_DTU_ASSERT_FAILURE_COUNT = 0;
 
 registerCleanupFunction(function () {
   if (DevToolsUtils.assertionFailureCount !==
       EXPECTED_DTU_ASSERT_FAILURE_COUNT) {