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

Unified Diff: chrome/browser/ui/views/payments/payment_sheet_view_controller_browsertest.cc

Issue 2849523003: Add billing address as a mandatory field of Payments credit cards. (Closed)
Patch Set: Components Unittests fix 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
Index: chrome/browser/ui/views/payments/payment_sheet_view_controller_browsertest.cc
diff --git a/chrome/browser/ui/views/payments/payment_sheet_view_controller_browsertest.cc b/chrome/browser/ui/views/payments/payment_sheet_view_controller_browsertest.cc
index 8ff3e3ef6776e9fc79ea61b1c89117fea8515247..95f66eade4488a23d382269aa2ac1e080b66d944 100644
--- a/chrome/browser/ui/views/payments/payment_sheet_view_controller_browsertest.cc
+++ b/chrome/browser/ui/views/payments/payment_sheet_view_controller_browsertest.cc
@@ -36,7 +36,11 @@ IN_PROC_BROWSER_TEST_F(PaymentSheetViewControllerNoShippingTest, NoData) {
// With a supported card (Visa) present, the pay button should be enabled.
IN_PROC_BROWSER_TEST_F(PaymentSheetViewControllerNoShippingTest,
SupportedCard) {
- AddCreditCard(autofill::test::GetCreditCard()); // Visa card.
+ autofill::AutofillProfile profile(autofill::test::GetFullProfile());
+ AddAutofillProfile(profile);
+ autofill::CreditCard card(autofill::test::GetCreditCard()); // Visa card.
+ card.set_billing_address_id(profile.guid());
+ AddCreditCard(card);
InvokePaymentRequestUI();
EXPECT_TRUE(IsPayButtonEnabled());
@@ -105,8 +109,11 @@ IN_PROC_BROWSER_TEST_F(PaymentSheetViewControllerContactDetailsTest,
// enough information to enable the pay button.
IN_PROC_BROWSER_TEST_F(PaymentSheetViewControllerContactDetailsTest,
SupportedCard_CompleteContactInfo) {
- AddCreditCard(autofill::test::GetCreditCard()); // Visa card.
- AddAutofillProfile(autofill::test::GetFullProfile());
+ autofill::AutofillProfile profile(autofill::test::GetFullProfile());
+ AddAutofillProfile(profile);
+ autofill::CreditCard card(autofill::test::GetCreditCard()); // Visa card.
+ card.set_billing_address_id(profile.guid());
+ AddCreditCard(card);
InvokePaymentRequestUI();
EXPECT_TRUE(IsPayButtonEnabled());
@@ -163,8 +170,11 @@ IN_PROC_BROWSER_TEST_F(PaymentSheetViewControllerContactDetailsTest,
IN_PROC_BROWSER_TEST_F(PaymentSheetViewControllerContactDetailsTest,
AllClickableRowsPresent) {
- AddCreditCard(autofill::test::GetCreditCard()); // Visa card.
- AddAutofillProfile(autofill::test::GetFullProfile());
+ autofill::AutofillProfile profile(autofill::test::GetFullProfile());
+ AddAutofillProfile(profile);
+ autofill::CreditCard card(autofill::test::GetCreditCard()); // Visa card.
+ card.set_billing_address_id(profile.guid());
+ AddCreditCard(card);
InvokePaymentRequestUI();
EXPECT_NE(nullptr, dialog_view()->GetViewByID(static_cast<int>(

Powered by Google App Engine
This is Rietveld 408576698