Chromium Code Reviews| Index: ash/login/mock_lock_screen_client.h |
| diff --git a/ash/login/mock_lock_screen_client.h b/ash/login/mock_lock_screen_client.h |
| index 3900dafaa3542b0ca7490ef0cf396488b0158ff4..60bbac1c958d7b13189707f67b0547ae0a484314 100644 |
| --- a/ash/login/mock_lock_screen_client.h |
| +++ b/ash/login/mock_lock_screen_client.h |
| @@ -18,16 +18,29 @@ class MockLockScreenClient : public mojom::LockScreenClient { |
| mojom::LockScreenClientPtr CreateInterfacePtrAndBind(); |
| - // mojom::LockScreenClient: |
| - MOCK_METHOD3(AuthenticateUser, |
| + MOCK_METHOD4(AuthenticateUser_, |
|
James Cook
2017/06/08 19:47:12
Is this "MethodName_" thing a gmock convention? I
jdufault
2017/06/08 22:23:14
It's a bit of a mess, but gmock doesn't support mo
|
| void(const AccountId& account_id, |
| const std::string& password, |
| - bool authenticated_by_pin)); |
| + bool authenticated_by_pin, |
| + AuthenticateUserCallback& callback)); |
| + |
| + // Set the result that should be passed to |callback| in |AuthenticateUser|. |
| + void set_authenticate_user_callback_result(bool value) { |
| + authenticate_user_callback_result_ = value; |
| + } |
| + |
| + // mojom::LockScreenClient: |
| + void AuthenticateUser(const AccountId& account_id, |
| + const std::string& password, |
| + bool authenticated_by_pin, |
| + AuthenticateUserCallback callback) override; |
| MOCK_METHOD1(AttemptUnlock, void(const AccountId& account_id)); |
| MOCK_METHOD1(HardlockPod, void(const AccountId& account_id)); |
| MOCK_METHOD1(RecordClickOnLockIcon, void(const AccountId& account_id)); |
| private: |
| + bool authenticate_user_callback_result_ = true; |
| + |
| mojo::Binding<ash::mojom::LockScreenClient> binding_; |
| DISALLOW_COPY_AND_ASSIGN(MockLockScreenClient); |
| @@ -38,4 +51,4 @@ std::unique_ptr<MockLockScreenClient> BindMockLockScreenClient(); |
| } // namespace ash |
| -#endif // ASH_LOGIN_MOCK_LOCK_SCREEN_CLIENT_H_ |
| +#endif // ASH_LOGIN_MOCK_LOCK_SCREEN_CLIENT_H_ |