| 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 <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 // chromeos::ServicesCustomizationExternalLoader is hooked up as an | 153 // chromeos::ServicesCustomizationExternalLoader is hooked up as an |
| 154 // extensions::ExternalLoader and depends on a functioning StatisticsProvider. | 154 // extensions::ExternalLoader and depends on a functioning StatisticsProvider. |
| 155 chromeos::system::ScopedFakeStatisticsProvider fake_statistics_provider_; | 155 chromeos::system::ScopedFakeStatisticsProvider fake_statistics_provider_; |
| 156 #endif | 156 #endif |
| 157 | 157 |
| 158 DISALLOW_COPY_AND_ASSIGN(ExternalProviderImplTest); | 158 DISALLOW_COPY_AND_ASSIGN(ExternalProviderImplTest); |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 } // namespace | 161 } // namespace |
| 162 | 162 |
| 163 #if defined(GOOGLE_CHROME_BUILD) |
| 163 TEST_F(ExternalProviderImplTest, InAppPayments) { | 164 TEST_F(ExternalProviderImplTest, InAppPayments) { |
| 164 InitServiceWithExternalProviders(); | 165 InitServiceWithExternalProviders(); |
| 165 | 166 |
| 166 scoped_refptr<content::MessageLoopRunner> runner = | 167 scoped_refptr<content::MessageLoopRunner> runner = |
| 167 new content::MessageLoopRunner; | 168 new content::MessageLoopRunner; |
| 168 service_->set_external_updates_finished_callback_for_test( | 169 service_->set_external_updates_finished_callback_for_test( |
| 169 runner->QuitClosure()); | 170 runner->QuitClosure()); |
| 170 | 171 |
| 171 service_->CheckForExternalUpdates(); | 172 service_->CheckForExternalUpdates(); |
| 172 runner->Run(); | 173 runner->Run(); |
| 173 | 174 |
| 174 EXPECT_TRUE(service_->GetInstalledExtension( | 175 EXPECT_TRUE(service_->GetInstalledExtension( |
| 175 extension_misc::kInAppPaymentsSupportAppId)); | 176 extension_misc::kInAppPaymentsSupportAppId)); |
| 176 EXPECT_TRUE(service_->IsExtensionEnabled( | 177 EXPECT_TRUE(service_->IsExtensionEnabled( |
| 177 extension_misc::kInAppPaymentsSupportAppId)); | 178 extension_misc::kInAppPaymentsSupportAppId)); |
| 178 } | 179 } |
| 180 #endif // defined(GOOGLE_CHROME_BUILD) |
| 179 | 181 |
| 180 } // namespace extensions | 182 } // namespace extensions |
| OLD | NEW |