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

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

Issue 444903002: [cros] user_manager component - move UserManagerBase and UserManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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 99921d94a0c2f7ce44da55d0ae6c881880bf92f7..719a633443cca7fc13edd9044ffa68088ab5d102 100644
--- a/chrome/browser/chromeos/accessibility/magnification_manager_browsertest.cc
+++ b/chrome/browser/chromeos/accessibility/magnification_manager_browsertest.cc
@@ -14,7 +14,6 @@
#include "chrome/browser/chromeos/accessibility/magnification_manager.h"
#include "chrome/browser/chromeos/login/helper.h"
#include "chrome/browser/chromeos/login/login_utils.h"
-#include "chrome/browser/chromeos/login/users/user_manager.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/chrome_switches.h"
@@ -22,6 +21,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/testing_profile.h"
#include "chromeos/chromeos_switches.h"
+#include "components/user_manager/user_manager.h"
#include "components/user_prefs/user_prefs.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_service.h"
@@ -96,7 +96,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);
+ user_manager::UserManager::Get()->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
@@ -184,12 +184,13 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginOffToOff) {
EXPECT_FALSE(IsMagnifierEnabled());
// Logs in with existing profile.
- UserManager::Get()->UserLoggedIn(kTestUserName, kTestUserName, true);
+ user_manager::UserManager::Get()->UserLoggedIn(
+ kTestUserName, kTestUserName, true);
// Confirms that magnifier is still disabled just after login.
EXPECT_FALSE(IsMagnifierEnabled());
- UserManager::Get()->SessionStarted();
+ user_manager::UserManager::Get()->SessionStarted();
// Confirms that magnifier is still disabled just after session starts.
EXPECT_FALSE(IsMagnifierEnabled());
@@ -223,13 +224,14 @@ 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);
+ user_manager::UserManager::Get()->UserLoggedIn(
+ kTestUserName, kTestUserName, true);
// Confirms that magnifier is keeping enabled.
EXPECT_TRUE(IsMagnifierEnabled());
EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
- UserManager::Get()->SessionStarted();
+ user_manager::UserManager::Get()->SessionStarted();
// Confirms that magnifier is disabled just after session start.
EXPECT_FALSE(IsMagnifierEnabled());
@@ -252,12 +254,13 @@ 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);
+ user_manager::UserManager::Get()->UserLoggedIn(
+ kTestUserName, kTestUserName, true);
// Confirms that magnifier is keeping disabled.
EXPECT_FALSE(IsMagnifierEnabled());
- UserManager::Get()->SessionStarted();
+ user_manager::UserManager::Get()->SessionStarted();
// Confirms that the magnifier is enabled and configured according to the
// explicitly set prefs just after session start.
@@ -287,13 +290,14 @@ 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);
+ user_manager::UserManager::Get()->UserLoggedIn(
+ kTestUserName, kTestUserName, true);
// Confirms that magnifier is keeping enabled.
EXPECT_TRUE(IsMagnifierEnabled());
EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
- UserManager::Get()->SessionStarted();
+ user_manager::UserManager::Get()->SessionStarted();
// Confirms that the magnifier is enabled and configured according to the
// explicitly set prefs just after session start.
@@ -316,13 +320,14 @@ 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);
+ user_manager::UserManager::Get()->UserLoggedIn(
+ kTestUserName, kTestUserName, true);
// Confirms that magnifier is keeping enabled.
EXPECT_TRUE(IsMagnifierEnabled());
EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
- UserManager::Get()->SessionStarted();
+ user_manager::UserManager::Get()->SessionStarted();
// Confirms that magnifier is disabled.
EXPECT_FALSE(IsMagnifierEnabled());
@@ -337,12 +342,13 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginAsNewUserOff) {
SetMagnifierEnabled(false);
// Logs in (but the session is not started yet).
- UserManager::Get()->UserLoggedIn(kTestUserName, kTestUserName, true);
+ user_manager::UserManager::Get()->UserLoggedIn(
+ kTestUserName, kTestUserName, true);
// Confirms that magnifier is keeping disabled.
EXPECT_FALSE(IsMagnifierEnabled());
- UserManager::Get()->SessionStarted();
+ user_manager::UserManager::Get()->SessionStarted();
// Confirms that magnifier is keeping disabled.
EXPECT_FALSE(IsMagnifierEnabled());
@@ -359,13 +365,14 @@ 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);
+ user_manager::UserManager::Get()->UserLoggedIn(
+ kTestUserName, kTestUserName, true);
// Confirms that magnifier is keeping enabled.
EXPECT_TRUE(IsMagnifierEnabled());
EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
- UserManager::Get()->SessionStarted();
+ user_manager::UserManager::Get()->SessionStarted();
// Confirms that magnifier keeps enabled.
EXPECT_TRUE(IsMagnifierEnabled());
@@ -379,12 +386,13 @@ 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);
+ user_manager::UserManager::Get()->UserLoggedIn(
+ kTestUserName, kTestUserName, true);
// Confirms that magnifier is keeping disabled.
EXPECT_FALSE(IsMagnifierEnabled());
- UserManager::Get()->SessionStarted();
+ user_manager::UserManager::Get()->SessionStarted();
// Confirms that magnifier is keeping disabled.
EXPECT_FALSE(IsMagnifierEnabled());
@@ -450,8 +458,9 @@ 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();
+ user_manager::UserManager::Get()->UserLoggedIn(
+ kTestUserName, kTestUserName, true);
+ user_manager::UserManager::Get()->SessionStarted();
// Confirms that magnifier is disabled just after login.
EXPECT_FALSE(IsMagnifierEnabled());

Powered by Google App Engine
This is Rietveld 408576698