Merge "Refresh auth credentials prospective fixes"

This commit is contained in:
Andrew Bonventre
2016-08-02 15:47:33 +00:00
committed by Gerrit Code Review
3 changed files with 5 additions and 2 deletions

View File

@@ -100,6 +100,9 @@
this.listen(document, 'visibilitychange', '_handleVisibilityChange');
}
this._requestCheckLoggedIn();
if (!document.hidden) {
this._handleVisibilityChange();
}
},
_createToastAlert: function() {

View File

@@ -105,7 +105,7 @@ limitations under the License.
var hideToastSpy = sandbox.spy(toast, 'hide');
assert.isFalse(refreshStub.called);
assert.isTrue(refreshStub.called);
element.flushDebouncer('checkLoggedIn');
flush(function() {
assert.isTrue(refreshStub.called);

View File

@@ -251,7 +251,7 @@
},
refreshCredentials: function() {
this._cache['/accounts/self/detail'] = undefined;
this._cache = {};
return this.getLoggedIn();
},