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

Side by Side Diff: components/user_manager/user_unittest.cc

Issue 2711113003: Track whether a given user session has completed initialization, and use (Closed)
Patch Set: Only expose known_user::RemovePrefsForTesting() for tests Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « components/user_manager/user_manager_base.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « components/user_manager/user_manager_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698