diff --git a/browser/base/content/test/general/browser_contextmenu.js b/browser/base/content/test/general/browser_contextmenu.js index 27cfe0ad43e2..cfa9cc983435 100644 --- a/browser/base/content/test/general/browser_contextmenu.js +++ b/browser/base/content/test/general/browser_contextmenu.js @@ -19,6 +19,12 @@ const chrome_base = "chrome://mochitests/content/browser/browser/base/content/te /* import-globals-from contextmenu_common.js */ Services.scriptloader.loadSubScript(chrome_base + "contextmenu_common.js", this); +add_task(async function init() { + // Ensure screenshots is really disabled (bug 1498738) + const addon = await AddonManager.getAddonByID("screenshots@mozilla.org"); + await addon.disable({allowSystemAddons: true}); +}); + // Below are test cases for XUL element add_task(async function test_xul_text_link_label() { let url = chrome_base + "subtst_contextmenu_xul.xul"; diff --git a/browser/base/content/test/general/browser_contextmenu_input.js b/browser/base/content/test/general/browser_contextmenu_input.js index 03dcd760fdfe..94f50805db04 100644 --- a/browser/base/content/test/general/browser_contextmenu_input.js +++ b/browser/base/content/test/general/browser_contextmenu_input.js @@ -12,6 +12,10 @@ add_task(async function test_setup() { const contextmenu_common = chrome_base + "contextmenu_common.js"; /* import-globals-from contextmenu_common.js */ Services.scriptloader.loadSubScript(contextmenu_common, this); + + // Ensure screenshots is really disabled (bug 1498738) + const addon = await AddonManager.getAddonByID("screenshots@mozilla.org"); + await addon.disable({allowSystemAddons: true}); }); add_task(async function test_text_input() { @@ -175,10 +179,6 @@ add_task(async function test_tel_email_url_number_input() { "context-delete", false, "---", null, "context-selectall", null], { - // XXX Bug 1345081. Currently the Screenshots menu option is shown for - // various text elements even though it is set to type "page". That bug - // should remove the need for next line. - maybeScreenshotsPresent: true, skipFocusChange: true, }); } diff --git a/browser/base/content/test/general/contextmenu_common.js b/browser/base/content/test/general/contextmenu_common.js index 6f0f0ca27534..458d88a8a67a 100644 --- a/browser/base/content/test/general/contextmenu_common.js +++ b/browser/base/content/test/general/contextmenu_common.js @@ -72,7 +72,7 @@ function getVisibleMenuItems(aMenu, aData) { item.id != "fill-login-no-logins" && // XXX Screenshots doesn't have an access key. This needs // at least bug 1320462 fixing first. - item.id != "screenshots_mozilla_org_create-screenshot") { + item.id != "screenshots_mozilla_org-menuitem-_create-screenshot") { ok(key, "menuitem " + item.id + " has an access key"); if (accessKeys[key]) ok(false, "menuitem " + item.id + " has same accesskey as " + accessKeys[key]); @@ -331,7 +331,7 @@ async function test_contextmenu(selector, menuItems, options = {}) { !Services.prefs.getBoolPref("extensions.screenshots.disabled", false)) { let screenshotItems = [ "---", null, - "screenshots_mozilla_org_create-screenshot", true, + "screenshots_mozilla_org-menuitem-_create-screenshot", true, ]; menuItems = menuItems.concat(screenshotItems); diff --git a/browser/base/content/test/performance/browser_preferences_usage.js b/browser/base/content/test/performance/browser_preferences_usage.js index 6a6d6e4e19e7..10045a2e0bbb 100644 --- a/browser/base/content/test/performance/browser_preferences_usage.js +++ b/browser/base/content/test/performance/browser_preferences_usage.js @@ -98,18 +98,9 @@ add_task(async function startup() { // This is accessed in debug only. }, "extensions.getAddons.cache.enabled": { - min: 6, + min: 5, max: 55, }, - - // Disabling screenshots in the default test profile triggers some - // work in the chrome registry that reads this pref. This can be removed - // when bootstrapped extensions are gone, or even when screenshots - // moves away from bootstrap (bug 1422437) - "chrome.override_package.global": { - min: 0, - max: 50, - }, }; let startupRecorder = Cc["@mozilla.org/test/startuprecorder;1"].getService().wrappedJSObject; diff --git a/browser/modules/test/browser/browser_PageActions.js b/browser/modules/test/browser/browser_PageActions.js index c89ae8a4e2c2..8290e1e8b54e 100644 --- a/browser/modules/test/browser/browser_PageActions.js +++ b/browser/modules/test/browser/browser_PageActions.js @@ -18,6 +18,10 @@ add_task(async function init() { registerCleanupFunction(async () => { BrowserTestUtils.removeTab(tab); }); + + // Ensure screenshots is really disabled (bug 1498738) + const addon = await AddonManager.getAddonByID("screenshots@mozilla.org"); + await addon.disable({allowSystemAddons: true}); });