| Index: content/public/test/android/javatests/src/org/chromium/content/browser/test/util/CallbackHelper.java
|
| diff --git a/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/CallbackHelper.java b/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/CallbackHelper.java
|
| index c1e91ec8a2a2eb41d4d8e849cfd6a05e574b1900..f5e13b7d7a31f5261c88b6e98a61bd52586f3e84 100644
|
| --- a/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/CallbackHelper.java
|
| +++ b/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/CallbackHelper.java
|
| @@ -6,8 +6,6 @@ package org.chromium.content.browser.test.util;
|
|
|
| import static org.chromium.base.test.util.ScalableTimeout.scaleTimeout;
|
|
|
| -import android.os.SystemClock;
|
| -
|
| import java.util.concurrent.TimeUnit;
|
| import java.util.concurrent.TimeoutException;
|
|
|
| @@ -199,32 +197,6 @@ public class CallbackHelper {
|
| }
|
|
|
| /**
|
| - * Blocks until the criteria is satisfied or throws an exception
|
| - * if the specified time frame is exceeded.
|
| - * @param timeout timeout value.
|
| - * @param unit timeout unit.
|
| - */
|
| - public void waitUntilCriteria(Criteria criteria, long timeout, TimeUnit unit)
|
| - throws InterruptedException, TimeoutException {
|
| - synchronized (mLock) {
|
| - final long startTime = SystemClock.uptimeMillis();
|
| - boolean isSatisfied = criteria.isSatisfied();
|
| - while (!isSatisfied
|
| - && SystemClock.uptimeMillis() - startTime < unit.toMillis(timeout)) {
|
| - mLock.wait(unit.toMillis(timeout));
|
| - isSatisfied = criteria.isSatisfied();
|
| - }
|
| -
|
| - if (!isSatisfied) throw new TimeoutException(criteria.getFailureReason());
|
| - }
|
| - }
|
| -
|
| - public void waitUntilCriteria(Criteria criteria)
|
| - throws InterruptedException, TimeoutException {
|
| - waitUntilCriteria(criteria, WAIT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
|
| - }
|
| -
|
| - /**
|
| * Should be called when the callback associated with this helper object is called.
|
| */
|
| public void notifyCalled() {
|
|
|