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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 "password", | 379 "password", |
380 std::string(), | 380 std::string(), |
381 username)); // username_hash | 381 username)); // username_hash |
382 | 382 |
383 const bool kUsingOAuth = true; | 383 const bool kUsingOAuth = true; |
384 // Setting |kHasCookies| to false prevents ProfileAuthData::Transfer from | 384 // Setting |kHasCookies| to false prevents ProfileAuthData::Transfer from |
385 // waiting for an IO task before proceeding. | 385 // waiting for an IO task before proceeding. |
386 const bool kHasCookies = false; | 386 const bool kHasCookies = false; |
387 const bool kHasActiveSession = false; | 387 const bool kHasActiveSession = false; |
388 LoginUtils::Get()->PrepareProfile( | 388 LoginUtils::Get()->PrepareProfile( |
389 UserContext(username, "password", std::string(), username, kUsingOAuth), | 389 UserContext(username, |
| 390 "password", |
| 391 std::string(), |
| 392 username, |
| 393 kUsingOAuth, |
| 394 UserContext::AUTH_FLOW_GAIA_WITHOUT_SAML), |
390 std::string(), kHasCookies, kHasActiveSession, this); | 395 std::string(), kHasCookies, kHasActiveSession, this); |
391 device_settings_test_helper.Flush(); | 396 device_settings_test_helper.Flush(); |
392 RunUntilIdle(); | 397 RunUntilIdle(); |
393 | 398 |
394 DeviceSettingsService::Get()->UnsetSessionManager(); | 399 DeviceSettingsService::Get()->UnsetSessionManager(); |
395 } | 400 } |
396 | 401 |
397 net::TestURLFetcher* PrepareOAuthFetcher(const GURL& expected_url) { | 402 net::TestURLFetcher* PrepareOAuthFetcher(const GURL& expected_url) { |
398 net::TestURLFetcher* fetcher = test_url_fetcher_factory_.GetFetcherByID(0); | 403 net::TestURLFetcher* fetcher = test_url_fetcher_factory_.GetFetcherByID(0); |
399 EXPECT_TRUE(fetcher); | 404 EXPECT_TRUE(fetcher); |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
668 } | 673 } |
669 | 674 |
670 INSTANTIATE_TEST_CASE_P( | 675 INSTANTIATE_TEST_CASE_P( |
671 LoginUtilsBlockingLoginTestInstance, | 676 LoginUtilsBlockingLoginTestInstance, |
672 LoginUtilsBlockingLoginTest, | 677 LoginUtilsBlockingLoginTest, |
673 testing::Values(0, 1, 2, 3, 4, 5)); | 678 testing::Values(0, 1, 2, 3, 4, 5)); |
674 | 679 |
675 } // namespace | 680 } // namespace |
676 | 681 |
677 } // namespace chromeos | 682 } // namespace chromeos |
OLD | NEW |