Migrate ProfileInfoCache away from BrowserThread::FILE.
[email protected]
[email protected] (minor test tweak in c/b/tracing)
Bug: 689520
Change-Id: I61f980da1a30f88b5c5688f1b5c62fa1646f6bf6
Reviewed-on: https://chromium-review.googlesource.com/611127
Commit-Queue: Gabriel Charette <[email protected]>
Reviewed-by: Ryan Hamilton <[email protected]>
Cr-Commit-Position: refs/heads/master@{#494108}
diff --git a/chrome/browser/profiles/profile_info_cache_unittest.cc b/chrome/browser/profiles/profile_info_cache_unittest.cc
index 6cb72ec..59c193b 100644
--- a/chrome/browser/profiles/profile_info_cache_unittest.cc
+++ b/chrome/browser/profiles/profile_info_cache_unittest.cc
@@ -108,9 +108,9 @@
}
void ProfileInfoCacheTest::TearDown() {
- // Drain the UI thread to make sure all tasks are completed. This prevents
+ // Drain remaining tasks to make sure all tasks are completed. This prevents
// memory leaks.
- base::RunLoop().RunUntilIdle();
+ content::RunAllBlockingPoolTasksUntilIdle();
}
ProfileInfoCache* ProfileInfoCacheTest::GetCache() {
@@ -441,7 +441,7 @@
GetCache()->SetGAIAPictureOfProfileAtIndex(0, &gaia_image);
// Make sure everything has completed, and the file has been written to disk.
- base::RunLoop().RunUntilIdle();
+ content::RunAllBlockingPoolTasksUntilIdle();
EXPECT_TRUE(gfx::test::AreImagesEqual(
gaia_image, *GetCache()->GetGAIAPictureOfProfileAtIndex(0)));
@@ -450,7 +450,7 @@
// Try to get the GAIA picture. This should return NULL until the read from
// disk is done.
EXPECT_EQ(NULL, GetCache()->GetGAIAPictureOfProfileAtIndex(0));
- base::RunLoop().RunUntilIdle();
+ content::RunAllBlockingPoolTasksUntilIdle();
EXPECT_TRUE(gfx::test::AreImagesEqual(
gaia_image, *GetCache()->GetGAIAPictureOfProfileAtIndex(0)));
@@ -656,7 +656,7 @@
profile_info_cache.AddProfileToCache(path_1, ASCIIToUTF16("name_1"),
std::string(), base::string16(), kIconIndex, std::string());
EXPECT_EQ(1U, profile_info_cache.GetNumberOfProfiles());
- base::RunLoop().RunUntilIdle();
+ content::RunAllBlockingPoolTasksUntilIdle();
// We haven't downloaded any high-res avatars yet.
EXPECT_EQ(0U, profile_info_cache.cached_avatar_images_.size());
@@ -696,7 +696,7 @@
profile_info_cache.GetHighResAvatarOfProfileAtIndex(0));
// Make sure everything has completed, and the file has been written to disk.
- base::RunLoop().RunUntilIdle();
+ content::RunAllBlockingPoolTasksUntilIdle();
// Clean up.
EXPECT_NE(std::string::npos, icon_path.MaybeAsASCII().find(file_name));
@@ -719,7 +719,7 @@
std::string(), base::string16(),
kIconIndex, std::string());
EXPECT_EQ(1U, profile_info_cache.GetNumberOfProfiles());
- base::RunLoop().RunUntilIdle();
+ content::RunAllBlockingPoolTasksUntilIdle();
// We haven't tried to download any high-res avatars as the specified icon is
// just a placeholder.