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

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

Issue 2559153002: PaymentApp: Make the PaymentAppFactory asynchronous (Closed)
Patch Set: Rebase onto latest master Created 4 years 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/PaymentRequestPaymentAppTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppTest.java
index 85ea61b554eda8bbb4945c029f45636627d3d97e..e8ce6324a74ae5df95a7f2bb0b4aa40ce333d0b6 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPaymentAppTest.java
@@ -129,4 +129,34 @@ public class PaymentRequestPaymentAppTest extends PaymentRequestTestBase {
clickAndWait(R.id.button_primary, mDismissed);
expectResultContains(new String[]{"https://bobpay.com", "\"transaction\"", "1337"});
}
+
+ /**
+ * Test payment with a Bob Pay that is created with a delay, but responds immediately
+ * to getInstruments.
+ */
+ @MediumTest
+ @Feature({"Payments"})
+ public void testPayViaDelayedFastBobPay()
+ throws InterruptedException, ExecutionException, TimeoutException {
+ installPaymentApp(
+ "https://bobpay.com", HAVE_INSTRUMENTS, IMMEDIATE_RESPONSE, DELAYED_CREATION);
+ triggerUIAndWait(mReadyToPay);
+ clickAndWait(R.id.button_primary, mDismissed);
+ expectResultContains(new String[] {"https://bobpay.com", "\"transaction\"", "1337"});
+ }
+
+ /**
+ * Test payment with a Bob Pay that is created with a delay, and responds slowly to
+ * getInstruments.
+ */
+ @MediumTest
+ @Feature({"Payments"})
+ public void testPayViaDelayedSlowBobPay()
+ throws InterruptedException, ExecutionException, TimeoutException {
+ installPaymentApp(
+ "https://bobpay.com", HAVE_INSTRUMENTS, DELAYED_RESPONSE, DELAYED_CREATION);
+ triggerUIAndWait(mReadyToPay);
+ clickAndWait(R.id.button_primary, mDismissed);
+ expectResultContains(new String[] {"https://bobpay.com", "\"transaction\"", "1337"});
+ }
}

Powered by Google App Engine
This is Rietveld 408576698