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

Unified Diff: ash/system/tiles/tray_tiles_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/system/supervised/tray_supervised_user_unittest.cc ('k') | ash/system/tray/system_tray_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tiles/tray_tiles_unittest.cc
diff --git a/ash/system/tiles/tray_tiles_unittest.cc b/ash/system/tiles/tray_tiles_unittest.cc
index afee1f0af46ff8a3cf4c8900ed095f9553f1c4f5..30fa09497afdea6b6507eb5e1df5e4250fdfd376 100644
--- a/ash/system/tiles/tray_tiles_unittest.cc
+++ b/ash/system/tiles/tray_tiles_unittest.cc
@@ -7,6 +7,7 @@
#include "ash/system/tiles/tiles_default_view.h"
#include "ash/test/ash_test_base.h"
#include "ash/test/test_session_controller_client.h"
+#include "components/user_manager/user_type.h"
#include "ui/views/controls/button/custom_button.h"
#include "ui/views/view.h"
@@ -99,10 +100,11 @@ TEST_F(TrayTilesTest, ButtonStatesAddingUser) {
// Settings buttons are disabled when adding a supervised user.
TEST_F(TrayTilesTest, ButtonStatesSupervisedUserFlow) {
- // Simulate a supervised user session with disabled settings.
+ // Simulate the add supervised user flow, which is a regular user session but
+ // with web UI settings disabled.
const bool enable_settings = false;
- GetSessionControllerClient()->AddUserSession("foo@example.com",
- enable_settings);
+ GetSessionControllerClient()->AddUserSession(
+ "foo@example.com", user_manager::USER_TYPE_REGULAR, enable_settings);
std::unique_ptr<views::View> default_view(
tray_tiles()->CreateDefaultViewForTesting());
EXPECT_EQ(Button::STATE_DISABLED, GetSettingsButton()->state());
« no previous file with comments | « ash/system/supervised/tray_supervised_user_unittest.cc ('k') | ash/system/tray/system_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698