| 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 "components/user_manager/user.h" | 5 #include "components/user_manager/user.h" |
| 6 | 6 |
| 7 #include "components/signin/core/account_id/account_id.h" | 7 #include "components/signin/core/account_id/account_id.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 namespace user_manager { | 10 namespace user_manager { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 ScopedUser kiosk_user(User::CreateKioskAppUser(account_id)); | 37 ScopedUser kiosk_user(User::CreateKioskAppUser(account_id)); |
| 38 EXPECT_TRUE(kiosk_user.IsAffiliated()); | 38 EXPECT_TRUE(kiosk_user.IsAffiliated()); |
| 39 | 39 |
| 40 ScopedUser public_session_user(User::CreatePublicAccountUser(account_id)); | 40 ScopedUser public_session_user(User::CreatePublicAccountUser(account_id)); |
| 41 EXPECT_TRUE(public_session_user.IsAffiliated()); | 41 EXPECT_TRUE(public_session_user.IsAffiliated()); |
| 42 | 42 |
| 43 ScopedUser arc_kiosk_user(User::CreateArcKioskAppUser(account_id)); | 43 ScopedUser arc_kiosk_user(User::CreateArcKioskAppUser(account_id)); |
| 44 EXPECT_TRUE(arc_kiosk_user.IsAffiliated()); | 44 EXPECT_TRUE(arc_kiosk_user.IsAffiliated()); |
| 45 } | 45 } |
| 46 | 46 |
| 47 TEST(UserTest, UserSessionInitialized) { |
| 48 const AccountId account_id = AccountId::FromUserEmailGaiaId(kEmail, kGaiaId); |
| 49 std::unique_ptr<User> user(User::CreateRegularUser(account_id)); |
| 50 EXPECT_FALSE(user->profile_ever_initialized()); |
| 51 user->set_profile_ever_initialized(true); |
| 52 EXPECT_TRUE(user->profile_ever_initialized()); |
| 53 } |
| 54 |
| 47 } // namespace user_manager | 55 } // namespace user_manager |
| OLD | NEW |