Bug 1386724 - Force devtools-browser to be loaded in shared-head.js;r=jdescottes draft
authorBrian Grinstead <bgrinstead@mozilla.com>
Wed, 02 Aug 2017 10:08:16 -0700
changeset 619810 f8a20a7eabfdbbfe51ecaf2ea8c59a4fcf41e695
parent 619581 52285ea5e54c73d3ed824544cef2ee3f195f05e6
child 641010 e1f92e82a8fe550ddeca9891d2284a3ca48b1c68
push id71825
push userbgrinstead@mozilla.com
push dateWed, 02 Aug 2017 17:08:26 +0000
bugs1386724, 1359855
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
--- 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/",
 const URL_ROOT_SSL = CHROME_URL_ROOT.replace("chrome://mochitests/content/",
+// Force devtools to be initialized so menu items and keyboard shortcuts get installed
 // All test are asynchronous
 registerCleanupFunction(function () {
   if (DevToolsUtils.assertionFailureCount !==