OLD | NEW |
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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 EXPECT_CALL(*cryptohome_, AsyncMount(_, _, _, _)) | 239 EXPECT_CALL(*cryptohome_, AsyncMount(_, _, _, _)) |
240 .WillRepeatedly(Return(true)); | 240 .WillRepeatedly(Return(true)); |
241 | 241 |
242 scoped_refptr<Authenticator> authenticator = | 242 scoped_refptr<Authenticator> authenticator = |
243 LoginUtils::Get()->CreateAuthenticator(this); | 243 LoginUtils::Get()->CreateAuthenticator(this); |
244 authenticator->CompleteLogin(ProfileManager::GetDefaultProfile(), | 244 authenticator->CompleteLogin(ProfileManager::GetDefaultProfile(), |
245 username, | 245 username, |
246 "password"); | 246 "password"); |
247 | 247 |
248 GaiaAuthConsumer::ClientLoginResult credentials; | 248 GaiaAuthConsumer::ClientLoginResult credentials; |
249 LoginUtils::Get()->PrepareProfile( | 249 LoginUtils::Get()->PrepareProfile(username, std::string(), "password", |
250 username, "password", credentials, false, true, false, this); | 250 credentials, false, true, false, this); |
251 loop_.RunAllPending(); | 251 loop_.RunAllPending(); |
252 } | 252 } |
253 | 253 |
254 TestURLFetcher* PrepareOAuthFetcher(const std::string& expected_url) { | 254 TestURLFetcher* PrepareOAuthFetcher(const std::string& expected_url) { |
255 TestURLFetcher* fetcher = test_url_fetcher_factory_.GetFetcherByID(0); | 255 TestURLFetcher* fetcher = test_url_fetcher_factory_.GetFetcherByID(0); |
256 EXPECT_TRUE(fetcher); | 256 EXPECT_TRUE(fetcher); |
257 EXPECT_TRUE(fetcher->delegate()); | 257 EXPECT_TRUE(fetcher->delegate()); |
258 EXPECT_TRUE(StartsWithASCII(fetcher->GetOriginalURL().spec(), | 258 EXPECT_TRUE(StartsWithASCII(fetcher->GetOriginalURL().spec(), |
259 expected_url, | 259 expected_url, |
260 true)); | 260 true)); |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 } | 450 } |
451 | 451 |
452 INSTANTIATE_TEST_CASE_P( | 452 INSTANTIATE_TEST_CASE_P( |
453 LoginUtilsBlockingLoginTestInstance, | 453 LoginUtilsBlockingLoginTestInstance, |
454 LoginUtilsBlockingLoginTest, | 454 LoginUtilsBlockingLoginTest, |
455 testing::Values(0, 1, 2, 3, 4, 5)); | 455 testing::Values(0, 1, 2, 3, 4, 5)); |
456 | 456 |
457 } // namespace | 457 } // namespace |
458 | 458 |
459 } | 459 } |
OLD | NEW |