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

Side by Side Diff: extensions/shell/test/shell_test.cc

Issue 2580063003: AppShell: Ignore channel requirements of extension API features (Closed)
Patch Set: rebase Created 3 years, 11 months 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 unified diff | Download patch
« no previous file with comments | « extensions/shell/test/shell_test.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
12 #include "base/path_service.h" 12 #include "base/path_service.h"
13 #include "base/run_loop.h" 13 #include "base/run_loop.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "components/version_info/version_info.h"
16 #include "content/public/common/content_switches.h" 15 #include "content/public/common/content_switches.h"
17 #include "extensions/browser/extension_system.h" 16 #include "extensions/browser/extension_system.h"
18 #include "extensions/shell/browser/desktop_controller.h" 17 #include "extensions/shell/browser/desktop_controller.h"
19 #include "extensions/shell/browser/shell_content_browser_client.h" 18 #include "extensions/shell/browser/shell_content_browser_client.h"
20 #include "extensions/shell/browser/shell_extension_system.h" 19 #include "extensions/shell/browser/shell_extension_system.h"
21 20
22 namespace extensions { 21 namespace extensions {
23 22
24 AppShellTest::AppShellTest() 23 AppShellTest::AppShellTest()
25 : browser_context_(nullptr), 24 : browser_context_(nullptr),
26 extension_system_(nullptr), 25 extension_system_(nullptr) {
27 // Default channel is STABLE but override with UNKNOWN so that unlaunched
28 // or incomplete APIs can write tests.
29 current_channel_(version_info::Channel::UNKNOWN) {
30 #if defined(OS_MACOSX) 26 #if defined(OS_MACOSX)
31 // TODO(phajdan.jr): Make browser tests self-contained on Mac; remove this. 27 // TODO(phajdan.jr): Make browser tests self-contained on Mac; remove this.
32 // Set up the application path as though we we are inside the App Shell.app 28 // Set up the application path as though we we are inside the App Shell.app
33 // bundle, rather than the top-level extensions_browsertests, because we 29 // bundle, rather than the top-level extensions_browsertests, because we
34 // make many assumptions about where the executable is located. 30 // make many assumptions about where the executable is located.
35 base::FilePath app_shell_path; 31 base::FilePath app_shell_path;
36 CHECK(PathService::Get(base::FILE_EXE, &app_shell_path)); 32 CHECK(PathService::Get(base::FILE_EXE, &app_shell_path));
37 app_shell_path = app_shell_path.DirName(); 33 app_shell_path = app_shell_path.DirName();
38 app_shell_path = app_shell_path.Append( 34 app_shell_path = app_shell_path.Append(
39 FILE_PATH_LITERAL("App Shell.app/Contents/MacOS/App Shell")); 35 FILE_PATH_LITERAL("App Shell.app/Contents/MacOS/App Shell"));
(...skipping 27 matching lines...) Expand all
67 63
68 RunTestOnMainThread(); 64 RunTestOnMainThread();
69 65
70 TearDownOnMainThread(); 66 TearDownOnMainThread();
71 67
72 // Clean up the app window. 68 // Clean up the app window.
73 DesktopController::instance()->CloseAppWindows(); 69 DesktopController::instance()->CloseAppWindows();
74 } 70 }
75 71
76 } // namespace extensions 72 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/shell/test/shell_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698