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

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

Issue 2581293002: [PR] Fix selection when cancelling out of add billing address flow (Closed)
Patch Set: 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
« no previous file with comments | « chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestBillingAddressTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestBase.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestBase.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestBase.java
index 2da38f179cf84f26feecf353e8c244a0e6859cc3..2d86e954bb62d3b6ea76b12f3a4f860c1d8635cc 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestBase.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestBase.java
@@ -399,6 +399,28 @@ abstract class PaymentRequestTestBase extends ChromeActivityTestCaseBase<ChromeT
}
/**
+ * Clicks on the label corresponding to the payment method suggestion at the specified
+ * |suggestionIndex|.
+ * @throws InterruptedException
+ */
+ protected void clickOnPaymentMethodSuggestionOptionAndWait(
+ final int suggestionIndex, CallbackHelper helper)
+ throws ExecutionException, TimeoutException, InterruptedException {
+ assert (suggestionIndex < getNumberOfPaymentInstruments());
+
+ int callCount = helper.getCallCount();
+ ThreadUtils.runOnUiThreadBlocking(new Runnable() {
+ @Override
+ public void run() {
+ ((OptionSection) mUI.getPaymentMethodSectionForTest())
+ .getOptionLabelsForTest(suggestionIndex)
+ .performClick();
+ }
+ });
+ helper.waitForCallback(callCount);
+ }
+
+ /**
* Returns the the number of shipping address suggestions.
*/
protected int getNumberOfShippingAddressSuggestions() throws ExecutionException {
« no previous file with comments | « chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestBillingAddressTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698