author | Thom Chiovoloni <tchiovoloni@mozilla.com> |
Tue, 05 Apr 2016 14:52:00 -0700 | |
changeset 291836 | b3eed99cb17bc8d6e6eda1a6f4ecb53fd1b30a43 |
parent 291835 | d24f23b9b8a14ea2b9f9e55f1b8736e65b2c08fa |
child 291837 | 99a916a1ccc445f08dda266607d969636f390858 |
push id | 30147 |
push user | cbook@mozilla.com |
push date | Wed, 06 Apr 2016 09:59:43 +0000 |
treeherder | mozilla-central@68c0b7d6f16c [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | markh |
bugs | 1246606 |
milestone | 48.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
|
--- a/browser/base/content/browser-fxaccounts.js +++ b/browser/base/content/browser-fxaccounts.js @@ -266,32 +266,32 @@ var gFxAccounts = { this.panelUILabel.removeAttribute("disabled"); this.panelUIAvatar.removeAttribute("disabled"); this.panelUIIcon.removeAttribute("disabled"); } let defaultLabel = this.panelUIStatus.getAttribute("defaultlabel"); let errorLabel = this.panelUIStatus.getAttribute("errorlabel"); let unverifiedLabel = this.panelUIStatus.getAttribute("unverifiedlabel"); - let signedInTooltiptext = this.panelUIStatus.getAttribute("signedinTooltiptext"); + // The localization string is for the signed in text, but it's the default text as well + let defaultTooltiptext = this.panelUIStatus.getAttribute("signedinTooltiptext"); let updateWithUserData = (userData) => { // Window might have been closed while fetching data. if (window.closed) { return; } // Reset the button to its original state. this.panelUILabel.setAttribute("label", defaultLabel); - this.panelUIStatus.removeAttribute("tooltiptext"); + this.panelUIStatus.setAttribute("tooltiptext", defaultTooltiptext); this.panelUIFooter.removeAttribute("fxastatus"); this.panelUIFooter.removeAttribute("fxaprofileimage"); this.panelUIAvatar.style.removeProperty("list-style-image"); let showErrorBadge = false; - if (!this._inCustomizationMode && userData) { // At this point we consider the user as logged-in (but still can be in an error state) if (this.loginFailed) { let tooltipDescription = this.strings.formatStringFromName("reconnectDescription", [userData.email], 1); this.panelUIFooter.setAttribute("fxastatus", "error"); this.panelUILabel.setAttribute("label", errorLabel); this.panelUIStatus.setAttribute("tooltiptext", tooltipDescription); showErrorBadge = true; @@ -300,17 +300,16 @@ var gFxAccounts = { this.panelUIFooter.setAttribute("fxastatus", "error"); this.panelUIFooter.setAttribute("unverified", "true"); this.panelUILabel.setAttribute("label", unverifiedLabel); this.panelUIStatus.setAttribute("tooltiptext", tooltipDescription); showErrorBadge = true; } else { this.panelUIFooter.setAttribute("fxastatus", "signedin"); this.panelUILabel.setAttribute("label", userData.email); - this.panelUIStatus.setAttribute("tooltiptext", signedInTooltiptext); } if (profileInfoEnabled) { this.panelUIFooter.setAttribute("fxaprofileimage", "enabled"); } } if (showErrorBadge) { gMenuButtonBadgeManager.addBadge(gMenuButtonBadgeManager.BADGEID_FXA, "fxa-needs-authentication"); } else {
--- a/browser/base/content/test/general/browser_fxaccounts.js +++ b/browser/base/content/test/general/browser_fxaccounts.js @@ -75,17 +75,17 @@ add_task(function* test_nouser() { let promiseUpdateDone = promiseObserver("test:browser_fxaccounts:updateAppMenuItem"); Services.obs.notifyObservers(null, this.FxAccountsCommon.ONLOGOUT_NOTIFICATION, null); yield promiseUpdateDone; // Check the world - the FxA footer area is visible as it is offering a signin. Assert.ok(isFooterVisible()) Assert.equal(panelUILabel.getAttribute("label"), panelUIStatus.getAttribute("defaultlabel")); - Assert.ok(!panelUIStatus.hasAttribute("tooltiptext"), "no tooltip when signed out"); + Assert.equal(panelUIStatus.getAttribute("tooltiptext"), panelUIStatus.getAttribute("signedinTooltiptext")); Assert.ok(!panelUIFooter.hasAttribute("fxastatus"), "no fxsstatus when signed out"); Assert.ok(!panelUIFooter.hasAttribute("fxaprofileimage"), "no fxaprofileimage when signed out"); let promisePreferencesOpened = promiseObserver("test:browser_fxaccounts:openPreferences"); panelUIStatus.click(); yield promisePreferencesOpened; });
--- a/browser/components/customizableui/content/panelUI.inc.xul +++ b/browser/components/customizableui/content/panelUI.inc.xul @@ -19,16 +19,17 @@ <toolbarbutton id="PanelUI-update-status" oncommand="gMenuButtonUpdateBadge.onMenuPanelCommand(event);" wrap="true" hidden="true"/> <hbox id="PanelUI-footer-fxa"> <hbox id="PanelUI-fxa-status" defaultlabel="&fxaSignIn.label;" signedinTooltiptext="&fxaSignedIn.tooltip;" + tooltiptext="&fxaSignedIn.tooltip;" errorlabel="&fxaSignInError.label;" unverifiedlabel="&fxaUnverified.label;" onclick="if (event.which == 1) gFxAccounts.onMenuPanelCommand();"> <image id="PanelUI-fxa-avatar"/> <toolbarbutton id="PanelUI-fxa-label" fxabrandname="&syncBrand.fxAccount.label;"/> </hbox> <toolbarseparator/>