Index: chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestExtraShippingOptionsTest.java |
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFailCompleteTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestExtraShippingOptionsTest.java |
similarity index 67% |
copy from chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFailCompleteTest.java |
copy to chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestExtraShippingOptionsTest.java |
index 56e7230bd77e22f74a2f0aa15ec4f61e15ad6087..14e3358b3c5655b1db7046f65bd032f5f7b106ad 100644 |
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFailCompleteTest.java |
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestExtraShippingOptionsTest.java |
@@ -17,11 +17,13 @@ import java.util.concurrent.ExecutionException; |
import java.util.concurrent.TimeoutException; |
/** |
- * A payment integration test for a merchant that always fails to complete the transaction. |
+ * A payment integration test for a merchant that provides shipping options, but does not request a |
+ * shipping address. |
*/ |
-public class PaymentRequestFailCompleteTest extends PaymentRequestTestBase { |
- public PaymentRequestFailCompleteTest() { |
- super("payment_request_fail_complete_test.html"); |
+public class PaymentRequestExtraShippingOptionsTest extends PaymentRequestTestBase { |
+ public PaymentRequestExtraShippingOptionsTest() { |
+ // This merchant provides shipping options, but does not request a shipping address. |
+ super("payment_request_extra_shipping_options_test.html"); |
} |
@Override |
@@ -30,20 +32,24 @@ public class PaymentRequestFailCompleteTest extends PaymentRequestTestBase { |
AutofillTestHelper helper = new AutofillTestHelper(); |
String billingAddressId = helper.setProfile(new AutofillProfile("", "https://example.com", |
true, "Jon Doe", "Google", "340 Main St", "CA", "Los Angeles", "", "90291", "", |
- "US", "310-310-6000", "jon.doe@gmail.com", "en-US")); |
+ "US", "555-555-5555", "", "en-US")); |
helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe", |
"4111111111111111", "1111", "12", "2050", "visa", R.drawable.pr_visa, |
billingAddressId, "" /* serverId */)); |
} |
+ /** |
+ * Submit the payment information without shipping address or shipping options to the merchant |
+ * when the user clicks "Pay." |
+ */ |
@MediumTest |
@Feature({"Payments"}) |
public void testPay() throws InterruptedException, ExecutionException, TimeoutException { |
triggerUIAndWait(mReadyToPay); |
clickAndWait(R.id.button_primary, mReadyForUnmaskInput); |
setTextInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123", mReadyToUnmask); |
- clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_POSITIVE, mResultReady); |
- clickAndWait(R.id.ok_button, mDismissed); |
- expectResultContains(new String[] {"Transaction failed"}); |
+ 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"}); |
} |
} |