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

Unified Diff: base/test/test_support_android.cc

Issue 10896050: Android: Use external storage for test data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 3 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/base_paths_android.cc ('k') | build/android/pylib/base_test_runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/test_support_android.cc
diff --git a/base/test/test_support_android.cc b/base/test/test_support_android.cc
index 4dbc0cdbb7b3edc17e581f097ebdbc38192008a5..db44cace0b8642970c583757f9caf9e62bb91634 100644
--- a/base/test/test_support_android.cc
+++ b/base/test/test_support_android.cc
@@ -5,6 +5,7 @@
#include <stdarg.h>
#include <string.h>
+#include "base/android/path_utils.h"
#include "base/file_path.h"
#include "base/logging.h"
#include "base/memory/singleton.h"
@@ -15,10 +16,6 @@
namespace {
-// The test implementation of AndroidOS stores everything in the following
-// directory.
-const char* kAndroidTestTempDirectory = "/data/local/tmp";
-
struct RunState {
RunState(base::MessagePump::Delegate* delegate, int run_depth)
: delegate(delegate),
@@ -141,15 +138,16 @@ base::MessagePump* CreateMessagePumpForUIStub() {
return new MessagePumpForUIStub();
};
-// Provides the test path for DIR_MODULE, DIR_CACHE and DIR_ANDROID_APP_DATA.
+// Provides the test path for DIR_MODULE and DIR_ANDROID_APP_DATA.
bool GetTestProviderPath(int key, FilePath* result) {
switch (key) {
case base::DIR_MODULE: {
- *result = FilePath(kAndroidTestTempDirectory);
+ *result = FilePath(base::android::GetExternalStorageDirectory());
return true;
}
case base::DIR_ANDROID_APP_DATA: {
- *result = FilePath(kAndroidTestTempDirectory);
+ // For tests, app data is put in external storage.
+ *result = FilePath(base::android::GetExternalStorageDirectory());
return true;
}
default:
@@ -183,7 +181,6 @@ void InitAndroidTestLogging() {
void InitAndroidTestPaths() {
InitPathProvider(DIR_MODULE);
- InitPathProvider(DIR_CACHE);
InitPathProvider(DIR_ANDROID_APP_DATA);
}
« no previous file with comments | « base/base_paths_android.cc ('k') | build/android/pylib/base_test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698