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

Unified Diff: ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.mm

Issue 2670843003: Removes unnecessary mock methods in fake identity service (Closed)
Patch Set: Created 3 years, 11 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: ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.mm
diff --git a/ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.mm b/ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.mm
index aeea097f4d90e1d353029f2ca74c7dc7bb9f0d10..3802388f81e1806e7f64b1be9f8cd5e4a564fc34 100644
--- a/ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.mm
+++ b/ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.mm
@@ -210,20 +210,34 @@ void FakeChromeIdentityService::ForgetIdentity(
}
}
-void FakeChromeIdentityService::SetUpForIntegrationTests() {
- ON_CALL(*this, GetAccessToken(_, _, _, _, _))
- .WillByDefault(Invoke(FakeGetAccessToken));
+void FakeChromeIdentityService::GetAccessToken(
+ ChromeIdentity* identity,
+ const std::string& client_id,
+ const std::string& client_secret,
+ const std::set<std::string>& scopes,
+ const ios::AccessTokenCallback& callback) {
+ FakeGetAccessToken(identity, client_id, client_secret, scopes, callback);
+}
- ON_CALL(*this, GetAvatarForIdentity(_, _))
- .WillByDefault(Invoke(FakeGetAvatarForIdentity));
+UIImage* FakeChromeIdentityService::GetCachedAvatarForIdentity(
+ ChromeIdentity* identity) {
+ return FakeGetCachedAvatarForIdentity(identity);
+}
- ON_CALL(*this, GetCachedAvatarForIdentity(_))
- .WillByDefault(Invoke(FakeGetCachedAvatarForIdentity));
+void FakeChromeIdentityService::GetAvatarForIdentity(
+ ChromeIdentity* identity,
+ GetAvatarCallback callback) {
+ FakeGetAvatarForIdentity(identity, callback);
+}
- ON_CALL(*this, GetHostedDomainForIdentity(_, _))
- .WillByDefault(Invoke(FakeGetHostedDomainForIdentity));
+void FakeChromeIdentityService::GetHostedDomainForIdentity(
+ ChromeIdentity* identity,
+ GetHostedDomainCallback callback) {
+ FakeGetHostedDomainForIdentity(identity, callback);
}
+void FakeChromeIdentityService::SetUpForIntegrationTests() {}
+
void FakeChromeIdentityService::AddIdentities(NSArray* identitiesNames) {
for (NSString* name in identitiesNames) {
NSString* email = [NSString stringWithFormat:kIdentityEmailFormat, name];

Powered by Google App Engine
This is Rietveld 408576698