Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / chromeos / accessibility / magnification_manager_browsertest.cc
index 719a633..2bef6d6 100644 (file)
@@ -37,7 +37,7 @@ void SetMagnifierEnabled(bool enabled) {
   MagnificationManager::Get()->SetMagnifierEnabled(enabled);
 }
 
-void SetMagnifierType(ash::MagnifierType type) {
+void SetMagnifierType(ui::MagnifierType type) {
   MagnificationManager::Get()->SetMagnifierType(type);
 }
 
@@ -58,7 +58,7 @@ double GetSavedFullScreenMagnifierScale() {
   return MagnificationManager::Get()->GetSavedScreenMagnifierScale();
 }
 
-ash::MagnifierType GetMagnifierType() {
+ui::MagnifierType GetMagnifierType() {
   return MagnificationManager::Get()->GetMagnifierType();
 }
 
@@ -80,7 +80,7 @@ void SetScreenMagnifierEnabledPref(bool enabled) {
   prefs()->SetBoolean(prefs::kAccessibilityScreenMagnifierEnabled, enabled);
 }
 
-void SetScreenMagnifierTypePref(ash::MagnifierType type) {
+void SetScreenMagnifierTypePref(ui::MagnifierType type) {
   prefs()->SetInteger(prefs::kAccessibilityScreenMagnifierType, type);
 }
 
@@ -152,13 +152,13 @@ class MagnificationManagerTest : public InProcessBrowserTest {
   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());
@@ -199,7 +199,7 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginOffToOff) {
   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());
 }
 
@@ -217,10 +217,10 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginFullToOff) {
 
   // 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).
@@ -229,7 +229,7 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginFullToOff) {
 
   // 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();
 
@@ -244,7 +244,7 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, PRE_LoginOffToFull) {
 
   // Sets prefs to explicitly enable the magnifier.
   SetScreenMagnifierEnabledPref(true);
-  SetScreenMagnifierTypePref(ash::MAGNIFIER_FULL);
+  SetScreenMagnifierTypePref(ui::MAGNIFIER_FULL);
   SetFullScreenMagnifierScalePref(2.5);
 }
 
@@ -265,7 +265,7 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginOffToFull) {
   // 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());
 }
@@ -276,17 +276,17 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, PRE_LoginFullToFull) {
 
   // 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).
@@ -295,14 +295,14 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginFullToFull) {
 
   // 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());
 }
@@ -314,10 +314,10 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, PRE_LoginFullToUnset) {
 
 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(
@@ -325,7 +325,7 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginFullToUnset) {
 
   // 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();
 
@@ -357,11 +357,11 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginAsNewUserOff) {
 
 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).
@@ -370,13 +370,13 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginAsNewUserFull) {
 
   // 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());
 }
@@ -402,58 +402,58 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginAsNewUserUnset) {
 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) {
@@ -466,11 +466,11 @@ 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) {
@@ -481,10 +481,10 @@ 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());
@@ -503,10 +503,10 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, InvalidScalePref) {
   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());
@@ -521,7 +521,7 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, InvalidScalePref) {
   // 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());
@@ -535,17 +535,17 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest,
 
   // 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();
 }