diff options
author | michaelbai@chromium.org <michaelbai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-20 01:56:39 +0000 |
---|---|---|
committer | michaelbai@chromium.org <michaelbai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-20 01:56:39 +0000 |
commit | adc9ef3ef389cfad6fb99dff2b767d72785045b6 (patch) | |
tree | 413f56fe56df672a12ff8ca89da00427a09b9cdb | |
parent | 8083841913b8eb8018ae52f67c923f0b3d66c466 (diff) | |
download | chromium_src-adc9ef3ef389cfad6fb99dff2b767d72785045b6.zip chromium_src-adc9ef3ef389cfad6fb99dff2b767d72785045b6.tar.gz chromium_src-adc9ef3ef389cfad6fb99dff2b767d72785045b6.tar.bz2 |
Fix the ChromePaths.UserCacheDir for Android
BUG=139431
Review URL: https://chromiumcodereview.appspot.com/11299079
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168693 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | build/android/gtest_filter/unit_tests_disabled | 3 | ||||
-rw-r--r-- | chrome/common/chrome_paths_unittest.cc | 10 |
2 files changed, 10 insertions, 3 deletions
diff --git a/build/android/gtest_filter/unit_tests_disabled b/build/android/gtest_filter/unit_tests_disabled index 1906e60..841454f 100644 --- a/build/android/gtest_filter/unit_tests_disabled +++ b/build/android/gtest_filter/unit_tests_disabled @@ -5,9 +5,6 @@ BrowserMainTest.WarmConnectionFieldTrial_Invalid BrowserMainTest.WarmConnectionFieldTrial_Random BrowserMainTest.WarmConnectionFieldTrial_WarmestSocket -# crbug.com/139431 -ChromePaths.UserCacheDir - # The UDP related tests currently do not work on Android because # we lack a UDP forwarder tool. NetworkStatsTestUDP.* diff --git a/chrome/common/chrome_paths_unittest.cc b/chrome/common/chrome_paths_unittest.cc index 98f9882..c3fa1a0 100644 --- a/chrome/common/chrome_paths_unittest.cc +++ b/chrome/common/chrome_paths_unittest.cc @@ -22,6 +22,12 @@ TEST(ChromePaths, UserCacheDir) { FilePath expected_cache_dir; ASSERT_TRUE(PathService::Get(base::DIR_CACHE, &expected_cache_dir)); expected_cache_dir = expected_cache_dir.Append("foobar"); +#elif(OS_ANDROID) + // No matter what the test_profile_dir is, Android always use the + // application's cache directory since multiple profiles are not + // supported. + FilePath expected_cache_dir; + ASSERT_TRUE(PathService::Get(base::DIR_CACHE, &expected_cache_dir)); #elif(OS_POSIX) FilePath homedir = file_util::GetHomeDir(); // Note: we assume XDG_CACHE_HOME/XDG_CONFIG_HOME are at their @@ -41,7 +47,11 @@ TEST(ChromePaths, UserCacheDir) { // the special cache dir. test_profile_dir = FilePath(FILE_PATH_LITERAL("/some/other/path")); chrome::GetUserCacheDirectory(test_profile_dir, &cache_dir); +#if defined(OS_ANDROID) + EXPECT_EQ(expected_cache_dir.value(), cache_dir.value()); +#else EXPECT_EQ(test_profile_dir.value(), cache_dir.value()); +#endif } #if defined(OS_WINDOWS) |