Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1971)

Unified Diff: android_webview/javatests/src/org/chromium/android_webview/test/ClearHistoryTest.java

Issue 481803004: Removing ContentViewCore dependencies from few functions which acts as direct wrapper to WebContents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed review comments and rebased the patch. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..086c2d2d74c9571056e4730e8e2d4c8c267edb0a 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 = awContents.getWebContents();
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));
}
}

Powered by Google App Engine
This is Rietveld 408576698