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

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

Issue 2482583002: Ensure ShellExtensionSystem::Init() is called in all extensions_browsertests. (Closed)
Patch Set: Created 4 years, 1 month 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/browser/guest_view/app_view/app_view_apitest.cc ('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"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 command_line->AppendSwitchASCII(switches::kTestType, "appshell"); 49 command_line->AppendSwitchASCII(switches::kTestType, "appshell");
50 SetUpCommandLine(command_line); 50 SetUpCommandLine(command_line);
51 content::BrowserTestBase::SetUp(); 51 content::BrowserTestBase::SetUp();
52 } 52 }
53 53
54 void AppShellTest::SetUpOnMainThread() { 54 void AppShellTest::SetUpOnMainThread() {
55 browser_context_ = ShellContentBrowserClient::Get()->GetBrowserContext(); 55 browser_context_ = ShellContentBrowserClient::Get()->GetBrowserContext();
56 56
57 extension_system_ = static_cast<ShellExtensionSystem*>( 57 extension_system_ = static_cast<ShellExtensionSystem*>(
58 ExtensionSystem::Get(browser_context_)); 58 ExtensionSystem::Get(browser_context_));
59 extension_system_->Init();
59 } 60 }
60 61
61 void AppShellTest::RunTestOnMainThreadLoop() { 62 void AppShellTest::RunTestOnMainThreadLoop() {
62 DCHECK(base::MessageLoopForUI::IsCurrent()); 63 DCHECK(base::MessageLoopForUI::IsCurrent());
63 base::RunLoop().RunUntilIdle(); 64 base::RunLoop().RunUntilIdle();
64 65
65 SetUpOnMainThread(); 66 SetUpOnMainThread();
66 67
67 RunTestOnMainThread(); 68 RunTestOnMainThread();
68 69
69 TearDownOnMainThread(); 70 TearDownOnMainThread();
70 71
71 // Clean up the app window. 72 // Clean up the app window.
72 DesktopController::instance()->CloseAppWindows(); 73 DesktopController::instance()->CloseAppWindows();
73 } 74 }
74 75
75 } // namespace extensions 76 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/guest_view/app_view/app_view_apitest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698