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, | 389 UserContext(username, "password", std::string(), username, kUsingOAuth), |
390 "password", | |
391 std::string(), | |
392 username, | |
393 kUsingOAuth, | |
394 UserContext::AUTH_FLOW_GAIA_WITHOUT_SAML), | |
395 std::string(), kHasCookies, kHasActiveSession, this); | 390 std::string(), kHasCookies, kHasActiveSession, this); |
396 device_settings_test_helper.Flush(); | 391 device_settings_test_helper.Flush(); |
397 RunUntilIdle(); | 392 RunUntilIdle(); |
398 | 393 |
399 DeviceSettingsService::Get()->UnsetSessionManager(); | 394 DeviceSettingsService::Get()->UnsetSessionManager(); |
400 } | 395 } |
401 | 396 |
402 net::TestURLFetcher* PrepareOAuthFetcher(const GURL& expected_url) { | 397 net::TestURLFetcher* PrepareOAuthFetcher(const GURL& expected_url) { |
403 net::TestURLFetcher* fetcher = test_url_fetcher_factory_.GetFetcherByID(0); | 398 net::TestURLFetcher* fetcher = test_url_fetcher_factory_.GetFetcherByID(0); |
404 EXPECT_TRUE(fetcher); | 399 EXPECT_TRUE(fetcher); |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 } | 668 } |
674 | 669 |
675 INSTANTIATE_TEST_CASE_P( | 670 INSTANTIATE_TEST_CASE_P( |
676 LoginUtilsBlockingLoginTestInstance, | 671 LoginUtilsBlockingLoginTestInstance, |
677 LoginUtilsBlockingLoginTest, | 672 LoginUtilsBlockingLoginTest, |
678 testing::Values(0, 1, 2, 3, 4, 5)); | 673 testing::Values(0, 1, 2, 3, 4, 5)); |
679 | 674 |
680 } // namespace | 675 } // namespace |
681 | 676 |
682 } // namespace chromeos | 677 } // namespace chromeos |
OLD | NEW |