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

Unified Diff: chrome/browser/ui/ash/session_controller_client_unittest.cc

Issue 2863993002: cros: Defer primary user meta update until active (Closed)
Patch Set: fix nits Created 3 years, 7 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
« no previous file with comments | « chrome/browser/ui/ash/session_controller_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/session_controller_client_unittest.cc
diff --git a/chrome/browser/ui/ash/session_controller_client_unittest.cc b/chrome/browser/ui/ash/session_controller_client_unittest.cc
index 2d0db44daf68faca0bb4f070fde6338b932c8db5..660e1a89e1c93125a3518ac7cfe2c5ca362a60f5 100644
--- a/chrome/browser/ui/ash/session_controller_client_unittest.cc
+++ b/chrome/browser/ui/ash/session_controller_client_unittest.cc
@@ -32,6 +32,7 @@
#include "testing/gtest/include/gtest/gtest.h"
using chromeos::FakeChromeUserManager;
+using session_manager::SessionState;
namespace {
@@ -382,6 +383,7 @@ TEST_F(SessionControllerClientTest, SendUserSession) {
session_manager_.CreateSession(
account_id, chromeos::ProfileHelper::GetUserIdHashByUserIdForTesting(
"user@test.com"));
+ session_manager_.SetSessionState(SessionState::ACTIVE);
SessionControllerClient::FlushForTesting();
// User session was sent.
@@ -404,8 +406,7 @@ TEST_F(SessionControllerClientTest, SupervisedUser) {
SessionControllerClient::FlushForTesting();
// Simulate the login screen. No user session yet.
- session_manager_.SetSessionState(
- session_manager::SessionState::LOGIN_PRIMARY);
+ session_manager_.SetSessionState(SessionState::LOGIN_PRIMARY);
EXPECT_FALSE(session_controller.last_user_session());
// Simulate a supervised user logging in.
@@ -419,6 +420,7 @@ TEST_F(SessionControllerClientTest, SupervisedUser) {
session_manager_.CreateSession(
account_id, chromeos::ProfileHelper::GetUserIdHashByUserIdForTesting(
"child@test.com"));
+ session_manager_.SetSessionState(SessionState::ACTIVE);
SessionControllerClient::FlushForTesting();
// The session controller received session info and user session.
« no previous file with comments | « chrome/browser/ui/ash/session_controller_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698