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

Unified Diff: chrome/browser/chromeos/system/tray_accessibility_browsertest.cc

Issue 11642014: Re-introduce the partial magnifier (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix the build failure on win_aura Created 7 years, 11 months 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
« no previous file with comments | « chrome/browser/chromeos/preferences.cc ('k') | chrome/browser/resources/options/browser_options.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/system/tray_accessibility_browsertest.cc
diff --git a/chrome/browser/chromeos/system/tray_accessibility_browsertest.cc b/chrome/browser/chromeos/system/tray_accessibility_browsertest.cc
index 220d928802868469c9c573aeef082939b3ecc4ab..23adfd6a6eccf34b35d70444f3c6c1482b3d82b6 100644
--- a/chrome/browser/chromeos/system/tray_accessibility_browsertest.cc
+++ b/chrome/browser/chromeos/system/tray_accessibility_browsertest.cc
@@ -30,8 +30,8 @@
namespace chromeos {
-namespace {
- ui::MouseEvent& dummyEvent = *((ui::MouseEvent*)0);
+void SetMagnifierEnabled(bool enabled) {
+ MagnificationManager::Get()->SetMagnifierEnabled(enabled);
}
class TrayAccessibilityTest : public CrosInProcessBrowserTest {
@@ -150,13 +150,13 @@ IN_PROC_BROWSER_TEST_F(TrayAccessibilityTest, ShowTrayIcon) {
EXPECT_FALSE(IsTrayIconVisible());
// Toggling magnifier the visibillity of the icon.
- MagnificationManager::Get()->SetMagnifier(ash::MAGNIFIER_FULL);
+ SetMagnifierEnabled(true);
EXPECT_TRUE(IsTrayIconVisible());
- MagnificationManager::Get()->SetMagnifier(ash::MAGNIFIER_OFF);
+ SetMagnifierEnabled(false);
EXPECT_FALSE(IsTrayIconVisible());
// Enabling all accessibility features.
- MagnificationManager::Get()->SetMagnifier(ash::MAGNIFIER_FULL);
+ SetMagnifierEnabled(true);
EXPECT_TRUE(IsTrayIconVisible());
accessibility::EnableHighContrast(true);
EXPECT_TRUE(IsTrayIconVisible());
@@ -166,7 +166,7 @@ IN_PROC_BROWSER_TEST_F(TrayAccessibilityTest, ShowTrayIcon) {
EXPECT_TRUE(IsTrayIconVisible());
accessibility::EnableHighContrast(false);
EXPECT_TRUE(IsTrayIconVisible());
- MagnificationManager::Get()->SetMagnifier(ash::MAGNIFIER_OFF);
+ SetMagnifierEnabled(false);
EXPECT_FALSE(IsTrayIconVisible());
// Confirms that prefs::kShouldAlwaysShowAccessibilityMenu doesn't affect
@@ -208,13 +208,13 @@ IN_PROC_BROWSER_TEST_F(TrayAccessibilityTest, ShowMenu) {
EXPECT_FALSE(CanCreateMenuItem());
// Toggling screen magnifier changes the visibillity of the menu.
- MagnificationManager::Get()->SetMagnifier(ash::MAGNIFIER_FULL);
+ SetMagnifierEnabled(true);
EXPECT_TRUE(CanCreateMenuItem());
- MagnificationManager::Get()->SetMagnifier(ash::MAGNIFIER_OFF);
+ SetMagnifierEnabled(false);
EXPECT_FALSE(CanCreateMenuItem());
// Enabling all accessibility features.
- MagnificationManager::Get()->SetMagnifier(ash::MAGNIFIER_FULL);
+ SetMagnifierEnabled(true);
EXPECT_TRUE(CanCreateMenuItem());
accessibility::EnableHighContrast(true);
EXPECT_TRUE(CanCreateMenuItem());
@@ -224,7 +224,7 @@ IN_PROC_BROWSER_TEST_F(TrayAccessibilityTest, ShowMenu) {
EXPECT_TRUE(CanCreateMenuItem());
accessibility::EnableHighContrast(false);
EXPECT_TRUE(CanCreateMenuItem());
- MagnificationManager::Get()->SetMagnifier(ash::MAGNIFIER_OFF);
+ SetMagnifierEnabled(false);
EXPECT_FALSE(CanCreateMenuItem());
}
@@ -255,13 +255,13 @@ IN_PROC_BROWSER_TEST_F(TrayAccessibilityTest, ShowMenuWithShowMenuOption) {
EXPECT_TRUE(CanCreateMenuItem());
// The menu is keeping visible regardless of toggling screen magnifier.
- MagnificationManager::Get()->SetMagnifier(ash::MAGNIFIER_FULL);
+ SetMagnifierEnabled(true);
EXPECT_TRUE(CanCreateMenuItem());
- MagnificationManager::Get()->SetMagnifier(ash::MAGNIFIER_OFF);
+ SetMagnifierEnabled(false);
EXPECT_TRUE(CanCreateMenuItem());
// Enabling all accessibility features.
- MagnificationManager::Get()->SetMagnifier(ash::MAGNIFIER_FULL);
+ SetMagnifierEnabled(true);
EXPECT_TRUE(CanCreateMenuItem());
accessibility::EnableHighContrast(true);
EXPECT_TRUE(CanCreateMenuItem());
@@ -271,7 +271,7 @@ IN_PROC_BROWSER_TEST_F(TrayAccessibilityTest, ShowMenuWithShowMenuOption) {
EXPECT_TRUE(CanCreateMenuItem());
accessibility::EnableHighContrast(false);
EXPECT_TRUE(CanCreateMenuItem());
- MagnificationManager::Get()->SetMagnifier(ash::MAGNIFIER_OFF);
+ SetMagnifierEnabled(false);
EXPECT_TRUE(CanCreateMenuItem());
// Sets prefs::kShouldAlwaysShowAccessibilityMenu = true.
@@ -300,13 +300,13 @@ IN_PROC_BROWSER_TEST_F(TrayAccessibilityTest, ShowMenuWithShowOnLoginScreen) {
EXPECT_TRUE(CanCreateMenuItem());
// The menu is keeping visible regardless of toggling screen magnifier.
- MagnificationManager::Get()->SetMagnifier(ash::MAGNIFIER_FULL);
+ SetMagnifierEnabled(true);
EXPECT_TRUE(CanCreateMenuItem());
- MagnificationManager::Get()->SetMagnifier(ash::MAGNIFIER_OFF);
+ SetMagnifierEnabled(false);
EXPECT_TRUE(CanCreateMenuItem());
// Enabling all accessibility features.
- MagnificationManager::Get()->SetMagnifier(ash::MAGNIFIER_FULL);
+ SetMagnifierEnabled(true);
EXPECT_TRUE(CanCreateMenuItem());
accessibility::EnableHighContrast(true);
EXPECT_TRUE(CanCreateMenuItem());
@@ -316,7 +316,7 @@ IN_PROC_BROWSER_TEST_F(TrayAccessibilityTest, ShowMenuWithShowOnLoginScreen) {
EXPECT_TRUE(CanCreateMenuItem());
accessibility::EnableHighContrast(false);
EXPECT_TRUE(CanCreateMenuItem());
- MagnificationManager::Get()->SetMagnifier(ash::MAGNIFIER_OFF);
+ SetMagnifierEnabled(false);
EXPECT_TRUE(CanCreateMenuItem());
// Sets prefs::kShouldAlwaysShowAccessibilityMenu = true.
@@ -362,17 +362,14 @@ IN_PROC_BROWSER_TEST_F(TrayAccessibilityTest, ClickDetailMenu) {
// Confirms that the check item toggles the magnifier.
EXPECT_FALSE(accessibility::IsHighContrastEnabled());
- EXPECT_EQ(ash::MAGNIFIER_OFF,
- MagnificationManager::Get()->GetMagnifierType());
+ EXPECT_FALSE(MagnificationManager::Get()->IsMagnifierEnabled());
EXPECT_TRUE(CreateDetailedMenu());
ClickScreenMagnifierOnDetailMenu();
- EXPECT_EQ(ash::MAGNIFIER_FULL,
- MagnificationManager::Get()->GetMagnifierType());
+ EXPECT_TRUE(MagnificationManager::Get()->IsMagnifierEnabled());
EXPECT_TRUE(CreateDetailedMenu());
ClickScreenMagnifierOnDetailMenu();
- EXPECT_EQ(ash::MAGNIFIER_OFF,
- MagnificationManager::Get()->GetMagnifierType());
+ EXPECT_FALSE(MagnificationManager::Get()->IsMagnifierEnabled());
}
IN_PROC_BROWSER_TEST_F(TrayAccessibilityTest, CheckMarksOnDetailMenu) {
@@ -416,7 +413,7 @@ IN_PROC_BROWSER_TEST_F(TrayAccessibilityTest, CheckMarksOnDetailMenu) {
CloseDetailMenu();
// Enabling full screen magnifier.
- MagnificationManager::Get()->SetMagnifier(ash::MAGNIFIER_FULL);
+ SetMagnifierEnabled(true);
EXPECT_TRUE(CreateDetailedMenu());
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
@@ -424,7 +421,7 @@ IN_PROC_BROWSER_TEST_F(TrayAccessibilityTest, CheckMarksOnDetailMenu) {
CloseDetailMenu();
// Disabling screen magnifier.
- MagnificationManager::Get()->SetMagnifier(ash::MAGNIFIER_OFF);
+ SetMagnifierEnabled(false);
EXPECT_TRUE(CreateDetailedMenu());
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
@@ -434,7 +431,7 @@ IN_PROC_BROWSER_TEST_F(TrayAccessibilityTest, CheckMarksOnDetailMenu) {
// Enabling all of the a11y features.
accessibility::EnableSpokenFeedback(true, NULL, ash::A11Y_NOTIFICATION_NONE);
accessibility::EnableHighContrast(true);
- MagnificationManager::Get()->SetMagnifier(ash::MAGNIFIER_FULL);
+ SetMagnifierEnabled(true);
EXPECT_TRUE(CreateDetailedMenu());
EXPECT_TRUE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_TRUE(IsHighContrastEnabledOnDetailMenu());
@@ -444,7 +441,7 @@ IN_PROC_BROWSER_TEST_F(TrayAccessibilityTest, CheckMarksOnDetailMenu) {
// Disabling all of the a11y features.
accessibility::EnableSpokenFeedback(false, NULL, ash::A11Y_NOTIFICATION_NONE);
accessibility::EnableHighContrast(false);
- MagnificationManager::Get()->SetMagnifier(ash::MAGNIFIER_OFF);
+ SetMagnifierEnabled(false);
EXPECT_TRUE(CreateDetailedMenu());
EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu());
EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu());
« no previous file with comments | « chrome/browser/chromeos/preferences.cc ('k') | chrome/browser/resources/options/browser_options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698