| 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 55083d067d63040164ffc63c99089a63bf26997b..3c9e234ebee313cdd2b89e50a722abca5281630a 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
|
| @@ -70,11 +70,10 @@ public class HttpCacheTest extends AwTestBase {
|
| @SmallTest
|
| @Feature({"AndroidWebView"})
|
| public void testLegacyHttpCacheDirIsRemovedOnStartup() throws Exception {
|
| - Context targetContext = getInstrumentation().getTargetContext();
|
| + Context appContext = getInstrumentation().getTargetContext().getApplicationContext();
|
| PathUtils.setPrivateDataDirectorySuffix(
|
| - AwBrowserProcess.PRIVATE_DATA_DIRECTORY_SUFFIX, targetContext);
|
| - File webViewLegacyCacheDir = new File(
|
| - PathUtils.getDataDirectory(targetContext), "Cache");
|
| + AwBrowserProcess.PRIVATE_DATA_DIRECTORY_SUFFIX, appContext);
|
| + File webViewLegacyCacheDir = new File(PathUtils.getDataDirectory(appContext), "Cache");
|
| if (!webViewLegacyCacheDir.isDirectory()) {
|
| assertTrue(webViewLegacyCacheDir.mkdir());
|
| assertTrue(webViewLegacyCacheDir.isDirectory());
|
| @@ -83,8 +82,8 @@ public class HttpCacheTest extends AwTestBase {
|
| assertTrue(dummyCacheFile.exists());
|
|
|
| // Set up JNI bindings.
|
| - ContextUtils.initApplicationContext(targetContext.getApplicationContext());
|
| - AwBrowserProcess.loadLibrary(targetContext);
|
| + ContextUtils.initApplicationContext(appContext);
|
| + AwBrowserProcess.loadLibrary();
|
| // No delay before removing the legacy cache files.
|
| AwContentsStatics.setLegacyCacheRemovalDelayForTest(0);
|
|
|
|
|