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

Side by Side Diff: chrome/browser/chromeos/login/login_browsertest.cc

Issue 190663012: Run ContentMain in a browser_test's browser process. This removes duplication of code in the browse… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: cleanup Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/shell.h" 5 #include "ash/shell.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "chrome/browser/chrome_browser_main.h" 7 #include "chrome/browser/chrome_browser_main.h"
8 #include "chrome/browser/chrome_browser_main_extra_parts.h" 8 #include "chrome/browser/chrome_browser_main_extra_parts.h"
9 #include "chrome/browser/chrome_content_browser_client.h" 9 #include "chrome/browser/chrome_content_browser_client.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 }; 119 };
120 120
121 121
122 class LoginSigninTest : public InProcessBrowserTest { 122 class LoginSigninTest : public InProcessBrowserTest {
123 protected: 123 protected:
124 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 124 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
125 command_line->AppendSwitch(chromeos::switches::kLoginManager); 125 command_line->AppendSwitch(chromeos::switches::kLoginManager);
126 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); 126 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests);
127 } 127 }
128 128
129 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { 129 virtual void SetUpOnMainThread() OVERRIDE {
130 content_browser_client_.reset(new TestContentBrowserClient()); 130 content_browser_client_.reset(new TestContentBrowserClient());
131 original_content_browser_client_ = content::SetBrowserClientForTesting( 131 original_content_browser_client_ = content::SetBrowserClientForTesting(
132 content_browser_client_.get()); 132 content_browser_client_.get());
133 } 133 }
134 134
135 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE { 135 virtual void CleanUpOnMainThread() OVERRIDE {
136 content::SetBrowserClientForTesting(original_content_browser_client_); 136 content::SetBrowserClientForTesting(original_content_browser_client_);
137 } 137 }
138 138
139 scoped_ptr<TestContentBrowserClient> content_browser_client_; 139 scoped_ptr<TestContentBrowserClient> content_browser_client_;
140 content::ContentBrowserClient* original_content_browser_client_; 140 content::ContentBrowserClient* original_content_browser_client_;
141 }; 141 };
142 142
143 // After a chrome crash, the session manager will restart chrome with 143 // After a chrome crash, the session manager will restart chrome with
144 // the -login-user flag indicating that the user is already logged in. 144 // the -login-user flag indicating that the user is already logged in.
145 // This profile should NOT be an OTR profile. 145 // This profile should NOT be an OTR profile.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 INSTANTIATE_TEST_CASE_P(LoginUserTestInstantiation, 198 INSTANTIATE_TEST_CASE_P(LoginUserTestInstantiation,
199 LoginUserTest, 199 LoginUserTest,
200 testing::Bool()); 200 testing::Bool());
201 201
202 INSTANTIATE_TEST_CASE_P(LoginGuestTestInstantiation, 202 INSTANTIATE_TEST_CASE_P(LoginGuestTestInstantiation,
203 LoginGuestTest, 203 LoginGuestTest,
204 testing::Bool()); 204 testing::Bool());
205 205
206 } // namespace 206 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698