| Index: chrome/browser/chromeos/system/tray_accessibility_browsertest.cc
|
| ===================================================================
|
| --- chrome/browser/chromeos/system/tray_accessibility_browsertest.cc (revision 176110)
|
| +++ chrome/browser/chromeos/system/tray_accessibility_browsertest.cc (working copy)
|
| @@ -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 @@
|
| 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 @@
|
| 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 @@
|
| 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 @@
|
| EXPECT_TRUE(CanCreateMenuItem());
|
| accessibility::EnableHighContrast(false);
|
| EXPECT_TRUE(CanCreateMenuItem());
|
| - MagnificationManager::Get()->SetMagnifier(ash::MAGNIFIER_OFF);
|
| + SetMagnifierEnabled(false);
|
| EXPECT_FALSE(CanCreateMenuItem());
|
| }
|
|
|
| @@ -255,13 +255,13 @@
|
| 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 @@
|
| 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 @@
|
| 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 @@
|
| 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 @@
|
| // 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 @@
|
| 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 @@
|
| 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 @@
|
| // 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 @@
|
| // 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());
|
|
|