OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/extensions/external_provider_impl.h" | 5 #include "chrome/browser/extensions/external_provider_impl.h" |
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/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 int(sizeof(prefs))); | 91 int(sizeof(prefs))); |
92 InitializeExtensionService(params); | 92 InitializeExtensionService(params); |
93 service_->updater()->Start(); | 93 service_->updater()->Start(); |
94 } | 94 } |
95 | 95 |
96 // ExtensionServiceTestBase overrides: | 96 // ExtensionServiceTestBase overrides: |
97 void SetUp() override { | 97 void SetUp() override { |
98 ExtensionServiceTestBase::SetUp(); | 98 ExtensionServiceTestBase::SetUp(); |
99 test_server_.reset(new EmbeddedTestServer()); | 99 test_server_.reset(new EmbeddedTestServer()); |
100 | 100 |
101 ASSERT_TRUE(test_server_->InitializeAndWaitUntilReady()); | 101 ASSERT_TRUE(test_server_->Start()); |
102 test_server_->RegisterRequestHandler( | 102 test_server_->RegisterRequestHandler( |
103 base::Bind(&ExternalProviderImplTest::HandleRequest, | 103 base::Bind(&ExternalProviderImplTest::HandleRequest, |
104 base::Unretained(this))); | 104 base::Unretained(this))); |
105 | 105 |
106 test_extension_cache_.reset(new ExtensionCacheFake()); | 106 test_extension_cache_.reset(new ExtensionCacheFake()); |
107 | 107 |
108 base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess(); | 108 base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess(); |
109 cmdline->AppendSwitchASCII(switches::kAppsGalleryUpdateURL, | 109 cmdline->AppendSwitchASCII(switches::kAppsGalleryUpdateURL, |
110 test_server_->GetURL(kManifestPath).spec()); | 110 test_server_->GetURL(kManifestPath).spec()); |
111 } | 111 } |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 service_->CheckForExternalUpdates(); | 170 service_->CheckForExternalUpdates(); |
171 runner->Run(); | 171 runner->Run(); |
172 | 172 |
173 EXPECT_TRUE(service_->GetInstalledExtension( | 173 EXPECT_TRUE(service_->GetInstalledExtension( |
174 extension_misc::kInAppPaymentsSupportAppId)); | 174 extension_misc::kInAppPaymentsSupportAppId)); |
175 EXPECT_TRUE(service_->IsExtensionEnabled( | 175 EXPECT_TRUE(service_->IsExtensionEnabled( |
176 extension_misc::kInAppPaymentsSupportAppId)); | 176 extension_misc::kInAppPaymentsSupportAppId)); |
177 } | 177 } |
178 | 178 |
179 } // namespace extensions | 179 } // namespace extensions |
OLD | NEW |