Index: chrome/browser/ui/views/payments/payment_method_view_controller_browsertest.cc |
diff --git a/chrome/browser/ui/views/payments/payment_method_view_controller_browsertest.cc b/chrome/browser/ui/views/payments/payment_method_view_controller_browsertest.cc |
index a95524e5c2eedf2a9428d8d5cbe9456960a8f24d..a6c10fb93847bbacc40d8317ae3c9dc54a1941e9 100644 |
--- a/chrome/browser/ui/views/payments/payment_method_view_controller_browsertest.cc |
+++ b/chrome/browser/ui/views/payments/payment_method_view_controller_browsertest.cc |
@@ -24,7 +24,10 @@ class PaymentMethodViewControllerTest : public PaymentRequestBrowserTestBase { |
}; |
IN_PROC_BROWSER_TEST_F(PaymentMethodViewControllerTest, OneCardSelected) { |
- const autofill::CreditCard card = autofill::test::GetCreditCard(); |
+ autofill::AutofillProfile billing_profile(autofill::test::GetFullProfile()); |
+ PaymentRequestBrowserTestBase::AddAutofillProfile(billing_profile); |
+ autofill::CreditCard card = autofill::test::GetCreditCard(); |
+ card.set_billing_address_id(billing_profile.guid()); |
AddCreditCard(card); |
InvokePaymentRequestUI(); |
@@ -47,7 +50,12 @@ IN_PROC_BROWSER_TEST_F(PaymentMethodViewControllerTest, OneCardSelected) { |
IN_PROC_BROWSER_TEST_F(PaymentMethodViewControllerTest, |
OneCardSelectedOutOfMany) { |
+ autofill::AutofillProfile billing_profile(autofill::test::GetFullProfile()); |
+ PaymentRequestBrowserTestBase::AddAutofillProfile(billing_profile); |
+ |
autofill::CreditCard card1 = autofill::test::GetCreditCard(); |
+ card1.set_billing_address_id(billing_profile.guid()); |
+ |
// Ensure that this card is the first suggestion. |
card1.set_use_count(5U); |
AddCreditCard(card1); |
@@ -55,6 +63,7 @@ IN_PROC_BROWSER_TEST_F(PaymentMethodViewControllerTest, |
// Slightly different visa. |
autofill::CreditCard card2 = autofill::test::GetCreditCard(); |
card2.SetNumber(base::ASCIIToUTF16("4111111111111112")); |
+ card2.set_billing_address_id(billing_profile.guid()); |
card2.set_use_count(1U); |
AddCreditCard(card2); |