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

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

Issue 13409003: Hide ContentClient getters from embedders so that they they don't reuse content's embedder API. The… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 8 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/chromeos/cros/cros_in_process_browser_test.h" 10 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 class LoginSigninTest : public CrosInProcessBrowserTest { 151 class LoginSigninTest : public CrosInProcessBrowserTest {
152 protected: 152 protected:
153 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 153 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
154 command_line->AppendSwitch(switches::kLoginManager); 154 command_line->AppendSwitch(switches::kLoginManager);
155 command_line->AppendSwitch(switches::kForceLoginManagerInTests); 155 command_line->AppendSwitch(switches::kForceLoginManagerInTests);
156 } 156 }
157 157
158 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { 158 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
159 content_browser_client_.reset(new TestContentBrowserClient()); 159 content_browser_client_.reset(new TestContentBrowserClient());
160 original_content_browser_client_ = content::GetContentClient()->browser(); 160 original_content_browser_client_ = content::SetBrowserClientForTesting(
161 content::GetContentClient()->set_browser_for_testing(
162 content_browser_client_.get()); 161 content_browser_client_.get());
163 } 162 }
164 163
165 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE { 164 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE {
166 content::GetContentClient()->set_browser_for_testing( 165 content::SetBrowserClientForTesting(original_content_browser_client_);
167 original_content_browser_client_);
168 } 166 }
169 167
170 scoped_ptr<TestContentBrowserClient> content_browser_client_; 168 scoped_ptr<TestContentBrowserClient> content_browser_client_;
171 content::ContentBrowserClient* original_content_browser_client_; 169 content::ContentBrowserClient* original_content_browser_client_;
172 }; 170 };
173 171
174 // After a chrome crash, the session manager will restart chrome with 172 // After a chrome crash, the session manager will restart chrome with
175 // the -login-user flag indicating that the user is already logged in. 173 // the -login-user flag indicating that the user is already logged in.
176 // This profile should NOT be an OTR profile. 174 // This profile should NOT be an OTR profile.
177 IN_PROC_BROWSER_TEST_F(LoginUserTest, UserPassed) { 175 IN_PROC_BROWSER_TEST_F(LoginUserTest, UserPassed) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 // Verifies that the webui for login comes up successfully. 216 // Verifies that the webui for login comes up successfully.
219 IN_PROC_BROWSER_TEST_F(LoginSigninTest, WebUIVisible) { 217 IN_PROC_BROWSER_TEST_F(LoginSigninTest, WebUIVisible) {
220 scoped_refptr<content::MessageLoopRunner> runner = 218 scoped_refptr<content::MessageLoopRunner> runner =
221 new content::MessageLoopRunner; 219 new content::MessageLoopRunner;
222 content_browser_client_->browser_main_extra_parts_->set_quit_task( 220 content_browser_client_->browser_main_extra_parts_->set_quit_task(
223 runner->QuitClosure()); 221 runner->QuitClosure());
224 runner->Run(); 222 runner->Run();
225 } 223 }
226 224
227 } // namespace chromeos 225 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/devtools/devtools_sanity_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698