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

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

Issue 2406093002: Fix monochrome not booting issue (Closed)
Patch Set: Created 4 years, 2 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/HttpCacheTest.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/HttpCacheTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/HttpCacheTest.java
index dd513184e159bd36c80e78aff2e734c03f7fedd4..c51ff40cb53390a085bad1f4632bbea6da77b83c 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/HttpCacheTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/HttpCacheTest.java
@@ -4,6 +4,7 @@
package org.chromium.android_webview.test;
+import android.content.Context;
import android.test.suitebuilder.annotation.SmallTest;
import org.chromium.android_webview.AwBrowserProcess;
@@ -69,9 +70,9 @@ public class HttpCacheTest extends AwTestBase {
@SmallTest
@Feature({"AndroidWebView"})
public void testLegacyHttpCacheDirIsRemovedOnStartup() throws Exception {
- ContextUtils.initApplicationContext(
- getInstrumentation().getTargetContext().getApplicationContext());
- PathUtils.setPrivateDataDirectorySuffix(AwBrowserProcess.PRIVATE_DATA_DIRECTORY_SUFFIX);
+ Context appContext = getInstrumentation().getTargetContext().getApplicationContext();
+ PathUtils.setPrivateDataDirectorySuffix(
+ AwBrowserProcess.PRIVATE_DATA_DIRECTORY_SUFFIX, appContext);
File webViewLegacyCacheDir = new File(PathUtils.getDataDirectory(), "Cache");
if (!webViewLegacyCacheDir.isDirectory()) {
assertTrue(webViewLegacyCacheDir.mkdir());
@@ -81,6 +82,7 @@ public class HttpCacheTest extends AwTestBase {
assertTrue(dummyCacheFile.exists());
// Set up JNI bindings.
+ ContextUtils.initApplicationContext(appContext);
AwBrowserProcess.loadLibrary();
// No delay before removing the legacy cache files.
AwContentsStatics.setLegacyCacheRemovalDelayForTest(0);

Powered by Google App Engine
This is Rietveld 408576698