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

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

Issue 656283002: [session_manager] Move user session initialization code out of ExistingUserController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 6 years, 2 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
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 user_context.SetKey(Key("password")); 111 user_context.SetKey(Key("password"));
112 SetExpectedCredentials(user_context); 112 SetExpectedCredentials(user_context);
113 EXPECT_TRUE(AddUserToSession(user_context)); 113 EXPECT_TRUE(AddUserToSession(user_context));
114 } 114 }
115 115
116 void LoginManagerTest::JSExpect(const std::string& expression) { 116 void LoginManagerTest::JSExpect(const std::string& expression) {
117 js_checker_.ExpectTrue(expression); 117 js_checker_.ExpectTrue(expression);
118 } 118 }
119 119
120 void LoginManagerTest::InitializeWebContents() { 120 void LoginManagerTest::InitializeWebContents() {
121 LoginDisplayHost* host = LoginDisplayHostImpl::default_host(); 121 LoginDisplayHost* host = LoginDisplayHostImpl::default_host();
122 EXPECT_TRUE(host != NULL); 122 EXPECT_TRUE(host != NULL);
123 123
124 content::WebContents* web_contents = 124 content::WebContents* web_contents =
125 host->GetWebUILoginView()->GetWebContents(); 125 host->GetWebUILoginView()->GetWebContents();
126 EXPECT_TRUE(web_contents != NULL); 126 EXPECT_TRUE(web_contents != NULL);
127 set_web_contents(web_contents); 127 set_web_contents(web_contents);
128 js_checker_.set_web_contents(web_contents); 128 js_checker_.set_web_contents(web_contents);
129 } 129 }
130 130
131 } // namespace chromeos 131 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698