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

Unified Diff: content/public/android/javatests/src/org/chromium/content/browser/ContentViewLocationTest.java

Issue 572013002: Removing ContentViewCore dependencies from direct WebContents functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased the patch and addressed review comments. Created 6 years, 2 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/ContentViewLocationTest.java
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/ContentViewLocationTest.java b/content/public/android/javatests/src/org/chromium/content/browser/ContentViewLocationTest.java
index 0ccd0b2034992925b72a69e305057ab553f21f17..e89daa14f59bb128ef7e4e45705c2c2c71dc886f 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/ContentViewLocationTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/ContentViewLocationTest.java
@@ -45,7 +45,7 @@ public class ContentViewLocationTest extends ContentShellTestBase {
}
private void pollForPositionCallback() throws Throwable {
- mJavascriptHelper.evaluateJavaScript(getContentViewCore(),
+ mJavascriptHelper.evaluateJavaScript(getWebContents(),
"positionCount = 0");
mJavascriptHelper.waitUntilHasValue();
assertEquals(0, Integer.parseInt(mJavascriptHelper.getJsonResultAndClear()));
@@ -53,7 +53,7 @@ public class ContentViewLocationTest extends ContentShellTestBase {
assertTrue(CriteriaHelper.pollForCriteria(new Criteria() {
@Override
public boolean isSatisfied() {
- mJavascriptHelper.evaluateJavaScript(getContentViewCore(), "positionCount");
+ mJavascriptHelper.evaluateJavaScript(getWebContents(), "positionCount");
try {
mJavascriptHelper.waitUntilHasValue();
} catch (Exception e) {
@@ -65,7 +65,7 @@ public class ContentViewLocationTest extends ContentShellTestBase {
}
private void startGeolocationWatchPosition() throws Throwable {
- mJavascriptHelper.evaluateJavaScript(getContentViewCore(),
+ mJavascriptHelper.evaluateJavaScript(getWebContents(),
"initiate_watchPosition();");
mJavascriptHelper.waitUntilHasValue();
}
@@ -116,7 +116,7 @@ public class ContentViewLocationTest extends ContentShellTestBase {
hideContentViewOnUiThread();
ensureGeolocationRunning(false);
- mJavascriptHelper.evaluateJavaScript(getContentViewCore(),
+ mJavascriptHelper.evaluateJavaScript(getWebContents(),
"positionCount = 0");
mJavascriptHelper.waitUntilHasValue();
@@ -126,8 +126,8 @@ public class ContentViewLocationTest extends ContentShellTestBase {
ensureGeolocationRunning(true);
// Navigate away and ensure that geolocation stops.
- loadUrl(getContentViewCore(), mTestCallbackHelperContainer,
- new LoadUrlParams("about:blank"));
+ loadUrl(getContentViewCore().getWebContents().getNavigationController(),
+ mTestCallbackHelperContainer, new LoadUrlParams("about:blank"));
ensureGeolocationRunning(false);
}
@@ -169,8 +169,8 @@ public class ContentViewLocationTest extends ContentShellTestBase {
startGeolocationWatchPosition();
ensureGeolocationRunning(false);
- loadUrl(getContentViewCore(), mTestCallbackHelperContainer,
- new LoadUrlParams("about:blank"));
+ loadUrl(getContentViewCore().getWebContents().getNavigationController(),
+ mTestCallbackHelperContainer, new LoadUrlParams("about:blank"));
showContentViewOnUiThread();
ensureGeolocationRunning(false);
}

Powered by Google App Engine
This is Rietveld 408576698