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

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

Issue 12258036: Properly handle disabling sync via the google dashboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Skip signout on cros. Created 7 years, 10 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 | « chrome/browser/signin/signin_manager_fake.cc ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/signin_manager_unittest.cc
diff --git a/chrome/browser/signin/signin_manager_unittest.cc b/chrome/browser/signin/signin_manager_unittest.cc
index 8dc20b2de67ff68db2dd8e889ec931ed8fffd27f..56e0198d4a290c9950abdfa063f93f1d756dab75 100644
--- a/chrome/browser/signin/signin_manager_unittest.cc
+++ b/chrome/browser/signin/signin_manager_unittest.cc
@@ -654,3 +654,13 @@ TEST_F(SigninManagerTest, SignInWithOAuthChallengeOtp) {
EXPECT_EQ(1U, google_login_success_.size());
EXPECT_EQ(1U, google_login_failure_.size());
}
+
+TEST_F(SigninManagerTest, SignOutWhileProhibited) {
+ manager_->Initialize(profile_.get());
+ EXPECT_TRUE(manager_->GetAuthenticatedUsername().empty());
+
+ manager_->SetAuthenticatedUsername("user@gmail.com");
+ manager_->ProhibitSignout();
+ manager_->SignOut();
+ EXPECT_FALSE(manager_->GetAuthenticatedUsername().empty());
+}
« no previous file with comments | « chrome/browser/signin/signin_manager_fake.cc ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698