Chromium Code Reviews| Index: base/path_service_unittest.cc |
| diff --git a/base/path_service_unittest.cc b/base/path_service_unittest.cc |
| index 0b96c123e97abbdca9490c1e3edf593f120651ba..b71f078709326ad022f8c3c0cb53fb226093fd88 100644 |
| --- a/base/path_service_unittest.cc |
| +++ b/base/path_service_unittest.cc |
| @@ -28,6 +28,7 @@ namespace { |
| bool ReturnsValidPath(int dir_type) { |
| FilePath path; |
| bool result = PathService::Get(dir_type, &path); |
| + |
| // Some paths might not exist on some platforms in which case confirming |
| // |result| is true and !path.empty() is the best we can do. |
| bool check_path_exists = true; |
| @@ -61,6 +62,16 @@ bool ReturnsValidPath(int dir_type) { |
| check_path_exists = false; |
| } |
| #endif |
| +#if defined(OS_MAC) |
|
Nico
2013/03/13 23:18:40
It's OS_MAXOSX (https://codereview.chromium.org/12
|
| + if (dir_type != base::DIR_EXE && dir_type != base::DIR_MODULE && |
| + dir_type != base::FILE_EXE && dir_type != base::FILE_MODULE) { |
| + if (path.ReferencesParent()) |
| + return false; |
| + } |
| +#else |
| + if (path.ReferencesParent()) |
| + return false; |
| +#endif |
| return result && !path.empty() && (!check_path_exists || |
| file_util::PathExists(path)); |
| } |