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

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

Issue 2081533002: Edit contacts UI for PaymentRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@contactDetails
Patch Set: Addressed comments Created 4 years, 6 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/PaymentRequestFreeShippingTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFreeShippingTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFreeShippingTest.java
index 489bb18945d44291480682fefbec3b025b25455e..c21520be0f2968b40136b12c7d848976fdadcdb5 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFreeShippingTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFreeShippingTest.java
@@ -20,6 +20,7 @@ import java.util.concurrent.TimeoutException;
*/
public class PaymentRequestFreeShippingTest extends PaymentRequestTestBase {
public PaymentRequestFreeShippingTest() {
+ // This merchant provides free shipping worldwide.
super("payment_request_free_shipping_test.html");
}
@@ -27,20 +28,20 @@ public class PaymentRequestFreeShippingTest extends PaymentRequestTestBase {
public void onMainActivityStarted()
throws InterruptedException, ExecutionException, TimeoutException {
AutofillTestHelper helper = new AutofillTestHelper();
+ // The user has a shipping address on disk.
helper.setProfile(new AutofillProfile("", "https://example.com", true, "Jon Doe", "Google",
"340 Main St", "CA", "Los Angeles", "", "90291", "", "US", "", "", "en-US"));
helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe",
"4111111111111111", "1111", "12", "2050", "visa", R.drawable.pr_visa));
}
+ /** Submit the shipping address to the merchant when the user clicks "Pay." */
@MediumTest
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);
+ setTextInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123", mReadyToUnmask);
+ clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_POSITIVE, mDismissed);
expectResultContains(new String[] {"Jon Doe", "4111111111111111", "12", "2050", "visa",
"123", "Google", "340 Main St", "CA", "Los Angeles", "90291", "US", "en",
"freeShippingOption"});

Powered by Google App Engine
This is Rietveld 408576698