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

Unified Diff: chrome/browser/notifications/message_center_settings_controller_unittest.cc

Issue 845373002: Change default code flag to NewAvatarMenu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_avatar_downloader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/notifications/message_center_settings_controller_unittest.cc
diff --git a/chrome/browser/notifications/message_center_settings_controller_unittest.cc b/chrome/browser/notifications/message_center_settings_controller_unittest.cc
index cd8e18b8656882e7d73ce10fbe188fce2bd271a4..e391501f50bb5c2f6c169292bb7db533cb424e2b 100644
--- a/chrome/browser/notifications/message_center_settings_controller_unittest.cc
+++ b/chrome/browser/notifications/message_center_settings_controller_unittest.cc
@@ -40,7 +40,14 @@ class MessageCenterSettingsControllerBaseTest : public testing::Test {
void SetUp() override { ASSERT_TRUE(testing_profile_manager_.SetUp()); }
virtual TestingProfile* CreateProfile(const std::string& name) {
- return testing_profile_manager_.CreateTestingProfile(name);
+ TestingProfile* profile =
+ testing_profile_manager_.CreateTestingProfile(name);
+ ProfileInfoCache& cache = *testing_profile_manager_.profile_info_cache();
Jun Mukai 2015/03/19 16:51:20 Why not ProfileInfoCache* cache = testing_profile_
noms (inactive) 2015/03/19 16:53:16 nit: const?
Mike Lerman 2015/03/19 17:23:56 I'll go with const &, the standard way of referenc
+ // Preload the avatar icon so it's cached for the test's execution.
+ cache.GetAvatarIconOfProfileAtIndex(
+ cache.GetIndexOfProfileWithPath(profile->GetPath()));
+ base::MessageLoop::current()->RunUntilIdle();
+ return profile;
}
void CreateController() {
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_avatar_downloader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698