| Index: content/public/test/android/javatests/src/org/chromium/content/browser/test/util/HistoryUtils.java
|
| diff --git a/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/HistoryUtils.java b/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/HistoryUtils.java
|
| index 7fe256893af231351aa1a3802f99cca2eecddb56..36c78314b3b362970f8db2c4a61e9564ed5eb558 100644
|
| --- a/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/HistoryUtils.java
|
| +++ b/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/HistoryUtils.java
|
| @@ -9,7 +9,7 @@ import static org.chromium.base.test.util.ScalableTimeout.scaleTimeout;
|
| import android.app.Instrumentation;
|
|
|
| import org.chromium.base.test.util.InstrumentationUtils;
|
| -import org.chromium.content.browser.ContentViewCore;
|
| +import org.chromium.content_public.browser.WebContents;
|
|
|
| import java.util.concurrent.Callable;
|
| import java.util.concurrent.TimeUnit;
|
| @@ -31,12 +31,12 @@ public class HistoryUtils {
|
| * @throws Throwable
|
| */
|
| public static boolean canGoBackOnUiThread(Instrumentation instrumentation,
|
| - final ContentViewCore contentViewCore) throws Throwable {
|
| + final WebContents webContents) throws Throwable {
|
| return InstrumentationUtils.runOnMainSyncAndGetResult(
|
| instrumentation, new Callable<Boolean>() {
|
| @Override
|
| public Boolean call() {
|
| - return contentViewCore.canGoBack();
|
| + return webContents.getNavigationController().canGoBack();
|
| }
|
| });
|
| }
|
| @@ -52,12 +52,12 @@ public class HistoryUtils {
|
| * @throws Throwable
|
| */
|
| public static boolean canGoToOffsetOnUiThread(Instrumentation instrumentation,
|
| - final ContentViewCore contentViewCore, final int offset) throws Throwable {
|
| + final WebContents webContents, final int offset) throws Throwable {
|
| return InstrumentationUtils.runOnMainSyncAndGetResult(
|
| instrumentation, new Callable<Boolean>() {
|
| @Override
|
| public Boolean call() throws Exception {
|
| - return contentViewCore.canGoToOffset(offset);
|
| + return webContents.getNavigationController().canGoToOffset(offset);
|
| }
|
| });
|
| }
|
| @@ -71,12 +71,12 @@ public class HistoryUtils {
|
| * @throws Throwable
|
| */
|
| public static boolean canGoForwardOnUiThread(Instrumentation instrumentation,
|
| - final ContentViewCore contentViewCore) throws Throwable {
|
| + final WebContents webContents) throws Throwable {
|
| return InstrumentationUtils.runOnMainSyncAndGetResult(
|
| instrumentation, new Callable<Boolean>() {
|
| @Override
|
| public Boolean call() {
|
| - return contentViewCore.canGoForward();
|
| + return webContents.getNavigationController().canGoForward();
|
| }
|
| });
|
| }
|
| @@ -89,11 +89,11 @@ public class HistoryUtils {
|
| * @throws Throwable
|
| */
|
| public static void clearHistoryOnUiThread(Instrumentation instrumentation,
|
| - final ContentViewCore contentViewCore) throws Throwable {
|
| + final WebContents webContents) throws Throwable {
|
| instrumentation.runOnMainSync(new Runnable() {
|
| @Override
|
| public void run() {
|
| - contentViewCore.clearHistory();
|
| + webContents.getNavigationController().clearHistory();
|
| }
|
| });
|
| }
|
| @@ -107,12 +107,12 @@ public class HistoryUtils {
|
| * @throws Throwable
|
| */
|
| public static String getUrlOnUiThread(Instrumentation instrumentation,
|
| - final ContentViewCore contentViewCore) throws Throwable {
|
| + final WebContents webContents) throws Throwable {
|
| return InstrumentationUtils.runOnMainSyncAndGetResult(
|
| instrumentation, new Callable<String>() {
|
| @Override
|
| public String call() throws Exception {
|
| - return contentViewCore.getUrl();
|
| + return webContents.getUrl();
|
| }
|
| });
|
| }
|
| @@ -129,13 +129,13 @@ public class HistoryUtils {
|
| * @throws Throwable
|
| */
|
| public static void goToOffsetSync(Instrumentation instrumentation,
|
| - final ContentViewCore contentViewCore, CallbackHelper onPageFinishedHelper,
|
| + final WebContents webContents, CallbackHelper onPageFinishedHelper,
|
| final int offset) throws Throwable {
|
| int currentCallCount = onPageFinishedHelper.getCallCount();
|
| instrumentation.runOnMainSync(new Runnable() {
|
| @Override
|
| public void run() {
|
| - contentViewCore.goToOffset(offset);
|
| + webContents.getNavigationController().goToOffset(offset);
|
| }
|
| });
|
|
|
| @@ -154,13 +154,13 @@ public class HistoryUtils {
|
| * @throws Throwable
|
| */
|
| public static void goBackSync(Instrumentation instrumentation,
|
| - final ContentViewCore contentViewCore,
|
| + final WebContents webContents,
|
| CallbackHelper onPageFinishedHelper) throws Throwable {
|
| int currentCallCount = onPageFinishedHelper.getCallCount();
|
| instrumentation.runOnMainSync(new Runnable() {
|
| @Override
|
| public void run() {
|
| - contentViewCore.goBack();
|
| + webContents.getNavigationController().goBack();
|
| }
|
| });
|
|
|
| @@ -177,13 +177,13 @@ public class HistoryUtils {
|
| * @throws Throwable
|
| */
|
| public static void goForwardSync(Instrumentation instrumentation,
|
| - final ContentViewCore contentViewCore,
|
| + final WebContents webContents,
|
| CallbackHelper onPageFinishedHelper) throws Throwable {
|
| int currentCallCount = onPageFinishedHelper.getCallCount();
|
| instrumentation.runOnMainSync(new Runnable() {
|
| @Override
|
| public void run() {
|
| - contentViewCore.goForward();
|
| + webContents.getNavigationController().goForward();
|
| }
|
| });
|
|
|
|
|