Chromium Code Reviews| 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..4947d5ea7d8b152d77ec48fc9258d7a62f523fb4 100644 |
| --- a/chrome/browser/notifications/message_center_settings_controller_unittest.cc |
| +++ b/chrome/browser/notifications/message_center_settings_controller_unittest.cc |
| @@ -40,7 +40,15 @@ 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); |
| + const ProfileInfoCache& cache = |
| + *testing_profile_manager_.profile_info_cache(); |
| + // Preload the avatar icon so it's cached for the test's execution. |
| + cache.GetAvatarIconOfProfileAtIndex( |
| + cache.GetIndexOfProfileWithPath(profile->GetPath())); |
|
Jun Mukai
2015/03/19 18:27:45
Personally I think it would be better to be a poin
Jun Mukai
2015/03/19 18:34:24
Ah, could you also add more comments for why this
Mike Lerman
2015/03/19 19:27:30
Changed to a pointer. Comment added.
|
| + base::MessageLoop::current()->RunUntilIdle(); |
| + return profile; |
| } |
| void CreateController() { |