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/test/ash_test_base.h" | 5 #include "ash/test/ash_test_base.h" |
6 #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" | 6 #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" |
7 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" | 7 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" |
8 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 8 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
9 #include "chrome/browser/signin/account_tracker_service_factory.h" | 9 #include "chrome/browser/signin/account_tracker_service_factory.h" |
10 #include "chrome/browser/signin/fake_signin_manager_builder.h" | 10 #include "chrome/browser/signin/fake_signin_manager_builder.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 std::unique_ptr<TestingProfile> profile_; | 46 std::unique_ptr<TestingProfile> profile_; |
47 | 47 |
48 DISALLOW_COPY_AND_ASSIGN(MultiUserTestingProfile); | 48 DISALLOW_COPY_AND_ASSIGN(MultiUserTestingProfile); |
49 }; | 49 }; |
50 | 50 |
51 } // namespace | 51 } // namespace |
52 | 52 |
53 class MultiUserUtilTest : public AshTestBase { | 53 class MultiUserUtilTest : public AshTestBase { |
54 public: | 54 public: |
55 MultiUserUtilTest() {} | 55 MultiUserUtilTest() {} |
56 ~MultiUserUtilTest() override{}; | 56 ~MultiUserUtilTest() override {} |
57 | 57 |
58 void SetUp() override { | 58 void SetUp() override { |
59 AshTestBase::SetUp(); | 59 AshTestBase::SetUp(); |
60 | 60 |
61 fake_user_manager_ = new chromeos::FakeChromeUserManager; | 61 fake_user_manager_ = new chromeos::FakeChromeUserManager; |
62 user_manager_enabler_.reset( | 62 user_manager_enabler_.reset( |
63 new chromeos::ScopedUserManagerEnabler(fake_user_manager_)); | 63 new chromeos::ScopedUserManagerEnabler(fake_user_manager_)); |
64 | 64 |
65 TestingProfile::Builder builder; | 65 TestingProfile::Builder builder; |
66 builder.AddTestingFactory(SigninManagerFactory::GetInstance(), | 66 builder.AddTestingFactory(SigninManagerFactory::GetInstance(), |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 multi_user_util::GetAccountIdFromProfile(profile()).GetUserEmail()); | 122 multi_user_util::GetAccountIdFromProfile(profile()).GetUserEmail()); |
123 | 123 |
124 SimulateTokenRevoked(id); | 124 SimulateTokenRevoked(id); |
125 EXPECT_EQ(std::string(), profile()->GetProfileUserName()); | 125 EXPECT_EQ(std::string(), profile()->GetProfileUserName()); |
126 EXPECT_EQ(kTestAccountId, | 126 EXPECT_EQ(kTestAccountId, |
127 multi_user_util::GetAccountIdFromProfile(profile()).GetUserEmail()); | 127 multi_user_util::GetAccountIdFromProfile(profile()).GetUserEmail()); |
128 } | 128 } |
129 | 129 |
130 } // namespace test | 130 } // namespace test |
131 } // namespace ash | 131 } // namespace ash |
OLD | NEW |