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

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

Issue 890873004: ProfileInfoCache: Don't delete ProfileAvatarDownloader while we're being called by it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 5 years, 11 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: chrome/browser/profiles/profile_info_cache_unittest.cc
diff --git a/chrome/browser/profiles/profile_info_cache_unittest.cc b/chrome/browser/profiles/profile_info_cache_unittest.cc
index 03223c60dc051fe0a5da49f1f48c4498641cba7d..57c2e338b0132f3e43721bdb9c3857dfc9eeb202 100644
--- a/chrome/browser/profiles/profile_info_cache_unittest.cc
+++ b/chrome/browser/profiles/profile_info_cache_unittest.cc
@@ -571,11 +571,13 @@ TEST_F(ProfileInfoCacheTest, DownloadHighResAvatarTest) {
avatar_downloader.OnFetchComplete(
GURL("http://www.google.com/avatar.png"), &bitmap);
+ // Now the download should not be in progress anymore.
+ EXPECT_EQ(0U, GetCache()->avatar_images_downloads_in_progress_.size());
+
std::string file_name =
profiles::GetDefaultAvatarIconFileNameAtIndex(kIconIndex);
// The file should have been cached and saved.
- EXPECT_EQ(1U, GetCache()->avatar_images_downloads_in_progress_.size());
EXPECT_EQ(1U, GetCache()->cached_avatar_images_.size());
EXPECT_TRUE(GetCache()->GetHighResAvatarOfProfileAtIndex(0));
EXPECT_EQ(GetCache()->cached_avatar_images_[file_name],

Powered by Google App Engine
This is Rietveld 408576698