| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 5 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
| 6 | 6 |
| 7 #include "ash/magnifier/magnification_controller.h" | 7 #include "ash/magnifier/magnification_controller.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 EXPECT_FALSE(IsBrailleImeActive()); | 659 EXPECT_FALSE(IsBrailleImeActive()); |
| 660 EXPECT_FALSE(IsBrailleImeCurrent()); | 660 EXPECT_FALSE(IsBrailleImeCurrent()); |
| 661 | 661 |
| 662 // Plugging in a display while spoken feedback is enabled should activate | 662 // Plugging in a display while spoken feedback is enabled should activate |
| 663 // the Braille IME. | 663 // the Braille IME. |
| 664 SetBrailleDisplayAvailability(true); | 664 SetBrailleDisplayAvailability(true); |
| 665 EXPECT_TRUE(IsSpokenFeedbackEnabled()); | 665 EXPECT_TRUE(IsSpokenFeedbackEnabled()); |
| 666 EXPECT_TRUE(IsBrailleImeActive()); | 666 EXPECT_TRUE(IsBrailleImeActive()); |
| 667 } | 667 } |
| 668 | 668 |
| 669 IN_PROC_BROWSER_TEST_F(AccessibilityManagerTest, AcessibilityMenuVisibility) { | 669 IN_PROC_BROWSER_TEST_F(AccessibilityManagerTest, AccessibilityMenuVisibility) { |
| 670 // Log in. | 670 // Log in. |
| 671 user_manager::UserManager::Get()->UserLoggedIn( | 671 user_manager::UserManager::Get()->UserLoggedIn( |
| 672 kTestUserName, kTestUserName, true); | 672 kTestUserName, kTestUserName, true); |
| 673 user_manager::UserManager::Get()->SessionStarted(); | 673 user_manager::UserManager::Get()->SessionStarted(); |
| 674 | 674 |
| 675 // Confirms that the features are disabled. | 675 // Confirms that the features are disabled. |
| 676 EXPECT_FALSE(IsLargeCursorEnabled()); | 676 EXPECT_FALSE(IsLargeCursorEnabled()); |
| 677 EXPECT_FALSE(IsSpokenFeedbackEnabled()); | 677 EXPECT_FALSE(IsSpokenFeedbackEnabled()); |
| 678 EXPECT_FALSE(IsHighContrastEnabled()); | 678 EXPECT_FALSE(IsHighContrastEnabled()); |
| 679 EXPECT_FALSE(IsAutoclickEnabled()); | 679 EXPECT_FALSE(IsAutoclickEnabled()); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 705 EXPECT_FALSE(ShouldShowAccessibilityMenu()); | 705 EXPECT_FALSE(ShouldShowAccessibilityMenu()); |
| 706 | 706 |
| 707 // Check on-screen keyboard. | 707 // Check on-screen keyboard. |
| 708 SetVirtualKeyboardEnabled(true); | 708 SetVirtualKeyboardEnabled(true); |
| 709 EXPECT_TRUE(ShouldShowAccessibilityMenu()); | 709 EXPECT_TRUE(ShouldShowAccessibilityMenu()); |
| 710 SetVirtualKeyboardEnabled(false); | 710 SetVirtualKeyboardEnabled(false); |
| 711 EXPECT_FALSE(ShouldShowAccessibilityMenu()); | 711 EXPECT_FALSE(ShouldShowAccessibilityMenu()); |
| 712 } | 712 } |
| 713 | 713 |
| 714 } // namespace chromeos | 714 } // namespace chromeos |
| OLD | NEW |