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

Side by Side Diff: ash/system/user/tray_user_unittest.cc

Issue 253063002: CleanUp: Introduce UserInfo. Move session_state stuff to ash/session. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 6 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 | Annotate | Revision Log
« no previous file with comments | « ash/system/user/tray_user_separator.cc ('k') | ash/system/user/user_card_view.cc » ('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 <vector> 5 #include <vector>
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/session/user_info.h"
9 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
10 #include "ash/shell.h" 11 #include "ash/shell.h"
11 #include "ash/shell_delegate.h" 12 #include "ash/shell_delegate.h"
12 #include "ash/system/tray/system_tray.h" 13 #include "ash/system/tray/system_tray.h"
13 #include "ash/system/tray/tray_constants.h" 14 #include "ash/system/tray/tray_constants.h"
14 #include "ash/system/user/tray_user.h" 15 #include "ash/system/user/tray_user.h"
15 #include "ash/system/user/tray_user_separator.h" 16 #include "ash/system/user/tray_user_separator.h"
16 #include "ash/test/ash_test_base.h" 17 #include "ash/test/ash_test_base.h"
17 #include "ash/test/test_session_state_delegate.h" 18 #include "ash/test/test_session_state_delegate.h"
18 #include "ash/test/test_shell_delegate.h" 19 #include "ash/test/test_shell_delegate.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 232
232 // Make sure that user changing gets properly executed. 233 // Make sure that user changing gets properly executed.
233 TEST_F(TrayUserTest, MutiUserModeButtonClicks) { 234 TEST_F(TrayUserTest, MutiUserModeButtonClicks) {
234 // Have two users. 235 // Have two users.
235 InitializeParameters(2, true); 236 InitializeParameters(2, true);
236 aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow()); 237 aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
237 ShowTrayMenu(&generator); 238 ShowTrayMenu(&generator);
238 239
239 // Switch to a new user - which has a capitalized name. 240 // Switch to a new user - which has a capitalized name.
240 ClickUserItem(&generator, 1); 241 ClickUserItem(&generator, 1);
241 EXPECT_EQ(delegate()->get_activated_user(), delegate()->GetUserID(1)); 242 const UserInfo* active_user = delegate()->GetActiveUserInfo();
243 const UserInfo* second_user = delegate()->GetUserInfo(1);
244 EXPECT_EQ(active_user->GetUserID(), second_user->GetUserID());
242 // Since the name is capitalized, the email should be different then the 245 // Since the name is capitalized, the email should be different then the
243 // user_id. 246 // user_id.
244 EXPECT_NE(delegate()->get_activated_user(), delegate()->GetUserEmail(1)); 247 EXPECT_NE(active_user->GetUserID(), second_user->GetEmail());
245 tray()->CloseSystemBubble(); 248 tray()->CloseSystemBubble();
246 } 249 }
247 250
248 #endif 251 #endif
249 252
250 } // namespace ash 253 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/user/tray_user_separator.cc ('k') | ash/system/user/user_card_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698