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

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

Issue 1917193003: Revert of 🍈 Unify application context usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/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 61d9dd91747ba7a2df0f8b71fca3dceb8c5a2c0e..993e988967015c8fa11c6b75d6ce8e46eccc86cc 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
@@ -3,14 +3,14 @@
// found in the LICENSE file.
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;
@@ -20,7 +20,6 @@
import org.chromium.android_webview.AwSwitches;
import org.chromium.android_webview.test.util.GraphicsTestUtils;
import org.chromium.android_webview.test.util.JSUtils;
-import org.chromium.base.ContextUtils;
import org.chromium.base.ThreadUtils;
import org.chromium.base.test.BaseActivityInstrumentationTestCase;
import org.chromium.base.test.util.CommandLineFlags;
@@ -80,11 +79,10 @@
@Override
protected void setUp() throws Exception {
- Context appContext = getInstrumentation().getTargetContext().getApplicationContext();
- mBrowserContext = new AwBrowserContext(new InMemorySharedPreferences(), appContext);
+ mBrowserContext = new AwBrowserContext(
+ new InMemorySharedPreferences(), getInstrumentation().getTargetContext());
super.setUp();
- ContextUtils.initApplicationContext(appContext);
if (needsBrowserProcessStarted()) {
startBrowserProcess();
}
@@ -100,10 +98,8 @@
});
}
- /**
- * Override this to return false if the test doesn't want the browser startup sequence to
+ /* Override this to return false if the test doesn't want the browser startup sequence to
* be run automatically.
- * @return Whether the instrumentation test requires the browser process to already be started.
*/
protected boolean needsBrowserProcessStarted() {
return true;

Powered by Google App Engine
This is Rietveld 408576698