| OLD | NEW |
| 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/shelf/shelf_layout_manager.h" | 8 #include "ash/shelf/shelf_layout_manager.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell_delegate.h" | 10 #include "ash/shell_delegate.h" |
| 11 #include "ash/system/tray/system_tray.h" | 11 #include "ash/system/tray/system_tray.h" |
| 12 #include "ash/system/tray/tray_constants.h" | 12 #include "ash/system/tray/tray_constants.h" |
| 13 #include "ash/system/user/tray_user.h" | 13 #include "ash/system/user/tray_user.h" |
| 14 #include "ash/system/user/tray_user_separator.h" | 14 #include "ash/system/user/tray_user_separator.h" |
| 15 #include "ash/system/user/user_view.h" | 15 #include "ash/system/user/user_view.h" |
| 16 #include "ash/test/ash_test_base.h" | 16 #include "ash/test/ash_test_base.h" |
| 17 #include "ash/test/test_session_state_delegate.h" | 17 #include "ash/test/test_session_state_delegate.h" |
| 18 #include "ash/test/test_shell_delegate.h" | 18 #include "ash/test/test_shell_delegate.h" |
| 19 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
| 20 #include "components/signin/core/account_id/account_id.h" | |
| 21 #include "components/user_manager/user_info.h" | 20 #include "components/user_manager/user_info.h" |
| 22 #include "ui/accessibility/ax_view_state.h" | 21 #include "ui/accessibility/ax_view_state.h" |
| 23 #include "ui/events/test/event_generator.h" | 22 #include "ui/events/test/event_generator.h" |
| 24 #include "ui/gfx/animation/animation_container_element.h" | 23 #include "ui/gfx/animation/animation_container_element.h" |
| 25 #include "ui/views/view.h" | 24 #include "ui/views/view.h" |
| 26 #include "ui/views/widget/widget.h" | 25 #include "ui/views/widget/widget.h" |
| 27 | 26 |
| 28 namespace ash { | 27 namespace ash { |
| 29 | 28 |
| 30 class TrayUserTest : public ash::test::AshTestBase { | 29 class TrayUserTest : public ash::test::AshTestBase { |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 TEST_F(TrayUserTest, MutiUserModeButtonClicks) { | 265 TEST_F(TrayUserTest, MutiUserModeButtonClicks) { |
| 267 // Have two users. | 266 // Have two users. |
| 268 InitializeParameters(2, true); | 267 InitializeParameters(2, true); |
| 269 ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow()); | 268 ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow()); |
| 270 ShowTrayMenu(&generator); | 269 ShowTrayMenu(&generator); |
| 271 | 270 |
| 272 // Switch to a new user - which has a capitalized name. | 271 // Switch to a new user - which has a capitalized name. |
| 273 ClickUserItem(&generator, 1); | 272 ClickUserItem(&generator, 1); |
| 274 const user_manager::UserInfo* active_user = delegate()->GetActiveUserInfo(); | 273 const user_manager::UserInfo* active_user = delegate()->GetActiveUserInfo(); |
| 275 const user_manager::UserInfo* second_user = delegate()->GetUserInfo(1); | 274 const user_manager::UserInfo* second_user = delegate()->GetUserInfo(1); |
| 276 EXPECT_EQ(active_user->GetAccountId(), second_user->GetAccountId()); | 275 EXPECT_EQ(active_user->GetUserID(), second_user->GetUserID()); |
| 277 // Since the name is capitalized, the email should be different then the | 276 // Since the name is capitalized, the email should be different then the |
| 278 // user_id. | 277 // user_id. |
| 279 EXPECT_NE(active_user->GetAccountId().GetUserEmail(), | 278 EXPECT_NE(active_user->GetUserID(), second_user->GetEmail()); |
| 280 second_user->GetEmail()); | |
| 281 tray()->CloseSystemBubble(); | 279 tray()->CloseSystemBubble(); |
| 282 } | 280 } |
| 283 | 281 |
| 284 #endif | 282 #endif |
| 285 | 283 |
| 286 } // namespace ash | 284 } // namespace ash |
| OLD | NEW |