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

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

Issue 2849523003: Add billing address as a mandatory field of Payments credit cards. (Closed)
Patch Set: Merge branch 'master' into billing 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_request_can_make_payment_metrics_browsertest.cc
diff --git a/chrome/browser/ui/views/payments/payment_request_can_make_payment_metrics_browsertest.cc b/chrome/browser/ui/views/payments/payment_request_can_make_payment_metrics_browsertest.cc
index 3c75b6e8263f0079cd2d6bf0658e028b7e7c8bf3..502785695fa33a9cb96529198f0d25142b5f33f4 100644
--- a/chrome/browser/ui/views/payments/payment_request_can_make_payment_metrics_browsertest.cc
+++ b/chrome/browser/ui/views/payments/payment_request_can_make_payment_metrics_browsertest.cc
@@ -139,6 +139,10 @@ IN_PROC_BROWSER_TEST_F(PaymentRequestCanMakePaymentMetricsTest,
Called_False_Shown_Completed) {
base::HistogramTester histogram_tester;
+ // An address is needed so that the UI can choose it as a billing address.
+ autofill::AutofillProfile billing_address = autofill::test::GetFullProfile();
+ AddAutofillProfile(billing_address);
+
// Don't add a card on file, so CanMakePayment returns false.
// Start the Payment Request and expect CanMakePayment to be called before the
// Payment Request is shown.
@@ -156,6 +160,7 @@ IN_PROC_BROWSER_TEST_F(PaymentRequestCanMakePaymentMetricsTest,
SetComboboxValue(base::UTF8ToUTF16("05"), autofill::CREDIT_CARD_EXP_MONTH);
SetComboboxValue(base::UTF8ToUTF16("2026"),
autofill::CREDIT_CARD_EXP_4_DIGIT_YEAR);
+ SelectBillingAddress(billing_address.guid());
ResetEventObserver(DialogEvent::BACK_TO_PAYMENT_SHEET_NAVIGATION);
ClickOnDialogViewAndWait(DialogViewID::EDITOR_SAVE_BUTTON);

Powered by Google App Engine
This is Rietveld 408576698