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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNameTest.java

Issue 2368073002: PaymentRequest: Add payer name field to payer info editor. (android) (Closed)
Patch Set: PaymentRequest: Add payer name field to payer info editor. (android) Created 4 years, 2 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/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNameTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestEmailTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNameTest.java
similarity index 80%
copy from chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestEmailTest.java
copy to chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNameTest.java
index 65034de736b47cc0968f3cb4c581bbab8c55ccb7..344c1ea9bf385536c51566bf32603ee2a7931429 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestEmailTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNameTest.java
@@ -18,19 +18,19 @@ import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;
/**
- * A payment integration test for a merchant that requests email address.
+ * A payment integration test for a merchant that requests payer name.
*/
-public class PaymentRequestEmailTest extends PaymentRequestTestBase {
- public PaymentRequestEmailTest() {
- // This merchant request an email address.
- super("payment_request_email_test.html");
+public class PaymentRequestNameTest extends PaymentRequestTestBase {
+ public PaymentRequestNameTest() {
+ // This merchant request a payer name.
+ super("payment_request_name_test.html");
}
@Override
public void onMainActivityStarted()
throws InterruptedException, ExecutionException, TimeoutException {
AutofillTestHelper helper = new AutofillTestHelper();
- // The user has a valid email address on disk.
+ // The user has a valid payer name on disk.
String billingAddressId = helper.setProfile(new AutofillProfile("", "https://example.com",
true, "Jon Doe", "Google", "340 Main St", "CA", "Los Angeles", "", "90291", "",
"US", "555-555-5555", "jon.doe@google.com", "en-US"));
@@ -39,7 +39,7 @@ public class PaymentRequestEmailTest extends PaymentRequestTestBase {
billingAddressId, "" /* serverId */));
}
- /** Provide the existing valid email address to the merchant. */
+ /** Provide the existing valid payer name to the merchant. */
@MediumTest
@Feature({"Payments"})
public void testPay() throws InterruptedException, ExecutionException, TimeoutException {
@@ -47,42 +47,42 @@ public class PaymentRequestEmailTest extends PaymentRequestTestBase {
clickAndWait(R.id.button_primary, mReadyForUnmaskInput);
setTextInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123", mReadyToUnmask);
clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_POSITIVE, mDismissed);
- expectResultContains(new String[] {"jon.doe@google.com"});
+ expectResultContains(new String[] {"Jon Doe"});
}
- /** Attempt to add an invalid email address and cancel the transaction. */
+ /** Attempt to add an invalid payer name and cancel the transaction. */
@MediumTest
@Feature({"Payments"})
- public void testAddInvalidEmailAndCancel()
+ public void testAddInvalidNameAndCancel()
throws InterruptedException, ExecutionException, TimeoutException {
triggerUIAndWait(mReadyToPay);
clickInContactInfoAndWait(R.id.payments_section, mReadyForInput);
clickInContactInfoAndWait(R.id.payments_add_option_button, mReadyToEdit);
- setTextInEditorAndWait(new String[] {"jane.jones"}, mEditorTextUpdate);
+ setTextInEditorAndWait(new String[] {""}, mEditorTextUpdate);
clickInEditorAndWait(R.id.payments_edit_done_button, mEditorValidationError);
clickInEditorAndWait(R.id.payments_edit_cancel_button, mReadyForInput);
clickAndWait(R.id.close_button, mDismissed);
expectResultContains(new String[] {"Request cancelled"});
}
- /** Add a new email address and provide that to the merchant. */
+ /** Add a new payer name and provide that to the merchant. */
@MediumTest
@Feature({"Payments"})
- public void testAddEmailAndPay()
+ public void testAddNameAndPay()
throws InterruptedException, ExecutionException, TimeoutException {
triggerUIAndWait(mReadyToPay);
clickInContactInfoAndWait(R.id.payments_section, mReadyForInput);
clickInContactInfoAndWait(R.id.payments_add_option_button, mReadyToEdit);
- setTextInEditorAndWait(new String[] {"jane.jones@google.com"}, mEditorTextUpdate);
+ setTextInEditorAndWait(new String[] {"Jane Jones"}, mEditorTextUpdate);
clickInEditorAndWait(R.id.payments_edit_done_button, mReadyToPay);
clickAndWait(R.id.button_primary, mReadyForUnmaskInput);
setTextInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123", mReadyToUnmask);
clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_POSITIVE, mDismissed);
- expectResultContains(new String[] {"jane.jones@google.com"});
+ expectResultContains(new String[] {"Jane Jones"});
}
/**
- * Test that starting a payment request that requires only the user's email address results in
+ * Test that starting a payment request that requires only the user's payer name results in
* the appropriate metric being logged in the PaymentRequest.RequestedInformation histogram.
*/
@MediumTest

Powered by Google App Engine
This is Rietveld 408576698