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

Unified Diff: content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeBasicsTest.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/JavaBridgeBasicsTest.java
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeBasicsTest.java b/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeBasicsTest.java
index fa42e6cdcc805852003d16666cb01db82d509f31..a2d5ad81d1d867d47f5b6cfa3db095ed9cce6c71 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeBasicsTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeBasicsTest.java
@@ -117,7 +117,7 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
public void run() {
getContentViewCore().addPossiblyUnsafeJavascriptInterface(object,
name, requiredAnnotation);
- getContentViewCore().reload(true);
+ getContentViewCore().getWebContents().getNavigationController().reload(true);
}
});
onPageFinishedHelper.waitForCallback(currentCallCount);
@@ -130,7 +130,7 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
runTestOnUiThread(new Runnable() {
@Override
public void run() {
- getContentViewCore().reload(true);
+ getContentViewCore().getWebContents().getNavigationController().reload(true);
}
});
onPageFinishedHelper.waitForCallback(currentCallCount);
@@ -195,7 +195,7 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
@Override
public void run() {
getContentViewCore().removeJavascriptInterface("foo");
- getContentViewCore().reload(true);
+ getContentViewCore().getWebContents().getNavigationController().reload(true);
}
});
onPageFinishedHelper.waitForCallback(currentCallCount);
@@ -357,7 +357,7 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
testObject, "testObject1", null);
getContentViewCore().addPossiblyUnsafeJavascriptInterface(
testObject, "testObject2", null);
- getContentViewCore().reload(true);
+ getContentViewCore().getWebContents().getNavigationController().reload(true);
}
});
onPageFinishedHelper.waitForCallback(currentCallCount);
@@ -404,7 +404,7 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
object, "testObject", null);
getContentViewCore().addPossiblyUnsafeJavascriptInterface(
innerObject, "innerObject", null);
- getContentViewCore().reload(true);
+ getContentViewCore().getWebContents().getNavigationController().reload(true);
}
});
onPageFinishedHelper.waitForCallback(currentCallCount);
@@ -545,7 +545,7 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
public void method() {}
private void privateMethod() {}
public int field;
- private int privateField;
+ private int mPrivateField;
}, "testObject");
executeJavaScript(
"var result = \"\"; " +
@@ -598,7 +598,7 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
public void testReflectPrivateFieldRaisesException() throws Throwable {
injectObjectAndReload(new Object() {
public Class<?> myGetClass() { return getClass(); }
- private int field;
+ private int mField;
}, "testObject");
assertRaisesException("testObject.myGetClass().getField('field')");
// getDeclaredField() is able to access a private field, but getInt()
@@ -774,7 +774,7 @@ public class JavaBridgeBasicsTest extends JavaBridgeTestBase {
public void run() {
getContentViewCore().addJavascriptInterface(new Test(),
"testObject");
- getContentViewCore().reload(true);
+ getContentViewCore().getWebContents().getNavigationController().reload(true);
}
});
onPageFinishedHelper.waitForCallback(currentCallCount);

Powered by Google App Engine
This is Rietveld 408576698