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

Side by Side 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: consty const 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_avatar_downloader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/test_extension_system.h" 10 #include "chrome/browser/extensions/test_extension_system.h"
(...skipping 22 matching lines...) Expand all
33 ~MessageCenterSettingsControllerBaseTest() override{}; 33 ~MessageCenterSettingsControllerBaseTest() override{};
34 34
35 base::FilePath GetProfilePath(const std::string& base_name) { 35 base::FilePath GetProfilePath(const std::string& base_name) {
36 return testing_profile_manager_.profile_manager()->user_data_dir() 36 return testing_profile_manager_.profile_manager()->user_data_dir()
37 .AppendASCII(base_name); 37 .AppendASCII(base_name);
38 } 38 }
39 39
40 void SetUp() override { ASSERT_TRUE(testing_profile_manager_.SetUp()); } 40 void SetUp() override { ASSERT_TRUE(testing_profile_manager_.SetUp()); }
41 41
42 virtual TestingProfile* CreateProfile(const std::string& name) { 42 virtual TestingProfile* CreateProfile(const std::string& name) {
43 return testing_profile_manager_.CreateTestingProfile(name); 43 TestingProfile* profile =
44 testing_profile_manager_.CreateTestingProfile(name);
45 const ProfileInfoCache& cache =
46 *testing_profile_manager_.profile_info_cache();
47 // Preload the avatar icon so it's cached for the test's execution.
48 cache.GetAvatarIconOfProfileAtIndex(
49 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.
50 base::MessageLoop::current()->RunUntilIdle();
51 return profile;
44 } 52 }
45 53
46 void CreateController() { 54 void CreateController() {
47 controller_.reset(new MessageCenterSettingsController( 55 controller_.reset(new MessageCenterSettingsController(
48 testing_profile_manager_.profile_info_cache())); 56 testing_profile_manager_.profile_info_cache()));
49 } 57 }
50 58
51 void ResetController() { 59 void ResetController() {
52 controller_.reset(); 60 controller_.reset();
53 } 61 }
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 EXPECT_EQ(3u, notifiers.size()); 258 EXPECT_EQ(3u, notifiers.size());
251 EXPECT_EQ(ash::system_notifier::kNotifierScreenshot, 259 EXPECT_EQ(ash::system_notifier::kNotifierScreenshot,
252 notifiers[2]->notifier_id.id); 260 notifiers[2]->notifier_id.id);
253 #endif 261 #endif
254 262
255 EXPECT_EQ(kBarId, notifiers[0]->notifier_id.id); 263 EXPECT_EQ(kBarId, notifiers[0]->notifier_id.id);
256 EXPECT_EQ(kFooId, notifiers[1]->notifier_id.id); 264 EXPECT_EQ(kFooId, notifiers[1]->notifier_id.id);
257 265
258 STLDeleteElements(&notifiers); 266 STLDeleteElements(&notifiers);
259 } 267 }
OLDNEW
« 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