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

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

Issue 2287383002: Add setup for integration tests in FakeChromeIdentityService. (Closed)
Patch Set: Fix callback in FakeGetAccessToken Created 4 years, 4 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.h
diff --git a/ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.h b/ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.h
index dbec6dc7185ff4b35734c2e165941fbb367b6fa7..1755d105521456041adcaa28055e745b47cb7f11 100644
--- a/ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.h
+++ b/ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.h
@@ -18,7 +18,7 @@ namespace ios {
class FakeChromeIdentityService : public ChromeIdentityService {
public:
FakeChromeIdentityService();
- ~FakeChromeIdentityService();
+ virtual ~FakeChromeIdentityService();
// Convenience method that returns the instance of
// |FakeChromeIdentityService| from the ChromeBrowserProvider.
@@ -41,6 +41,15 @@ class FakeChromeIdentityService : public ChromeIdentityService {
const std::set<std::string>& scopes,
const ios::AccessTokenCallback& callback));
+ MOCK_METHOD2(GetAvatarForIdentity,
+ void(ChromeIdentity* identity, GetAvatarCallback callback));
+
+ MOCK_METHOD1(GetCachedAvatarForIdentity, UIImage*(ChromeIdentity* identity));
+
+ MOCK_METHOD2(GetHostedDomainForIdentity,
+ void(ChromeIdentity* identity,
+ GetHostedDomainCallback callback));
+
MOCK_METHOD1(GetMDMDeviceStatus,
ios::MDMDeviceStatus(NSDictionary* user_info));
@@ -49,6 +58,9 @@ class FakeChromeIdentityService : public ChromeIdentityService {
NSDictionary* user_info,
ios::MDMStatusCallback callback));
+ // Sets up the mock methods for integration tests.
+ void SetUpForIntegrationTests();
+
// Adds the identities given their name.
void AddIdentities(NSArray* identitiesNames);
« no previous file with comments | « ios/public/provider/chrome/browser/DEPS ('k') | ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698