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

Unified Diff: content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestCallbackHelperContainer.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/test/android/javatests/src/org/chromium/content/browser/test/util/TestCallbackHelperContainer.java
diff --git a/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestCallbackHelperContainer.java b/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestCallbackHelperContainer.java
index cfc53ffbfd24eb273f64cb90c52bc041ea70457b..d97e1ef9f72e18d4e5706d6dba25f977cfc05192 100644
--- a/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestCallbackHelperContainer.java
+++ b/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestCallbackHelperContainer.java
@@ -126,7 +126,7 @@ public class TestCallbackHelperContainer {
* @param webContents A WebContents instance to be used.
* @param code A JavaScript code to be evaluated.
*/
- public void evaluateJavaScript(WebContents webContents, String code) {
+ public void evaluateJavaScriptForTests(WebContents webContents, String code) {
JavaScriptCallback callback =
new JavaScriptCallback() {
@Override
@@ -134,12 +134,12 @@ public class TestCallbackHelperContainer {
notifyCalled(jsonResult);
}
};
- webContents.evaluateJavaScript(code, callback);
+ webContents.evaluateJavaScriptForTests(code, callback);
mJsonResult = null;
}
/**
- * Returns true if the evaluation started by evaluateJavaScript() has completed.
+ * Returns true if the evaluation started by evaluateJavaScriptForTests() has completed.
*/
public boolean hasValue() {
return mJsonResult != null;

Powered by Google App Engine
This is Rietveld 408576698