| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.android_webview.test; | 5 package org.chromium.android_webview.test; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 import android.graphics.Bitmap; | 8 import android.graphics.Bitmap; |
| 9 import android.graphics.BitmapFactory; | 9 import android.graphics.BitmapFactory; |
| 10 import android.graphics.Canvas; | 10 import android.graphics.Canvas; |
| 11 import android.os.Handler; | 11 import android.os.Handler; |
| 12 import android.os.Looper; | 12 import android.os.Looper; |
| 13 import android.os.Message; | 13 import android.os.Message; |
| 14 import android.support.test.filters.LargeTest; |
| 15 import android.support.test.filters.SmallTest; |
| 14 import android.test.UiThreadTest; | 16 import android.test.UiThreadTest; |
| 15 import android.test.suitebuilder.annotation.LargeTest; | |
| 16 import android.test.suitebuilder.annotation.SmallTest; | |
| 17 import android.util.Pair; | 17 import android.util.Pair; |
| 18 import android.view.KeyEvent; | 18 import android.view.KeyEvent; |
| 19 import android.view.View; | 19 import android.view.View; |
| 20 import android.webkit.JavascriptInterface; | 20 import android.webkit.JavascriptInterface; |
| 21 | 21 |
| 22 import org.chromium.android_webview.AwContents; | 22 import org.chromium.android_webview.AwContents; |
| 23 import org.chromium.android_webview.AwSettings; | 23 import org.chromium.android_webview.AwSettings; |
| 24 import org.chromium.android_webview.AwSwitches; | 24 import org.chromium.android_webview.AwSwitches; |
| 25 import org.chromium.android_webview.test.TestAwContentsClient.OnDownloadStartHel
per; | 25 import org.chromium.android_webview.test.TestAwContentsClient.OnDownloadStartHel
per; |
| 26 import org.chromium.android_webview.test.util.CommonResources; | 26 import org.chromium.android_webview.test.util.CommonResources; |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 assertTrue(bindingManager.isChildProcessCreated()); | 612 assertTrue(bindingManager.isChildProcessCreated()); |
| 613 | 613 |
| 614 // Test end-to-end interaction with the renderer. | 614 // Test end-to-end interaction with the renderer. |
| 615 AwSettings awSettings = getAwSettingsOnUiThread(awContents); | 615 AwSettings awSettings = getAwSettingsOnUiThread(awContents); |
| 616 awSettings.setJavaScriptEnabled(true); | 616 awSettings.setJavaScriptEnabled(true); |
| 617 assertEquals("42", JSUtils.executeJavaScriptAndWaitForResult(this, awCon
tents, | 617 assertEquals("42", JSUtils.executeJavaScriptAndWaitForResult(this, awCon
tents, |
| 618 mContentsClient.getOnEvaluateJavaScriptResultHelper(), "
21 + 21")); | 618 mContentsClient.getOnEvaluateJavaScriptResultHelper(), "
21 + 21")); |
| 619 } | 619 } |
| 620 | 620 |
| 621 } | 621 } |
| OLD | NEW |