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

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

Issue 2287383002: Add setup for integration tests in FakeChromeIdentityService. (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_FAKE_CHROME_IDENTITY_SERVICE_H _ 5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_FAKE_CHROME_IDENTITY_SERVICE_H _
6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_FAKE_CHROME_IDENTITY_SERVICE_H _ 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_FAKE_CHROME_IDENTITY_SERVICE_H _
7 7
8 #include "ios/public/provider/chrome/browser/signin/chrome_identity_service.h" 8 #include "ios/public/provider/chrome/browser/signin/chrome_identity_service.h"
9 9
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 23 matching lines...) Expand all
34 void ForgetIdentity(ChromeIdentity* identity, 34 void ForgetIdentity(ChromeIdentity* identity,
35 ForgetIdentityCallback callback) override; 35 ForgetIdentityCallback callback) override;
36 36
37 MOCK_METHOD5(GetAccessToken, 37 MOCK_METHOD5(GetAccessToken,
38 void(ChromeIdentity* identity, 38 void(ChromeIdentity* identity,
39 const std::string& client_id, 39 const std::string& client_id,
40 const std::string& client_secret, 40 const std::string& client_secret,
41 const std::set<std::string>& scopes, 41 const std::set<std::string>& scopes,
42 const ios::AccessTokenCallback& callback)); 42 const ios::AccessTokenCallback& callback));
43 43
44 MOCK_METHOD2(GetAvatarForIdentity,
45 void(ChromeIdentity* identity, GetAvatarCallback callback));
46
47 MOCK_METHOD1(GetCachedAvatarForIdentity, UIImage*(ChromeIdentity* identity));
48
49 MOCK_METHOD2(GetHostedDomainForIdentity,
50 void(ChromeIdentity* identity,
51 GetHostedDomainCallback callback));
52
44 MOCK_METHOD1(GetMDMDeviceStatus, 53 MOCK_METHOD1(GetMDMDeviceStatus,
45 ios::MDMDeviceStatus(NSDictionary* user_info)); 54 ios::MDMDeviceStatus(NSDictionary* user_info));
46 55
47 MOCK_METHOD3(HandleMDMNotification, 56 MOCK_METHOD3(HandleMDMNotification,
48 bool(ChromeIdentity* identity, 57 bool(ChromeIdentity* identity,
49 NSDictionary* user_info, 58 NSDictionary* user_info,
50 ios::MDMStatusCallback callback)); 59 ios::MDMStatusCallback callback));
51 60
61 // Sets up the mock methods for integration tests.
62 void SetUpForIntegrationTests();
63
52 // Adds the identities given their name. 64 // Adds the identities given their name.
53 void AddIdentities(NSArray* identitiesNames); 65 void AddIdentities(NSArray* identitiesNames);
54 66
55 // Adds |identity| to the available identities. 67 // Adds |identity| to the available identities.
56 void AddIdentity(ChromeIdentity* identity); 68 void AddIdentity(ChromeIdentity* identity);
57 69
58 private: 70 private:
59 base::scoped_nsobject<NSMutableArray> identities_; 71 base::scoped_nsobject<NSMutableArray> identities_;
60 }; 72 };
61 73
62 } // namespace ios 74 } // namespace ios
63 75
64 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_FAKE_CHROME_IDENTITY_SERVIC E_H_ 76 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_FAKE_CHROME_IDENTITY_SERVIC E_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698