Chromium Code Reviews| Index: chrome/browser/ui/views/payments/shipping_address_editor_view_controller_browsertest.cc |
| diff --git a/chrome/browser/ui/views/payments/shipping_address_editor_view_controller_browsertest.cc b/chrome/browser/ui/views/payments/shipping_address_editor_view_controller_browsertest.cc |
| index 4b8edd22de409bf01e37a1f29903844611d7eb16..8f8095f2a8292de207d5db63cbc1c2f44e303585 100644 |
| --- a/chrome/browser/ui/views/payments/shipping_address_editor_view_controller_browsertest.cc |
| +++ b/chrome/browser/ui/views/payments/shipping_address_editor_view_controller_browsertest.cc |
| @@ -599,4 +599,36 @@ IN_PROC_BROWSER_TEST_F(PaymentRequestShippingAddressEditorTest, |
| EXPECT_NE(textfield->GetFocusManager()->GetFocusedView(), nullptr); |
| } |
| +// Tests that the editor accepts an international phone from another country. |
| +IN_PROC_BROWSER_TEST_F(PaymentRequestShippingAddressEditorTest, |
| + InternationalPhoneNumberFromOtherCountry) { |
| + InvokePaymentRequestUI(); |
| + OpenShippingAddressEditorScreen(); |
| + |
| + SetCommonFields(); |
| + |
| + // Set an Australian phone number in international format. |
| + SetEditorTextfieldValue(base::UTF8ToUTF16("+61 2 9374 4000"), |
| + autofill::PHONE_HOME_WHOLE_NUMBER); |
| + |
| + ResetEventObserver(DialogEvent::BACK_TO_PAYMENT_SHEET_NAVIGATION); |
| + ClickOnDialogViewAndWait(DialogViewID::SAVE_ADDRESS_BUTTON); |
| +} |
| + |
| +// Tests that the editor doesn't accept a local phone from another country. |
| +IN_PROC_BROWSER_TEST_F(PaymentRequestShippingAddressEditorTest, |
| + LocalPhoneNumberFromOtherCountry) { |
| + InvokePaymentRequestUI(); |
| + OpenShippingAddressEditorScreen(); |
| + |
| + SetCommonFields(); |
| + |
| + // Set an Australian phone number in international format. |
| + SetEditorTextfieldValue(base::UTF8ToUTF16("02 9374 4000"), |
| + autofill::PHONE_HOME_WHOLE_NUMBER); |
| + |
| + ResetEventObserver(DialogEvent::EDITOR_VALIDATION_ERROR); |
|
Mathieu
2017/05/29 16:34:00
we are disabling the done button when there is inv
sebsg
2017/05/29 19:48:39
Ok, I'll rebase when it lands.
|
| + ClickOnDialogViewAndWait(DialogViewID::SAVE_ADDRESS_BUTTON); |
| +} |
| + |
| } // namespace payments |