From 9130bd250bda0a747b3ddb0895736aba415466f9 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Wed, 9 Aug 2017 14:53:53 -0400 Subject: [PATCH] Bug 1373650. Disable Report Site Issue page action before running page action tests. r=adw MozReview-Commit-ID: J5gAWBvw8td --HG-- extra : rebase_source : 61823de48dcbc475aed6dee8e54ae20d4a1e0700 --- browser/modules/test/browser/browser_PageActions.js | 2 ++ browser/modules/test/browser/head.js | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/browser/modules/test/browser/browser_PageActions.js b/browser/modules/test/browser/browser_PageActions.js index 7285f4ee23ac..d92e39f659ea 100644 --- a/browser/modules/test/browser/browser_PageActions.js +++ b/browser/modules/test/browser/browser_PageActions.js @@ -14,6 +14,8 @@ add_task(async function init() { gBrowser, url: "http://example.com/", }); + + await disableNonReleaseActions(); registerCleanupFunction(async () => { await BrowserTestUtils.removeTab(tab); }); diff --git a/browser/modules/test/browser/head.js b/browser/modules/test/browser/head.js index 8a6a405cb684..6bdf181f0b79 100644 --- a/browser/modules/test/browser/head.js +++ b/browser/modules/test/browser/head.js @@ -228,3 +228,14 @@ function getPopupNotificationNode() { 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]]}); + } +}