MagnificationManager::Get()->SetMagnifierEnabled(enabled);
}
-void SetMagnifierType(ash::MagnifierType type) {
+void SetMagnifierType(ui::MagnifierType type) {
MagnificationManager::Get()->SetMagnifierType(type);
}
return MagnificationManager::Get()->GetSavedScreenMagnifierScale();
}
-ash::MagnifierType GetMagnifierType() {
+ui::MagnifierType GetMagnifierType() {
return MagnificationManager::Get()->GetMagnifierType();
}
prefs()->SetBoolean(prefs::kAccessibilityScreenMagnifierEnabled, enabled);
}
-void SetScreenMagnifierTypePref(ash::MagnifierType type) {
+void SetScreenMagnifierTypePref(ui::MagnifierType type) {
prefs()->SetInteger(prefs::kAccessibilityScreenMagnifierType, type);
}
MagnificationManagerTest() {}
virtual ~MagnificationManagerTest() {}
- virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
+ virtual void SetUpCommandLine(CommandLine* command_line) override {
command_line->AppendSwitch(switches::kLoginManager);
command_line->AppendSwitchASCII(switches::kLoginProfile,
TestingProfile::kTestUserProfileDir);
}
- virtual void SetUpOnMainThread() OVERRIDE {
+ virtual void SetUpOnMainThread() override {
// Set the login-screen profile.
MagnificationManager::Get()->SetProfileForTest(
ProfileManager::GetActiveUserProfile());
SetMagnifierEnabled(true);
// Confirms that magnifier is enabled.
EXPECT_TRUE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
EXPECT_TRUE(GetScreenMagnifierEnabledFromPref());
}
// Enables magnifier on login screen.
SetMagnifierEnabled(true);
- SetMagnifierType(ash::MAGNIFIER_FULL);
+ SetMagnifierType(ui::MAGNIFIER_FULL);
SetFullScreenMagnifierScale(2.5);
EXPECT_TRUE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
EXPECT_EQ(2.5, GetFullScreenMagnifierScale());
// Logs in (but the session is not started yet).
// Confirms that magnifier is keeping enabled.
EXPECT_TRUE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
user_manager::UserManager::Get()->SessionStarted();
// Sets prefs to explicitly enable the magnifier.
SetScreenMagnifierEnabledPref(true);
- SetScreenMagnifierTypePref(ash::MAGNIFIER_FULL);
+ SetScreenMagnifierTypePref(ui::MAGNIFIER_FULL);
SetFullScreenMagnifierScalePref(2.5);
}
// Confirms that the magnifier is enabled and configured according to the
// explicitly set prefs just after session start.
EXPECT_TRUE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
EXPECT_EQ(2.5, GetFullScreenMagnifierScale());
EXPECT_TRUE(GetScreenMagnifierEnabledFromPref());
}
// Sets prefs to explicitly enable the magnifier.
SetScreenMagnifierEnabledPref(true);
- SetScreenMagnifierTypePref(ash::MAGNIFIER_FULL);
+ SetScreenMagnifierTypePref(ui::MAGNIFIER_FULL);
SetFullScreenMagnifierScalePref(2.5);
}
IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginFullToFull) {
// Enables magnifier on login screen.
- SetMagnifierType(ash::MAGNIFIER_FULL);
+ SetMagnifierType(ui::MAGNIFIER_FULL);
SetMagnifierEnabled(true);
SetFullScreenMagnifierScale(3.0);
EXPECT_TRUE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
EXPECT_EQ(3.0, GetFullScreenMagnifierScale());
// Logs in (but the session is not started yet).
// Confirms that magnifier is keeping enabled.
EXPECT_TRUE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
user_manager::UserManager::Get()->SessionStarted();
// Confirms that the magnifier is enabled and configured according to the
// explicitly set prefs just after session start.
EXPECT_TRUE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
EXPECT_EQ(2.5, GetFullScreenMagnifierScale());
EXPECT_TRUE(GetScreenMagnifierEnabledFromPref());
}
IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginFullToUnset) {
// Enables full screen magnifier.
- SetMagnifierType(ash::MAGNIFIER_FULL);
+ SetMagnifierType(ui::MAGNIFIER_FULL);
SetMagnifierEnabled(true);
EXPECT_TRUE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
// Logs in (but the session is not started yet).
user_manager::UserManager::Get()->UserLoggedIn(
// Confirms that magnifier is keeping enabled.
EXPECT_TRUE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
user_manager::UserManager::Get()->SessionStarted();
IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginAsNewUserFull) {
// Enables magnifier on login screen.
- SetMagnifierType(ash::MAGNIFIER_FULL);
+ SetMagnifierType(ui::MAGNIFIER_FULL);
SetMagnifierEnabled(true);
SetFullScreenMagnifierScale(2.5);
EXPECT_TRUE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
EXPECT_EQ(2.5, GetFullScreenMagnifierScale());
// Logs in (but the session is not started yet).
// Confirms that magnifier is keeping enabled.
EXPECT_TRUE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
user_manager::UserManager::Get()->SessionStarted();
// Confirms that magnifier keeps enabled.
EXPECT_TRUE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
EXPECT_EQ(2.5, GetFullScreenMagnifierScale());
EXPECT_TRUE(GetScreenMagnifierEnabledFromPref());
}
IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, ChangeMagnifierType) {
// Enables/disables full screen magnifier.
SetMagnifierEnabled(false);
- SetMagnifierType(ash::MAGNIFIER_FULL);
+ SetMagnifierType(ui::MAGNIFIER_FULL);
EXPECT_FALSE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
SetMagnifierEnabled(true);
EXPECT_TRUE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
SetMagnifierEnabled(false);
EXPECT_FALSE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
// Enables/disables partial screen magnifier.
- SetMagnifierType(ash::MAGNIFIER_PARTIAL);
+ SetMagnifierType(ui::MAGNIFIER_PARTIAL);
EXPECT_FALSE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
SetMagnifierEnabled(true);
EXPECT_TRUE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
SetMagnifierEnabled(false);
EXPECT_FALSE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
// Changes the magnifier type when the magnifier is enabled.
- SetMagnifierType(ash::MAGNIFIER_FULL);
+ SetMagnifierType(ui::MAGNIFIER_FULL);
SetMagnifierEnabled(true);
EXPECT_TRUE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
- SetMagnifierType(ash::MAGNIFIER_PARTIAL);
+ SetMagnifierType(ui::MAGNIFIER_PARTIAL);
EXPECT_TRUE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
- SetMagnifierType(ash::MAGNIFIER_FULL);
+ SetMagnifierType(ui::MAGNIFIER_FULL);
EXPECT_TRUE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
// Changes the magnifier type when the magnifier is disabled.
SetMagnifierEnabled(false);
- SetMagnifierType(ash::MAGNIFIER_FULL);
+ SetMagnifierType(ui::MAGNIFIER_FULL);
EXPECT_FALSE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
- SetMagnifierType(ash::MAGNIFIER_PARTIAL);
+ SetMagnifierType(ui::MAGNIFIER_PARTIAL);
EXPECT_FALSE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
- SetMagnifierType(ash::MAGNIFIER_FULL);
+ SetMagnifierType(ui::MAGNIFIER_FULL);
EXPECT_FALSE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
}
IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, TypePref) {
EXPECT_FALSE(IsMagnifierEnabled());
// Sets the pref as true to enable magnifier.
- SetScreenMagnifierTypePref(ash::MAGNIFIER_FULL);
+ SetScreenMagnifierTypePref(ui::MAGNIFIER_FULL);
SetScreenMagnifierEnabledPref(true);
// Confirms that magnifier is enabled.
EXPECT_TRUE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
}
IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, ScalePref) {
SetSavedFullScreenMagnifierScale(2.5);
// Enables full screen magnifier.
- SetMagnifierType(ash::MAGNIFIER_FULL);
+ SetMagnifierType(ui::MAGNIFIER_FULL);
SetMagnifierEnabled(true);
EXPECT_TRUE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
// Confirms that 2.5x is restored.
EXPECT_EQ(2.5, GetFullScreenMagnifierScale());
SetSavedFullScreenMagnifierScale(0.5);
// Enables full screen magnifier.
- SetMagnifierType(ash::MAGNIFIER_FULL);
+ SetMagnifierType(ui::MAGNIFIER_FULL);
SetMagnifierEnabled(true);
EXPECT_TRUE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
// Confirms that the actual scale is set to the minimum scale.
EXPECT_EQ(1.0, GetFullScreenMagnifierScale());
// Enables full screen magnifier.
SetMagnifierEnabled(true);
EXPECT_TRUE(IsMagnifierEnabled());
- EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
+ EXPECT_EQ(ui::MAGNIFIER_FULL, GetMagnifierType());
// Confirms that the actual scale is set to the maximum scale.
EXPECT_EQ(4.0, GetFullScreenMagnifierScale());
// Set full screen magnifier, and confirm the observer is called.
SetMagnifierEnabled(true);
- SetMagnifierType(ash::MAGNIFIER_FULL);
+ SetMagnifierType(ui::MAGNIFIER_FULL);
EXPECT_TRUE(observer.observed());
EXPECT_TRUE(observer.observed_enabled());
- EXPECT_EQ(observer.magnifier_type(), ash::MAGNIFIER_FULL);
- EXPECT_EQ(GetMagnifierType(), ash::MAGNIFIER_FULL);
+ EXPECT_EQ(observer.magnifier_type(), ui::MAGNIFIER_FULL);
+ EXPECT_EQ(GetMagnifierType(), ui::MAGNIFIER_FULL);
observer.reset();
// Set full screen magnifier again, and confirm the observer is not called.
- SetMagnifierType(ash::MAGNIFIER_FULL);
+ SetMagnifierType(ui::MAGNIFIER_FULL);
EXPECT_FALSE(observer.observed());
- EXPECT_EQ(GetMagnifierType(), ash::MAGNIFIER_FULL);
+ EXPECT_EQ(GetMagnifierType(), ui::MAGNIFIER_FULL);
observer.reset();
}