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 c51ff40cb53390a085bad1f4632bbea6da77b83c..dd513184e159bd36c80e78aff2e734c03f7fedd4 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,7 +4,6 @@ |
package org.chromium.android_webview.test; |
-import android.content.Context; |
import android.test.suitebuilder.annotation.SmallTest; |
import org.chromium.android_webview.AwBrowserProcess; |
@@ -70,9 +69,9 @@ public class HttpCacheTest extends AwTestBase { |
@SmallTest |
@Feature({"AndroidWebView"}) |
public void testLegacyHttpCacheDirIsRemovedOnStartup() throws Exception { |
- Context appContext = getInstrumentation().getTargetContext().getApplicationContext(); |
- PathUtils.setPrivateDataDirectorySuffix( |
- AwBrowserProcess.PRIVATE_DATA_DIRECTORY_SUFFIX, appContext); |
+ ContextUtils.initApplicationContext( |
+ getInstrumentation().getTargetContext().getApplicationContext()); |
+ PathUtils.setPrivateDataDirectorySuffix(AwBrowserProcess.PRIVATE_DATA_DIRECTORY_SUFFIX); |
File webViewLegacyCacheDir = new File(PathUtils.getDataDirectory(), "Cache"); |
if (!webViewLegacyCacheDir.isDirectory()) { |
assertTrue(webViewLegacyCacheDir.mkdir()); |
@@ -82,7 +81,6 @@ 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); |