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

Unified Diff: chrome/browser/signin/chrome_signin_client_unittest.cc

Issue 2478173003: Lock profile before sign in when force sign in is enabled. (Closed)
Patch Set: rogerta's comments Created 4 years, 1 month 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
Index: chrome/browser/signin/chrome_signin_client_unittest.cc
diff --git a/chrome/browser/signin/chrome_signin_client_unittest.cc b/chrome/browser/signin/chrome_signin_client_unittest.cc
index e4500de255e843b34a6d905548b88843ed4a3d42..00ea61cf893a7d270cb3dc0d193b08251d5ca160 100644
--- a/chrome/browser/signin/chrome_signin_client_unittest.cc
+++ b/chrome/browser/signin/chrome_signin_client_unittest.cc
@@ -133,7 +133,7 @@ class MockChromeSigninClient : public ChromeSigninClient {
: ChromeSigninClient(profile, controller) {}
MOCK_METHOD1(ShowUserManager, void(const base::FilePath&));
- MOCK_METHOD1(LockProfile, void(const base::FilePath&));
+ MOCK_METHOD1(LockForceSigninProfile, void(const base::FilePath&));
};
class MockSigninManager : public SigninManager {
@@ -187,7 +187,8 @@ TEST_F(ChromeSigninClientSignoutTest, SignOut) {
EXPECT_CALL(*client_, ShowUserManager(browser()->profile()->GetPath()))
.Times(1);
- EXPECT_CALL(*client_, LockProfile(browser()->profile()->GetPath())).Times(1);
+ EXPECT_CALL(*client_, LockForceSigninProfile(browser()->profile()->GetPath()))
+ .Times(1);
EXPECT_CALL(*manager_, DoSignOut(source_metric, delete_metric)).Times(1);
manager_->SignOut(source_metric, delete_metric);
@@ -204,7 +205,8 @@ TEST_F(ChromeSigninClientSignoutTest, SignOutWithoutManager) {
EXPECT_CALL(*client_, ShowUserManager(browser()->profile()->GetPath()))
.Times(0);
- EXPECT_CALL(*client_, LockProfile(browser()->profile()->GetPath())).Times(1);
+ EXPECT_CALL(*client_, LockForceSigninProfile(browser()->profile()->GetPath()))
+ .Times(1);
EXPECT_CALL(*manager_, DoSignOut(source_metric, delete_metric)).Times(1);
manager_->SignOut(source_metric, delete_metric);
@@ -212,7 +214,8 @@ TEST_F(ChromeSigninClientSignoutTest, SignOutWithoutManager) {
EXPECT_CALL(*client_, ShowUserManager(browser()->profile()->GetPath()))
.Times(1);
- EXPECT_CALL(*client_, LockProfile(browser()->profile()->GetPath())).Times(1);
+ EXPECT_CALL(*client_, LockForceSigninProfile(browser()->profile()->GetPath()))
+ .Times(1);
EXPECT_CALL(*manager_, DoSignOut(source_metric, delete_metric)).Times(1);
manager_->SignOut(source_metric, delete_metric);
}
@@ -229,7 +232,8 @@ TEST_F(ChromeSigninClientSignoutTest, SignOutWithoutForceSignin) {
EXPECT_CALL(*client_, ShowUserManager(browser()->profile()->GetPath()))
.Times(0);
- EXPECT_CALL(*client_, LockProfile(browser()->profile()->GetPath())).Times(0);
+ EXPECT_CALL(*client_, LockForceSigninProfile(browser()->profile()->GetPath()))
+ .Times(0);
EXPECT_CALL(*manager_, DoSignOut(source_metric, delete_metric)).Times(1);
manager_->SignOut(source_metric, delete_metric);
}
@@ -249,7 +253,8 @@ TEST_F(ChromeSigninClientSignoutTest, SignOutGuestSession) {
EXPECT_CALL(*client_, ShowUserManager(browser()->profile()->GetPath()))
.Times(0);
- EXPECT_CALL(*client_, LockProfile(browser()->profile()->GetPath())).Times(0);
+ EXPECT_CALL(*client_, LockForceSigninProfile(browser()->profile()->GetPath()))
+ .Times(0);
EXPECT_CALL(*manager_, DoSignOut(source_metric, delete_metric)).Times(1);
manager_->SignOut(source_metric, delete_metric);
}
« no previous file with comments | « chrome/browser/signin/chrome_signin_client.cc ('k') | chrome/browser/ui/webui/signin/inline_login_handler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698