| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/mus/test/wm_test_base.h" | 5 #include "ash/mus/test/wm_test_base.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/common/session/session_controller.h" | 10 #include "ash/common/session/session_controller.h" |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 session->session_id = 1; | 191 session->session_id = 1; |
| 192 session->type = user_manager::USER_TYPE_REGULAR; | 192 session->type = user_manager::USER_TYPE_REGULAR; |
| 193 const std::string email("ash.user@example.com"); | 193 const std::string email("ash.user@example.com"); |
| 194 session->account_id = AccountId::FromUserEmail(email); | 194 session->account_id = AccountId::FromUserEmail(email); |
| 195 session->display_name = "Ash User"; | 195 session->display_name = "Ash User"; |
| 196 session->display_email = email; | 196 session->display_email = email; |
| 197 session_controller->UpdateUserSession(std::move(session)); | 197 session_controller->UpdateUserSession(std::move(session)); |
| 198 | 198 |
| 199 // Simulate the user session becoming active. | 199 // Simulate the user session becoming active. |
| 200 mojom::SessionInfoPtr info = mojom::SessionInfo::New(); | 200 mojom::SessionInfoPtr info = mojom::SessionInfo::New(); |
| 201 info->max_users = 10; | |
| 202 info->can_lock_screen = true; | 201 info->can_lock_screen = true; |
| 203 info->should_lock_screen_automatically = false; | 202 info->should_lock_screen_automatically = false; |
| 204 info->add_user_session_policy = AddUserSessionPolicy::ALLOWED; | 203 info->add_user_session_policy = AddUserSessionPolicy::ALLOWED; |
| 205 info->state = session_manager::SessionState::ACTIVE; | 204 info->state = session_manager::SessionState::ACTIVE; |
| 206 session_controller->SetSessionInfo(std::move(info)); | 205 session_controller->SetSessionInfo(std::move(info)); |
| 207 } | 206 } |
| 208 | 207 |
| 209 | 208 |
| 210 } // namespace mus | 209 } // namespace mus |
| 211 } // namespace ash | 210 } // namespace ash |
| OLD | NEW |