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"}); |
+ } |
} |