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

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

Issue 2333713003: Move PathUtils to use ContextUtils. (Closed)
Patch Set: Rebase 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 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);

Powered by Google App Engine
This is Rietveld 408576698