| 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/common/shell_delegate.h" | 7 #include "ash/common/shell_delegate.h" |
| 8 #include "ash/common/system/tray/system_tray.h" | 8 #include "ash/common/system/tray/system_tray.h" |
| 9 #include "ash/common/system/tray/tray_constants.h" | 9 #include "ash/common/system/tray/tray_constants.h" |
| 10 #include "ash/common/system/user/tray_user.h" | 10 #include "ash/common/system/user/tray_user.h" |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 ui::test::EventGenerator& generator = GetEventGenerator(); | 251 ui::test::EventGenerator& generator = GetEventGenerator(); |
| 252 ShowTrayMenu(&generator); | 252 ShowTrayMenu(&generator); |
| 253 | 253 |
| 254 // Switch to a new user - which has a capitalized name. | 254 // Switch to a new user - which has a capitalized name. |
| 255 ClickUserItem(&generator, 1); | 255 ClickUserItem(&generator, 1); |
| 256 const user_manager::UserInfo* active_user = delegate()->GetActiveUserInfo(); | 256 const user_manager::UserInfo* active_user = delegate()->GetActiveUserInfo(); |
| 257 const user_manager::UserInfo* second_user = delegate()->GetUserInfo(1); | 257 const user_manager::UserInfo* second_user = delegate()->GetUserInfo(1); |
| 258 EXPECT_EQ(active_user->GetAccountId(), second_user->GetAccountId()); | 258 EXPECT_EQ(active_user->GetAccountId(), second_user->GetAccountId()); |
| 259 // Since the name is capitalized, the email should be different then the | 259 // Since the name is capitalized, the email should be different then the |
| 260 // user_id. | 260 // user_id. |
| 261 EXPECT_NE(active_user->GetAccountId().GetUserEmail(), | 261 EXPECT_NE(active_user->GetAccountId(), second_user->GetAccountId()) |
| 262 second_user->GetEmail()); | 262 << "User switch failed: active_user:" |
| 263 << active_user->GetAccountId().Serialize() |
| 264 << ", second_user:" << second_user->GetAccountId().Serialize(); |
| 263 tray()->CloseSystemBubble(); | 265 tray()->CloseSystemBubble(); |
| 264 } | 266 } |
| 265 | 267 |
| 266 #endif | 268 #endif |
| 267 | 269 |
| 268 } // namespace ash | 270 } // namespace ash |
| OLD | NEW |