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
This commit is contained in:
Sebastian Hengst 2019-03-18 14:37:04 +00:00
parent b33de7cfb1
commit 2a4d267a85

View File

@ -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);