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

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

Issue 2141703003: [Extensions] Clean up renderer channel-related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dc_feature_no_filter
Patch Set: Test fix Created 4 years, 5 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
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/path_service.h" 11 #include "base/path_service.h"
12 #include "build/build_config.h" 12 #include "build/build_config.h"
13 #include "components/version_info/version_info.h"
13 #include "content/public/common/content_switches.h" 14 #include "content/public/common/content_switches.h"
14 #include "extensions/browser/extension_system.h" 15 #include "extensions/browser/extension_system.h"
15 #include "extensions/shell/browser/desktop_controller.h" 16 #include "extensions/shell/browser/desktop_controller.h"
16 #include "extensions/shell/browser/shell_content_browser_client.h" 17 #include "extensions/shell/browser/shell_content_browser_client.h"
17 #include "extensions/shell/browser/shell_extension_system.h" 18 #include "extensions/shell/browser/shell_extension_system.h"
18 19
19 namespace extensions { 20 namespace extensions {
20 21
21 AppShellTest::AppShellTest() : browser_context_(NULL), extension_system_(NULL) { 22 AppShellTest::AppShellTest()
23 : browser_context_(nullptr),
24 extension_system_(nullptr),
25 // Default channel is STABLE but override with UNKNOWN so that unlaunched
26 // or incomplete APIs can write tests.
27 current_channel_(version_info::Channel::UNKNOWN) {
22 #if defined(OS_MACOSX) 28 #if defined(OS_MACOSX)
23 // TODO(phajdan.jr): Make browser tests self-contained on Mac; remove this. 29 // TODO(phajdan.jr): Make browser tests self-contained on Mac; remove this.
24 // Set up the application path as though we we are inside the App Shell.app 30 // Set up the application path as though we we are inside the App Shell.app
25 // bundle, rather than the top-level extensions_browsertests, because we 31 // bundle, rather than the top-level extensions_browsertests, because we
26 // make many assumptions about where the executable is located. 32 // make many assumptions about where the executable is located.
27 base::FilePath app_shell_path; 33 base::FilePath app_shell_path;
28 CHECK(PathService::Get(base::FILE_EXE, &app_shell_path)); 34 CHECK(PathService::Get(base::FILE_EXE, &app_shell_path));
29 app_shell_path = app_shell_path.DirName(); 35 app_shell_path = app_shell_path.DirName();
30 app_shell_path = app_shell_path.Append( 36 app_shell_path = app_shell_path.Append(
31 FILE_PATH_LITERAL("App Shell.app/Contents/MacOS/App Shell")); 37 FILE_PATH_LITERAL("App Shell.app/Contents/MacOS/App Shell"));
(...skipping 25 matching lines...) Expand all
57 63
58 RunTestOnMainThread(); 64 RunTestOnMainThread();
59 65
60 TearDownOnMainThread(); 66 TearDownOnMainThread();
61 67
62 // Clean up the app window. 68 // Clean up the app window.
63 DesktopController::instance()->CloseAppWindows(); 69 DesktopController::instance()->CloseAppWindows();
64 } 70 }
65 71
66 } // namespace extensions 72 } // namespace extensions
OLDNEW
« chrome/common/extensions/chrome_extensions_client.cc ('K') | « extensions/shell/test/shell_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698