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

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

Issue 2888733004: Change text and disable empty combobox for payment request shipping address (Closed)
Patch Set: Fixed a weird goof 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/credit_card_editor_view_controller_browsertest.cc
diff --git a/chrome/browser/ui/views/payments/credit_card_editor_view_controller_browsertest.cc b/chrome/browser/ui/views/payments/credit_card_editor_view_controller_browsertest.cc
index 471ace6096f838d904fd4d9831abcd16ad039ad2..aac356bfd61d684774a9a01cfe3f015d49733a6d 100644
--- a/chrome/browser/ui/views/payments/credit_card_editor_view_controller_browsertest.cc
+++ b/chrome/browser/ui/views/payments/credit_card_editor_view_controller_browsertest.cc
@@ -485,14 +485,12 @@ IN_PROC_BROWSER_TEST_F(PaymentRequestCreditCardEditorTest,
IN_PROC_BROWSER_TEST_F(PaymentRequestCreditCardEditorTest,
CreateNewBillingAddress) {
autofill::CreditCard card = autofill::test::GetCreditCard();
- // Make sure to clear billing address.
+ // Make sure to clear billing address and have none available.
card.set_billing_address_id("");
AddCreditCard(card);
autofill::TestAutofillClock test_clock;
test_clock.SetNow(kJune2017);
- autofill::AutofillProfile billing_profile(autofill::test::GetFullProfile());
- AddAutofillProfile(billing_profile);
InvokePaymentRequestUI();
@@ -506,6 +504,12 @@ IN_PROC_BROWSER_TEST_F(PaymentRequestCreditCardEditorTest,
ResetEventObserver(DialogEvent::CREDIT_CARD_EDITOR_OPENED);
ClickOnChildInListViewAndWait(/*child_index=*/0, /*num_children=*/1,
DialogViewID::PAYMENT_METHOD_SHEET_LIST_VIEW);
+ // Billing address combobox must be disabled since there are no saved address.
+ views::View* billing_address_combobox = dialog_view()->GetViewByID(
+ static_cast<int>(autofill::ADDRESS_BILLING_LINE1));
+ ASSERT_NE(nullptr, billing_address_combobox);
+ EXPECT_FALSE(billing_address_combobox->enabled());
+
// Click to open the address editor
ResetEventObserver(DialogEvent::SHIPPING_ADDRESS_EDITOR_OPENED);
ClickOnDialogViewAndWait(DialogViewID::ADD_BILLING_ADDRESS_BUTTON);

Powered by Google App Engine
This is Rietveld 408576698