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

Unified Diff: chrome/browser/profiles/profile_list_desktop_browsertest.cc

Issue 597783003: Update the AvatarMenu when a supervised user's custodian info changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests Created 6 years, 3 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 | « chrome/browser/profiles/avatar_menu.cc ('k') | chrome/browser/supervised_user/supervised_user_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_list_desktop_browsertest.cc
diff --git a/chrome/browser/profiles/profile_list_desktop_browsertest.cc b/chrome/browser/profiles/profile_list_desktop_browsertest.cc
index 65a0b2fdbcbc18d2155e57466a823e08e980e08f..e87bdf1c851fcecdf8085ed13824ca77a85646c6 100644
--- a/chrome/browser/profiles/profile_list_desktop_browsertest.cc
+++ b/chrome/browser/profiles/profile_list_desktop_browsertest.cc
@@ -34,13 +34,8 @@ class ProfileListDesktopBrowserTest : public InProcessBrowserTest {
public:
ProfileListDesktopBrowserTest() {}
- AvatarMenu* GetAvatarMenu(ProfileInfoCache* cache) {
- // Reset the menu.
- avatar_menu_.reset(new AvatarMenu(
- cache,
- NULL,
- browser()));
- return avatar_menu_.get();
+ scoped_ptr<AvatarMenu> CreateAvatarMenu(ProfileInfoCache* cache) {
+ return scoped_ptr<AvatarMenu>(new AvatarMenu(cache, NULL, browser()));
}
private:
@@ -68,7 +63,7 @@ IN_PROC_BROWSER_TEST_F(ProfileListDesktopBrowserTest, MAYBE_SignOut) {
ProfileInfoCache& cache = profile_manager->GetProfileInfoCache();
size_t index = cache.GetIndexOfProfileWithPath(current_profile->GetPath());
- AvatarMenu* menu = GetAvatarMenu(&cache);
+ scoped_ptr<AvatarMenu> menu = CreateAvatarMenu(&cache);
menu->RebuildMenu();
BrowserList* browser_list =
@@ -125,7 +120,7 @@ IN_PROC_BROWSER_TEST_F(ProfileListDesktopBrowserTest, MAYBE_SwitchToProfile) {
content::RunMessageLoop();
ASSERT_EQ(cache.GetNumberOfProfiles(), 2U);
- AvatarMenu* menu = GetAvatarMenu(&cache);
+ scoped_ptr<AvatarMenu> menu = CreateAvatarMenu(&cache);
menu->RebuildMenu();
BrowserList* browser_list =
BrowserList::GetInstance(chrome::GetActiveDesktop());
« no previous file with comments | « chrome/browser/profiles/avatar_menu.cc ('k') | chrome/browser/supervised_user/supervised_user_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698