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

Unified Diff: components/proximity_auth/unlock_manager_impl_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/proximity_auth/unlock_manager_impl.cc ('k') | ui/login/account_picker/md_user_pod_row.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/proximity_auth/unlock_manager_impl_unittest.cc
diff --git a/components/proximity_auth/unlock_manager_impl_unittest.cc b/components/proximity_auth/unlock_manager_impl_unittest.cc
index bc88d7c853b3172f6fc2a9f45c61f4b4d1f2263b..9dc836f9ae92a6629637d79d54799f037f2f3910 100644
--- a/components/proximity_auth/unlock_manager_impl_unittest.cc
+++ b/components/proximity_auth/unlock_manager_impl_unittest.cc
@@ -640,7 +640,7 @@ TEST_F(ProximityAuthUnlockManagerImplTest,
unlock_manager_->SetRemoteDeviceLifeCycle(nullptr);
EXPECT_CALL(proximity_auth_client_, FinalizeUnlock(false));
- unlock_manager_->OnAuthAttempted(ScreenlockBridge::LockHandler::USER_CLICK);
+ unlock_manager_->OnAuthAttempted(mojom::AuthType::USER_CLICK);
}
TEST_F(ProximityAuthUnlockManagerImplTest, OnAuthAttempted_UnlockNotAllowed) {
@@ -650,7 +650,7 @@ TEST_F(ProximityAuthUnlockManagerImplTest, OnAuthAttempted_UnlockNotAllowed) {
ON_CALL(*proximity_monitor(), IsUnlockAllowed()).WillByDefault(Return(false));
EXPECT_CALL(proximity_auth_client_, FinalizeUnlock(false));
- unlock_manager_->OnAuthAttempted(ScreenlockBridge::LockHandler::USER_CLICK);
+ unlock_manager_->OnAuthAttempted(mojom::AuthType::USER_CLICK);
}
TEST_F(ProximityAuthUnlockManagerImplTest, OnAuthAttempted_NotUserClick) {
@@ -658,8 +658,7 @@ TEST_F(ProximityAuthUnlockManagerImplTest, OnAuthAttempted_NotUserClick) {
SimulateUserPresentState();
EXPECT_CALL(proximity_auth_client_, FinalizeUnlock(_)).Times(0);
- unlock_manager_->OnAuthAttempted(
- ScreenlockBridge::LockHandler::EXPAND_THEN_USER_CLICK);
+ unlock_manager_->OnAuthAttempted(mojom::AuthType::EXPAND_THEN_USER_CLICK);
}
TEST_F(ProximityAuthUnlockManagerImplTest, OnAuthAttempted_DuplicateCall) {
@@ -667,17 +666,17 @@ TEST_F(ProximityAuthUnlockManagerImplTest, OnAuthAttempted_DuplicateCall) {
SimulateUserPresentState();
EXPECT_CALL(messenger_, RequestUnlock());
- unlock_manager_->OnAuthAttempted(ScreenlockBridge::LockHandler::USER_CLICK);
+ unlock_manager_->OnAuthAttempted(mojom::AuthType::USER_CLICK);
EXPECT_CALL(messenger_, RequestUnlock()).Times(0);
- unlock_manager_->OnAuthAttempted(ScreenlockBridge::LockHandler::USER_CLICK);
+ unlock_manager_->OnAuthAttempted(mojom::AuthType::USER_CLICK);
}
TEST_F(ProximityAuthUnlockManagerImplTest, OnAuthAttempted_TimesOut) {
CreateUnlockManager(ProximityAuthSystem::SESSION_LOCK);
SimulateUserPresentState();
- unlock_manager_->OnAuthAttempted(ScreenlockBridge::LockHandler::USER_CLICK);
+ unlock_manager_->OnAuthAttempted(mojom::AuthType::USER_CLICK);
// Simulate the timeout period elapsing.
EXPECT_CALL(proximity_auth_client_, FinalizeUnlock(false));
@@ -689,7 +688,7 @@ TEST_F(ProximityAuthUnlockManagerImplTest,
CreateUnlockManager(ProximityAuthSystem::SESSION_LOCK);
SimulateUserPresentState();
- unlock_manager_->OnAuthAttempted(ScreenlockBridge::LockHandler::USER_CLICK);
+ unlock_manager_->OnAuthAttempted(mojom::AuthType::USER_CLICK);
EXPECT_CALL(proximity_auth_client_, FinalizeUnlock(_));
unlock_manager_->OnUnlockResponse(false);
@@ -706,7 +705,7 @@ TEST_F(ProximityAuthUnlockManagerImplTest,
SimulateUserPresentState();
EXPECT_CALL(messenger_, RequestUnlock());
- unlock_manager_->OnAuthAttempted(ScreenlockBridge::LockHandler::USER_CLICK);
+ unlock_manager_->OnAuthAttempted(mojom::AuthType::USER_CLICK);
EXPECT_CALL(proximity_auth_client_, FinalizeUnlock(false));
unlock_manager_->OnUnlockResponse(false);
@@ -719,7 +718,7 @@ TEST_F(ProximityAuthUnlockManagerImplTest,
SimulateUserPresentState();
EXPECT_CALL(messenger_, RequestUnlock());
- unlock_manager_->OnAuthAttempted(ScreenlockBridge::LockHandler::USER_CLICK);
+ unlock_manager_->OnAuthAttempted(mojom::AuthType::USER_CLICK);
EXPECT_CALL(messenger_, DispatchUnlockEvent());
unlock_manager_->OnUnlockResponse(true);
@@ -735,7 +734,7 @@ TEST_F(ProximityAuthUnlockManagerImplTest,
SimulateUserPresentState();
EXPECT_CALL(messenger_, RequestUnlock());
- unlock_manager_->OnAuthAttempted(ScreenlockBridge::LockHandler::USER_CLICK);
+ unlock_manager_->OnAuthAttempted(mojom::AuthType::USER_CLICK);
EXPECT_CALL(messenger_, DispatchUnlockEvent());
unlock_manager_->OnUnlockResponse(true);
@@ -751,7 +750,7 @@ TEST_F(ProximityAuthUnlockManagerImplTest,
SimulateUserPresentState();
EXPECT_CALL(messenger_, DispatchUnlockEvent());
- unlock_manager_->OnAuthAttempted(ScreenlockBridge::LockHandler::USER_CLICK);
+ unlock_manager_->OnAuthAttempted(mojom::AuthType::USER_CLICK);
EXPECT_CALL(proximity_auth_client_, FinalizeUnlock(false));
unlock_manager_->OnUnlockEventSent(false);
@@ -764,7 +763,7 @@ TEST_F(ProximityAuthUnlockManagerImplTest,
SimulateUserPresentState();
EXPECT_CALL(messenger_, DispatchUnlockEvent());
- unlock_manager_->OnAuthAttempted(ScreenlockBridge::LockHandler::USER_CLICK);
+ unlock_manager_->OnAuthAttempted(mojom::AuthType::USER_CLICK);
EXPECT_CALL(proximity_auth_client_, FinalizeUnlock(true));
unlock_manager_->OnUnlockEventSent(true);
@@ -788,7 +787,7 @@ TEST_F(ProximityAuthUnlockManagerImplTest, OnAuthAttempted_SignIn_Success) {
}));
EXPECT_CALL(messenger_, RequestDecryption(kChallenge));
- unlock_manager_->OnAuthAttempted(ScreenlockBridge::LockHandler::USER_CLICK);
+ unlock_manager_->OnAuthAttempted(mojom::AuthType::USER_CLICK);
EXPECT_CALL(messenger_, DispatchUnlockEvent());
unlock_manager_->OnDecryptResponse(kSignInSecret);
@@ -816,7 +815,7 @@ TEST_F(ProximityAuthUnlockManagerImplTest,
}));
EXPECT_CALL(messenger_, RequestDecryption(kChallenge));
- unlock_manager_->OnAuthAttempted(ScreenlockBridge::LockHandler::USER_CLICK);
+ unlock_manager_->OnAuthAttempted(mojom::AuthType::USER_CLICK);
EXPECT_CALL(messenger_, DispatchUnlockEvent());
unlock_manager_->OnDecryptResponse(kSignInSecret);
@@ -844,7 +843,7 @@ TEST_F(ProximityAuthUnlockManagerImplTest,
}));
EXPECT_CALL(messenger_, RequestDecryption(kChallenge));
- unlock_manager_->OnAuthAttempted(ScreenlockBridge::LockHandler::USER_CLICK);
+ unlock_manager_->OnAuthAttempted(mojom::AuthType::USER_CLICK);
EXPECT_CALL(proximity_auth_client_, FinalizeSignin(std::string()));
unlock_manager_->OnDecryptResponse(std::string());
« no previous file with comments | « components/proximity_auth/unlock_manager_impl.cc ('k') | ui/login/account_picker/md_user_pod_row.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698