| Index: android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java
|
| diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java
|
| index 6c4fe83344a67e72ca8f9bfe8d7097f4fc3e2a5a..caeb729ae00ed1b29556698aca7db769ff113d91 100644
|
| --- a/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java
|
| +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java
|
| @@ -2956,12 +2956,12 @@ public class AwSettingsTest extends AwTestBase {
|
| final AwTestContainerView mContainerView = createAwTestContainerViewOnMainSync(client);
|
| final AwContents awContents = mContainerView.getAwContents();
|
| enableJavaScriptOnUiThread(awContents);
|
| - JSUtils.executeJavaScriptAndWaitForResult(this, awContents,
|
| + JSUtils.executeJavaScriptAndWaitForResult(getInstrumentation(), awContents,
|
| client.getOnEvaluateJavaScriptResultHelper(),
|
| "window.emptyDocumentPersistenceTest = true;");
|
| loadUrlSync(awContents, client.getOnPageFinishedHelper(),
|
| ContentUrlConstants.ABOUT_BLANK_DISPLAY_URL);
|
| - String result = JSUtils.executeJavaScriptAndWaitForResult(this, awContents,
|
| + String result = JSUtils.executeJavaScriptAndWaitForResult(getInstrumentation(), awContents,
|
| client.getOnEvaluateJavaScriptResultHelper(),
|
| "window.emptyDocumentPersistenceTest ? 'set' : 'not set';");
|
| assertEquals(allow ? "\"set\"" : "\"not set\"", result);
|
| @@ -3014,12 +3014,12 @@ public class AwSettingsTest extends AwTestBase {
|
| awContents, client.getOnPageFinishedHelper(), testPageHtml, "text/html", false);
|
|
|
| // Focus on an empty DIV.
|
| - JSUtils.executeJavaScriptAndWaitForResult(this, awContents,
|
| + JSUtils.executeJavaScriptAndWaitForResult(getInstrumentation(), awContents,
|
| client.getOnEvaluateJavaScriptResultHelper(), "window.a.focus();");
|
| assertEquals(1, getSelectionChangeCountForSelectionUpdateTest(awContents, client));
|
|
|
| // Create and delete a zero-width space. See crbug.com/698752 for details.
|
| - JSUtils.executeJavaScriptAndWaitForResult(this, awContents,
|
| + JSUtils.executeJavaScriptAndWaitForResult(getInstrumentation(), awContents,
|
| client.getOnEvaluateJavaScriptResultHelper(),
|
| "(function() {"
|
| + "var sel = window.getSelection();"
|
| @@ -3051,16 +3051,16 @@ public class AwSettingsTest extends AwTestBase {
|
| String expectedTitle = Integer.toString(mTitleIdx);
|
| // Since selectionchange event is posted on a message loop, we run another message loop
|
| // before we get the result. On Chromium both run on the same message loop.
|
| - JSUtils.executeJavaScriptAndWaitForResult(this, awContents,
|
| + JSUtils.executeJavaScriptAndWaitForResult(getInstrumentation(), awContents,
|
| client.getOnEvaluateJavaScriptResultHelper(),
|
| "setTimeout(function() { document.title = '" + expectedTitle + "'; });");
|
| pollTitleAs(expectedTitle, awContents);
|
|
|
| - String result = JSUtils.executeJavaScriptAndWaitForResult(
|
| - this, awContents, client.getOnEvaluateJavaScriptResultHelper(), "window.cnt");
|
| + String result = JSUtils.executeJavaScriptAndWaitForResult(getInstrumentation(), awContents,
|
| + client.getOnEvaluateJavaScriptResultHelper(), "window.cnt");
|
| // Clean up
|
| - JSUtils.executeJavaScriptAndWaitForResult(
|
| - this, awContents, client.getOnEvaluateJavaScriptResultHelper(), "window.cnt = 0;");
|
| + JSUtils.executeJavaScriptAndWaitForResult(getInstrumentation(), awContents,
|
| + client.getOnEvaluateJavaScriptResultHelper(), "window.cnt = 0;");
|
| return Integer.parseInt(result);
|
| }
|
|
|
|
|