OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "extensions/shell/test/shell_test.h" | 5 #include "extensions/shell/test/shell_test.h" |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "content/public/common/content_switches.h" | 12 #include "content/public/common/content_switches.h" |
13 #include "extensions/browser/extension_system.h" | 13 #include "extensions/browser/extension_system.h" |
14 #include "extensions/shell/browser/desktop_controller.h" | 14 #include "extensions/shell/browser/desktop_controller.h" |
15 #include "extensions/shell/browser/shell_content_browser_client.h" | 15 #include "extensions/shell/browser/shell_content_browser_client.h" |
16 #include "extensions/shell/browser/shell_extension_system.h" | 16 #include "extensions/shell/browser/shell_extension_system.h" |
17 | 17 |
18 namespace extensions { | 18 namespace extensions { |
19 | 19 |
20 AppShellTest::AppShellTest() : browser_context_(NULL), extension_system_(NULL) { | 20 AppShellTest::AppShellTest() : browser_context_(NULL), extension_system_(NULL) { |
21 #if defined(OS_MACOSX) | 21 #if defined(OS_MACOSX) |
22 // TODO(phajdan.jr): Make browser tests self-contained on Mac; remove this. | 22 // TODO(phajdan.jr): Make browser tests self-contained on Mac; remove this. |
23 // Set up the application path as though we we are inside the App Shell.app | 23 // Set up the application path as though we we are inside the App Shell.app |
24 // bundle, rather than the top-level app_shell_browsertests, because we | 24 // bundle, rather than the top-level extensions_browsertests, because we |
25 // make many assumptions about where the executable is located. | 25 // make many assumptions about where the executable is located. |
26 base::FilePath app_shell_path; | 26 base::FilePath app_shell_path; |
27 CHECK(PathService::Get(base::FILE_EXE, &app_shell_path)); | 27 CHECK(PathService::Get(base::FILE_EXE, &app_shell_path)); |
28 app_shell_path = app_shell_path.DirName(); | 28 app_shell_path = app_shell_path.DirName(); |
29 app_shell_path = app_shell_path.Append( | 29 app_shell_path = app_shell_path.Append( |
30 FILE_PATH_LITERAL("App Shell.app/Contents/MacOS/App Shell")); | 30 FILE_PATH_LITERAL("App Shell.app/Contents/MacOS/App Shell")); |
31 CHECK(PathService::Override(base::FILE_EXE, app_shell_path)); | 31 CHECK(PathService::Override(base::FILE_EXE, app_shell_path)); |
32 #endif | 32 #endif |
33 } | 33 } |
34 | 34 |
(...skipping 21 matching lines...) Expand all Loading... |
56 | 56 |
57 RunTestOnMainThread(); | 57 RunTestOnMainThread(); |
58 | 58 |
59 TearDownOnMainThread(); | 59 TearDownOnMainThread(); |
60 | 60 |
61 // Clean up the app window. | 61 // Clean up the app window. |
62 DesktopController::instance()->CloseAppWindows(); | 62 DesktopController::instance()->CloseAppWindows(); |
63 } | 63 } |
64 | 64 |
65 } // namespace extensions | 65 } // namespace extensions |
OLD | NEW |