OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 authenticator->CompleteLogin(ProfileManager::GetDefaultProfile(), | 428 authenticator->CompleteLogin(ProfileManager::GetDefaultProfile(), |
429 UserContext(username, | 429 UserContext(username, |
430 "password", | 430 "password", |
431 std::string(), | 431 std::string(), |
432 username)); // username_hash | 432 username)); // username_hash |
433 | 433 |
434 const bool kUsingOAuth = true; | 434 const bool kUsingOAuth = true; |
435 // Setting |kHasCookies| to false prevents ProfileAuthData::Transfer from | 435 // Setting |kHasCookies| to false prevents ProfileAuthData::Transfer from |
436 // waiting for an IO task before proceeding. | 436 // waiting for an IO task before proceeding. |
437 const bool kHasCookies = false; | 437 const bool kHasCookies = false; |
| 438 const bool kHasActiveSession = false; |
438 LoginUtils::Get()->PrepareProfile( | 439 LoginUtils::Get()->PrepareProfile( |
439 UserContext(username, "password", std::string(), username), | 440 UserContext(username, "password", std::string(), username), |
440 std::string(), kUsingOAuth, kHasCookies, this); | 441 std::string(), kUsingOAuth, kHasCookies, kHasActiveSession, this); |
441 device_settings_test_helper.Flush(); | 442 device_settings_test_helper.Flush(); |
442 RunUntilIdle(); | 443 RunUntilIdle(); |
443 | 444 |
444 DeviceSettingsService::Get()->UnsetSessionManager(); | 445 DeviceSettingsService::Get()->UnsetSessionManager(); |
445 } | 446 } |
446 | 447 |
447 net::TestURLFetcher* PrepareOAuthFetcher(const std::string& expected_url) { | 448 net::TestURLFetcher* PrepareOAuthFetcher(const std::string& expected_url) { |
448 net::TestURLFetcher* fetcher = test_url_fetcher_factory_.GetFetcherByID(0); | 449 net::TestURLFetcher* fetcher = test_url_fetcher_factory_.GetFetcherByID(0); |
449 EXPECT_TRUE(fetcher); | 450 EXPECT_TRUE(fetcher); |
450 if (!fetcher) | 451 if (!fetcher) |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 } | 719 } |
719 | 720 |
720 INSTANTIATE_TEST_CASE_P( | 721 INSTANTIATE_TEST_CASE_P( |
721 LoginUtilsBlockingLoginTestInstance, | 722 LoginUtilsBlockingLoginTestInstance, |
722 LoginUtilsBlockingLoginTest, | 723 LoginUtilsBlockingLoginTest, |
723 testing::Values(0, 1, 2, 3, 4, 5)); | 724 testing::Values(0, 1, 2, 3, 4, 5)); |
724 | 725 |
725 } // namespace | 726 } // namespace |
726 | 727 |
727 } | 728 } |
OLD | NEW |