summaryrefslogtreecommitdiffstats
path: root/base/base_paths_mac.mm
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-15 19:52:52 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-15 19:52:52 +0000
commit7fac888e97750567424c1ededd1c6c3957dddaa6 (patch)
tree194dd4c1cc4520775b42e56b619c414782049a3f /base/base_paths_mac.mm
parent490348b9600fd16e8ae14b32b78a9b9f3613fd6c (diff)
downloadchromium_src-7fac888e97750567424c1ededd1c6c3957dddaa6.zip
chromium_src-7fac888e97750567424c1ededd1c6c3957dddaa6.tar.gz
chromium_src-7fac888e97750567424c1ededd1c6c3957dddaa6.tar.bz2
Mac: Let out-of-process tests run in bundled mode for their whole lifetime.
Since out-of-process tests override the EXE path to look like the bundled app, it makes sense to override AmIBundled() as well. This is important because the renderer process started from browser_tests runs as bundled, and if browser and renderer process don't agree on bundled-ness, the "load plugin" requests for internal plugins from the renderer have the wrong plugin path, causing the plugin load to fail. Also add a DCHECK that makes sure that AmIBundled() doesn't flip-flop. This makes PDFBrowserTest work on mac, so enable it. It looks like even unit_tests uses the out-of-process test runner, so this change is a bit hairy :-/ BUG=61258,63183 TEST=all existing tests still pass, PDFBrowserTest.* passes. Review URL: http://codereview.chromium.org/4947002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66156 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/base_paths_mac.mm')
-rw-r--r--base/base_paths_mac.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/base/base_paths_mac.mm b/base/base_paths_mac.mm
index 793bece..34a3d23 100644
--- a/base/base_paths_mac.mm
+++ b/base/base_paths_mac.mm
@@ -52,7 +52,8 @@ bool PathProviderMac(int key, FilePath* result) {
case base::DIR_APP_DATA:
return mac_util::GetUserDirectory(NSApplicationSupportDirectory, result);
case base::DIR_SOURCE_ROOT: {
- if (GetNSExecutablePath(result)) {
+ // Go through PathService to catch overrides.
+ if (PathService::Get(base::FILE_EXE, result)) {
// Start with the executable's directory.
*result = result->DirName();
if (mac_util::AmIBundled()) {