Skip to content

Commit

Permalink
fix PathServiceTest.Get test
Browse files Browse the repository at this point in the history
Test was modified according to XBOX limitations

b/219026606

Change-Id: Iea811495b50fd29588ba439a955d9522672adb88
  • Loading branch information
victorpasoshnikov committed Jun 23, 2023
1 parent 48939ab commit 938719a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions base/path_service_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ bool ReturnsValidPath(int dir_type) {
if (path.ReferencesParent())
return false;
#endif
return result && !path.empty() && (!check_path_exists || PathExists(path));
// Some existing root folders (LocalFolder, LocalCacheFolder, etc.)
// can't be verifyed by PathExists but can do with DirectoryExists
return result && !path.empty() &&
(!check_path_exists || PathExists(path) || DirectoryExists(path));
}

#if defined(OS_WIN)
Expand Down Expand Up @@ -85,7 +88,7 @@ TEST_F(PathServiceTest, Get) {
for (int key = PATH_START + 1; key < PATH_END; ++key) {
#if defined(STARBOARD)
if (key == DIR_CURRENT || key == DIR_USER_DESKTOP ||
key == DIR_SOURCE_ROOT) {
key == DIR_SOURCE_ROOT || key == DIR_HOME) {
continue;
}
#else
Expand Down

0 comments on commit 938719a

Please sign in to comment.