| Index: chrome/browser/ui/views/payments/payment_request_credit_card_editor_interactive_uitest.cc
|
| diff --git a/chrome/browser/ui/views/payments/payment_request_credit_card_editor_interactive_uitest.cc b/chrome/browser/ui/views/payments/payment_request_credit_card_editor_interactive_uitest.cc
|
| index 2dfcc616ea0a0b2f90a365f81bec896fc5860e0b..2f75250e9d3bd83bb307992d5387e9817bf5b704 100644
|
| --- a/chrome/browser/ui/views/payments/payment_request_credit_card_editor_interactive_uitest.cc
|
| +++ b/chrome/browser/ui/views/payments/payment_request_credit_card_editor_interactive_uitest.cc
|
| @@ -6,6 +6,7 @@
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h"
|
| #include "chrome/browser/ui/views/payments/payment_request_interactive_uitest_base.h"
|
| +#include "chrome/browser/ui/views/payments/validating_textfield.h"
|
| #include "components/autofill/core/browser/field_types.h"
|
| #include "components/autofill/core/browser/personal_data_manager.h"
|
| #include "components/payments/payment_request.h"
|
| @@ -81,4 +82,23 @@ IN_PROC_BROWSER_TEST_F(PaymentRequestCreditCardEditorTest,
|
| EXPECT_EQ(0u, personal_data_manager->GetCreditCards().size());
|
| }
|
|
|
| +IN_PROC_BROWSER_TEST_F(PaymentRequestCreditCardEditorTest, EnteringEmptyData) {
|
| + InvokePaymentRequestUI();
|
| +
|
| + OpenPaymentMethodScreen();
|
| +
|
| + OpenCreditCardEditorScreen();
|
| +
|
| + // Setting empty data and unfocusing a required textfield will make it
|
| + // invalid.
|
| + SetEditorTextfieldValue(base::ASCIIToUTF16(""),
|
| + autofill::CREDIT_CARD_NAME_FULL);
|
| +
|
| + ValidatingTextfield* textfield =
|
| + static_cast<ValidatingTextfield*>(dialog_view()->GetViewByID(
|
| + static_cast<int>(autofill::CREDIT_CARD_NAME_FULL)));
|
| + EXPECT_TRUE(textfield);
|
| + EXPECT_TRUE(textfield->invalid());
|
| +}
|
| +
|
| } // namespace payments
|
|
|