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

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

Issue 1117453002: Add gaia_id to ProfileInfoCache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comments Created 5 years, 7 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/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 TEST_F(ProfileListChromeOSTest, DontShowSupervisedUsers) { 158 TEST_F(ProfileListChromeOSTest, DontShowSupervisedUsers) {
159 base::string16 name1(ASCIIToUTF16("p1")); 159 base::string16 name1(ASCIIToUTF16("p1"));
160 base::string16 supervised_name(ASCIIToUTF16("p2@example.com")); 160 base::string16 supervised_name(ASCIIToUTF16("p2@example.com"));
161 161
162 AddProfile(name1, true); 162 AddProfile(name1, true);
163 163
164 // Add a managed user profile. 164 // Add a managed user profile.
165 ProfileInfoCache* cache = manager()->profile_info_cache(); 165 ProfileInfoCache* cache = manager()->profile_info_cache();
166 manager()->profile_info_cache()->AddProfileToCache( 166 manager()->profile_info_cache()->AddProfileToCache(
167 cache->GetUserDataDir().AppendASCII("p2"), supervised_name, 167 cache->GetUserDataDir().AppendASCII("p2"), supervised_name, std::string(),
168 base::string16(), 0, "TEST_ID"); 168 base::string16(), 0, "TEST_ID");
169 169
170 GetFakeChromeUserManager()->AddUser(base::UTF16ToASCII(supervised_name)); 170 GetFakeChromeUserManager()->AddUser(base::UTF16ToASCII(supervised_name));
171 171
172 AvatarMenu* menu = GetAvatarMenu(); 172 AvatarMenu* menu = GetAvatarMenu();
173 ASSERT_EQ(1U, menu->GetNumberOfItems()); 173 ASSERT_EQ(1U, menu->GetNumberOfItems());
174 174
175 const AvatarMenu::Item& item1 = menu->GetItemAt(0); 175 const AvatarMenu::Item& item1 = menu->GetItemAt(0);
176 EXPECT_EQ(0U, item1.menu_index); 176 EXPECT_EQ(0U, item1.menu_index);
177 EXPECT_EQ(name1, item1.name); 177 EXPECT_EQ(name1, item1.name);
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 298
299 // Should only show avatar menu with multiple users. 299 // Should only show avatar menu with multiple users.
300 EXPECT_FALSE(AvatarMenu::ShouldShowAvatarMenu()); 300 EXPECT_FALSE(AvatarMenu::ShouldShowAvatarMenu());
301 301
302 AddProfile(name2, false); 302 AddProfile(name2, false);
303 303
304 EXPECT_FALSE(AvatarMenu::ShouldShowAvatarMenu()); 304 EXPECT_FALSE(AvatarMenu::ShouldShowAvatarMenu());
305 } 305 }
306 306
307 } // namespace chromeos 307 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698