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

Unified Diff: components/payments/core/autofill_payment_instrument_unittest.cc

Issue 2918133002: [Merge M60][Payments] Refactor the year and month combobox models and preselect. (Closed)
Patch Set: Created 3 years, 7 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 | « components/payments/core/autofill_payment_instrument.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/payments/core/autofill_payment_instrument_unittest.cc
diff --git a/components/payments/core/autofill_payment_instrument_unittest.cc b/components/payments/core/autofill_payment_instrument_unittest.cc
index 6b09937de32c362f9d9f50475f45b05251e98d7f..7f84726ad79f82368644771a9defbb356d7c052c 100644
--- a/components/payments/core/autofill_payment_instrument_unittest.cc
+++ b/components/payments/core/autofill_payment_instrument_unittest.cc
@@ -170,16 +170,14 @@ TEST_F(AutofillPaymentInstrumentTest, IsCompleteForPayment) {
EXPECT_TRUE(instrument.GetMissingInfoLabel().empty());
}
-// An expired local card is not a valid instrument for payment.
+// An expired local card is still a valid instrument for payment.
TEST_F(AutofillPaymentInstrumentTest, IsCompleteForPayment_Expired) {
autofill::CreditCard& card = local_credit_card();
card.SetExpirationYear(2016); // Expired.
AutofillPaymentInstrument instrument("visa", card, billing_profiles(),
"en-US", nullptr);
- EXPECT_FALSE(instrument.IsCompleteForPayment());
- EXPECT_EQ(l10n_util::GetStringUTF16(
- IDS_PAYMENTS_VALIDATION_INVALID_CREDIT_CARD_EXPIRED),
- instrument.GetMissingInfoLabel());
+ EXPECT_TRUE(instrument.IsCompleteForPayment());
+ EXPECT_EQ(base::string16(), instrument.GetMissingInfoLabel());
}
// A local card with no name is not a valid instrument for payment.
@@ -263,7 +261,7 @@ TEST_F(AutofillPaymentInstrumentTest, IsCompleteForPayment_MaskedCard) {
EXPECT_TRUE(instrument.GetMissingInfoLabel().empty());
}
-// An expired masked (server) card is not a valid instrument for payment.
+// An expired masked (server) card is still a valid instrument for payment.
TEST_F(AutofillPaymentInstrumentTest, IsCompleteForPayment_ExpiredMaskedCard) {
autofill::CreditCard card = autofill::test::GetMaskedServerCard();
ASSERT_GT(billing_profiles().size(), 0UL);
@@ -271,10 +269,8 @@ TEST_F(AutofillPaymentInstrumentTest, IsCompleteForPayment_ExpiredMaskedCard) {
card.SetExpirationYear(2016); // Expired.
AutofillPaymentInstrument instrument("visa", card, billing_profiles(),
"en-US", nullptr);
- EXPECT_FALSE(instrument.IsCompleteForPayment());
- EXPECT_EQ(l10n_util::GetStringUTF16(
- IDS_PAYMENTS_VALIDATION_INVALID_CREDIT_CARD_EXPIRED),
- instrument.GetMissingInfoLabel());
+ EXPECT_TRUE(instrument.IsCompleteForPayment());
+ EXPECT_EQ(base::string16(), instrument.GetMissingInfoLabel());
}
// An expired card is a valid instrument for canMakePayment.
« no previous file with comments | « components/payments/core/autofill_payment_instrument.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698