Bug 1373650. Disable Report Site Issue page action before running page action tests. r=adw
MozReview-Commit-ID: J5gAWBvw8td
--- a/browser/modules/test/browser/browser_PageActions.js
+++ b/browser/modules/test/browser/browser_PageActions.js
@@ -9,16 +9,18 @@
add_task(async function init() {
// The page action urlbar button, and therefore the panel, is only shown when
// the current tab is actionable -- i.e., a normal web page. about:blank is
// not, so open a new tab first thing, and close it when this test is done.
let tab = await BrowserTestUtils.openNewForegroundTab({
gBrowser,
url: "http://example.com/",
});
+
+ await disableNonReleaseActions();
registerCleanupFunction(async () => {
await BrowserTestUtils.removeTab(tab);
});
});
// Tests a simple non-built-in action without an iframe or subview. Also
// thoroughly checks most of the action's properties, methods, and DOM nodes, so
--- a/browser/modules/test/browser/head.js
+++ b/browser/modules/test/browser/head.js
@@ -223,8 +223,19 @@ function getPopupNotificationNode() {
// clear, popupNotifications is a list of <xul:popupnotification>
// nodes.
let popupNotifications = PopupNotifications.panel.childNodes;
Assert.equal(popupNotifications.length, 1,
"Should be showing a <xul:popupnotification>");
return popupNotifications[0];
}
+
+/**
+ * Disable non-release page actions (that are tested elsewhere).
+ *
+ * @return void
+ */
+async function disableNonReleaseActions() {
+ if (AppConstants.MOZ_DEV_EDITION || AppConstants.NIGHTLY_BUILD) {
+ await SpecialPowers.pushPrefEnv({set: [["extensions.webcompat-reporter.enabled", false]]});
+ }
+}