| Index: chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsTest.java
|
| diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsTest.java
|
| index 2820aae6166e1bd1776374b474bc6e872466197b..309d4d81ef1e792b6418d4da59608e2eda5553a3 100644
|
| --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsTest.java
|
| +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsTest.java
|
| @@ -38,10 +38,42 @@ public class PaymentRequestContactDetailsTest extends PaymentRequestTestBase {
|
| public void testPay() throws InterruptedException, ExecutionException, TimeoutException {
|
| triggerUIAndWait(mReadyToPay);
|
| clickAndWait(R.id.button_primary, mReadyForUnmaskInput);
|
| - typeInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123",
|
| - mReadyForUnmaskInput.getTarget(), mReadyToUnmask);
|
| - clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_POSITIVE,
|
| - mReadyToUnmask.getTarget(), mDismissed);
|
| + typeInCardUnmaskDialogAndWait(
|
| + R.id.card_unmask_input, "123", mReadyForUnmaskInput.getTarget(), mReadyToUnmask);
|
| + clickCardUnmaskButtonAndWait(
|
| + DialogInterface.BUTTON_POSITIVE, mReadyToUnmask.getTarget(), mDismissed);
|
| expectResultContains(new String[] {"555-555-5555", "jon.doe@google.com"});
|
| }
|
| +
|
| + @MediumTest
|
| + public void testAddInvalidContactAndCancel()
|
| + throws InterruptedException, ExecutionException, TimeoutException {
|
| + triggerUIAndWait(mReadyToPay);
|
| + clickAndWait(CONSTRAINT_CONTACT_DETAILS, R.id.payments_section, mReadyForInput);
|
| + clickAndWait(CONSTRAINT_CONTACT_DETAILS, R.id.payments_add_option_button, mReadyToEdit);
|
| + typeInEditDialog(R.id.payments_edit_phone_input, "+++");
|
| + typeInEditDialog(R.id.payments_edit_email_input, "jane.jones");
|
| + clickAndWait(
|
| + CONSTRAINT_EDIT_DIALOG, R.id.payments_edit_done_button, mEditorValidationError);
|
| + clickAndWait(CONSTRAINT_EDIT_DIALOG, R.id.payments_edit_cancel_button, mEditorDismissed);
|
| + clickAndWait(R.id.close_button, mDismissed);
|
| + expectResultContains(new String[] {"Request cancelled"});
|
| + }
|
| +
|
| + @MediumTest
|
| + public void testAddContactAndPay()
|
| + throws InterruptedException, ExecutionException, TimeoutException {
|
| + triggerUIAndWait(mReadyToPay);
|
| + clickAndWait(CONSTRAINT_CONTACT_DETAILS, R.id.payments_section, mReadyForInput);
|
| + clickAndWait(CONSTRAINT_CONTACT_DETAILS, R.id.payments_add_option_button, mReadyToEdit);
|
| + typeInEditDialog(R.id.payments_edit_phone_input, "999-999-9999");
|
| + typeInEditDialog(R.id.payments_edit_email_input, "jane.jones@google.com");
|
| + clickAndWait(CONSTRAINT_EDIT_DIALOG, R.id.payments_edit_done_button, mReadyToPay);
|
| + clickAndWait(R.id.button_primary, mReadyForUnmaskInput);
|
| + typeInCardUnmaskDialogAndWait(
|
| + R.id.card_unmask_input, "123", mReadyForUnmaskInput.getTarget(), mReadyToUnmask);
|
| + clickCardUnmaskButtonAndWait(
|
| + DialogInterface.BUTTON_POSITIVE, mReadyToUnmask.getTarget(), mDismissed);
|
| + expectResultContains(new String[] {"999-999-9999", "jane.jones@google.com"});
|
| + }
|
| }
|
|
|