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 b87683364b18581ae9b96cc35f48f5a87f5fb44e..7705f7351672a1eceb4476ba33bde3a8ced42e6c 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 |
@@ -380,6 +380,18 @@ abstract class PaymentRequestTestBase extends ChromeActivityTestCaseBase<ChromeT |
}); |
} |
+ /** Returns the selected spinner value in the editor UI for credit cards. */ |
+ protected String getSpinnerSelectionTextInCardEditor(final int dropdownIndex) |
+ throws ExecutionException { |
+ return ThreadUtils.runOnUiThreadBlocking(new Callable<String>() { |
+ @Override |
+ public String call() { |
+ return mUI.getCardEditorView().getDropdownFieldsForTest().get(dropdownIndex) |
+ .getSelectedItem().toString(); |
+ } |
+ }); |
+ } |
+ |
/** Selects the spinner value in the editor UI for credit cards. */ |
protected void setSpinnerSelectionsInCardEditorAndWait(final int[] selections, |
CallbackHelper helper) throws InterruptedException, TimeoutException { |