mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1716630 - Test for developer tools on app menu when developer tools are disabled is set. r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D117933
This commit is contained in:
parent
5249683cb0
commit
04dd2f4733
@ -50,6 +50,22 @@ add_task(async function test_updates_post_policy() {
|
||||
"The Web Developer item of the hamburger menu should not be available."
|
||||
);
|
||||
|
||||
let menuButton = document.getElementById("PanelUI-menu-button");
|
||||
menuButton.click();
|
||||
await BrowserTestUtils.waitForEvent(window.PanelUI.mainView, "ViewShown");
|
||||
let moreToolsButtonId = "appMenu-more-button2";
|
||||
document.getElementById(moreToolsButtonId).click();
|
||||
await BrowserTestUtils.waitForEvent(
|
||||
document.getElementById("appmenu-moreTools"),
|
||||
"ViewShown"
|
||||
);
|
||||
is(
|
||||
document.getElementById("appmenu-developer-tools-view").children.length,
|
||||
2,
|
||||
"The developer tools are properly populated"
|
||||
);
|
||||
window.PanelUI.hide();
|
||||
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
});
|
||||
|
||||
|
@ -620,7 +620,9 @@ var gDevToolsBrowser = (exports.gDevToolsBrowser = {
|
||||
const menu = win.document.getElementById("menu_devToolbox");
|
||||
|
||||
// Hide the "Toggle Tools" menu item if we are on about:devtools-toolbox.
|
||||
menu.hidden = gDevToolsBrowser._isAboutDevtoolsToolbox(win);
|
||||
menu.hidden =
|
||||
gDevToolsBrowser._isAboutDevtoolsToolbox(win) ||
|
||||
Services.prefs.getBoolPref("devtools.policy.disabled", false);
|
||||
|
||||
// Add a checkmark for the "Toggle Tools" menu item if a toolbox is already opened.
|
||||
const hasToolbox = gDevToolsBrowser.hasToolboxOpened(win);
|
||||
|
Loading…
Reference in New Issue
Block a user