Chromium Code Reviews| Index: android_webview/javatests/src/org/chromium/android_webview/test/ClearHistoryTest.java |
| diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/ClearHistoryTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/ClearHistoryTest.java |
| index adc931c6c633186c26ab7bca8b0a491583007c08..cf55a0bc87e1b8b55ca51323c19a99f769b7650c 100644 |
| --- a/android_webview/javatests/src/org/chromium/android_webview/test/ClearHistoryTest.java |
| +++ b/android_webview/javatests/src/org/chromium/android_webview/test/ClearHistoryTest.java |
| @@ -7,9 +7,9 @@ package org.chromium.android_webview.test; |
| import org.chromium.android_webview.AwContents; |
| import org.chromium.base.test.util.DisabledTest; |
| import org.chromium.base.test.util.UrlUtils; |
| -import org.chromium.content.browser.ContentViewCore; |
| import org.chromium.content.browser.test.util.HistoryUtils; |
| import org.chromium.content.browser.test.util.TestCallbackHelperContainer.OnPageFinishedHelper; |
| +import org.chromium.content_public.browser.WebContents; |
| /** |
| * Tests for a wanted clearHistory method. |
| @@ -36,23 +36,22 @@ public class ClearHistoryTest extends AwTestBase { |
| final AwTestContainerView testContainerView = |
| createAwTestContainerViewOnMainSync(contentsClient); |
| final AwContents awContents = testContainerView.getAwContents(); |
| - final ContentViewCore contentViewCore = testContainerView.getContentViewCore(); |
| - |
| + final WebContents webContents = testContainerView.getContentViewCore().getWebContents(); |
|
boliu
2014/09/13 00:38:53
awContents.getWebContents
AKVT
2014/09/13 11:30:50
Done.
|
| OnPageFinishedHelper onPageFinishedHelper = contentsClient.getOnPageFinishedHelper(); |
| for (int i = 0; i < 3; i++) { |
| loadUrlSync(awContents, onPageFinishedHelper, URLS[i]); |
| } |
| - HistoryUtils.goBackSync(getInstrumentation(), contentViewCore, onPageFinishedHelper); |
| + HistoryUtils.goBackSync(getInstrumentation(), webContents, onPageFinishedHelper); |
| assertTrue("Should be able to go back", |
| - HistoryUtils.canGoBackOnUiThread(getInstrumentation(), contentViewCore)); |
| + HistoryUtils.canGoBackOnUiThread(getInstrumentation(), webContents)); |
| assertTrue("Should be able to go forward", |
| - HistoryUtils.canGoForwardOnUiThread(getInstrumentation(), contentViewCore)); |
| + HistoryUtils.canGoForwardOnUiThread(getInstrumentation(), webContents)); |
| - HistoryUtils.clearHistoryOnUiThread(getInstrumentation(), contentViewCore); |
| + HistoryUtils.clearHistoryOnUiThread(getInstrumentation(), webContents); |
| assertFalse("Should not be able to go back", |
| - HistoryUtils.canGoBackOnUiThread(getInstrumentation(), contentViewCore)); |
| + HistoryUtils.canGoBackOnUiThread(getInstrumentation(), webContents)); |
| assertFalse("Should not be able to go forward", |
| - HistoryUtils.canGoForwardOnUiThread(getInstrumentation(), contentViewCore)); |
| + HistoryUtils.canGoForwardOnUiThread(getInstrumentation(), webContents)); |
| } |
| } |