Backed out changeset 34db5bec9cad (bug 1371543) for failing browser-chrome's browser/components/uitour/test/browser_UITour_availableTargets.js. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Fri, 08 Sep 2017 11:49:54 +0200
changeset 429181 cd88f7fba8bdc30c1b1d885e6065a81a2960c3cd
parent 429180 f7364d8ab9d4a7e6c2dd445d92ca3b86c225210a
child 429182 f4d56d495aa65fd99cf89f5922180a3c01b65308
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1371543
milestone57.0a1
backs out34db5bec9cad5bd0b83235b3d1a9ea1ebce8692a
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
Backed out changeset 34db5bec9cad (bug 1371543) for failing browser-chrome's browser/components/uitour/test/browser_UITour_availableTargets.js. r=backout
browser/app/permissions
browser/components/uitour/UITour-lib.js
browser/components/uitour/UITour.jsm
browser/components/uitour/test/browser_UITour_availableTargets.js
--- a/browser/app/permissions
+++ b/browser/app/permissions
@@ -3,17 +3,16 @@
 # * matchtype \t type \t permission \t host
 # * "origin" should be used for matchtype, "host" is supported for legacy reasons
 # * type is a string that identifies the type of permission (e.g. "cookie")
 # * permission is an integer between 1 and 15
 # See nsPermissionManager.cpp for more...
 
 # UITour
 origin	uitour	1	https://www.mozilla.org
-origin	uitour	1	https://screenshots.firefox.com
 origin	uitour	1	https://support.mozilla.org
 origin	uitour	1	https://addons.mozilla.org
 origin	uitour	1	https://discovery.addons.mozilla.org
 origin	uitour	1	about:home
 origin	uitour	1	about:newtab
 
 # XPInstall
 origin	install	1	https://addons.mozilla.org
--- a/browser/components/uitour/UITour-lib.js
+++ b/browser/components/uitour/UITour-lib.js
@@ -115,17 +115,16 @@ if (typeof Mozilla == "undefined") {
    * <li>pageAction-bookmark
    * <li>pageAction-copyURL
    * <li>pageAction-emailLink
    * <li>pageAction-sendToDevice
    * <li>pocket
    * <li>privateWindow
    * <li>quit
    * <li>readerMode-urlBar
-   * <li>screenshots
    * <li>search
    * <li>searchIcon
    * <li>searchPrefsLink
    * <li>selectedTabIcon
    * <li>trackingProtection
    * <li>urlbar
    * <li>webide
    * </ul>
--- a/browser/components/uitour/UITour.jsm
+++ b/browser/components/uitour/UITour.jsm
@@ -252,22 +252,16 @@ this.UITour = {
                aDocument.getElementById("pageAction-panel-emailLink");
       },
     }],
     ["pageAction-sendToDevice", {
       query: (aDocument) => {
         return aDocument.getElementById("pageAction-urlbar-sendToDevice") ||
                aDocument.getElementById("pageAction-panel-sendToDevice");
       },
-    }],
-    ["screenshots", {
-      query: (aDocument) => {
-        return aDocument.getElementById("pageAction-urlbar-screenshots") ||
-               aDocument.getElementById("pageAction-panel-screenshots");
-      },
     }]
   ]),
 
   init() {
     log.debug("Initializing UITour");
     // Lazy getter is initialized here so it can be replicated any time
     // in a test.
     delete this.seenPageIDs;
--- a/browser/components/uitour/test/browser_UITour_availableTargets.js
+++ b/browser/components/uitour/test/browser_UITour_availableTargets.js
@@ -24,28 +24,24 @@ function getExpectedTargets() {
     "pageAction-bookmark",
     "pageAction-copyURL",
     "pageAction-emailLink",
     "pageAction-sendToDevice",
       ...(hasPocket ? ["pocket"] : []),
     "privateWindow",
       ...(hasQuit ? ["quit"] : []),
     "readerMode-urlBar",
-    "screenshots",
-    "search",
-    "searchIcon",
     "trackingProtection",
     "urlbar",
   ];
 }
 
 add_task(setup_UITourTest);
 
 add_UITour_task(async function test_availableTargets() {
-  await ensureScreenshotsEnabled();
   let data = await getConfigurationPromise("availableTargets");
   let expecteds = getExpectedTargets();
   ok_targets(data, expecteds);
   ok(UITour.availableTargetsCache.has(window),
      "Targets should now be cached");
 });
 
 add_UITour_task(async function test_availableTargets_changeWidgets() {
@@ -79,17 +75,16 @@ 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" ],
     [ "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);
   }
@@ -99,17 +94,16 @@ 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" ],
     [ "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);
   }
@@ -151,19 +145,8 @@ var pageActionsHelper = {
       return;
     }
     for (let [ action, originalState] of this._originalStates) {
       action.shownInUrlbar = originalState;
     }
     this._originalStates = null;
   }
 };
-
-function ensureScreenshotsEnabled() {
-  SpecialPowers.pushPrefEnv({ set: [
-    [ "extensions.screenshots.system", false ],
-    [ "extensions.screenshots.system-disabled", false ]
-  ]});
-  return BrowserTestUtils.waitForCondition(() => {
-    return PageActions.actionForID("screenshots") &&
-           !CustomizableUI.getWidget("screenshots_mozilla_org-browser-action");
-  }, "Should enable Screenshots");
-}