summaryrefslogtreecommitdiffstats
path: root/extensions/shell/test
diff options
context:
space:
mode:
authoryoz <yoz@chromium.org>2014-12-19 12:58:18 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-19 20:59:22 +0000
commit289ee7c3b41766e6996b6a7d6ecd5a574b2a147e (patch)
tree410510e9e2b211f6f98119af8ce12ef751dba93d /extensions/shell/test
parent9f60ea8024d81d8b1cfc9a88f465c41e853a0ef3 (diff)
downloadchromium_src-289ee7c3b41766e6996b6a7d6ecd5a574b2a147e.zip
chromium_src-289ee7c3b41766e6996b6a7d6ecd5a574b2a147e.tar.gz
chromium_src-289ee7c3b41766e6996b6a7d6ecd5a574b2a147e.tar.bz2
AppShell support for Mac.
Very basic support for app_shell on Mac cocoa. It allows building and running app_shell, app_shell_unittests, and app_shell_browsertests on Mac. It introduces app_shell_framework and app_shell_helper targets. Much of the work is based on the content_shell equivalents. The above targets build as part of 'all' on Mac, but are not yet covered by trybots. Shortcomings compared to Aura: - The AppShell desktop controller doesn't support tracking multiple app windows. - Running App Shell --load-apps works (at least for the Calculator sample) but can only be exited via ^C at the command line, and there is no Mac menu. BUG=399363 Review URL: https://codereview.chromium.org/745093002 Cr-Commit-Position: refs/heads/master@{#309256}
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() {