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

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

Issue 1952373003: Use callbacks for testing payments UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments 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 997ac2ae170b57cf8718ef8ac937142512f7c879..febc1bef5ef671e986814b7d1155550430fce8d0 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
@@ -6,6 +6,8 @@ package org.chromium.chrome.browser.payments;
import android.test.suitebuilder.annotation.MediumTest;
+import org.chromium.chrome.R;
+
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;
@@ -22,28 +24,28 @@ public class PaymentRequestNoShippingTest extends PaymentRequestTestBase {
throws InterruptedException, ExecutionException, TimeoutException {}
@MediumTest
- public void testCloseDialog()
- throws InterruptedException, ExecutionException, TimeoutException {
- triggerPaymentUI();
- clickClosePaymentUIButton();
+ public void testCloseDialog() throws InterruptedException, ExecutionException,
+ TimeoutException {
+ triggerUIAndWait(mReadyToClose);
+ clickAndWait(R.id.close_button, mDismissed);
expectResultContains(new String[] {"Request cancelled"});
}
@MediumTest
- public void testEditAndCloseDialog()
- throws InterruptedException, ExecutionException, TimeoutException {
- triggerPaymentUI();
- clickSecondaryPaymentUIButton();
- clickClosePaymentUIButton();
+ public void testEditAndCloseDialog() throws InterruptedException, ExecutionException,
+ TimeoutException {
+ triggerUIAndWait(mReadyForInput);
+ clickAndWait(R.id.button_secondary, mReadyToClose);
+ clickAndWait(R.id.close_button, mDismissed);
expectResultContains(new String[] {"Request cancelled"});
}
@MediumTest
- public void testEditAndCancelDialog()
- throws InterruptedException, ExecutionException, TimeoutException {
- triggerPaymentUI();
- clickSecondaryPaymentUIButton();
- clickSecondaryPaymentUIButton();
+ public void testEditAndCancelDialog() throws InterruptedException, ExecutionException,
+ TimeoutException {
+ triggerUIAndWait(mReadyForInput);
+ clickAndWait(R.id.button_secondary, mReadyForInput);
+ clickAndWait(R.id.button_secondary, mDismissed);
expectResultContains(new String[] {"Request cancelled"});
}
}

Powered by Google App Engine
This is Rietveld 408576698