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

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

Issue 375413002: Replace chromeos::UserManager::Get() with chromeos::GetUserManager(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 5 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 8b387e114537a3540254d2f20d7fcd354decc1cc..8acdffff22d21f2e862d52c953bff727c723ccc1 100644
--- a/chrome/browser/chromeos/accessibility/magnification_manager_browsertest.cc
+++ b/chrome/browser/chromeos/accessibility/magnification_manager_browsertest.cc
@@ -97,7 +97,7 @@ bool GetScreenMagnifierEnabledFromPref() {
// the profile is regarded as "non new" in the next login. This is used in
// PRE_XXX cases so that in the main XXX case we can test non new profiles.
void PrepareNonNewProfile(const std::string& name) {
- UserManager::Get()->UserLoggedIn(name, name, true);
+ GetUserManager()->UserLoggedIn(name, name, true);
// To prepare a non-new profile for tests, we must ensure the profile
// directory and the preference files are created, because that's what
// Profile::IsNewProfile() checks. UserLoggedIn(), however, does not yet
@@ -185,12 +185,12 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginOffToOff) {
EXPECT_FALSE(IsMagnifierEnabled());
// Logs in with existing profile.
- UserManager::Get()->UserLoggedIn(kTestUserName, kTestUserName, true);
+ GetUserManager()->UserLoggedIn(kTestUserName, kTestUserName, true);
// Confirms that magnifier is still disabled just after login.
EXPECT_FALSE(IsMagnifierEnabled());
- UserManager::Get()->SessionStarted();
+ GetUserManager()->SessionStarted();
// Confirms that magnifier is still disabled just after session starts.
EXPECT_FALSE(IsMagnifierEnabled());
@@ -224,13 +224,13 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginFullToOff) {
EXPECT_EQ(2.5, GetFullScreenMagnifierScale());
// Logs in (but the session is not started yet).
- UserManager::Get()->UserLoggedIn(kTestUserName, kTestUserName, true);
+ GetUserManager()->UserLoggedIn(kTestUserName, kTestUserName, true);
// Confirms that magnifier is keeping enabled.
EXPECT_TRUE(IsMagnifierEnabled());
EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
- UserManager::Get()->SessionStarted();
+ GetUserManager()->SessionStarted();
// Confirms that magnifier is disabled just after session start.
EXPECT_FALSE(IsMagnifierEnabled());
@@ -253,12 +253,12 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginOffToFull) {
EXPECT_FALSE(IsMagnifierEnabled());
// Logs in (but the session is not started yet).
- UserManager::Get()->UserLoggedIn(kTestUserName, kTestUserName, true);
+ GetUserManager()->UserLoggedIn(kTestUserName, kTestUserName, true);
// Confirms that magnifier is keeping disabled.
EXPECT_FALSE(IsMagnifierEnabled());
- UserManager::Get()->SessionStarted();
+ GetUserManager()->SessionStarted();
// Confirms that the magnifier is enabled and configured according to the
// explicitly set prefs just after session start.
@@ -288,13 +288,13 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginFullToFull) {
EXPECT_EQ(3.0, GetFullScreenMagnifierScale());
// Logs in (but the session is not started yet).
- UserManager::Get()->UserLoggedIn(kTestUserName, kTestUserName, true);
+ GetUserManager()->UserLoggedIn(kTestUserName, kTestUserName, true);
// Confirms that magnifier is keeping enabled.
EXPECT_TRUE(IsMagnifierEnabled());
EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
- UserManager::Get()->SessionStarted();
+ GetUserManager()->SessionStarted();
// Confirms that the magnifier is enabled and configured according to the
// explicitly set prefs just after session start.
@@ -317,13 +317,13 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginFullToUnset) {
EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
// Logs in (but the session is not started yet).
- UserManager::Get()->UserLoggedIn(kTestUserName, kTestUserName, true);
+ GetUserManager()->UserLoggedIn(kTestUserName, kTestUserName, true);
// Confirms that magnifier is keeping enabled.
EXPECT_TRUE(IsMagnifierEnabled());
EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
- UserManager::Get()->SessionStarted();
+ GetUserManager()->SessionStarted();
// Confirms that magnifier is disabled.
EXPECT_FALSE(IsMagnifierEnabled());
@@ -338,12 +338,12 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginAsNewUserOff) {
SetMagnifierEnabled(false);
// Logs in (but the session is not started yet).
- UserManager::Get()->UserLoggedIn(kTestUserName, kTestUserName, true);
+ GetUserManager()->UserLoggedIn(kTestUserName, kTestUserName, true);
// Confirms that magnifier is keeping disabled.
EXPECT_FALSE(IsMagnifierEnabled());
- UserManager::Get()->SessionStarted();
+ GetUserManager()->SessionStarted();
// Confirms that magnifier is keeping disabled.
EXPECT_FALSE(IsMagnifierEnabled());
@@ -360,13 +360,13 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginAsNewUserFull) {
EXPECT_EQ(2.5, GetFullScreenMagnifierScale());
// Logs in (but the session is not started yet).
- UserManager::Get()->UserLoggedIn(kTestUserName, kTestUserName, true);
+ GetUserManager()->UserLoggedIn(kTestUserName, kTestUserName, true);
// Confirms that magnifier is keeping enabled.
EXPECT_TRUE(IsMagnifierEnabled());
EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
- UserManager::Get()->SessionStarted();
+ GetUserManager()->SessionStarted();
// Confirms that magnifier keeps enabled.
EXPECT_TRUE(IsMagnifierEnabled());
@@ -380,12 +380,12 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginAsNewUserUnset) {
EXPECT_FALSE(IsMagnifierEnabled());
// Logs in (but the session is not started yet).
- UserManager::Get()->UserLoggedIn(kTestUserName, kTestUserName, true);
+ GetUserManager()->UserLoggedIn(kTestUserName, kTestUserName, true);
// Confirms that magnifier is keeping disabled.
EXPECT_FALSE(IsMagnifierEnabled());
- UserManager::Get()->SessionStarted();
+ GetUserManager()->SessionStarted();
// Confirms that magnifier is keeping disabled.
EXPECT_FALSE(IsMagnifierEnabled());
@@ -451,8 +451,8 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, ChangeMagnifierType) {
IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, TypePref) {
// Logs in
- UserManager::Get()->UserLoggedIn(kTestUserName, kTestUserName, true);
- UserManager::Get()->SessionStarted();
+ GetUserManager()->UserLoggedIn(kTestUserName, kTestUserName, true);
+ GetUserManager()->SessionStarted();
// Confirms that magnifier is disabled just after login.
EXPECT_FALSE(IsMagnifierEnabled());

Powered by Google App Engine
This is Rietveld 408576698