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

Unified Diff: base/test/android/javatests/src/org/chromium/base/test/BaseChromiumRunnerCommon.java

Issue 2853003003: [Android] Keep extracted secondary dex files when clearing data in tests. (RELAND) (Closed)
Patch Set: Fixed Created 3 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
« no previous file with comments | « base/BUILD.gn ('k') | build/android/main_dex_classes.flags » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/android/javatests/src/org/chromium/base/test/BaseChromiumRunnerCommon.java
diff --git a/base/test/android/javatests/src/org/chromium/base/test/BaseChromiumRunnerCommon.java b/base/test/android/javatests/src/org/chromium/base/test/BaseChromiumRunnerCommon.java
index fcda91039be63d15930700cc63a94204b9dda9b0..e5eb2731b7b064f881f23eac7c17fc36719376e8 100644
--- a/base/test/android/javatests/src/org/chromium/base/test/BaseChromiumRunnerCommon.java
+++ b/base/test/android/javatests/src/org/chromium/base/test/BaseChromiumRunnerCommon.java
@@ -9,6 +9,7 @@ import android.content.ContextWrapper;
import android.content.SharedPreferences;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
+import android.support.v4.content.ContextCompat;
import org.chromium.android.support.PackageManagerWrapper;
import org.chromium.base.Log;
@@ -59,9 +60,8 @@ class BaseChromiumRunnerCommon {
try {
ApplicationInfo ai = super.getApplicationInfo(packageName, flags);
if (packageName.equals(getPackageName())) {
- ApplicationInfo appAi =
- super.getApplicationInfo(mAppContext.getPackageName(), flags);
- File dataDir = new File(appAi.dataDir, "test-multidex");
+ File dataDir = new File(
+ ContextCompat.getCodeCacheDir(mAppContext), "test-multidex");
if (!dataDir.exists() && !dataDir.mkdirs()) {
throw new IOException(String.format(
"Unable to create test multidex directory \"%s\"",
« no previous file with comments | « base/BUILD.gn ('k') | build/android/main_dex_classes.flags » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698