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

Unified Diff: ash/test/test_session_state_delegate.cc

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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: ash/test/test_session_state_delegate.cc
diff --git a/ash/test/test_session_state_delegate.cc b/ash/test/test_session_state_delegate.cc
index a2b99c85521b6e4f2c5aab47eeff236d8d2d888d..0c2e5da182f44d556f5b40798a6623136de27851 100644
--- a/ash/test/test_session_state_delegate.cc
+++ b/ash/test/test_session_state_delegate.cc
@@ -231,9 +231,9 @@ bool TestSessionStateDelegate::ShouldShowAvatar(aura::Window* window) const {
return !GetActiveUserInfo()->GetImage().isNull();
}
-void TestSessionStateDelegate::SwitchActiveUser(const std::string& user_id) {
+void TestSessionStateDelegate::SwitchActiveUser(const user_manager::UserID& user_id) {
// Make sure this is a user id and not an email address.
- EXPECT_EQ(user_id, GetUserIDFromEmail(user_id));
+ EXPECT_EQ(user_id.GetUserEmail(), GetUserIDFromEmail(user_id.GetUserEmail()));
Denis Kuznetsov (DE-MUC) 2015/06/10 16:50:46 No need for this check here. This check should be
active_user_index_ = 0;
for (std::vector<MockUserInfo*>::iterator iter = user_list_.begin();
iter != user_list_.end();
@@ -247,7 +247,7 @@ void TestSessionStateDelegate::SwitchActiveUser(const std::string& user_id) {
}
void TestSessionStateDelegate::CycleActiveUser(CycleUser cycle_user) {
- SwitchActiveUser("someone@tray");
+ SwitchActiveUser(user_manager::UserID(std::string(), "someone@tray"));
Denis Kuznetsov (DE-MUC) 2015/06/10 16:50:46 FromUserEmail()
}
bool TestSessionStateDelegate::IsMultiProfileAllowedByPrimaryUserPolicy()

Powered by Google App Engine
This is Rietveld 408576698