From 2a4d267a858a2611017b6c768ac937b089b1b85d Mon Sep 17 00:00:00 2001 From: Sebastian Hengst Date: Mon, 18 Mar 2019 14:37:04 +0000 Subject: [PATCH] Bug 1536073 - Remove DevTools button in browser_identityBlock_focus.js to prevent branch-specific focus in toolbar r=Gijs Differential Revision: https://phabricator.services.mozilla.com/D23858 --HG-- extra : moz-landing-system : lando --- .../test/siteIdentity/browser_identityBlock_focus.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/browser/base/content/test/siteIdentity/browser_identityBlock_focus.js b/browser/base/content/test/siteIdentity/browser_identityBlock_focus.js index 233a08b3b6f3..f20140f3dce1 100644 --- a/browser/base/content/test/siteIdentity/browser_identityBlock_focus.js +++ b/browser/base/content/test/siteIdentity/browser_identityBlock_focus.js @@ -5,6 +5,14 @@ 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);