OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/dir_reader_posix.h" | 8 #include "base/files/dir_reader_posix.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 protected: | 204 protected: |
205 SigninExtensionsDeviceCloudPolicyBrowserTest() | 205 SigninExtensionsDeviceCloudPolicyBrowserTest() |
206 : fetcher_factory_(&fetcher_impl_factory_) {} | 206 : fetcher_factory_(&fetcher_impl_factory_) {} |
207 | 207 |
208 const extensions::Extension* InstallAndLoadTestExtension() const { | 208 const extensions::Extension* InstallAndLoadTestExtension() const { |
209 Profile* signin_profile = GetSigninProfile(); | 209 Profile* signin_profile = GetSigninProfile(); |
210 ExtensionService* service = | 210 ExtensionService* service = |
211 extensions::ExtensionSystem::Get(signin_profile)->extension_service(); | 211 extensions::ExtensionSystem::Get(signin_profile)->extension_service(); |
212 scoped_refptr<extensions::UnpackedInstaller> installer( | 212 scoped_refptr<extensions::UnpackedInstaller> installer( |
213 extensions::UnpackedInstaller::Create(service)); | 213 extensions::UnpackedInstaller::Create(service)); |
214 ExtensionTestNotificationObserver observer(signin_profile); | 214 extensions::ExtensionTestNotificationObserver observer(signin_profile); |
215 installer->Load(GetTestExtensionSourcePath()); | 215 installer->Load(GetTestExtensionSourcePath()); |
216 observer.WaitForExtensionLoad(); | 216 observer.WaitForExtensionLoad(); |
217 return GetTestExtension(); | 217 return GetTestExtension(); |
218 } | 218 } |
219 | 219 |
220 private: | 220 private: |
221 void SetUp() override { | 221 void SetUp() override { |
222 StartPolicyTestServer(); | 222 StartPolicyTestServer(); |
223 DevicePolicyCrosBrowserTest::SetUp(); | 223 DevicePolicyCrosBrowserTest::SetUp(); |
224 } | 224 } |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 ASSERT_TRUE(extension); | 364 ASSERT_TRUE(extension); |
365 Browser* browser = CreateBrowser(GetSigninProfile()); | 365 Browser* browser = CreateBrowser(GetSigninProfile()); |
366 extensions::ResultCatcher result_catcher; | 366 extensions::ResultCatcher result_catcher; |
367 ui_test_utils::NavigateToURL( | 367 ui_test_utils::NavigateToURL( |
368 browser, extension->GetResourceURL(kTestExtensionTestPage)); | 368 browser, extension->GetResourceURL(kTestExtensionTestPage)); |
369 EXPECT_TRUE(result_catcher.GetNextResult()); | 369 EXPECT_TRUE(result_catcher.GetNextResult()); |
370 CloseBrowserSynchronously(browser); | 370 CloseBrowserSynchronously(browser); |
371 } | 371 } |
372 | 372 |
373 } // namespace policy | 373 } // namespace policy |
OLD | NEW |