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

Side by Side Diff: components/proximity_auth/proximity_auth_system_unittest.cc

Issue 2937553002: Create Mojo Struct for user information used in login/lock screen. (Closed)
Patch Set: rebase Created 3 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "components/proximity_auth/proximity_auth_system.h" 5 #include "components/proximity_auth/proximity_auth_system.h"
6 6
7 #include "base/test/simple_test_clock.h" 7 #include "base/test/simple_test_clock.h"
8 #include "base/test/test_simple_task_runner.h" 8 #include "base/test/test_simple_task_runner.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "components/cryptauth/remote_device.h" 10 #include "components/cryptauth/remote_device.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 58
59 // Mock implementation of UnlockManager. 59 // Mock implementation of UnlockManager.
60 class MockUnlockManager : public UnlockManager { 60 class MockUnlockManager : public UnlockManager {
61 public: 61 public:
62 MockUnlockManager() {} 62 MockUnlockManager() {}
63 ~MockUnlockManager() override {} 63 ~MockUnlockManager() override {}
64 MOCK_METHOD0(IsUnlockAllowed, bool()); 64 MOCK_METHOD0(IsUnlockAllowed, bool());
65 MOCK_METHOD1(SetRemoteDeviceLifeCycle, void(RemoteDeviceLifeCycle*)); 65 MOCK_METHOD1(SetRemoteDeviceLifeCycle, void(RemoteDeviceLifeCycle*));
66 MOCK_METHOD0(OnLifeCycleStateChanged, void()); 66 MOCK_METHOD0(OnLifeCycleStateChanged, void());
67 MOCK_METHOD1(OnAuthAttempted, void(ScreenlockBridge::LockHandler::AuthType)); 67 MOCK_METHOD1(OnAuthAttempted, void(mojom::AuthType));
68 68
69 private: 69 private:
70 DISALLOW_COPY_AND_ASSIGN(MockUnlockManager); 70 DISALLOW_COPY_AND_ASSIGN(MockUnlockManager);
71 }; 71 };
72 72
73 // Mock implementation of ProximityAuthPrefManager. 73 // Mock implementation of ProximityAuthPrefManager.
74 class MockProximityAuthPrefManager : public ProximityAuthPrefManager { 74 class MockProximityAuthPrefManager : public ProximityAuthPrefManager {
75 public: 75 public:
76 MockProximityAuthPrefManager() : ProximityAuthPrefManager(nullptr) {} 76 MockProximityAuthPrefManager() : ProximityAuthPrefManager(nullptr) {}
77 ~MockProximityAuthPrefManager() override {} 77 ~MockProximityAuthPrefManager() override {}
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 TEST_F(ProximityAuthSystemTest, ForcePasswordReauth) { 429 TEST_F(ProximityAuthSystemTest, ForcePasswordReauth) {
430 ON_CALL(*pref_manager_, GetLastPasswordEntryTimestampMs()) 430 ON_CALL(*pref_manager_, GetLastPasswordEntryTimestampMs())
431 .WillByDefault(Return(kTimestampAfterReauthMs)); 431 .WillByDefault(Return(kTimestampAfterReauthMs));
432 EXPECT_CALL(proximity_auth_client_, 432 EXPECT_CALL(proximity_auth_client_,
433 UpdateScreenlockState(ScreenlockState::PASSWORD_REAUTH)); 433 UpdateScreenlockState(ScreenlockState::PASSWORD_REAUTH));
434 FocusUser(kUser1); 434 FocusUser(kUser1);
435 EXPECT_FALSE(life_cycle()); 435 EXPECT_FALSE(life_cycle());
436 } 436 }
437 437
438 } // namespace proximity_auth 438 } // namespace proximity_auth
OLDNEW
« no previous file with comments | « components/proximity_auth/proximity_auth_system.cc ('k') | components/proximity_auth/public/interfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698