| 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 {
|
|
|