summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-22 18:35:10 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-22 18:35:10 +0000
commitd480bc80924732bfe029c894db68cecb15ce0a9f (patch)
tree063298145cedbcd6cac8fb8987b1e5b41416c45c /base
parent878c426fd8ec9fc5568a7549d7cebad29db3413e (diff)
downloadchromium_src-d480bc80924732bfe029c894db68cecb15ce0a9f.zip
chromium_src-d480bc80924732bfe029c894db68cecb15ce0a9f.tar.gz
chromium_src-d480bc80924732bfe029c894db68cecb15ce0a9f.tar.bz2
Fix DIR_SOURCE_ROOT to work in bundles like Chromium.app. Add more ui tests. Add a resource for tabs with no title on mac. Fix window title reporting. Remove the Browser dependency from the tab strip (only needs a TabStripModel).
Review URL: http://codereview.chromium.org/93025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14212 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/base_paths_mac.mm20
1 files changed, 16 insertions, 4 deletions
diff --git a/base/base_paths_mac.mm b/base/base_paths_mac.mm
index cd0287c..8c84fbf 100644
--- a/base/base_paths_mac.mm
+++ b/base/base_paths_mac.mm
@@ -9,6 +9,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/logging.h"
+#include "base/mac_util.h"
#include "base/path_service.h"
#include "base/string_util.h"
@@ -28,11 +29,22 @@ bool PathProviderMac(int key, FilePath* result) {
}
case base::DIR_SOURCE_ROOT: {
FilePath path;
- // On the mac, unit tests execute two levels deep from the source root.
- // For example: src/xcodebuild/{Debug|Release}/base_unittests
PathService::Get(base::DIR_EXE, &path);
- path = path.DirName();
- *result = path.DirName();
+ if (mac_util::AmIBundled()) {
+ // The bundled app executables (Chromium, TestShell, etc) live five
+ // leves down, eg:
+ // src/xcodebuild/{Debug|Release}/Chromium.app/Contents/MacOS/Chromium.
+ path = path.DirName();
+ path = path.DirName();
+ path = path.DirName();
+ path = path.DirName();
+ *result = path.DirName();
+ } else {
+ // Unit tests execute two levels deep from the source root, eg:
+ // src/xcodebuild/{Debug|Release}/base_unittests
+ path = path.DirName();
+ *result = path.DirName();
+ }
return true;
}
default: