diff options
-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); } |