| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 local_state_.registry()); | 105 local_state_.registry()); |
| 106 #endif | 106 #endif |
| 107 | 107 |
| 108 ASSERT_TRUE(test_server_->InitializeAndWaitUntilReady()); | 108 ASSERT_TRUE(test_server_->InitializeAndWaitUntilReady()); |
| 109 test_server_->RegisterRequestHandler( | 109 test_server_->RegisterRequestHandler( |
| 110 base::Bind(&ExternalProviderImplTest::HandleRequest, | 110 base::Bind(&ExternalProviderImplTest::HandleRequest, |
| 111 base::Unretained(this))); | 111 base::Unretained(this))); |
| 112 | 112 |
| 113 test_extension_cache_.reset(new ExtensionCacheFake()); | 113 test_extension_cache_.reset(new ExtensionCacheFake()); |
| 114 | 114 |
| 115 CommandLine* cmdline = CommandLine::ForCurrentProcess(); | 115 base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess(); |
| 116 cmdline->AppendSwitchASCII(switches::kAppsGalleryUpdateURL, | 116 cmdline->AppendSwitchASCII(switches::kAppsGalleryUpdateURL, |
| 117 test_server_->GetURL(kManifestPath).spec()); | 117 test_server_->GetURL(kManifestPath).spec()); |
| 118 } | 118 } |
| 119 | 119 |
| 120 void TearDown() override { | 120 void TearDown() override { |
| 121 TestingBrowserProcess::GetGlobal()->SetLocalState(NULL); | 121 TestingBrowserProcess::GetGlobal()->SetLocalState(NULL); |
| 122 } | 122 } |
| 123 | 123 |
| 124 private: | 124 private: |
| 125 scoped_ptr<HttpResponse> HandleRequest(const HttpRequest& request) { | 125 scoped_ptr<HttpResponse> HandleRequest(const HttpRequest& request) { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 service_->CheckForExternalUpdates(); | 182 service_->CheckForExternalUpdates(); |
| 183 runner->Run(); | 183 runner->Run(); |
| 184 | 184 |
| 185 EXPECT_TRUE(service_->GetInstalledExtension( | 185 EXPECT_TRUE(service_->GetInstalledExtension( |
| 186 extension_misc::kInAppPaymentsSupportAppId)); | 186 extension_misc::kInAppPaymentsSupportAppId)); |
| 187 EXPECT_TRUE(service_->IsExtensionEnabled( | 187 EXPECT_TRUE(service_->IsExtensionEnabled( |
| 188 extension_misc::kInAppPaymentsSupportAppId)); | 188 extension_misc::kInAppPaymentsSupportAppId)); |
| 189 } | 189 } |
| 190 | 190 |
| 191 } // namespace extensions | 191 } // namespace extensions |
| OLD | NEW |