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

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

Issue 682943002: Make chrome/browser/chromeos/accessibility compile on Athena with use_ash=0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@athena_do_not_use_ash41_scroll_end_effect
Patch Set: Created 6 years, 2 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
Index: chrome/browser/chromeos/accessibility/magnification_manager_browsertest.cc
diff --git a/chrome/browser/chromeos/accessibility/magnification_manager_browsertest.cc b/chrome/browser/chromeos/accessibility/magnification_manager_browsertest.cc
index c27f056cc59c3a710243b7e6fab5243bf292f818..2bef6d6b090b99da35a322e219d127570bc0c72e 100644
--- a/chrome/browser/chromeos/accessibility/magnification_manager_browsertest.cc
+++ b/chrome/browser/chromeos/accessibility/magnification_manager_browsertest.cc
@@ -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);
}
@@ -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();
}

Powered by Google App Engine
This is Rietveld 408576698