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

Unified Diff: trunk/src/chrome/browser/sync/profile_sync_service_startup_unittest.cc

Issue 17610004: Revert 208315 "Make use of InvalidationService" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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
Index: trunk/src/chrome/browser/sync/profile_sync_service_startup_unittest.cc
===================================================================
--- trunk/src/chrome/browser/sync/profile_sync_service_startup_unittest.cc (revision 208346)
+++ trunk/src/chrome/browser/sync/profile_sync_service_startup_unittest.cc (working copy)
@@ -168,7 +168,7 @@
SigninManagerBase* signin =
SigninManagerFactory::GetForProfile(profile);
profile->GetPrefs()->SetString(prefs::kGoogleServicesUsername,
- "test_user@gmail.com");
+ "test_user");
signin->Initialize(profile, NULL);
EXPECT_FALSE(signin->GetAuthenticatedUsername().empty());
return new TestProfileSyncService(
@@ -216,9 +216,9 @@
// Simulate successful signin as test_user.
profile_->GetPrefs()->SetString(prefs::kGoogleServicesUsername,
- "test_user@gmail.com");
- sync_->signin()->SetAuthenticatedUsername("test_user@gmail.com");
- GoogleServiceSigninSuccessDetails details("test_user@gmail.com", "");
+ "test_user");
+ sync_->signin()->SetAuthenticatedUsername("test_user");
+ GoogleServiceSigninSuccessDetails details("test_user", "");
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL,
content::Source<Profile>(profile_.get()),
@@ -263,9 +263,9 @@
// Simulate successful signin as test_user.
profile_->GetPrefs()->SetString(prefs::kGoogleServicesUsername,
- "test_user@gmail.com");
- sync_->signin()->SetAuthenticatedUsername("test_user@gmail.com");
- GoogleServiceSigninSuccessDetails details("test_user@gmail.com", "");
+ "test_user");
+ sync_->signin()->SetAuthenticatedUsername("test_user");
+ GoogleServiceSigninSuccessDetails details("test_user", "");
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL,
content::Source<Profile>(profile_.get()),
@@ -284,7 +284,7 @@
// TODO(pavely): Reenable test once android is switched to oauth2.
TEST_F(ProfileSyncServiceStartupTest, DISABLED_StartInvalidCredentials) {
profile_->GetPrefs()->SetString(prefs::kGoogleServicesUsername,
- "test_user@gmail.com");
+ "test_user");
SigninManagerFactory::GetForProfile(
profile_.get())->Initialize(profile_.get(), NULL);
CreateSyncService();
@@ -313,8 +313,7 @@
sync_->SetSetupInProgress(true);
// Simulate successful signin.
- GoogleServiceSigninSuccessDetails details("test_user@gmail.com",
- std::string());
+ GoogleServiceSigninSuccessDetails details("test_user", std::string());
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL,
content::Source<Profile>(profile_.get()),
@@ -368,8 +367,7 @@
TEST_F(ProfileSyncServiceStartupTest, StartNormal) {
// Pre load the tokens
- profile_->GetPrefs()->SetString(prefs::kGoogleServicesUsername,
- "test_user@gmail.com");
+ profile_->GetPrefs()->SetString(prefs::kGoogleServicesUsername, "test_user");
SigninManagerFactory::GetForProfile(profile_.get())->Initialize(
profile_.get(), NULL);
CreateSyncService();
@@ -402,8 +400,7 @@
}
// Pre load the tokens
- profile_->GetPrefs()->SetString(prefs::kGoogleServicesUsername,
- "test_user@gmail.com");
+ profile_->GetPrefs()->SetString(prefs::kGoogleServicesUsername, "test_user");
SigninManagerFactory::GetForProfile(profile_.get())->Initialize(
profile_.get(), NULL);
CreateSyncService();
@@ -432,8 +429,7 @@
profile_->GetPrefs()->SetBoolean(prefs::kSyncKeepEverythingSynced, false);
// Pre load the tokens
- profile_->GetPrefs()->SetString(prefs::kGoogleServicesUsername,
- "test_user@gmail.com");
+ profile_->GetPrefs()->SetString(prefs::kGoogleServicesUsername, "test_user");
SigninManagerFactory::GetForProfile(profile_.get())->Initialize(
profile_.get(), NULL);
CreateSyncService();
@@ -455,8 +451,7 @@
TEST_F(ProfileSyncServiceStartupTest, ManagedStartup) {
// Service should not be started by Initialize() since it's managed.
- profile_->GetPrefs()->SetString(prefs::kGoogleServicesUsername,
- "test_user@gmail.com");
+ profile_->GetPrefs()->SetString(prefs::kGoogleServicesUsername, "test_user");
SigninManagerFactory::GetForProfile(profile_.get())->Initialize(
profile_.get(), NULL);
CreateSyncService();
@@ -473,8 +468,7 @@
}
TEST_F(ProfileSyncServiceStartupTest, SwitchManaged) {
- profile_->GetPrefs()->SetString(prefs::kGoogleServicesUsername,
- "test_user@gmail.com");
+ profile_->GetPrefs()->SetString(prefs::kGoogleServicesUsername, "test_user");
SigninManagerFactory::GetForProfile(profile_.get())->Initialize(
profile_.get(), NULL);
CreateSyncService();
@@ -505,8 +499,7 @@
}
TEST_F(ProfileSyncServiceStartupTest, StartFailure) {
- profile_->GetPrefs()->SetString(prefs::kGoogleServicesUsername,
- "test_user@gmail.com");
+ profile_->GetPrefs()->SetString(prefs::kGoogleServicesUsername, "test_user");
SigninManagerFactory::GetForProfile(profile_.get())->Initialize(
profile_.get(), NULL);
CreateSyncService();
@@ -539,8 +532,7 @@
TEST_F(ProfileSyncServiceStartupTest, StartDownloadFailed) {
// Pre load the tokens
- profile_->GetPrefs()->SetString(prefs::kGoogleServicesUsername,
- "test_user@gmail.com");
+ profile_->GetPrefs()->SetString(prefs::kGoogleServicesUsername, "test_user");
SigninManagerFactory::GetForProfile(profile_.get())->Initialize(
profile_.get(), NULL);
CreateSyncService();

Powered by Google App Engine
This is Rietveld 408576698