| 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 c061c3520eb5a1657e3b0383e9ba36ecb9a48c01..9ad1f91c7f86b1e3106f747ff22d740377646505 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
|
| @@ -7,6 +7,7 @@ package org.chromium.chrome.browser.payments;
|
| import static java.util.Arrays.asList;
|
|
|
| import android.os.Handler;
|
| +import android.view.KeyEvent;
|
| import android.view.View;
|
| import android.view.ViewGroup;
|
| import android.widget.CheckBox;
|
| @@ -281,6 +282,21 @@ abstract class PaymentRequestTestBase extends ChromeActivityTestCaseBase<ChromeT
|
| helper.waitForCallback(callCount);
|
| }
|
|
|
| + protected void clickAndroidBackButtonInEditorAndWait(CallbackHelper helper)
|
| + throws InterruptedException, TimeoutException {
|
| + int callCount = helper.getCallCount();
|
| + ThreadUtils.runOnUiThread(new Runnable() {
|
| + @Override
|
| + public void run() {
|
| + mUI.getEditorView().dispatchKeyEvent(
|
| + new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK));
|
| + mUI.getEditorView().dispatchKeyEvent(
|
| + new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK));
|
| + }
|
| + });
|
| + helper.waitForCallback(callCount);
|
| + }
|
| +
|
| /** Clicks on a button in the card unmask UI. */
|
| protected void clickCardUnmaskButtonAndWait(final int dialogButtonId, CallbackHelper helper)
|
| throws InterruptedException, TimeoutException {
|
|
|