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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java

Issue 1123783002: Add ExecuteJavaScriptForTest and make all tests use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java b/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
index d4530f9d462c853ca053f181e5aef64104083787..0f23bcda766c332bec3cbf16673ac8da8b5e75e6 100644
--- a/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
+++ b/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
@@ -293,12 +293,17 @@ import java.util.UUID;
}
@Override
- @VisibleForTesting
public void evaluateJavaScript(String script, JavaScriptCallback callback) {
nativeEvaluateJavaScript(mNativeWebContentsAndroid, script, callback);
}
@Override
+ @VisibleForTesting
+ public void evaluateJavaScriptForTests(String script, JavaScriptCallback callback) {
+ nativeEvaluateJavaScriptForTests(mNativeWebContentsAndroid, script, callback);
+ }
+
+ @Override
public void addMessageToDevToolsConsole(int level, String message) {
nativeAddMessageToDevToolsConsole(mNativeWebContentsAndroid, level, message);
}
@@ -421,6 +426,8 @@ import java.util.UUID;
private native void nativeResumeLoadingCreatedWebContents(long nativeWebContentsAndroid);
private native void nativeEvaluateJavaScript(long nativeWebContentsAndroid,
String script, JavaScriptCallback callback);
+ private native void nativeEvaluateJavaScriptForTests(long nativeWebContentsAndroid,
+ String script, JavaScriptCallback callback);
private native void nativeAddMessageToDevToolsConsole(
long nativeWebContentsAndroid, int level, String message);
private native boolean nativeHasAccessedInitialDocument(

Powered by Google App Engine
This is Rietveld 408576698