OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/magnifier/magnification_controller.h" | 5 #include "ash/magnifier/magnification_controller.h" |
6 #include "ash/shell.h" | 6 #include "ash/shell.h" |
7 #include "ash/system/tray/system_tray.h" | 7 #include "ash/system/tray/system_tray.h" |
8 #include "ash/system/tray_accessibility.h" | 8 #include "ash/system/tray_accessibility.h" |
9 #include "ash/system/user/login_status.h" | 9 #include "ash/system/user/login_status.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 IN_PROC_BROWSER_TEST_P(TrayAccessibilityTest, LoginStatus) { | 262 IN_PROC_BROWSER_TEST_P(TrayAccessibilityTest, LoginStatus) { |
263 EXPECT_EQ(ash::user::LOGGED_IN_NONE, GetLoginStatus()); | 263 EXPECT_EQ(ash::user::LOGGED_IN_NONE, GetLoginStatus()); |
264 | 264 |
265 UserManager::Get()->UserLoggedIn( | 265 UserManager::Get()->UserLoggedIn( |
266 "owner@invalid.domain", "owner@invalid.domain", true); | 266 "owner@invalid.domain", "owner@invalid.domain", true); |
267 UserManager::Get()->SessionStarted(); | 267 UserManager::Get()->SessionStarted(); |
268 | 268 |
269 EXPECT_EQ(ash::user::LOGGED_IN_USER, GetLoginStatus()); | 269 EXPECT_EQ(ash::user::LOGGED_IN_USER, GetLoginStatus()); |
270 } | 270 } |
271 | 271 |
272 IN_PROC_BROWSER_TEST_P(TrayAccessibilityTest, ShowTrayIcon) { | 272 // http://crbug.com/396342 |
| 273 IN_PROC_BROWSER_TEST_P(TrayAccessibilityTest, DISABLED_ShowTrayIcon) { |
273 SetLoginStatus(ash::user::LOGGED_IN_NONE); | 274 SetLoginStatus(ash::user::LOGGED_IN_NONE); |
274 | 275 |
275 // Confirms that the icon is invisible before login. | 276 // Confirms that the icon is invisible before login. |
276 EXPECT_FALSE(IsTrayIconVisible()); | 277 EXPECT_FALSE(IsTrayIconVisible()); |
277 | 278 |
278 UserManager::Get()->UserLoggedIn( | 279 UserManager::Get()->UserLoggedIn( |
279 "owner@invalid.domain", "owner@invalid.domain", true); | 280 "owner@invalid.domain", "owner@invalid.domain", true); |
280 UserManager::Get()->SessionStarted(); | 281 UserManager::Get()->SessionStarted(); |
281 | 282 |
282 // Confirms that the icon is invisible just after login. | 283 // Confirms that the icon is invisible just after login. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 | 332 |
332 // Confirms that prefs::kShouldAlwaysShowAccessibilityMenu doesn't affect | 333 // Confirms that prefs::kShouldAlwaysShowAccessibilityMenu doesn't affect |
333 // the icon on the tray. | 334 // the icon on the tray. |
334 SetShowAccessibilityOptionsInSystemTrayMenu(true); | 335 SetShowAccessibilityOptionsInSystemTrayMenu(true); |
335 AccessibilityManager::Get()->EnableHighContrast(true); | 336 AccessibilityManager::Get()->EnableHighContrast(true); |
336 EXPECT_TRUE(IsTrayIconVisible()); | 337 EXPECT_TRUE(IsTrayIconVisible()); |
337 AccessibilityManager::Get()->EnableHighContrast(false); | 338 AccessibilityManager::Get()->EnableHighContrast(false); |
338 EXPECT_FALSE(IsTrayIconVisible()); | 339 EXPECT_FALSE(IsTrayIconVisible()); |
339 } | 340 } |
340 | 341 |
341 IN_PROC_BROWSER_TEST_P(TrayAccessibilityTest, ShowMenu) { | 342 // http://crbug.com/396342 |
| 343 IN_PROC_BROWSER_TEST_P(TrayAccessibilityTest, DISABLED_ShowMenu) { |
342 // Login | 344 // Login |
343 UserManager::Get()->UserLoggedIn( | 345 UserManager::Get()->UserLoggedIn( |
344 "owner@invalid.domain", "owner@invalid.domain", true); | 346 "owner@invalid.domain", "owner@invalid.domain", true); |
345 UserManager::Get()->SessionStarted(); | 347 UserManager::Get()->SessionStarted(); |
346 | 348 |
347 SetShowAccessibilityOptionsInSystemTrayMenu(false); | 349 SetShowAccessibilityOptionsInSystemTrayMenu(false); |
348 | 350 |
349 // Confirms that the menu is hidden. | 351 // Confirms that the menu is hidden. |
350 EXPECT_FALSE(CanCreateMenuItem()); | 352 EXPECT_FALSE(CanCreateMenuItem()); |
351 | 353 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 EXPECT_TRUE(CanCreateMenuItem()); | 401 EXPECT_TRUE(CanCreateMenuItem()); |
400 AccessibilityManager::Get()->EnableSpokenFeedback( | 402 AccessibilityManager::Get()->EnableSpokenFeedback( |
401 false, ash::A11Y_NOTIFICATION_NONE); | 403 false, ash::A11Y_NOTIFICATION_NONE); |
402 EXPECT_TRUE(CanCreateMenuItem()); | 404 EXPECT_TRUE(CanCreateMenuItem()); |
403 AccessibilityManager::Get()->EnableHighContrast(false); | 405 AccessibilityManager::Get()->EnableHighContrast(false); |
404 EXPECT_TRUE(CanCreateMenuItem()); | 406 EXPECT_TRUE(CanCreateMenuItem()); |
405 SetMagnifierEnabled(false); | 407 SetMagnifierEnabled(false); |
406 EXPECT_FALSE(CanCreateMenuItem()); | 408 EXPECT_FALSE(CanCreateMenuItem()); |
407 } | 409 } |
408 | 410 |
409 IN_PROC_BROWSER_TEST_P(TrayAccessibilityTest, ShowMenuWithShowMenuOption) { | 411 // http://crbug.com/396318 |
| 412 IN_PROC_BROWSER_TEST_P(TrayAccessibilityTest, |
| 413 DISABLED_ShowMenuWithShowMenuOption) { |
410 // Login | 414 // Login |
411 UserManager::Get()->UserLoggedIn( | 415 UserManager::Get()->UserLoggedIn( |
412 "owner@invalid.domain", "owner@invalid.domain", true); | 416 "owner@invalid.domain", "owner@invalid.domain", true); |
413 UserManager::Get()->SessionStarted(); | 417 UserManager::Get()->SessionStarted(); |
414 | 418 |
415 SetShowAccessibilityOptionsInSystemTrayMenu(true); | 419 SetShowAccessibilityOptionsInSystemTrayMenu(true); |
416 | 420 |
417 // Confirms that the menu is visible. | 421 // Confirms that the menu is visible. |
418 EXPECT_TRUE(CanCreateMenuItem()); | 422 EXPECT_TRUE(CanCreateMenuItem()); |
419 | 423 |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 EXPECT_TRUE(IsVirtualKeyboardMenuShownOnDetailMenu()); | 877 EXPECT_TRUE(IsVirtualKeyboardMenuShownOnDetailMenu()); |
874 CloseDetailMenu(); | 878 CloseDetailMenu(); |
875 } | 879 } |
876 | 880 |
877 INSTANTIATE_TEST_CASE_P(TrayAccessibilityTestInstance, | 881 INSTANTIATE_TEST_CASE_P(TrayAccessibilityTestInstance, |
878 TrayAccessibilityTest, | 882 TrayAccessibilityTest, |
879 testing::Values(PREF_SERVICE, | 883 testing::Values(PREF_SERVICE, |
880 POLICY)); | 884 POLICY)); |
881 | 885 |
882 } // namespace chromeos | 886 } // namespace chromeos |
OLD | NEW |