Chromium Code Reviews| 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..b55cedb773a9215120d9b81d4688689b8a4466be 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 we use external storage for app data. |
|
Mark Mentovai
2012/08/30 02:52:29
Don’t say “we.”
nilesh
2012/08/30 17:21:55
Done.
|
| + *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); |
| } |