Bug 1536073 - Remove DevTools button in browser_identityBlock_focus.js to prevent branch-specific focus in toolbar r=Gijs a=test-only l10n=a=same-version-merge DEVEDITION_67_0b3_BUILD1 DEVEDITION_67_0b3_RELEASE FENNEC_67_0b3_BUILD1 FENNEC_67_0b3_RELEASE FIREFOX_67_0b3_BUILD1 FIREFOX_67_0b3_RELEASE
authorSebastian Hengst <archaeopteryx@coole-files.de>
Mon, 18 Mar 2019 14:37:04 +0000
changeset 525626 018abdd16060b7849be760b348242a12ec8cf4dd
parent 525625 cb4eac8d65949e75804cfc6f373a844961c6ec31
child 525627 28bf1f25205bed03123db25e8c82e317bcfc5692
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs, test-only
bugs1536073
milestone67.0
Bug 1536073 - Remove DevTools button in browser_identityBlock_focus.js to prevent branch-specific focus in toolbar r=Gijs a=test-only l10n=a=same-version-merge Differential Revision: https://phabricator.services.mozilla.com/D23858
browser/base/content/test/siteIdentity/browser_identityBlock_focus.js
--- a/browser/base/content/test/siteIdentity/browser_identityBlock_focus.js
+++ b/browser/base/content/test/siteIdentity/browser_identityBlock_focus.js
@@ -1,15 +1,23 @@
 /* Tests that the identity block can be reached via keyboard
  * shortcuts and that it has the correct tab order.
  */
 
 const TEST_PATH = getRootDirectory(gTestPath).replace("chrome://mochitests/content", "https://example.com");
 const PERMISSIONS_PAGE = TEST_PATH + "permissions.html";
 
+// The DevEdition has the DevTools button in the toolbar by default. Remove it
+// to prevent branch-specific rules what button should be focused.
+CustomizableUI.removeWidgetFromArea("developer-button");
+
+registerCleanupFunction(async function resetToolbar() {
+  await CustomizableUI.reset();
+});
+
 function synthesizeKeyAndWaitForFocus(element, keyCode, options) {
   let focused = BrowserTestUtils.waitForEvent(element, "focus");
   EventUtils.synthesizeKey(keyCode, options);
   return focused;
 }
 
 // Checks that the identity block is the next element after the urlbar
 // to be focused if there are no active notification anchors.