Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(563)

Unified Diff: chrome/browser/resources/google_now/background_unittest.gtestjs

Issue 21235008: Authentication Manager for Google Now (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@GeoSM-Diag
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/google_now/background_unittest.gtestjs
diff --git a/chrome/browser/resources/google_now/background_unittest.gtestjs b/chrome/browser/resources/google_now/background_unittest.gtestjs
index 693f9d342709e29e3ffb382d2ae0e646dc073a9b..2c3f19267d9f5e84c31d10a00444aabcb7d53ce0 100644
--- a/chrome/browser/resources/google_now/background_unittest.gtestjs
+++ b/chrome/browser/resources/google_now/background_unittest.gtestjs
@@ -59,7 +59,7 @@ function mockInitializeDependencies(fixture) {
'startPollingCards'
]);
fixture.makeAndRegisterMockApis([
- 'chrome.identity.getAuthToken',
+ 'authenticationManager.isSignedIn',
'chrome.location.clearWatch',
'chrome.notifications.getAll',
'chrome.preferencesPrivate.googleGeolocationAccessEnabled.get',
@@ -88,14 +88,15 @@ function expectStateMachineCalls(
testIdentityToken,
testGeolocationPref,
testUserRespondedToToast) {
- var chromeIdentityGetAuthTokenSavedArgs = new SaveMockArguments();
+ var authenticationManagerIsSignedInSavedArgs = new SaveMockArguments();
mockApisObj.expects(once()).
- chrome_identity_getAuthToken(
- chromeIdentityGetAuthTokenSavedArgs.match(
- eqJSON({interactive: false})),
- chromeIdentityGetAuthTokenSavedArgs.match(ANYTHING)).
+ authenticationManager_isSignedIn(
+ authenticationManagerIsSignedInSavedArgs.match(ANYTHING)).
will(invokeCallback(
- chromeIdentityGetAuthTokenSavedArgs, 1, testIdentityToken));
+ authenticationManagerIsSignedInSavedArgs,
+ 0,
+ !!testIdentityToken,
+ testIdentityToken));
var googleGeolocationPrefGetSavedArgs = new SaveMockArguments();
mockApisObj.expects(once()).

Powered by Google App Engine
This is Rietveld 408576698