Bug 1527922 - Remove DevTools button in browser_toolbarKeyNav.js to prevent branch-specific focus in toolbar r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D22876

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Sebastian Hengst 2019-03-11 13:01:06 +00:00
Родитель a7f9d31d4c
Коммит 613c6b9e17
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -11,6 +11,10 @@
const PERMISSIONS_PAGE = "https://example.com/browser/browser/base/content/test/permissions/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");
async function expectFocusAfterKey(aKey, aFocus, aAncestorOk = false) {
let res = aKey.match(/^(Shift\+)?(?:(.)|(.+))$/);
let shift = Boolean(res[1]);
@ -230,3 +234,7 @@ add_task(async function testArrowsOverflowButton() {
await expectFocusAfterKey("ArrowLeft", "sidebar-button");
});
});
registerCleanupFunction(async function resetToolbar() {
await CustomizableUI.reset();
});