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

Unified Diff: content/browser/payments/payment_app_provider_impl_unittest.cc

Issue 2609103002: PaymentApp: Add PaymentAppProvider class. (Closed)
Patch Set: Remove override keyword Created 3 years, 11 months 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
« no previous file with comments | « content/browser/payments/payment_app_provider_impl.cc ('k') | content/browser/storage_partition_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/payments/payment_app_provider_impl_unittest.cc
diff --git a/content/browser/payments/payment_app_context_impl_unittest.cc b/content/browser/payments/payment_app_provider_impl_unittest.cc
similarity index 79%
rename from content/browser/payments/payment_app_context_impl_unittest.cc
rename to content/browser/payments/payment_app_provider_impl_unittest.cc
index 0a765089f0772e5de8f38120ea1253e11b32476a..8fde6670496bc23830b328de26bdf07a586cb990 100644
--- a/content/browser/payments/payment_app_context_impl_unittest.cc
+++ b/content/browser/payments/payment_app_provider_impl_unittest.cc
@@ -10,8 +10,7 @@
#include "base/run_loop.h"
#include "components/payments/payment_app.mojom.h"
#include "content/browser/payments/payment_app_content_unittest_base.h"
-#include "content/browser/payments/payment_app_context_impl.h"
-#include "content/public/browser/payment_app_context.h"
+#include "content/browser/payments/payment_app_provider_impl.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
@@ -32,21 +31,22 @@ void SetManifestCallback(bool* called,
}
void GetAllManifestsCallback(bool* called,
- PaymentAppContext::Manifests* out_manifests,
- PaymentAppContext::Manifests manifests) {
+ PaymentAppProvider::Manifests* out_manifests,
+ PaymentAppProvider::Manifests manifests) {
*called = true;
*out_manifests = std::move(manifests);
}
} // namespace
-class PaymentAppContextTest : public PaymentAppContentUnitTestBase {
+class PaymentAppProviderTest : public PaymentAppContentUnitTestBase {
public:
- PaymentAppContextTest() {}
- ~PaymentAppContextTest() override {}
+ PaymentAppProviderTest() {}
+ ~PaymentAppProviderTest() override {}
- void GetAllManifests(PaymentAppContext::GetAllManifestsCallback callback) {
- payment_app_context()->GetAllManifests(callback);
+ void GetAllManifests(PaymentAppProvider::GetAllManifestsCallback callback) {
+ PaymentAppProviderImpl::GetInstance()->GetAllManifests(browser_context(),
+ callback);
base::RunLoop().RunUntilIdle();
}
@@ -65,10 +65,10 @@ class PaymentAppContextTest : public PaymentAppContentUnitTestBase {
}
private:
- DISALLOW_COPY_AND_ASSIGN(PaymentAppContextTest);
+ DISALLOW_COPY_AND_ASSIGN(PaymentAppProviderTest);
};
-TEST_F(PaymentAppContextTest, Test) {
+TEST_F(PaymentAppProviderTest, Test) {
static const struct {
const char* scopeUrl;
const char* scriptUrl;
@@ -82,7 +82,7 @@ TEST_F(PaymentAppContextTest, Test) {
GURL(kPaymentAppInfo[i].scriptUrl));
}
- PaymentAppContext::Manifests manifests;
+ PaymentAppProvider::Manifests manifests;
bool called = false;
GetAllManifests(base::Bind(&GetAllManifestsCallback, &called, &manifests));
ASSERT_TRUE(called);
« no previous file with comments | « content/browser/payments/payment_app_provider_impl.cc ('k') | content/browser/storage_partition_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698