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

Side by Side Diff: chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc

Issue 1701563002: Refactor ProfileInfoCache in c/b/ui/views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to comments Created 4 years, 10 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
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 "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // Create a profile for the user. 83 // Create a profile for the user.
84 manager()->CreateTestingProfile(account_id.GetUserEmail()); 84 manager()->CreateTestingProfile(account_id.GetUserEmail());
85 } 85 }
86 86
87 AvatarMenu* GetAvatarMenu() { 87 AvatarMenu* GetAvatarMenu() {
88 // Reset the MockObserver. 88 // Reset the MockObserver.
89 mock_observer_.reset(new MockObserver()); 89 mock_observer_.reset(new MockObserver());
90 EXPECT_EQ(0, change_count()); 90 EXPECT_EQ(0, change_count());
91 91
92 // Reset the menu. 92 // Reset the menu.
93 avatar_menu_.reset(new AvatarMenu( 93 avatar_menu_.reset(new AvatarMenu(manager()->profile_attributes_storage(),
94 manager()->profile_info_cache(), 94 mock_observer_.get(), NULL));
achuithb 2016/02/19 11:55:22 nit: nullptr
lwchkg 2016/02/20 05:20:03 Done.
95 mock_observer_.get(),
96 NULL));
97 avatar_menu_->RebuildMenu(); 95 avatar_menu_->RebuildMenu();
98 EXPECT_EQ(0, change_count()); 96 EXPECT_EQ(0, change_count());
99 return avatar_menu_.get(); 97 return avatar_menu_.get();
100 } 98 }
101 99
102 void ActiveUserChanged(const base::string16& name) { 100 void ActiveUserChanged(const base::string16& name) {
103 std::string email_string = base::UTF16ToASCII(name) + "@example.com"; 101 std::string email_string = base::UTF16ToASCII(name) + "@example.com";
104 const AccountId account_id(AccountId::FromUserEmail(email_string)); 102 const AccountId account_id(AccountId::FromUserEmail(email_string));
105 GetFakeChromeUserManager()->SwitchActiveUser(account_id); 103 GetFakeChromeUserManager()->SwitchActiveUser(account_id);
106 } 104 }
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 301
304 // Should only show avatar menu with multiple users. 302 // Should only show avatar menu with multiple users.
305 EXPECT_FALSE(AvatarMenu::ShouldShowAvatarMenu()); 303 EXPECT_FALSE(AvatarMenu::ShouldShowAvatarMenu());
306 304
307 AddProfile(name2, false); 305 AddProfile(name2, false);
308 306
309 EXPECT_FALSE(AvatarMenu::ShouldShowAvatarMenu()); 307 EXPECT_FALSE(AvatarMenu::ShouldShowAvatarMenu());
310 } 308 }
311 309
312 } // namespace chromeos 310 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/avatar_menu.h » ('j') | chrome/browser/profiles/avatar_menu.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698