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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/JavaScriptEvalChromeTest.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: chrome/android/javatests/src/org/chromium/chrome/browser/JavaScriptEvalChromeTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/JavaScriptEvalChromeTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/JavaScriptEvalChromeTest.java
index ca686b8ef27c5328ee0da3bd6a03d40f38332cf6..9581ec68199e1613608a56e540538604fb5d0796 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/JavaScriptEvalChromeTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/JavaScriptEvalChromeTest.java
@@ -55,8 +55,8 @@ public class JavaScriptEvalChromeTest extends ChromeTabbedActivityTestBase {
for (int i = 1; i <= 30; ++i) {
for (int j = 0; j < 5; ++j) {
// Start evaluation of a JavaScript script -- we don't need a result.
- tab1.getWebContents().evaluateJavaScript("foobar();", null);
- tab2.getWebContents().evaluateJavaScript("foobar();", null);
+ tab1.getWebContents().evaluateJavaScriptForTests("foobar();", null);
+ tab2.getWebContents().evaluateJavaScriptForTests("foobar();", null);
}
assertEquals("Incorrect JavaScript evaluation result on tab1",
i * 2,
@@ -65,8 +65,8 @@ public class JavaScriptEvalChromeTest extends ChromeTabbedActivityTestBase {
tab1.getWebContents(), "add2()")));
for (int j = 0; j < 5; ++j) {
// Start evaluation of a JavaScript script -- we don't need a result.
- tab1.getWebContents().evaluateJavaScript("foobar();", null);
- tab2.getWebContents().evaluateJavaScript("foobar();", null);
+ tab1.getWebContents().evaluateJavaScriptForTests("foobar();", null);
+ tab2.getWebContents().evaluateJavaScriptForTests("foobar();", null);
}
assertEquals("Incorrect JavaScript evaluation result on tab2",
i * 2 + 1,

Powered by Google App Engine
This is Rietveld 408576698