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

Unified Diff: components/payments/content/payment_request_spec_unittest.cc

Issue 2843513004: [Payments] Return basic-card as the method name when possible. (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | components/payments/core/payment_request_data_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/payments/content/payment_request_spec_unittest.cc
diff --git a/components/payments/content/payment_request_spec_unittest.cc b/components/payments/content/payment_request_spec_unittest.cc
index 9a3b9b0f61e573605de06041aba80965375f34eb..7414a613f25206b7cea3212e89b9705353aabdb0 100644
--- a/components/payments/content/payment_request_spec_unittest.cc
+++ b/components/payments/content/payment_request_spec_unittest.cc
@@ -68,12 +68,12 @@ TEST_F(PaymentRequestSpecTest, IsMethodSupportedThroughBasicCard) {
RecreateSpecWithMethodData(std::move(method_data));
- // Only unionpay and jcb are supported through basic-card.
+ // unionpay and jcb are supported through basic-card. visa is supported
+ // through basic card because it was specified in basic-card in addition to
+ // supportedMethods.
EXPECT_TRUE(spec()->IsMethodSupportedThroughBasicCard("unionpay"));
EXPECT_TRUE(spec()->IsMethodSupportedThroughBasicCard("jcb"));
- // "visa" is NOT supported through basic card because it was specified
- // directly first in supportedMethods.
- EXPECT_FALSE(spec()->IsMethodSupportedThroughBasicCard("visa"));
+ EXPECT_TRUE(spec()->IsMethodSupportedThroughBasicCard("visa"));
EXPECT_FALSE(spec()->IsMethodSupportedThroughBasicCard("mastercard"));
EXPECT_FALSE(spec()->IsMethodSupportedThroughBasicCard("diners"));
EXPECT_FALSE(spec()->IsMethodSupportedThroughBasicCard("garbage"));
« no previous file with comments | « no previous file | components/payments/core/payment_request_data_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698