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 <memory> | 5 #include <memory> |
6 #include <string> | 6 #include <string> |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 public: | 80 public: |
81 ArcKioskAppManagerTest() : settings_helper_(false) {} | 81 ArcKioskAppManagerTest() : settings_helper_(false) {} |
82 ~ArcKioskAppManagerTest() override {} | 82 ~ArcKioskAppManagerTest() override {} |
83 | 83 |
84 void SetUpCommandLine(base::CommandLine* command_line) override { | 84 void SetUpCommandLine(base::CommandLine* command_line) override { |
85 InProcessBrowserTest::SetUpCommandLine(command_line); | 85 InProcessBrowserTest::SetUpCommandLine(command_line); |
86 arc::SetArcAvailableCommandLineForTesting(command_line); | 86 arc::SetArcAvailableCommandLineForTesting(command_line); |
87 } | 87 } |
88 | 88 |
89 void SetUpOnMainThread() override { | 89 void SetUpOnMainThread() override { |
90 InProcessBrowserTest::SetUpOnMainThread(); | |
91 | |
92 settings_helper_.ReplaceProvider(kAccountsPrefDeviceLocalAccounts); | 90 settings_helper_.ReplaceProvider(kAccountsPrefDeviceLocalAccounts); |
93 owner_settings_service_ = | 91 owner_settings_service_ = |
94 settings_helper_.CreateOwnerSettingsService(browser()->profile()); | 92 settings_helper_.CreateOwnerSettingsService(browser()->profile()); |
95 } | 93 } |
96 | 94 |
97 void TearDownOnMainThread() override { settings_helper_.RestoreProvider(); } | 95 void TearDownOnMainThread() override { settings_helper_.RestoreProvider(); } |
98 | 96 |
99 void SetApps(const std::vector<policy::ArcKioskAppBasicInfo>& apps, | 97 void SetApps(const std::vector<policy::ArcKioskAppBasicInfo>& apps, |
100 const std::string& auto_login_account) { | 98 const std::string& auto_login_account) { |
101 base::ListValue device_local_accounts; | 99 base::ListValue device_local_accounts; |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 EXPECT_TRUE(waiter.was_notified()); | 222 EXPECT_TRUE(waiter.was_notified()); |
225 | 223 |
226 ArcKioskAppManager::Apps apps; | 224 ArcKioskAppManager::Apps apps; |
227 manager()->GetAllApps(&apps); | 225 manager()->GetAllApps(&apps); |
228 ASSERT_EQ(0u, apps.size()); | 226 ASSERT_EQ(0u, apps.size()); |
229 EXPECT_FALSE(manager()->GetAutoLaunchAccountId().is_valid()); | 227 EXPECT_FALSE(manager()->GetAutoLaunchAccountId().is_valid()); |
230 } | 228 } |
231 } | 229 } |
232 | 230 |
233 } // namespace chromeos | 231 } // namespace chromeos |
OLD | NEW |