Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(587)

Unified Diff: chrome/browser/chromeos/accessibility/accessibility_manager_browsertest.cc

Issue 102483006: Getting rid of GetDefaultProfile & fixing multi user issues with accessibility (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/accessibility/accessibility_manager_browsertest.cc
diff --git a/chrome/browser/chromeos/accessibility/accessibility_manager_browsertest.cc b/chrome/browser/chromeos/accessibility/accessibility_manager_browsertest.cc
index 1971904a71370dbf928cd40476d7e3661696f9ef..44a336ee91d98c6033886a62194a36578be5f39b 100644
--- a/chrome/browser/chromeos/accessibility/accessibility_manager_browsertest.cc
+++ b/chrome/browser/chromeos/accessibility/accessibility_manager_browsertest.cc
@@ -138,6 +138,10 @@ bool IsLargeCursorEnabled() {
return AccessibilityManager::Get()->IsLargeCursorEnabled();
}
+bool ShouldShowAccessibilityMenu() {
+ return AccessibilityManager::Get()->ShouldShowAccessibilityMenu();
+}
+
void SetHighContrastEnabled(bool enabled) {
return AccessibilityManager::Get()->EnableHighContrast(enabled);
}
@@ -560,4 +564,41 @@ IN_PROC_BROWSER_TEST_P(AccessibilityManagerUserTypeTest,
EXPECT_EQ(kTestAutoclickDelayMs, GetAutoclickDelayFromPref());
}
+IN_PROC_BROWSER_TEST_F(AccessibilityManagerTest, AcessibilityMenuVisibility) {
+ // Log in.
+ UserManager::Get()->UserLoggedIn(kTestUserName, kTestUserName, true);
+ UserManager::Get()->SessionStarted();
+
+ // Confirms that the features are disabled.
+ EXPECT_FALSE(IsLargeCursorEnabled());
+ EXPECT_FALSE(IsSpokenFeedbackEnabled());
+ EXPECT_FALSE(IsHighContrastEnabled());
+ EXPECT_FALSE(IsAutoclickEnabled());
+ EXPECT_FALSE(ShouldShowAccessibilityMenu());
+
+ // Check large cursor.
+ SetLargeCursorEnabled(true);
+ EXPECT_TRUE(ShouldShowAccessibilityMenu());
+ SetLargeCursorEnabled(false);
+ EXPECT_FALSE(ShouldShowAccessibilityMenu());
+
+ // Check spoken feedback.
+ SetSpokenFeedbackEnabled(true);
+ EXPECT_TRUE(ShouldShowAccessibilityMenu());
+ SetSpokenFeedbackEnabled(false);
+ EXPECT_FALSE(ShouldShowAccessibilityMenu());
+
+ // Check high contrast.
+ SetHighContrastEnabled(true);
+ EXPECT_TRUE(ShouldShowAccessibilityMenu());
+ SetHighContrastEnabled(false);
+ EXPECT_FALSE(ShouldShowAccessibilityMenu());
+
+ // Check autoclick.
+ SetAutoclickEnabled(true);
+ EXPECT_TRUE(ShouldShowAccessibilityMenu());
+ SetAutoclickEnabled(false);
+ EXPECT_FALSE(ShouldShowAccessibilityMenu());
+}
+
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698