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

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

Issue 2969713002: [Payments] Present web payment app instead of instruments to user (Closed)
Patch Set: address comments Created 3 years, 5 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_info_fetcher.cc ('k') | content/public/browser/BUILD.gn » ('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_provider_impl_unittest.cc b/content/browser/payments/payment_app_provider_impl_unittest.cc
index beeaa902f29f82898948cac90076962d6d8fd1b5..a174e45924c16b24712accf6ac1b0fd8f731ff1e 100644
--- a/content/browser/payments/payment_app_provider_impl_unittest.cc
+++ b/content/browser/payments/payment_app_provider_impl_unittest.cc
@@ -120,19 +120,27 @@ TEST_F(PaymentAppProviderTest, GetAllPaymentAppsTest) {
GURL("https://bobpay.com/b"), GURL("https://bobpay.com/b/script.js"));
PaymentHandlerStatus status;
- SetPaymentInstrument(manager1, "test_key1", PaymentInstrument::New(),
+ PaymentInstrumentPtr instrument_1 = PaymentInstrument::New();
+ instrument_1->enabled_methods.push_back("hellopay");
+ SetPaymentInstrument(manager1, "test_key1", std::move(instrument_1),
base::Bind(&SetPaymentInstrumentCallback, &status));
- SetPaymentInstrument(manager2, "test_key2", PaymentInstrument::New(),
+
+ PaymentInstrumentPtr instrument_2 = PaymentInstrument::New();
+ instrument_2->enabled_methods.push_back("hellopay");
+ SetPaymentInstrument(manager2, "test_key2", std::move(instrument_2),
base::Bind(&SetPaymentInstrumentCallback, &status));
- SetPaymentInstrument(manager2, "test_key3", PaymentInstrument::New(),
+
+ PaymentInstrumentPtr instrument_3 = PaymentInstrument::New();
+ instrument_3->enabled_methods.push_back("bobpay");
+ SetPaymentInstrument(manager2, "test_key3", std::move(instrument_3),
base::Bind(&SetPaymentInstrumentCallback, &status));
PaymentAppProvider::PaymentApps apps;
GetAllPaymentApps(base::Bind(&GetAllPaymentAppsCallback, &apps));
ASSERT_EQ(2U, apps.size());
- ASSERT_EQ(1U, apps[GURL("https://hellopay.com/")]->instruments.size());
- ASSERT_EQ(2U, apps[GURL("https://bobpay.com/")]->instruments.size());
+ ASSERT_EQ(1U, apps[GURL("https://hellopay.com/")]->enabled_methods.size());
+ ASSERT_EQ(2U, apps[GURL("https://bobpay.com/")]->enabled_methods.size());
}
} // namespace content
« no previous file with comments | « content/browser/payments/payment_app_info_fetcher.cc ('k') | content/public/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698