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

Unified Diff: ash/login/lock_screen_controller_unittest.cc

Issue 2903353003: Adding mojo calls for easy unlock service (Closed)
Patch Set: comments and 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 | « ash/login/lock_screen_controller.cc ('k') | ash/login/mock_lock_screen_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/login/lock_screen_controller_unittest.cc
diff --git a/ash/login/lock_screen_controller_unittest.cc b/ash/login/lock_screen_controller_unittest.cc
index 3e42c9ee679438c372efa3643aa090e7051d6d41..a1c3debb5f67ab2b4d52b254cfe44653df3bcc42 100644
--- a/ash/login/lock_screen_controller_unittest.cc
+++ b/ash/login/lock_screen_controller_unittest.cc
@@ -38,4 +38,26 @@ TEST_F(LockScreenControllerTest, RequestAuthentication) {
base::RunLoop().RunUntilIdle();
}
+TEST_F(LockScreenControllerTest, RequestEasyUnlock) {
+ LockScreenController* controller = Shell::Get()->lock_screen_controller();
+ std::unique_ptr<MockLockScreenClient> client = BindMockLockScreenClient();
+
+ AccountId id = AccountId::FromUserEmail("user1@test.com");
+
+ // Verify AttemptUnlock mojo call is run with the same account id.
+ EXPECT_CALL(*client, AttemptUnlock(id));
+ controller->AttemptUnlock(id);
+ base::RunLoop().RunUntilIdle();
+
+ // Verify HardlockPod mojo call is run with the same account id.
+ EXPECT_CALL(*client, HardlockPod(id));
+ controller->HardlockPod(id);
+ base::RunLoop().RunUntilIdle();
+
+ // Verify RecordClickOnLockIcon mojo call is run with the same account id.
+ EXPECT_CALL(*client, RecordClickOnLockIcon(id));
+ controller->RecordClickOnLockIcon(id);
+ base::RunLoop().RunUntilIdle();
+}
+
} // namespace ash
« no previous file with comments | « ash/login/lock_screen_controller.cc ('k') | ash/login/mock_lock_screen_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698