OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 }; | 78 }; |
79 | 79 |
80 class ArcAuthServiceTest : public InProcessBrowserTest { | 80 class ArcAuthServiceTest : public InProcessBrowserTest { |
81 protected: | 81 protected: |
82 ArcAuthServiceTest() = default; | 82 ArcAuthServiceTest() = default; |
83 | 83 |
84 // InProcessBrowserTest: | 84 // InProcessBrowserTest: |
85 ~ArcAuthServiceTest() override = default; | 85 ~ArcAuthServiceTest() override = default; |
86 | 86 |
87 void SetUpCommandLine(base::CommandLine* command_line) override { | 87 void SetUpCommandLine(base::CommandLine* command_line) override { |
88 InProcessBrowserTest::SetUpCommandLine(command_line); | |
89 arc::SetArcAvailableCommandLineForTesting(command_line); | 88 arc::SetArcAvailableCommandLineForTesting(command_line); |
90 } | 89 } |
91 | 90 |
92 void SetUpOnMainThread() override { | 91 void SetUpOnMainThread() override { |
93 user_manager_enabler_ = | 92 user_manager_enabler_ = |
94 base::MakeUnique<chromeos::ScopedUserManagerEnabler>( | 93 base::MakeUnique<chromeos::ScopedUserManagerEnabler>( |
95 new chromeos::FakeChromeUserManager()); | 94 new chromeos::FakeChromeUserManager()); |
96 // Init ArcSessionManager for testing. | 95 // Init ArcSessionManager for testing. |
97 ArcSessionManager::DisableUIForTesting(); | 96 ArcSessionManager::DisableUIForTesting(); |
98 ArcAuthNotification::DisableForTesting(); | 97 ArcAuthNotification::DisableForTesting(); |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 EXPECT_TRUE(auth_instance.account_info()); | 218 EXPECT_TRUE(auth_instance.account_info()); |
220 EXPECT_EQ(kFakeUserName, auth_instance.account_info()->account_name.value()); | 219 EXPECT_EQ(kFakeUserName, auth_instance.account_info()->account_name.value()); |
221 EXPECT_EQ(kFakeAuthCode, auth_instance.account_info()->auth_code.value()); | 220 EXPECT_EQ(kFakeAuthCode, auth_instance.account_info()->auth_code.value()); |
222 EXPECT_EQ(mojom::ChromeAccountType::USER_ACCOUNT, | 221 EXPECT_EQ(mojom::ChromeAccountType::USER_ACCOUNT, |
223 auth_instance.account_info()->account_type); | 222 auth_instance.account_info()->account_type); |
224 EXPECT_FALSE(auth_instance.account_info()->enrollment_token); | 223 EXPECT_FALSE(auth_instance.account_info()->enrollment_token); |
225 EXPECT_FALSE(auth_instance.account_info()->is_managed); | 224 EXPECT_FALSE(auth_instance.account_info()->is_managed); |
226 } | 225 } |
227 | 226 |
228 } // namespace arc | 227 } // namespace arc |
OLD | NEW |