OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 ASH_LOGIN_MOCK_LOCK_SCREEN_CLIENT_H_ | 5 #ifndef ASH_LOGIN_MOCK_LOCK_SCREEN_CLIENT_H_ |
6 #define ASH_LOGIN_MOCK_LOCK_SCREEN_CLIENT_H_ | 6 #define ASH_LOGIN_MOCK_LOCK_SCREEN_CLIENT_H_ |
7 | 7 |
8 #include "ash/public/interfaces/lock_screen.mojom.h" | 8 #include "ash/public/interfaces/lock_screen.mojom.h" |
9 #include "mojo/public/cpp/bindings/binding_set.h" | 9 #include "mojo/public/cpp/bindings/binding_set.h" |
10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
11 | 11 |
12 namespace ash { | 12 namespace ash { |
13 | 13 |
14 class MockLockScreenClient : public mojom::LockScreenClient { | 14 class MockLockScreenClient : public mojom::LockScreenClient { |
15 public: | 15 public: |
16 MockLockScreenClient(); | 16 MockLockScreenClient(); |
17 ~MockLockScreenClient() override; | 17 ~MockLockScreenClient() override; |
18 | 18 |
19 mojom::LockScreenClientPtr CreateInterfacePtrAndBind(); | 19 mojom::LockScreenClientPtr CreateInterfacePtrAndBind(); |
20 | 20 |
21 // mojom::LockScreenClient: | 21 // mojom::LockScreenClient: |
22 MOCK_METHOD3(AuthenticateUser, | 22 MOCK_METHOD3(AuthenticateUser, |
23 void(const AccountId& account_id, | 23 void(const AccountId& account_id, |
24 const std::string& password, | 24 const std::string& password, |
25 bool authenticated_by_pin)); | 25 bool authenticated_by_pin)); |
26 MOCK_METHOD1(AttemptUnlock, void(const AccountId& account_id)); | 26 MOCK_METHOD1(AttemptUnlock, void(const AccountId& account_id)); |
27 MOCK_METHOD1(HardlockPod, void(const AccountId& account_id)); | 27 MOCK_METHOD1(HardlockPod, void(const AccountId& account_id)); |
28 MOCK_METHOD1(RecordClickOnLockIcon, void(const AccountId& account_id)); | 28 MOCK_METHOD1(RecordClickOnLockIcon, void(const AccountId& account_id)); |
| 29 MOCK_METHOD1(FocusPod, void(const AccountId& account_id)); |
| 30 MOCK_METHOD0(NoPodFocused, void()); |
| 31 MOCK_METHOD1(LoadWallpaper, void(const AccountId& account_id)); |
| 32 MOCK_METHOD0(SignOutUser, void()); |
| 33 MOCK_METHOD1(MaxIncorrectPasswordAttempts, void(const AccountId& account_id)); |
29 | 34 |
30 private: | 35 private: |
31 mojo::Binding<ash::mojom::LockScreenClient> binding_; | 36 mojo::Binding<ash::mojom::LockScreenClient> binding_; |
32 | 37 |
33 DISALLOW_COPY_AND_ASSIGN(MockLockScreenClient); | 38 DISALLOW_COPY_AND_ASSIGN(MockLockScreenClient); |
34 }; | 39 }; |
35 | 40 |
36 // Helper method to bind a lock screen client so it receives all mojo calls. | 41 // Helper method to bind a lock screen client so it receives all mojo calls. |
37 std::unique_ptr<MockLockScreenClient> BindMockLockScreenClient(); | 42 std::unique_ptr<MockLockScreenClient> BindMockLockScreenClient(); |
38 | 43 |
39 } // namespace ash | 44 } // namespace ash |
40 | 45 |
41 #endif // ASH_LOGIN_MOCK_LOCK_SCREEN_CLIENT_H_ | 46 #endif // ASH_LOGIN_MOCK_LOCK_SCREEN_CLIENT_H_ |
OLD | NEW |