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

Unified Diff: content/browser/payments/payment_app_content_unittest_base.h

Issue 2556433002: PaymentApp: Implement GetAllManifests() in PaymentAppContext. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/payments/payment_app_content_unittest_base.h
diff --git a/content/browser/payments/payment_app_content_unittest_base.h b/content/browser/payments/payment_app_content_unittest_base.h
new file mode 100644
index 0000000000000000000000000000000000000000..e635c0c2ed2a6a9336735466d70fbb8f23e3ca9b
--- /dev/null
+++ b/content/browser/payments/payment_app_content_unittest_base.h
@@ -0,0 +1,50 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_CONTENT_UNITTEST_BASE_H_
+#define CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_CONTENT_UNITTEST_BASE_H_
+
+#include <memory>
+#include <string>
+#include <vector>
+
+#include "content/browser/payments/payment_app_context_impl.h"
please use gerrit instead 2016/12/16 21:41:21 You may be able to use forward declaration: class
zino 2016/12/17 17:11:54 Done.
+#include "content/browser/payments/payment_app_manager.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace content {
+
+class EmbeddedWorkerTestHelper;
+class StoragePartitionImpl;
+class TestBrowserThreadBundle;
+
+class PaymentAppContentUnitTestBase : public testing::Test {
+ protected:
+ PaymentAppContentUnitTestBase();
+ ~PaymentAppContentUnitTestBase() override;
+
+ PaymentAppContextImpl* GetPaymentAppContext() const;
please use gerrit instead 2016/12/16 21:41:21 simple getters can be defined in the header with u
zino 2016/12/17 17:11:54 Done.
+ PaymentAppManager* CreatePaymentAppManager(const GURL& scope_url,
please use gerrit instead 2016/12/16 21:41:21 #include "url/gurl.h"
zino 2016/12/17 17:11:54 Done.
+ const GURL& sw_script_url);
+ void SetManifest(PaymentAppManager* manager,
+ const std::string& scope,
+ payments::mojom::PaymentAppManifestPtr manifest,
please use gerrit instead 2016/12/16 21:41:21 #include "components/payments/payment_app.mojom.h"
zino 2016/12/17 17:11:54 Done.
+ const PaymentAppManager::SetManifestCallback& callback);
+ void GetManifest(PaymentAppManager* manager,
+ const std::string& scope,
+ const PaymentAppManager::GetManifestCallback& callback);
+
+ private:
+ std::unique_ptr<TestBrowserThreadBundle> thread_bundle_;
+ std::unique_ptr<EmbeddedWorkerTestHelper> embedded_worker_helper_;
+ std::unique_ptr<StoragePartitionImpl> storage_partition_impl_;
+ scoped_refptr<PaymentAppContextImpl> payment_app_context_;
please use gerrit instead 2016/12/16 21:41:21 #include "base/memory/ref_counted.h"
zino 2016/12/17 17:11:54 Done.
+ std::vector<payments::mojom::PaymentAppManagerPtr> payment_app_managers_;
+
+ DISALLOW_COPY_AND_ASSIGN(PaymentAppContentUnitTestBase);
please use gerrit instead 2016/12/16 21:41:21 #include "base/macros.h"
zino 2016/12/17 17:11:54 Done.
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_CONTENT_UNITTEST_BASE_H_

Powered by Google App Engine
This is Rietveld 408576698