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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/ModalDialogTest.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/ModalDialogTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/ModalDialogTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/ModalDialogTest.java
index 7cffc5bf0a92ac33a911e9c777342b062292a6c3..e7ccc6e09aab1a30646e64c43192e87a7c4fe279 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/ModalDialogTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/ModalDialogTest.java
@@ -264,7 +264,8 @@ public class ModalDialogTest extends ChromeActivityTestCaseBase<ChromeActivity>
clickCancel(jsDialog);
scriptEvent.waitUntilHasValue();
- scriptEvent.evaluateJavaScript(getActivity().getCurrentContentViewCore().getWebContents(),
+ scriptEvent.evaluateJavaScriptForTests(
+ getActivity().getCurrentContentViewCore().getWebContents(),
"alert('Android');");
assertTrue("No further dialog boxes should be shown.", scriptEvent.waitUntilHasValue());
}
@@ -310,7 +311,8 @@ public class ModalDialogTest extends ChromeActivityTestCaseBase<ChromeActivity>
private OnEvaluateJavaScriptResultHelper executeJavaScriptAndWaitForDialog(
final OnEvaluateJavaScriptResultHelper helper, String script)
throws InterruptedException {
- helper.evaluateJavaScript(getActivity().getCurrentContentViewCore().getWebContents(),
+ helper.evaluateJavaScriptForTests(
+ getActivity().getCurrentContentViewCore().getWebContents(),
script);
boolean criteriaSatisfied = CriteriaHelper.pollForCriteria(
new JavascriptAppModalDialogShownCriteria(true));

Powered by Google App Engine
This is Rietveld 408576698