Backed out changeset 1376c328fbb3 (bug 1185579) for browser_fxa.js test failures
authorWes Kocher <wkocher@mozilla.com>
Wed, 05 Aug 2015 13:50:59 -0700
changeset 288065 53560cc91161fdd60bc0ca8e140b5b44917c0913
parent 288064 816eb5a838ebcf0262f6c0a9a69770fea9d22635
child 288066 9f1f1e11ca3774feaea4b29ea9fe37fa65de7cd6
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1185579
milestone42.0a1
backs out1376c328fbb3cebcc55e7443d13c4da8a69111fe
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 1376c328fbb3 (bug 1185579) for browser_fxa.js test failures
browser/components/uitour/UITour.jsm
browser/components/uitour/test/browser.ini
browser/components/uitour/test/browser_fxa.js
browser/components/uitour/test/head.js
--- a/browser/components/uitour/UITour.jsm
+++ b/browser/components/uitour/UITour.jsm
@@ -93,30 +93,21 @@ this.UITour = {
   availableTargetsCache: new WeakMap(),
 
   _annotationPanelMutationObservers: new WeakMap(),
 
   highlightEffects: ["random", "wobble", "zoom", "color"],
   targets: new Map([
     ["accountStatus", {
       query: (aDocument) => {
-        // If the user is logged in, use the avatar element.
-        let fxAFooter = aDocument.getElementById("PanelUI-footer-fxa");
-        if (fxAFooter.getAttribute("fxastatus")) {
-          return aDocument.getElementById("PanelUI-fxa-avatar");
-        }
-
-        // Otherwise use the sync setup icon.
         let statusButton = aDocument.getElementById("PanelUI-fxa-label");
         return aDocument.getAnonymousElementByAttribute(statusButton,
                                                         "class",
                                                         "toolbarbutton-icon");
       },
-      // This is a fake widgetName starting with the "PanelUI-" prefix so we know
-      // to automatically open the appMenu when annotating this target.
       widgetName: "PanelUI-fxa-label",
     }],
     ["addons",      {query: "#add-ons-button"}],
     ["appMenu",     {
       addTargetListener: (aDocument, aCallback) => {
         let panelPopup = aDocument.getElementById("PanelUI-popup");
         panelPopup.addEventListener("popupshown", aCallback);
       },
--- a/browser/components/uitour/test/browser.ini
+++ b/browser/components/uitour/test/browser.ini
@@ -2,18 +2,16 @@
 support-files =
   head.js
   image.png
   uitour.html
   ../UITour-lib.js
 
 [browser_backgroundTab.js]
 skip-if = e10s # Bug 941428 - UITour.jsm not e10s friendly
-[browser_fxa.js]
-skip-if = e10s || debug || asan # Bug 1073247 - UITour tests not e10s friendly # updateAppMenuItem leaks
 [browser_no_tabs.js]
 [browser_openPreferences.js]
 skip-if = e10s # Bug 1073247 - UITour tests not e10s friendly
 [browser_openSearchPanel.js]
 skip-if = true # Bug 1113038 - Intermittent "Popup was opened"
 [browser_trackingProtection.js]
 skip-if = os == "linux" # Intermittent NS_ERROR_NOT_AVAILABLE [nsIUrlClassifierDBService.beginUpdate]
 tag = trackingprotection
deleted file mode 100644
--- a/browser/components/uitour/test/browser_fxa.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-XPCOMUtils.defineLazyModuleGetter(this, "fxAccounts",
-                                  "resource://gre/modules/FxAccounts.jsm");
-
-let gTestTab;
-let gContentAPI;
-let gContentWindow;
-
-function test() {
-  UITourTest();
-}
-
-registerCleanupFunction(function*() {
-  yield signOut();
-  gFxAccounts.updateAppMenuItem();
-});
-
-let tests = [
-  taskify(function* test_highlight_accountStatus_loggedOut() {
-    let userData = yield fxAccounts.getSignedInUser();
-    is(userData, null, "Not logged in initially");
-    yield showMenuPromise("appMenu");
-    yield showHighlightPromise("accountStatus");
-    let highlight = document.getElementById("UITourHighlightContainer");
-    is(highlight.getAttribute("targetName"), "accountStatus", "Correct highlight target");
-  }),
-
-  taskify(function* test_highlight_accountStatus_loggedIn() {
-    yield setSignedInUser();
-    let userData = yield fxAccounts.getSignedInUser();
-    isnot(userData, null, "Logged in now");
-    // gFxAccounts.updateAppMenuItem(); // Causes a leak.
-    yield showMenuPromise("appMenu");
-    yield showHighlightPromise("accountStatus");
-    let highlight = document.getElementById("UITourHighlightContainer");
-    todo_is(highlight.popupBoxObject.anchorNode.id, "PanelUI-fxa-avatar", "Anchored on avatar");
-    is(highlight.getAttribute("targetName"), "accountStatus", "Correct highlight target");
-  }),
-];
-
-// Helpers copied from browser_aboutAccounts.js
-// watch out - these will fire observers which if you aren't careful, may
-// interfere with the tests.
-function setSignedInUser(data) {
-  if (!data) {
-    data = {
-      email: "foo@example.com",
-      uid: "1234@lcip.org",
-      assertion: "foobar",
-      sessionToken: "dead",
-      kA: "beef",
-      kB: "cafe",
-      verified: true
-    };
-  }
- return fxAccounts.setSignedInUser(data);
-}
-
-function signOut() {
-  // we always want a "localOnly" signout here...
-  return fxAccounts.signOut(true);
-}
--- a/browser/components/uitour/test/head.js
+++ b/browser/components/uitour/test/head.js
@@ -134,22 +134,16 @@ function hideInfoPromise(...args) {
 }
 
 function showInfoPromise(...args) {
   let popup = document.getElementById("UITourTooltip");
   gContentAPI.showInfo.apply(gContentAPI, args);
   return promisePanelElementShown(window, popup);
 }
 
-function showHighlightPromise(...args) {
-  let popup = document.getElementById("UITourHighlightContainer");
-  gContentAPI.showHighlight.apply(gContentAPI, args);
-  return promisePanelElementShown(window, popup);
-}
-
 function showMenuPromise(name) {
   return new Promise(resolve => {
     gContentAPI.showMenu(name, () => resolve());
   });
 }
 
 function waitForCallbackResultPromise() {
   return waitForConditionPromise(() => {