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

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

Issue 2076623002: 🍳 Fix and clean up application context in webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wrap context. Created 4 years, 6 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/AwSecondBrowserProcessTest.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwSecondBrowserProcessTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwSecondBrowserProcessTest.java
index b12f60290923ede129b703738e9ec530de32a71a..55d412545ba3a7eeac0010f19bf2d2f4f8792701 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AwSecondBrowserProcessTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwSecondBrowserProcessTest.java
@@ -117,14 +117,15 @@ public class AwSecondBrowserProcessTest extends AwTestBase {
}
private boolean tryStartingBrowserProcess() {
- final Context context = getActivity();
final Boolean success[] = new Boolean[1];
+ // The activity must be launched in order for proper webview statics to be setup.
+ getActivity();
// runOnMainSync does not catch RuntimeExceptions, they just terminate the test.
getInstrumentation().runOnMainSync(new Runnable() {
@Override
public void run() {
try {
- AwBrowserProcess.start(context);
+ AwBrowserProcess.start();
success[0] = true;
} catch (RuntimeException e) {
success[0] = false;

Powered by Google App Engine
This is Rietveld 408576698