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

Unified Diff: extensions/shell/test/shell_test.cc

Issue 745093002: AppShell support for Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minors Created 6 years 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 | « extensions/shell/browser/shell_native_app_window_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/shell/test/shell_test.cc
diff --git a/extensions/shell/test/shell_test.cc b/extensions/shell/test/shell_test.cc
index 37147766adc55352b795660bd451ac84ebb11249..e18ffcfa91f7f539d55754187e03b6b6926a52cd 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() {
« no previous file with comments | « extensions/shell/browser/shell_native_app_window_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698