diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-23 13:38:43 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-23 13:38:43 +0000 |
commit | 88bc7712cf26cd18fc17bc0409770c05adbfd697 (patch) | |
tree | 3d5573c17ac17afd52bfb217b752d7d843d03938 /base | |
parent | c8cb9612733811e0b6cf4a313d35043e8dde6fdc (diff) | |
download | chromium_src-88bc7712cf26cd18fc17bc0409770c05adbfd697.zip chromium_src-88bc7712cf26cd18fc17bc0409770c05adbfd697.tar.gz chromium_src-88bc7712cf26cd18fc17bc0409770c05adbfd697.tar.bz2 |
If chromium has not been started yet, the cache path will not exist.
TEST=Fix PathServiceTest.Get on POSIX on new slaves
BUG=none
Review URL: http://codereview.chromium.org/4023006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63649 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/path_service_unittest.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/base/path_service_unittest.cc b/base/path_service_unittest.cc index 4c41aed..c65f7a5 100644 --- a/base/path_service_unittest.cc +++ b/base/path_service_unittest.cc @@ -21,6 +21,12 @@ namespace { bool ReturnsValidPath(int dir_type) { FilePath path; bool result = PathService::Get(dir_type, &path); +#if defined(OS_POSIX) + // If chromium has never been started on this account, the cache path will not + // exist. + if (dir_type == base::DIR_USER_CACHE) + return result && !path.value().empty(); +#endif return result && !path.value().empty() && file_util::PathExists(path); } |