| Index: chrome/test/android/javatests/src/org/chromium/chrome/test/util/InfoBarUtil.java
|
| diff --git a/chrome/test/android/javatests/src/org/chromium/chrome/test/util/InfoBarUtil.java b/chrome/test/android/javatests/src/org/chromium/chrome/test/util/InfoBarUtil.java
|
| index bb5281c77e049a5757d26354c7fcaef04511cbcd..83a3c5fb9e2b388338cbd22739024e6ffc8c7122 100644
|
| --- a/chrome/test/android/javatests/src/org/chromium/chrome/test/util/InfoBarUtil.java
|
| +++ b/chrome/test/android/javatests/src/org/chromium/chrome/test/util/InfoBarUtil.java
|
| @@ -6,9 +6,9 @@ package org.chromium.chrome.test.util;
|
|
|
| import android.view.View;
|
|
|
| +import org.chromium.base.ThreadUtils;
|
| import org.chromium.chrome.R;
|
| import org.chromium.chrome.browser.infobar.InfoBar;
|
| -import org.chromium.content.browser.test.util.TouchCommon;
|
|
|
| /**
|
| * Utility functions for dealing with InfoBars.
|
| @@ -19,9 +19,16 @@ public class InfoBarUtil {
|
| * @return True if the View was found.
|
| */
|
| private static boolean findButton(InfoBar infoBar, int buttonId, boolean click) {
|
| - View button = infoBar.getView().findViewById(buttonId);
|
| + final View button = infoBar.getView().findViewById(buttonId);
|
| if (button == null) return false;
|
| - if (click) TouchCommon.singleClickView(button);
|
| + if (click) {
|
| + ThreadUtils.runOnUiThreadBlocking(new Runnable() {
|
| + @Override
|
| + public void run() {
|
| + button.performClick();
|
| + }
|
| + });
|
| + }
|
| return true;
|
| }
|
|
|
|
|