Index: chrome/browser/sync/profile_sync_service_startup_unittest.cc |
=================================================================== |
--- chrome/browser/sync/profile_sync_service_startup_unittest.cc (revision 208727) |
+++ 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(); |