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

Unified Diff: chrome/browser/profiles/gaia_info_update_service_unittest.cc

Issue 8879036: Clear GAIA profile picture URL when signing out (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tests Created 9 years 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/profiles/gaia_info_update_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/gaia_info_update_service_unittest.cc
diff --git a/chrome/browser/profiles/gaia_info_update_service_unittest.cc b/chrome/browser/profiles/gaia_info_update_service_unittest.cc
index 93d401fb7c1773dc4eca06b6f9835fa9f8f0c7d1..4fa04f974305919b9213742b979c6e6b910f7e29 100644
--- a/chrome/browser/profiles/gaia_info_update_service_unittest.cc
+++ b/chrome/browser/profiles/gaia_info_update_service_unittest.cc
@@ -180,13 +180,19 @@ TEST_F(GAIAInfoUpdateServiceTest, LogOut) {
gfx::Image gaia_picture = gfx::test::CreateImage();
GetCache()->SetGAIAPictureOfProfileAtIndex(0, &gaia_picture);
+ // Set a fake picture URL.
+ profile()->GetPrefs()->SetString(prefs::kProfileGAIAInfoPictureURL,
+ "example.com");
+
GAIAInfoUpdateService service(profile());
+ EXPECT_FALSE(service.GetCachedPictureURL().empty());
// Log out.
profile()->GetPrefs()->SetString(prefs::kGoogleServicesUsername, "");
- // Verify that the GAIA name and picture are unset.
+ // Verify that the GAIA name and picture, and picture URL are unset.
EXPECT_TRUE(GetCache()->GetGAIANameOfProfileAtIndex(0).empty());
EXPECT_EQ(NULL, GetCache()->GetGAIAPictureOfProfileAtIndex(0));
+ EXPECT_TRUE(service.GetCachedPictureURL().empty());
}
TEST_F(GAIAInfoUpdateServiceTest, LogIn) {
« no previous file with comments | « chrome/browser/profiles/gaia_info_update_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698