Bug 1466575 - Update tests to use new Screenshots pageAction id; r=_6a68
authorBarry Chen <bchen@mozilla.com>
Thu, 09 Aug 2018 17:40:39 -0500
changeset 486160 b17bf2e7a761071252eb4e65c553ba841dc674cb
parent 486159 ea0593b7eb05ca90e0c2c886845a18eb8b373eb9
child 486161 09fe744984bc6f548ae4b9f2e09ae44773215923
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewers_6a68
bugs1466575
milestone63.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 1466575 - Update tests to use new Screenshots pageAction id; r=_6a68 MozReview-Commit-ID: 9Bm0NHAP9Lj
browser/components/uitour/UITour.jsm
browser/components/uitour/test/browser_UITour_availableTargets.js
browser/extensions/screenshots/test/browser/browser_screenshots_ui_check.js
browser/extensions/screenshots/test/browser/head.js
--- a/browser/components/uitour/UITour.jsm
+++ b/browser/components/uitour/UITour.jsm
@@ -233,17 +233,17 @@ var UITour = {
         return aDocument.getElementById("pageAction-urlbar-sendToDevice") ||
                aDocument.getElementById("pageAction-panel-sendToDevice");
       },
     }],
     ["screenshots", {
       query: (aDocument) => {
         aDocument.ownerGlobal.BrowserPageActions.placeLazyActionsInPanel();
         return aDocument.getElementById("pageAction-urlbar-screenshots") ||
-               aDocument.getElementById("pageAction-panel-screenshots");
+               aDocument.getElementById("pageAction-panel-screenshots_mozilla_org");
       },
     }]
   ]),
 
   init() {
     log.debug("Initializing UITour");
     // Lazy getter is initialized here so it can be replicated any time
     // in a test.
--- a/browser/components/uitour/test/browser_UITour_availableTargets.js
+++ b/browser/components/uitour/test/browser_UITour_availableTargets.js
@@ -77,17 +77,17 @@ add_UITour_task(async function test_avai
 add_UITour_task(async function test_availableTargets_removeUrlbarPageActionsAll() {
   pageActionsHelper.setActionsUrlbarState(false);
   UITour.clearAvailableTargetsCache();
   let data = await getConfigurationPromise("availableTargets");
   let expecteds = getExpectedTargets();
   ok_targets(data, expecteds);
   let expectedActions = [
     [ "pocket", "pageAction-panel-pocket" ],
-    [ "screenshots", "pageAction-panel-screenshots" ],
+    [ "screenshots", "pageAction-panel-screenshots_mozilla_org" ],
     [ "pageAction-bookmark", "pageAction-panel-bookmark" ],
     [ "pageAction-copyURL", "pageAction-panel-copyURL" ],
     [ "pageAction-emailLink", "pageAction-panel-emailLink" ],
     [ "pageAction-sendToDevice", "pageAction-panel-sendToDevice" ],
   ];
   for (let [ targetName, expectedNodeId ] of expectedActions) {
     await assertTargetNode(targetName, expectedNodeId);
   }
@@ -97,17 +97,17 @@ add_UITour_task(async function test_avai
 add_UITour_task(async function test_availableTargets_addUrlbarPageActionsAll() {
   pageActionsHelper.setActionsUrlbarState(true);
   UITour.clearAvailableTargetsCache();
   let data = await getConfigurationPromise("availableTargets");
   let expecteds = getExpectedTargets();
   ok_targets(data, expecteds);
   let expectedActions = [
     [ "pocket", "pocket-button-box" ],
-    [ "screenshots", "pageAction-urlbar-screenshots" ],
+    [ "screenshots", "pageAction-panel-screenshots_mozilla_org" ],
     [ "pageAction-bookmark", "star-button-box" ],
     [ "pageAction-copyURL", "pageAction-urlbar-copyURL" ],
     [ "pageAction-emailLink", "pageAction-urlbar-emailLink" ],
     [ "pageAction-sendToDevice", "pageAction-urlbar-sendToDevice" ],
   ];
   for (let [ targetName, expectedNodeId ] of expectedActions) {
     await assertTargetNode(targetName, expectedNodeId);
   }
@@ -152,11 +152,11 @@ var pageActionsHelper = {
   }
 };
 
 function ensureScreenshotsEnabled() {
   SpecialPowers.pushPrefEnv({ set: [
     [ "extensions.screenshots.disabled", false ]
   ]});
   return BrowserTestUtils.waitForCondition(() => {
-    return PageActions.actionForID("screenshots");
+    return PageActions.actionForID("screenshots_mozilla_org");
   }, "Should enable Screenshots");
 }
--- a/browser/extensions/screenshots/test/browser/browser_screenshots_ui_check.js
+++ b/browser/extensions/screenshots/test/browser/browser_screenshots_ui_check.js
@@ -1,11 +1,11 @@
 "use strict";
 
-const BUTTON_ID = "pageAction-panel-screenshots";
+const BUTTON_ID = "pageAction-panel-screenshots_mozilla_org";
 
 function checkElements(expectPresent, l) {
   for (const id of l) {
     is(!!document.getElementById(id), expectPresent, "element " + id + (expectPresent ? " is" : " is not") + " present");
   }
 }
 
 async function togglePageActionPanel() {
--- a/browser/extensions/screenshots/test/browser/head.js
+++ b/browser/extensions/screenshots/test/browser/head.js
@@ -11,17 +11,17 @@ function promiseScreenshotsEnabled() {
   if (!Services.prefs.getBoolPref("extensions.screenshots.disabled", false)) {
     info("Screenshots was already enabled, assuming enabled by default for tests");
     enabledOnStartup = true;
     return Promise.resolve(true);
   }
   info("Screenshots is not enabled");
   return new Promise((resolve, reject) => {
     const interval = setInterval(() => {
-      const action = PageActions.actionForID("screenshots");
+      const action = PageActions.actionForID("screenshots_mozilla_org");
       if (action) {
         info("screenshots page action created");
         clearInterval(interval);
         resolve(false);
       }
     }, 100);
     info("Set Screenshots disabled pref to false.");
     Services.prefs.setBoolPref("extensions.screenshots.disabled", false);