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

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

Issue 110913009: ChromeOS: properly enable multiprofile mode in LoginManagerTest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review changes Created 7 years 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
« no previous file with comments | « chrome/browser/chromeos/login/fake_login_utils.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/chromeos/login/login_manager_test.h" 5 #include "chrome/browser/chromeos/login/login_manager_test.h"
6 6
7 #include "base/prefs/scoped_user_pref_update.h" 7 #include "base/prefs/scoped_user_pref_update.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/chromeos/login/existing_user_controller.h" 10 #include "chrome/browser/chromeos/login/existing_user_controller.h"
(...skipping 19 matching lines...) Expand all
30 void LoginManagerTest::CleanUpOnMainThread() { 30 void LoginManagerTest::CleanUpOnMainThread() {
31 if (LoginDisplayHostImpl::default_host()) 31 if (LoginDisplayHostImpl::default_host())
32 LoginDisplayHostImpl::default_host()->Finalize(); 32 LoginDisplayHostImpl::default_host()->Finalize();
33 base::MessageLoop::current()->RunUntilIdle(); 33 base::MessageLoop::current()->RunUntilIdle();
34 } 34 }
35 35
36 void LoginManagerTest::SetUpCommandLine(CommandLine* command_line) { 36 void LoginManagerTest::SetUpCommandLine(CommandLine* command_line) {
37 command_line->AppendSwitch(chromeos::switches::kLoginManager); 37 command_line->AppendSwitch(chromeos::switches::kLoginManager);
38 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); 38 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests);
39 command_line->AppendSwitch(::switches::kMultiProfiles); 39 command_line->AppendSwitch(::switches::kMultiProfiles);
40 command_line->AppendSwitchASCII(::switches::kForceFieldTrials,
41 "ChromeOSUseMultiProfiles/Enable/");
40 } 42 }
41 43
42 void LoginManagerTest::SetUpInProcessBrowserTestFixture() { 44 void LoginManagerTest::SetUpInProcessBrowserTestFixture() {
43 mock_login_utils_ = new testing::NiceMock<MockLoginUtils>(); 45 mock_login_utils_ = new testing::NiceMock<MockLoginUtils>();
44 mock_login_utils_->DelegateToFake(); 46 mock_login_utils_->DelegateToFake();
45 mock_login_utils_->GetFakeLoginUtils()->set_should_launch_browser( 47 mock_login_utils_->GetFakeLoginUtils()->set_should_launch_browser(
46 should_launch_browser_); 48 should_launch_browser_);
47 LoginUtils::Set(mock_login_utils_); 49 LoginUtils::Set(mock_login_utils_);
48 } 50 }
49 51
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 LoginDisplayHost* host = LoginDisplayHostImpl::default_host(); 120 LoginDisplayHost* host = LoginDisplayHostImpl::default_host();
119 EXPECT_TRUE(host != NULL); 121 EXPECT_TRUE(host != NULL);
120 122
121 content::WebContents* web_contents = 123 content::WebContents* web_contents =
122 host->GetWebUILoginView()->GetWebContents(); 124 host->GetWebUILoginView()->GetWebContents();
123 EXPECT_TRUE(web_contents != NULL); 125 EXPECT_TRUE(web_contents != NULL);
124 set_web_contents(web_contents); 126 set_web_contents(web_contents);
125 } 127 }
126 128
127 } // namespace chromeos 129 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/fake_login_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698