Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: chrome/browser/extensions/test_extension_dir.cc

Issue 2770753006: [base/files] Respect MAC_CHROMIUM_TMPDIR instead of TMPDIR on macOS. (Closed)
Patch Set: comment Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/files/file_util_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/test_extension_dir.cc
diff --git a/chrome/browser/extensions/test_extension_dir.cc b/chrome/browser/extensions/test_extension_dir.cc
index dc7e2926e2fc562492515ef0ef6b902e7097730b..a2791820178ca450029ef512fb20413266b1db4d 100644
--- a/chrome/browser/extensions/test_extension_dir.cc
+++ b/chrome/browser/extensions/test_extension_dir.cc
@@ -67,7 +67,13 @@ base::FilePath TestExtensionDir::Pack() {
}
base::FilePath TestExtensionDir::UnpackedPath() {
- return dir_.GetPath();
+ // We make this absolute because it's possible that dir_ contains a symlink as
+ // part of it's path. When UnpackedInstaller::GetAbsolutePath() runs as part
+ // of loading the extension, the extension's path is converted to an absolute
+ // path, which actually does something like `realpath` as part of its
+ // resolution. If the tests are comparing paths to UnpackedPath(), then
+ // they'll need to compare the same absolute'd path.
+ return base::MakeAbsoluteFilePath(dir_.GetPath());
}
} // namespace extensions
« no previous file with comments | « base/files/file_util_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698