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

Unified Diff: android_webview/javatests/src/org/chromium/android_webview/test/AndroidWebViewTestBase.java

Issue 10941015: [Android] Upstream the WebView find-in-page API implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fixes + command line switch for synchronous APIs Created 8 years, 3 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: android_webview/javatests/src/org/chromium/android_webview/test/AndroidWebViewTestBase.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AndroidWebViewTestBase.java b/android_webview/javatests/src/org/chromium/android_webview/test/AndroidWebViewTestBase.java
index 3ba898b54471ea4f84be2433c7e7c9049f6708d9..4aeab2f88338888b831665d3c9f5f5cd20a850a5 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AndroidWebViewTestBase.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AndroidWebViewTestBase.java
@@ -8,7 +8,6 @@ import android.app.Instrumentation;
import android.content.Context;
import android.test.ActivityInstrumentationTestCase2;
import android.view.View;
-import android.view.ViewGroup;
import junit.framework.Assert;
@@ -172,6 +171,16 @@ public class AndroidWebViewTestBase
return testContainerView.get();
}
+ protected void destroyAwContentsOnMainSync(final AwContents contents) {
+ if (contents == null) return;
+ getInstrumentation().runOnMainSync(new Runnable() {
+ @Override
+ public void run() {
+ contents.destroy();
+ }
+ });
+ }
+
protected String getTitleOnUiThread(final ContentViewCore contentViewCore) throws Throwable {
return runTestOnUiThreadAndGetResult(new Callable<String>() {
@Override

Powered by Google App Engine
This is Rietveld 408576698