Chromium Code Reviews| 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 246 .WillRepeatedly(Return(true)); | 246 .WillRepeatedly(Return(true)); |
| 247 | 247 |
| 248 scoped_refptr<Authenticator> authenticator = | 248 scoped_refptr<Authenticator> authenticator = |
| 249 LoginUtils::Get()->CreateAuthenticator(this); | 249 LoginUtils::Get()->CreateAuthenticator(this); |
| 250 authenticator->CompleteLogin(ProfileManager::GetDefaultProfile(), | 250 authenticator->CompleteLogin(ProfileManager::GetDefaultProfile(), |
| 251 username, | 251 username, |
| 252 "password"); | 252 "password"); |
| 253 | 253 |
| 254 GaiaAuthConsumer::ClientLoginResult credentials; | 254 GaiaAuthConsumer::ClientLoginResult credentials; |
| 255 LoginUtils::Get()->PrepareProfile( | 255 LoginUtils::Get()->PrepareProfile( |
| 256 username, "password", credentials, false, true, false, this); | 256 username, "", "password", credentials, false, true, false, this); |
|
whywhat
2011/12/05 12:14:49
nit: You pass "" here and std::string() in other p
Ivan Korotkov
2011/12/05 14:12:48
Done.
| |
| 257 loop_.RunAllPending(); | 257 loop_.RunAllPending(); |
| 258 } | 258 } |
| 259 | 259 |
| 260 TestURLFetcher* PrepareOAuthFetcher(const std::string& expected_url) { | 260 TestURLFetcher* PrepareOAuthFetcher(const std::string& expected_url) { |
| 261 TestURLFetcher* fetcher = test_url_fetcher_factory_.GetFetcherByID(0); | 261 TestURLFetcher* fetcher = test_url_fetcher_factory_.GetFetcherByID(0); |
| 262 EXPECT_TRUE(fetcher); | 262 EXPECT_TRUE(fetcher); |
| 263 EXPECT_TRUE(fetcher->delegate()); | 263 EXPECT_TRUE(fetcher->delegate()); |
| 264 EXPECT_TRUE(StartsWithASCII(fetcher->GetOriginalURL().spec(), | 264 EXPECT_TRUE(StartsWithASCII(fetcher->GetOriginalURL().spec(), |
| 265 expected_url, | 265 expected_url, |
| 266 true)); | 266 true)); |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 456 } | 456 } |
| 457 | 457 |
| 458 INSTANTIATE_TEST_CASE_P( | 458 INSTANTIATE_TEST_CASE_P( |
| 459 LoginUtilsBlockingLoginTestInstance, | 459 LoginUtilsBlockingLoginTestInstance, |
| 460 LoginUtilsBlockingLoginTest, | 460 LoginUtilsBlockingLoginTest, |
| 461 testing::Values(0, 1, 2, 3, 4, 5)); | 461 testing::Values(0, 1, 2, 3, 4, 5)); |
| 462 | 462 |
| 463 } // namespace | 463 } // namespace |
| 464 | 464 |
| 465 } | 465 } |
| OLD | NEW |