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

Unified Diff: content/public/android/javatests/src/org/chromium/content/browser/NavigationTest.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: content/public/android/javatests/src/org/chromium/content/browser/NavigationTest.java
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/NavigationTest.java b/content/public/android/javatests/src/org/chromium/content/browser/NavigationTest.java
index a2037b51bb061152cd3734aff36dac531b9e8d3b..790e57df6e7b007f09d01de4e3399a45855338af 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/NavigationTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/NavigationTest.java
@@ -35,7 +35,7 @@ public class NavigationTest extends ContentShellTestBase {
new Runnable() {
@Override
public void run() {
- contentViewCore.goBack();
+ contentViewCore.getWebContents().getNavigationController().goBack();
}
});
}
@@ -47,7 +47,7 @@ public class NavigationTest extends ContentShellTestBase {
new Runnable() {
@Override
public void run() {
- contentViewCore.reload(true);
+ contentViewCore.getWebContents().getNavigationController().reload(true);
}
});
}
@@ -68,26 +68,30 @@ public class NavigationTest extends ContentShellTestBase {
loadUrl(contentViewCore, testCallbackHelperContainer, new LoadUrlParams(URL_6));
loadUrl(contentViewCore, testCallbackHelperContainer, new LoadUrlParams(URL_7));
- NavigationHistory history = contentViewCore.getDirectedNavigationHistory(false, 3);
+ NavigationHistory history = contentViewCore.getWebContents().getNavigationController()
+ .getDirectedNavigationHistory(false, 3);
assertEquals(3, history.getEntryCount());
assertEquals(URL_6, history.getEntryAtIndex(0).getUrl());
assertEquals(URL_5, history.getEntryAtIndex(1).getUrl());
assertEquals(URL_4, history.getEntryAtIndex(2).getUrl());
- history = contentViewCore.getDirectedNavigationHistory(true, 3);
+ history = contentViewCore.getWebContents().getNavigationController()
+ .getDirectedNavigationHistory(true, 3);
assertEquals(history.getEntryCount(), 0);
goBack(contentViewCore, testCallbackHelperContainer);
goBack(contentViewCore, testCallbackHelperContainer);
goBack(contentViewCore, testCallbackHelperContainer);
- history = contentViewCore.getDirectedNavigationHistory(false, 4);
+ history = contentViewCore.getWebContents().getNavigationController()
+ .getDirectedNavigationHistory(false, 4);
assertEquals(3, history.getEntryCount());
assertEquals(URL_3, history.getEntryAtIndex(0).getUrl());
assertEquals(URL_2, history.getEntryAtIndex(1).getUrl());
assertEquals(URL_1, history.getEntryAtIndex(2).getUrl());
- history = contentViewCore.getDirectedNavigationHistory(true, 4);
+ history = contentViewCore.getWebContents().getNavigationController()
+ .getDirectedNavigationHistory(true, 4);
assertEquals(3, history.getEntryCount());
assertEquals(URL_5, history.getEntryAtIndex(0).getUrl());
assertEquals(URL_6, history.getEntryAtIndex(1).getUrl());

Powered by Google App Engine
This is Rietveld 408576698