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

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

Issue 8761016: Shaving parallel authenticator yak to remove unnecessary dependency on this class from OAuth spec... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_utils.h" 5 #include "chrome/browser/chromeos/login/login_utils.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 .WillRepeatedly(Return(false)); 227 .WillRepeatedly(Return(false));
228 EXPECT_EQ(policy::EnterpriseInstallAttributes::LOCK_SUCCESS, 228 EXPECT_EQ(policy::EnterpriseInstallAttributes::LOCK_SUCCESS,
229 connector_->LockDevice(username)); 229 connector_->LockDevice(username));
230 loop_.RunAllPending(); 230 loop_.RunAllPending();
231 } 231 }
232 232
233 void PrepareProfile(const std::string& username) { 233 void PrepareProfile(const std::string& username) {
234 MockSessionManagerClient* session_managed_client = 234 MockSessionManagerClient* session_managed_client =
235 dbus_thread_manager_.mock_session_manager_client(); 235 dbus_thread_manager_.mock_session_manager_client();
236 EXPECT_CALL(*session_managed_client, StartSession(_)); 236 EXPECT_CALL(*session_managed_client, StartSession(_));
237
238 // crypto::Encryptor::SetCounter wants exactly 128 bits, and
239 // ParallelAuthenticator CHECKs on that.
240 CryptohomeBlob blob;
241 for (size_t i = 0; i < 16; ++i)
242 blob.push_back(i);
243 EXPECT_CALL(*cryptohome_, GetSystemSalt()) 237 EXPECT_CALL(*cryptohome_, GetSystemSalt())
244 .WillRepeatedly(Return(blob)); 238 .WillRepeatedly(Return(std::string("stub_system_salt")));
245 EXPECT_CALL(*cryptohome_, AsyncMount(_, _, _, _)) 239 EXPECT_CALL(*cryptohome_, AsyncMount(_, _, _, _))
246 .WillRepeatedly(Return(true)); 240 .WillRepeatedly(Return(true));
247 241
248 scoped_refptr<Authenticator> authenticator = 242 scoped_refptr<Authenticator> authenticator =
249 LoginUtils::Get()->CreateAuthenticator(this); 243 LoginUtils::Get()->CreateAuthenticator(this);
250 authenticator->CompleteLogin(ProfileManager::GetDefaultProfile(), 244 authenticator->CompleteLogin(ProfileManager::GetDefaultProfile(),
251 username, 245 username,
252 "password"); 246 "password");
253 247
254 GaiaAuthConsumer::ClientLoginResult credentials; 248 GaiaAuthConsumer::ClientLoginResult credentials;
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 } 450 }
457 451
458 INSTANTIATE_TEST_CASE_P( 452 INSTANTIATE_TEST_CASE_P(
459 LoginUtilsBlockingLoginTestInstance, 453 LoginUtilsBlockingLoginTestInstance,
460 LoginUtilsBlockingLoginTest, 454 LoginUtilsBlockingLoginTest,
461 testing::Values(0, 1, 2, 3, 4, 5)); 455 testing::Values(0, 1, 2, 3, 4, 5));
462 456
463 } // namespace 457 } // namespace
464 458
465 } 459 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/login_utils.cc ('k') | chrome/browser/chromeos/login/mock_authenticator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698