OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_CONTENT_UNITTEST_BASE_H_ |
| 6 #define CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_CONTENT_UNITTEST_BASE_H_ |
| 7 |
| 8 #include <memory> |
| 9 #include <string> |
| 10 #include <vector> |
| 11 |
| 12 #include "content/browser/payments/payment_app_context_impl.h" |
| 13 #include "content/browser/payments/payment_app_manager.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 |
| 16 namespace content { |
| 17 |
| 18 class EmbeddedWorkerTestHelper; |
| 19 class StoragePartitionImpl; |
| 20 class TestBrowserThreadBundle; |
| 21 |
| 22 class PaymentAppContentUnitTestBase : public testing::Test { |
| 23 protected: |
| 24 PaymentAppContentUnitTestBase(); |
| 25 ~PaymentAppContentUnitTestBase() override; |
| 26 |
| 27 PaymentAppContextImpl* GetPaymentAppContext() const; |
| 28 PaymentAppManager* CreatePaymentAppManager(const GURL& scope_url, |
| 29 const GURL& sw_script_url); |
| 30 void SetManifest(PaymentAppManager* manager, |
| 31 const std::string& scope, |
| 32 payments::mojom::PaymentAppManifestPtr manifest, |
| 33 const PaymentAppManager::SetManifestCallback& callback); |
| 34 void GetManifest(PaymentAppManager* manager, |
| 35 const std::string& scope, |
| 36 const PaymentAppManager::GetManifestCallback& callback); |
| 37 |
| 38 private: |
| 39 std::unique_ptr<TestBrowserThreadBundle> thread_bundle_; |
| 40 std::unique_ptr<EmbeddedWorkerTestHelper> embedded_worker_helper_; |
| 41 std::unique_ptr<StoragePartitionImpl> storage_partition_impl_; |
| 42 scoped_refptr<PaymentAppContextImpl> payment_app_context_; |
| 43 std::vector<payments::mojom::PaymentAppManagerPtr> services_; |
| 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(PaymentAppContentUnitTestBase); |
| 46 }; |
| 47 |
| 48 } // namespace content |
| 49 |
| 50 #endif // CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_CONTENT_UNITTEST_BASE_H_ |
OLD | NEW |