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

Unified Diff: chrome/browser/ui/webui/settings/people_handler_unittest.cc

Issue 2603283003: [MD Settings][People] Force sign out only in the case of unrecoverable error (Closed)
Patch Set: Created 3 years, 12 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/ui/webui/settings/people_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/settings/people_handler_unittest.cc
diff --git a/chrome/browser/ui/webui/settings/people_handler_unittest.cc b/chrome/browser/ui/webui/settings/people_handler_unittest.cc
index 9134d833095af3dfbf2424b772d2f18ba14643a9..365232d9f7244d3ad09a1cc4966bbb7baec2e135 100644
--- a/chrome/browser/ui/webui/settings/people_handler_unittest.cc
+++ b/chrome/browser/ui/webui/settings/people_handler_unittest.cc
@@ -404,7 +404,7 @@ TEST_F(PeopleHandlerTest,
EXPECT_CALL(*mock_pss_, IsBackendInitialized()).WillRepeatedly(Return(false));
SetDefaultExpectationsForConfigPage();
- handler_->OpenSyncSetup(false /* creating_supervised_user */);
+ handler_->OpenSyncSetup();
EXPECT_EQ(1U, web_ui_.call_data().size());
ExpectPageStatusChanged(PeopleHandler::kSpinnerPageStatus);
@@ -440,7 +440,7 @@ TEST_F(PeopleHandlerTest,
.WillOnce(Return(false))
.WillRepeatedly(Return(true));
SetDefaultExpectationsForConfigPage();
- handler_->OpenSyncSetup(false /* creating_supervised_user */);
+ handler_->OpenSyncSetup();
// It's important to tell sync the user cancelled the setup flow before we
// tell it we're through with the setup progress.
@@ -461,7 +461,7 @@ TEST_F(PeopleHandlerTest,
error_ = GoogleServiceAuthError::AuthErrorNone();
EXPECT_CALL(*mock_pss_, IsBackendInitialized()).WillRepeatedly(Return(false));
- handler_->OpenSyncSetup(false /* creating_supervised_user */);
+ handler_->OpenSyncSetup();
ExpectPageStatusChanged(PeopleHandler::kSpinnerPageStatus);
Mock::VerifyAndClearExpectations(mock_pss_);
error_ = GoogleServiceAuthError(
@@ -488,7 +488,7 @@ TEST_F(PeopleHandlerNonCrosTest, HandleGaiaAuthFailure) {
.WillRepeatedly(Return(false));
EXPECT_CALL(*mock_pss_, IsFirstSetupComplete()).WillRepeatedly(Return(false));
// Open the web UI.
- handler_->OpenSyncSetup(false /* creating_supervised_user */);
+ handler_->OpenSyncSetup();
ASSERT_FALSE(handler_->is_configuring_sync());
}
@@ -498,7 +498,7 @@ TEST_F(PeopleHandlerNonCrosTest, UnrecoverableErrorInitializingSync) {
EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(false));
EXPECT_CALL(*mock_pss_, IsFirstSetupComplete()).WillRepeatedly(Return(false));
// Open the web UI.
- handler_->OpenSyncSetup(false /* creating_supervised_user */);
+ handler_->OpenSyncSetup();
ASSERT_FALSE(handler_->is_configuring_sync());
}
@@ -507,7 +507,7 @@ TEST_F(PeopleHandlerNonCrosTest, GaiaErrorInitializingSync) {
EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(false));
EXPECT_CALL(*mock_pss_, IsFirstSetupComplete()).WillRepeatedly(Return(false));
// Open the web UI.
- handler_->OpenSyncSetup(false /* creating_supervised_user */);
+ handler_->OpenSyncSetup();
ASSERT_FALSE(handler_->is_configuring_sync());
}
@@ -707,7 +707,7 @@ TEST_F(PeopleHandlerTest, ShowSyncSetup) {
SetupInitializedProfileSyncService();
// This should display the sync setup dialog (not login).
SetDefaultExpectationsForConfigPage();
- handler_->OpenSyncSetup(false /* creating_supervised_user */);
+ handler_->OpenSyncSetup();
ExpectSyncPrefsChanged();
}
@@ -742,7 +742,7 @@ TEST_F(PeopleHandlerTest, ShowSigninOnAuthError) {
// On ChromeOS, this should display the spinner while we try to startup the
// sync backend, and on desktop this displays the login dialog.
- handler_->OpenSyncSetup(false /* creating_supervised_user */);
+ handler_->OpenSyncSetup();
// Sync setup is closed when re-auth is in progress.
EXPECT_EQ(NULL,
@@ -761,7 +761,7 @@ TEST_F(PeopleHandlerTest, ShowSetupSyncEverything) {
SetupInitializedProfileSyncService();
SetDefaultExpectationsForConfigPage();
// This should display the sync setup dialog (not login).
- handler_->OpenSyncSetup(false /* creating_supervised_user */);
+ handler_->OpenSyncSetup();
const base::DictionaryValue* dictionary = ExpectSyncPrefsChanged();
CheckBool(dictionary, "syncAllDataTypes", true);
@@ -791,7 +791,7 @@ TEST_F(PeopleHandlerTest, ShowSetupManuallySyncAll) {
sync_prefs.SetKeepEverythingSynced(false);
SetDefaultExpectationsForConfigPage();
// This should display the sync setup dialog (not login).
- handler_->OpenSyncSetup(false /* creating_supervised_user */);
+ handler_->OpenSyncSetup();
const base::DictionaryValue* dictionary = ExpectSyncPrefsChanged();
CheckConfigDataTypeArguments(dictionary, CHOOSE_WHAT_TO_SYNC, GetAllTypes());
@@ -815,7 +815,7 @@ TEST_F(PeopleHandlerTest, ShowSetupSyncForAllTypesIndividually) {
WillRepeatedly(Return(types));
// This should display the sync setup dialog (not login).
- handler_->OpenSyncSetup(false /* creating_supervised_user */);
+ handler_->OpenSyncSetup();
// Close the config overlay.
LoginUIServiceFactory::GetForProfile(profile_)->LoginUIClosed(
@@ -839,7 +839,7 @@ TEST_F(PeopleHandlerTest, ShowSetupOldGaiaPassphraseRequired) {
SetDefaultExpectationsForConfigPage();
// This should display the sync setup dialog (not login).
- handler_->OpenSyncSetup(false /* creating_supervised_user */);
+ handler_->OpenSyncSetup();
const base::DictionaryValue* dictionary = ExpectSyncPrefsChanged();
CheckBool(dictionary, "passphraseRequired", true);
@@ -855,7 +855,7 @@ TEST_F(PeopleHandlerTest, ShowSetupCustomPassphraseRequired) {
SetDefaultExpectationsForConfigPage();
// This should display the sync setup dialog (not login).
- handler_->OpenSyncSetup(false /* creating_supervised_user */);
+ handler_->OpenSyncSetup();
const base::DictionaryValue* dictionary = ExpectSyncPrefsChanged();
CheckBool(dictionary, "passphraseRequired", true);
@@ -873,7 +873,7 @@ TEST_F(PeopleHandlerTest, ShowSetupEncryptAll) {
.WillRepeatedly(Return(true));
// This should display the sync setup dialog (not login).
- handler_->OpenSyncSetup(false /* creating_supervised_user */);
+ handler_->OpenSyncSetup();
const base::DictionaryValue* dictionary = ExpectSyncPrefsChanged();
CheckBool(dictionary, "encryptAllData", true);
@@ -890,7 +890,7 @@ TEST_F(PeopleHandlerTest, ShowSetupEncryptAllDisallowed) {
.WillRepeatedly(Return(false));
// This should display the sync setup dialog (not login).
- handler_->OpenSyncSetup(false /* creating_supervised_user */);
+ handler_->OpenSyncSetup();
const base::DictionaryValue* dictionary = ExpectSyncPrefsChanged();
CheckBool(dictionary, "encryptAllData", false);
« no previous file with comments | « chrome/browser/ui/webui/settings/people_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698