}
void LoginManagerTest::TearDownOnMainThread() {
+ MixinBasedBrowserTest::TearDownOnMainThread();
if (LoginDisplayHostImpl::default_host())
LoginDisplayHostImpl::default_host()->Finalize();
base::MessageLoop::current()->RunUntilIdle();
void LoginManagerTest::SetUpCommandLine(CommandLine* command_line) {
command_line->AppendSwitch(chromeos::switches::kLoginManager);
command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests);
+ MixinBasedBrowserTest::SetUpCommandLine(command_line);
}
void LoginManagerTest::SetUpInProcessBrowserTestFixture() {
+ MixinBasedBrowserTest::SetUpInProcessBrowserTestFixture();
mock_login_utils_ = new testing::NiceMock<MockLoginUtils>();
mock_login_utils_->DelegateToFake();
mock_login_utils_->GetFakeLoginUtils()->set_should_launch_browser(
}
void LoginManagerTest::SetUpOnMainThread() {
+ MixinBasedBrowserTest::SetUpOnMainThread();
content::WindowedNotificationObserver(
chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE,
content::NotificationService::AllSources()).Wait();
ADD_FAILURE();
return false;
}
- controller->Login(user_context, SigninSpecifics());
- content::WindowedNotificationObserver(
+ content::WindowedNotificationObserver observer(
chrome::NOTIFICATION_SESSION_STARTED,
- content::NotificationService::AllSources()).Wait();
+ content::NotificationService::AllSources());
+ controller->Login(user_context, SigninSpecifics());
+ observer.Wait();
const user_manager::UserList& logged_users =
user_manager::UserManager::Get()->GetLoggedInUsers();
for (user_manager::UserList::const_iterator it = logged_users.begin();
}
void LoginManagerTest::InitializeWebContents() {
- LoginDisplayHost* host = LoginDisplayHostImpl::default_host();
- EXPECT_TRUE(host != NULL);
-
- content::WebContents* web_contents =
- host->GetWebUILoginView()->GetWebContents();
- EXPECT_TRUE(web_contents != NULL);
- set_web_contents(web_contents);
- js_checker_.set_web_contents(web_contents);
- }
+ LoginDisplayHost* host = LoginDisplayHostImpl::default_host();
+ EXPECT_TRUE(host != NULL);
+
+ content::WebContents* web_contents =
+ host->GetWebUILoginView()->GetWebContents();
+ EXPECT_TRUE(web_contents != NULL);
+ set_web_contents(web_contents);
+ js_checker_.set_web_contents(web_contents);
+}
} // namespace chromeos