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

Unified Diff: android_webview/javatests/src/org/chromium/android_webview/test/util/JSUtils.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: android_webview/javatests/src/org/chromium/android_webview/test/util/JSUtils.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/util/JSUtils.java b/android_webview/javatests/src/org/chromium/android_webview/test/util/JSUtils.java
index 5f2b6ab99f3a570d2b2f781522c8e526687caaff..c522fa80f7efc9d34fff9f558a0bd2fcbe56ddd8 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/util/JSUtils.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/util/JSUtils.java
@@ -47,7 +47,7 @@ public class JSUtils {
testCase.getInstrumentation().runOnMainSync(new Runnable() {
@Override
public void run() {
- awContents.getWebContents().evaluateJavaScript(
+ awContents.getWebContents().evaluateJavaScriptForTests(
"var evObj = document.createEvent('Events'); "
+ "evObj.initEvent('click', true, false); "
+ "document.getElementById('" + linkId + "').dispatchEvent(evObj);"
@@ -65,7 +65,7 @@ public class JSUtils {
testCase.getInstrumentation().runOnMainSync(new Runnable() {
@Override
public void run() {
- onEvaluateJavaScriptResultHelper.evaluateJavaScript(
+ onEvaluateJavaScriptResultHelper.evaluateJavaScriptForTests(
awContents.getWebContents(), code);
}
});

Powered by Google App Engine
This is Rietveld 408576698