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

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

Issue 1973753002: Paying for digital goods with PaymentRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/PaymentRequestNoShippingTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNoShippingTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNoShippingTest.java
index a7343bdb6f116eae4c75c87fcf4e24f0d0e92bed..6e014e663eac5be03a3c86bb153ea919f5ee5c77 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNoShippingTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNoShippingTest.java
@@ -4,6 +4,7 @@
package org.chromium.chrome.browser.payments;
+import android.content.DialogInterface;
import android.test.suitebuilder.annotation.MediumTest;
import org.chromium.chrome.R;
@@ -58,9 +59,22 @@ public class PaymentRequestNoShippingTest extends PaymentRequestTestBase {
public void testPayAndCancelDialog() throws InterruptedException, ExecutionException,
TimeoutException {
triggerUIAndWait(mReadyToPay);
- clickAndWait(R.id.button_primary, mReadyToUnmask);
- cancelCardUnmaskDialogAndWait(mReadyToUnmask.getTarget(), mResultReady);
+ clickAndWait(R.id.button_primary, mReadyForUnmaskInput);
+ clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_NEGATIVE,
+ mReadyForUnmaskInput.getTarget(), mResultReady);
clickAndWait(R.id.ok_button, mDismissed);
expectResultContains(new String[] {"Request cancelled"});
}
+
+ @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);
+ expectResultContains(new String[] {"Jon Doe", "4111111111111111", "12", "2050", "visa",
+ "123"});
+ }
}

Powered by Google App Engine
This is Rietveld 408576698