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

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

Issue 379803004: Move UserInfo to user_manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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.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/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/session/user_info.h"
9 #include "ash/shelf/shelf_layout_manager.h" 8 #include "ash/shelf/shelf_layout_manager.h"
10 #include "ash/shell.h" 9 #include "ash/shell.h"
11 #include "ash/shell_delegate.h" 10 #include "ash/shell_delegate.h"
12 #include "ash/system/tray/system_tray.h" 11 #include "ash/system/tray/system_tray.h"
13 #include "ash/system/tray/tray_constants.h" 12 #include "ash/system/tray/tray_constants.h"
14 #include "ash/system/user/tray_user.h" 13 #include "ash/system/user/tray_user.h"
15 #include "ash/system/user/tray_user_separator.h" 14 #include "ash/system/user/tray_user_separator.h"
16 #include "ash/test/ash_test_base.h" 15 #include "ash/test/ash_test_base.h"
17 #include "ash/test/test_session_state_delegate.h" 16 #include "ash/test/test_session_state_delegate.h"
18 #include "ash/test/test_shell_delegate.h" 17 #include "ash/test/test_shell_delegate.h"
18 #include "components/user_manager/user_info.h"
19 #include "ui/aura/test/event_generator.h" 19 #include "ui/aura/test/event_generator.h"
20 #include "ui/gfx/animation/animation_container_element.h" 20 #include "ui/gfx/animation/animation_container_element.h"
21 #include "ui/views/view.h" 21 #include "ui/views/view.h"
22 #include "ui/views/widget/widget.h" 22 #include "ui/views/widget/widget.h"
23 23
24 namespace ash { 24 namespace ash {
25 25
26 class TrayUserTest : public ash::test::AshTestBase { 26 class TrayUserTest : public ash::test::AshTestBase {
27 public: 27 public:
28 TrayUserTest(); 28 TrayUserTest();
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 230
231 // Make sure that user changing gets properly executed. 231 // Make sure that user changing gets properly executed.
232 TEST_F(TrayUserTest, MutiUserModeButtonClicks) { 232 TEST_F(TrayUserTest, MutiUserModeButtonClicks) {
233 // Have two users. 233 // Have two users.
234 InitializeParameters(2, true); 234 InitializeParameters(2, true);
235 aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow()); 235 aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
236 ShowTrayMenu(&generator); 236 ShowTrayMenu(&generator);
237 237
238 // Switch to a new user - which has a capitalized name. 238 // Switch to a new user - which has a capitalized name.
239 ClickUserItem(&generator, 1); 239 ClickUserItem(&generator, 1);
240 const UserInfo* active_user = delegate()->GetActiveUserInfo(); 240 const user_manager::UserInfo* active_user = delegate()->GetActiveUserInfo();
241 const UserInfo* second_user = delegate()->GetUserInfo(1); 241 const user_manager::UserInfo* second_user = delegate()->GetUserInfo(1);
242 EXPECT_EQ(active_user->GetUserID(), second_user->GetUserID()); 242 EXPECT_EQ(active_user->GetUserID(), second_user->GetUserID());
243 // Since the name is capitalized, the email should be different then the 243 // Since the name is capitalized, the email should be different then the
244 // user_id. 244 // user_id.
245 EXPECT_NE(active_user->GetUserID(), second_user->GetEmail()); 245 EXPECT_NE(active_user->GetUserID(), second_user->GetEmail());
246 tray()->CloseSystemBubble(); 246 tray()->CloseSystemBubble();
247 } 247 }
248 248
249 #endif 249 #endif
250 250
251 } // namespace ash 251 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/user/tray_user.cc ('k') | ash/system/user/user_card_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698