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

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

Issue 2468483002: session_manager: Tracks user sessions (Closed)
Patch Set: replace func overload with better names Created 4 years, 1 month 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 fa0ee762b4ef62ef77a5931fbcf5a5b4d773534e..77f9eec8a797cc8499b60f641b53d1dd6901ecf3 100644
--- a/chrome/browser/chromeos/accessibility/magnification_manager_browsertest.cc
+++ b/chrome/browser/chromeos/accessibility/magnification_manager_browsertest.cc
@@ -23,7 +23,6 @@
#include "chromeos/chromeos_switches.h"
#include "components/prefs/pref_service.h"
#include "components/session_manager/core/session_manager.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"
@@ -98,11 +97,11 @@ bool GetScreenMagnifierEnabledFromPref() {
// that 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 AccountId& account_id) {
- user_manager::UserManager::Get()->UserLoggedIn(
- account_id, account_id.GetUserEmail(), true);
+ session_manager::SessionManager::Get()->CreateSession(
+ account_id, account_id.GetUserEmail());
// 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
+ // Profile::IsNewProfile() checks. CreateSession(), however, does not yet
// create the profile directory until GetActiveUserProfile() is called.
ProfileManager::GetActiveUserProfile();
}
@@ -189,8 +188,8 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginOffToOff) {
EXPECT_FALSE(IsMagnifierEnabled());
// Logs in with existing profile.
- user_manager::UserManager::Get()->UserLoggedIn(test_account_id_,
- kTestUserName, true);
+ session_manager::SessionManager::Get()->CreateSession(test_account_id_,
+ kTestUserName);
// Confirms that magnifier is still disabled just after login.
EXPECT_FALSE(IsMagnifierEnabled());
@@ -229,8 +228,8 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginFullToOff) {
EXPECT_EQ(2.5, GetFullScreenMagnifierScale());
// Logs in (but the session is not started yet).
- user_manager::UserManager::Get()->UserLoggedIn(test_account_id_,
- kTestUserName, true);
+ session_manager::SessionManager::Get()->CreateSession(test_account_id_,
+ kTestUserName);
// Confirms that magnifier is keeping enabled.
EXPECT_TRUE(IsMagnifierEnabled());
@@ -259,8 +258,8 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginOffToFull) {
EXPECT_FALSE(IsMagnifierEnabled());
// Logs in (but the session is not started yet).
- user_manager::UserManager::Get()->UserLoggedIn(test_account_id_,
- kTestUserName, true);
+ session_manager::SessionManager::Get()->CreateSession(test_account_id_,
+ kTestUserName);
// Confirms that magnifier is keeping disabled.
EXPECT_FALSE(IsMagnifierEnabled());
@@ -295,8 +294,8 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginFullToFull) {
EXPECT_EQ(3.0, GetFullScreenMagnifierScale());
// Logs in (but the session is not started yet).
- user_manager::UserManager::Get()->UserLoggedIn(test_account_id_,
- kTestUserName, true);
+ session_manager::SessionManager::Get()->CreateSession(test_account_id_,
+ kTestUserName);
// Confirms that magnifier is keeping enabled.
EXPECT_TRUE(IsMagnifierEnabled());
@@ -325,8 +324,8 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginFullToUnset) {
EXPECT_EQ(ash::MAGNIFIER_FULL, GetMagnifierType());
// Logs in (but the session is not started yet).
- user_manager::UserManager::Get()->UserLoggedIn(test_account_id_,
- kTestUserName, true);
+ session_manager::SessionManager::Get()->CreateSession(test_account_id_,
+ kTestUserName);
// Confirms that magnifier is keeping enabled.
EXPECT_TRUE(IsMagnifierEnabled());
@@ -347,8 +346,8 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginAsNewUserOff) {
SetMagnifierEnabled(false);
// Logs in (but the session is not started yet).
- user_manager::UserManager::Get()->UserLoggedIn(test_account_id_,
- kTestUserName, true);
+ session_manager::SessionManager::Get()->CreateSession(test_account_id_,
+ kTestUserName);
// Confirms that magnifier is keeping disabled.
EXPECT_FALSE(IsMagnifierEnabled());
@@ -370,8 +369,8 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginAsNewUserFull) {
EXPECT_EQ(2.5, GetFullScreenMagnifierScale());
// Logs in (but the session is not started yet).
- user_manager::UserManager::Get()->UserLoggedIn(test_account_id_,
- kTestUserName, true);
+ session_manager::SessionManager::Get()->CreateSession(test_account_id_,
+ kTestUserName);
// Confirms that magnifier is keeping enabled.
EXPECT_TRUE(IsMagnifierEnabled());
@@ -391,8 +390,8 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, LoginAsNewUserUnset) {
EXPECT_FALSE(IsMagnifierEnabled());
// Logs in (but the session is not started yet).
- user_manager::UserManager::Get()->UserLoggedIn(test_account_id_,
- kTestUserName, true);
+ session_manager::SessionManager::Get()->CreateSession(test_account_id_,
+ kTestUserName);
// Confirms that magnifier is keeping disabled.
EXPECT_FALSE(IsMagnifierEnabled());
@@ -463,8 +462,8 @@ IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, ChangeMagnifierType) {
IN_PROC_BROWSER_TEST_F(MagnificationManagerTest, TypePref) {
// Logs in
- user_manager::UserManager::Get()->UserLoggedIn(test_account_id_,
- kTestUserName, true);
+ session_manager::SessionManager::Get()->CreateSession(test_account_id_,
+ kTestUserName);
session_manager::SessionManager::Get()->SessionStarted();
// Confirms that magnifier is disabled just after login.

Powered by Google App Engine
This is Rietveld 408576698