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 0c17f1bc8a886e514d8f2bcd97922ddbae4033de..a10c1ecb5af527cc8f78f1f4f5f1eb85ce05f468 100644 |
--- a/components/payments/core/autofill_payment_instrument_unittest.cc |
+++ b/components/payments/core/autofill_payment_instrument_unittest.cc |
@@ -135,6 +135,8 @@ TEST_F(AutofillPaymentInstrumentTest, |
// A Masked (server) card is a valid instrument for payment. |
TEST_F(AutofillPaymentInstrumentTest, IsCompleteForPayment_MaskedCard) { |
autofill::CreditCard card = autofill::test::GetMaskedServerCard(); |
+ ASSERT_GT(billing_profiles().size(), 0UL); |
+ card.set_billing_address_id(billing_profiles()[0]->guid()); |
AutofillPaymentInstrument instrument("visa", card, billing_profiles(), |
"en-US", nullptr); |
EXPECT_TRUE(instrument.IsCompleteForPayment()); |
@@ -144,6 +146,8 @@ TEST_F(AutofillPaymentInstrumentTest, IsCompleteForPayment_MaskedCard) { |
// An expired masked (server) card is not a valid instrument for payment. |
TEST_F(AutofillPaymentInstrumentTest, IsCompleteForPayment_ExpiredMaskedCard) { |
autofill::CreditCard card = autofill::test::GetMaskedServerCard(); |
+ ASSERT_GT(billing_profiles().size(), 0UL); |
+ card.set_billing_address_id(billing_profiles()[0]->guid()); |
card.SetExpirationYear(2016); // Expired. |
AutofillPaymentInstrument instrument("visa", card, billing_profiles(), |
"en-US", nullptr); |