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/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
8 #include "ash/common/shell_delegate.h" | 8 #include "ash/common/shell_delegate.h" |
9 #include "ash/common/system/tray/system_tray.h" | 9 #include "ash/common/system/tray/system_tray.h" |
10 #include "ash/common/system/tray/tray_constants.h" | 10 #include "ash/common/system/tray/tray_constants.h" |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 views::View* view = | 186 views::View* view = |
187 tray_user(0)->user_view_for_test()->user_card_view_for_test(); | 187 tray_user(0)->user_view_for_test()->user_card_view_for_test(); |
188 ui::AXNodeData node_data; | 188 ui::AXNodeData node_data; |
189 view->GetAccessibleNodeData(&node_data); | 189 view->GetAccessibleNodeData(&node_data); |
190 EXPECT_EQ( | 190 EXPECT_EQ( |
191 base::UTF8ToUTF16("Über tray Über tray Über tray Über tray First@tray"), | 191 base::UTF8ToUTF16("Über tray Über tray Über tray Über tray First@tray"), |
192 node_data.GetString16Attribute(ui::AX_ATTR_NAME)); | 192 node_data.GetString16Attribute(ui::AX_ATTR_NAME)); |
193 EXPECT_EQ(ui::AX_ROLE_BUTTON, node_data.role); | 193 EXPECT_EQ(ui::AX_ROLE_BUTTON, node_data.role); |
194 } | 194 } |
195 | 195 |
196 #if defined(OS_CHROMEOS) | |
197 // Make sure that in multi user mode the user panel can be activated and there | 196 // Make sure that in multi user mode the user panel can be activated and there |
198 // will be one panel for each user plus one additional separator at the end. | 197 // will be one panel for each user plus one additional separator at the end. |
199 // Note: the mouse watcher (for automatic closing upon leave) cannot be tested | 198 // Note: the mouse watcher (for automatic closing upon leave) cannot be tested |
200 // here since it does not work with the event system in unit tests. | 199 // here since it does not work with the event system in unit tests. |
201 TEST_F(TrayUserTest, MultiUserModeDoesNotAllowToAddUser) { | 200 TEST_F(TrayUserTest, MultiUserModeDoesNotAllowToAddUser) { |
202 InitializeParameters(1, true); | 201 InitializeParameters(1, true); |
203 | 202 |
204 // Move the mouse over the status area and click to open the status menu. | 203 // Move the mouse over the status area and click to open the status menu. |
205 ui::test::EventGenerator& generator = GetEventGenerator(); | 204 ui::test::EventGenerator& generator = GetEventGenerator(); |
206 generator.set_async(false); | 205 generator.set_async(false); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 const user_manager::UserInfo* active_user = delegate()->GetActiveUserInfo(); | 271 const user_manager::UserInfo* active_user = delegate()->GetActiveUserInfo(); |
273 const user_manager::UserInfo* second_user = delegate()->GetUserInfo(1); | 272 const user_manager::UserInfo* second_user = delegate()->GetUserInfo(1); |
274 EXPECT_EQ(active_user->GetAccountId(), second_user->GetAccountId()); | 273 EXPECT_EQ(active_user->GetAccountId(), second_user->GetAccountId()); |
275 // Since the name is capitalized, the email should be different than the | 274 // Since the name is capitalized, the email should be different than the |
276 // user_id. | 275 // user_id. |
277 EXPECT_NE(active_user->GetAccountId().GetUserEmail(), | 276 EXPECT_NE(active_user->GetAccountId().GetUserEmail(), |
278 second_user->GetDisplayEmail()); | 277 second_user->GetDisplayEmail()); |
279 tray()->CloseSystemBubble(); | 278 tray()->CloseSystemBubble(); |
280 } | 279 } |
281 | 280 |
282 #endif | |
283 | |
284 } // namespace ash | 281 } // namespace ash |
OLD | NEW |