Index: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java |
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java |
index f28d1800da6b463a3e9c9ecb2856830039fc16d8..cc9f32439a8c72fccd34ede08162ed05d4e7f292 100644 |
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java |
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java |
@@ -4,14 +4,14 @@ |
package org.chromium.android_webview.test; |
+import static org.chromium.base.test.util.ScalableTimeout.scaleTimeout; |
+ |
import android.app.Instrumentation; |
import android.content.Context; |
import android.graphics.Bitmap; |
import android.os.Build; |
import android.util.Log; |
-import static org.chromium.base.test.util.ScalableTimeout.scaleTimeout; |
- |
import org.chromium.android_webview.AwBrowserContext; |
import org.chromium.android_webview.AwBrowserProcess; |
import org.chromium.android_webview.AwContents; |
@@ -87,6 +87,8 @@ public class AwTestBase |
super.setUp(); |
if (needsBrowserProcessStarted()) { |
startBrowserProcess(); |
+ } else if (needsNativeLoaded()) { |
+ getActivity(); |
Torne
2016/04/15 14:22:43
Can you explain what the test case change here doe
Peter Wen
2016/04/18 18:49:58
Added in comments.
|
} |
} |
@@ -108,6 +110,14 @@ public class AwTestBase |
} |
/** |
+ * Override this to return true if native needs to be loaded. |
+ * @return Whether the test runner activity must be created to load native. |
+ */ |
+ protected boolean needsNativeLoaded() { |
+ return false; |
+ } |
+ |
+ /** |
* Runs a {@link Callable} on the main thread, blocking until it is |
* complete, and returns the result. Calls |
* {@link Instrumentation#waitForIdleSync()} first to help avoid certain |