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

Unified Diff: ash/session/session_controller_unittest.cc

Issue 2829813002: cros: Move IsUserSupervised and IsUserChild off SystemTrayDelegate (Closed)
Patch Set: review comments Created 3 years, 8 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 | « ash/session/session_controller.cc ('k') | ash/shelf/wm_shelf.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/session/session_controller_unittest.cc
diff --git a/ash/session/session_controller_unittest.cc b/ash/session/session_controller_unittest.cc
index b90ee19121e8e653c16c304366c4adb33c691b18..b287cc2b94935516f93e7ecc180f4169a5d847b3 100644
--- a/ash/session/session_controller_unittest.cc
+++ b/ash/session/session_controller_unittest.cc
@@ -348,5 +348,26 @@ TEST_F(SessionControllerTest, UserSessionUnblockedWithRunningUnlockAnimation) {
}
}
+TEST_F(SessionControllerTest, IsUserSupervised) {
+ mojom::UserSessionPtr session = mojom::UserSession::New();
+ session->session_id = 1u;
+ session->type = user_manager::USER_TYPE_SUPERVISED;
+ controller()->UpdateUserSession(std::move(session));
+
+ EXPECT_TRUE(controller()->IsUserSupervised());
+}
+
+TEST_F(SessionControllerTest, IsUserChild) {
+ mojom::UserSessionPtr session = mojom::UserSession::New();
+ session->session_id = 1u;
+ session->type = user_manager::USER_TYPE_CHILD;
+ controller()->UpdateUserSession(std::move(session));
+
+ EXPECT_TRUE(controller()->IsUserChild());
+
+ // Child accounts are supervised.
+ EXPECT_TRUE(controller()->IsUserSupervised());
+}
+
} // namespace
} // namespace ash
« no previous file with comments | « ash/session/session_controller.cc ('k') | ash/shelf/wm_shelf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698