[base] Add DIR_GEN_TEST_DATA_ROOT to BasePathKey
This key provides a platform-independent way to locate files that are
generated during the build for use in tests.
Known such cases are updated to use the new key.
Bug: 1262430, 1264897
Change-Id: I7e708580727ac24f45b1046731d52f996b0d9ed5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3237884
Commit-Queue: David Dorwin <[email protected]>
Auto-Submit: David Dorwin <[email protected]>
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Wez <[email protected]>
Cr-Commit-Position: refs/heads/main@{#936595}
diff --git a/base/base_paths_mac.mm b/base/base_paths_mac.mm
index 27df6fd8..b5bc512 100644
--- a/base/base_paths_mac.mm
+++ b/base/base_paths_mac.mm
@@ -40,8 +40,8 @@
// _NSGetExecutablePath may return paths containing ./ or ../ which makes
// FilePath::DirName() work incorrectly, convert it to absolute path so that
- // paths such as DIR_SOURCE_ROOT can work, since we expect absolute paths to
- // be returned here.
+ // paths such as DIR_SRC_TEST_DATA_ROOT can work, since we expect absolute
+ // paths to be returned here.
// TODO(bauerb): http://crbug.com/259796, http://crbug.com/373477
base::ThreadRestrictions::ScopedAllowIO allow_io;
*path = base::MakeAbsoluteFilePath(base::FilePath(executable_path));
@@ -82,7 +82,7 @@
#endif // defined(OS_IOS)
return success;
}
- case base::DIR_SOURCE_ROOT:
+ case base::DIR_SRC_TEST_DATA_ROOT:
#if defined(OS_IOS)
// On iOS, there is no access to source root, however, the necessary
// resources are packaged into the test as assets.