Bug 1373650. Disable Report Site Issue page action before running page action tests. r=adw
authorMike Taylor <miket@mozilla.com>
Wed, 09 Aug 2017 14:53:53 -0400
changeset 374299 449c8d0f859e
parent 374298 792f4bf3fed7
child 374300 b54b0c24d18f
push id32320
push userarchaeopteryx@coole-files.de
push dateSat, 12 Aug 2017 21:35:10 +0000
treeherdermozilla-central@6062341662fc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersadw
bugs1373650
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1373650. Disable Report Site Issue page action before running page action tests. r=adw MozReview-Commit-ID: J5gAWBvw8td
browser/modules/test/browser/browser_PageActions.js
browser/modules/test/browser/head.js
--- 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]]});
+  }
+}