summaryrefslogtreecommitdiffstats
path: root/extensions/shell/test
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/shell/test')
-rw-r--r--extensions/shell/test/shell_test.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/extensions/shell/test/shell_test.cc b/extensions/shell/test/shell_test.cc
index 37147766a..e18ffcf 100644
--- a/extensions/shell/test/shell_test.cc
+++ b/extensions/shell/test/shell_test.cc
@@ -4,8 +4,11 @@
#include "extensions/shell/test/shell_test.h"
+#include "base/base_paths.h"
#include "base/command_line.h"
+#include "base/files/file_path.h"
#include "base/logging.h"
+#include "base/path_service.h"
#include "content/public/common/content_switches.h"
#include "extensions/browser/extension_system.h"
#include "extensions/shell/browser/desktop_controller.h"
@@ -15,6 +18,18 @@
namespace extensions {
AppShellTest::AppShellTest() : browser_context_(NULL), extension_system_(NULL) {
+#if defined(OS_MACOSX)
+ // TODO(phajdan.jr): Make browser tests self-contained on Mac; remove this.
+ // Set up the application path as though we we are inside the App Shell.app
+ // bundle, rather than the top-level app_shell_browsertests, because we
+ // make many assumptions about where the executable is located.
+ base::FilePath app_shell_path;
+ CHECK(PathService::Get(base::FILE_EXE, &app_shell_path));
+ app_shell_path = app_shell_path.DirName();
+ app_shell_path = app_shell_path.Append(
+ FILE_PATH_LITERAL("App Shell.app/Contents/MacOS/App Shell"));
+ CHECK(PathService::Override(base::FILE_EXE, app_shell_path));
+#endif
}
AppShellTest::~AppShellTest() {