Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Side by Side Diff: content/browser/payments/payment_app_content_unittest_base.h

Issue 2556433002: PaymentApp: Implement GetAllManifests() in PaymentAppContext. (Closed)
Patch Set: addressed comments Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/payments/payment_app_content_unittest_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 "base/macros.h"
13 #include "base/memory/ref_counted.h"
14 #include "components/payments/payment_app.mojom.h"
15 #include "content/browser/payments/payment_app_manager.h"
16 #include "testing/gtest/include/gtest/gtest.h"
17 #include "url/gurl.h"
18
19 namespace content {
20
21 class EmbeddedWorkerTestHelper;
22 class PaymentAppContextImpl;
23 class StoragePartitionImpl;
24 class TestBrowserThreadBundle;
25
26 class PaymentAppContentUnitTestBase : public testing::Test {
27 protected:
28 PaymentAppContentUnitTestBase();
29 ~PaymentAppContentUnitTestBase() override;
30
31 PaymentAppContextImpl* payment_app_context() const {
32 return payment_app_context_.get();
33 }
34 PaymentAppManager* CreatePaymentAppManager(const GURL& scope_url,
35 const GURL& sw_script_url);
36 void SetManifest(PaymentAppManager* manager,
37 const std::string& scope,
38 payments::mojom::PaymentAppManifestPtr manifest,
39 const PaymentAppManager::SetManifestCallback& callback);
40 void GetManifest(PaymentAppManager* manager,
41 const std::string& scope,
42 const PaymentAppManager::GetManifestCallback& callback);
43
44 private:
45 std::unique_ptr<TestBrowserThreadBundle> thread_bundle_;
46 std::unique_ptr<EmbeddedWorkerTestHelper> embedded_worker_helper_;
47 std::unique_ptr<StoragePartitionImpl> storage_partition_impl_;
48 scoped_refptr<PaymentAppContextImpl> payment_app_context_;
49 std::vector<payments::mojom::PaymentAppManagerPtr> payment_app_managers_;
50
51 DISALLOW_COPY_AND_ASSIGN(PaymentAppContentUnitTestBase);
52 };
53
54 } // namespace content
55
56 #endif // CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_CONTENT_UNITTEST_BASE_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/payments/payment_app_content_unittest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698