Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: chrome/browser/chromeos/login/login_utils_browsertest.cc

Issue 328383003: Revert of Introduce SessionManager that will contain code to start user session on Chrome OS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 // If there was no work then quit the fake IO loop. 351 // If there was no work then quit the fake IO loop.
352 return has_work; 352 return has_work;
353 } 353 }
354 354
355 virtual void OnProfilePrepared(Profile* profile) OVERRIDE { 355 virtual void OnProfilePrepared(Profile* profile) OVERRIDE {
356 EXPECT_FALSE(prepared_profile_); 356 EXPECT_FALSE(prepared_profile_);
357 prepared_profile_ = profile; 357 prepared_profile_ = profile;
358 } 358 }
359 359
360 #if defined(ENABLE_RLZ) 360 #if defined(ENABLE_RLZ)
361 virtual void OnRlzInitialized() OVERRIDE { 361 virtual void OnRlzInitialized(Profile* profile) OVERRIDE {
362 rlz_initialized_cb_.Run(); 362 rlz_initialized_cb_.Run();
363 } 363 }
364 #endif 364 #endif
365 365
366 virtual void OnLoginFailure(const LoginFailure& error) OVERRIDE { 366 virtual void OnLoginFailure(const LoginFailure& error) OVERRIDE {
367 FAIL() << "OnLoginFailure not expected"; 367 FAIL() << "OnLoginFailure not expected";
368 } 368 }
369 369
370 virtual void OnLoginSuccess(const UserContext& user_context) OVERRIDE { 370 virtual void OnLoginSuccess(const UserContext& user_context) OVERRIDE {
371 FAIL() << "OnLoginSuccess not expected"; 371 FAIL() << "OnLoginSuccess not expected";
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 user_context.SetUserIDHash(username); 404 user_context.SetUserIDHash(username);
405 authenticator->CompleteLogin(ProfileHelper::GetSigninProfile(), 405 authenticator->CompleteLogin(ProfileHelper::GetSigninProfile(),
406 user_context); 406 user_context);
407 407
408 // Setting |kHasCookies| to false prevents ProfileAuthData::Transfer from 408 // Setting |kHasCookies| to false prevents ProfileAuthData::Transfer from
409 // waiting for an IO task before proceeding. 409 // waiting for an IO task before proceeding.
410 const bool kHasCookies = false; 410 const bool kHasCookies = false;
411 const bool kHasActiveSession = false; 411 const bool kHasActiveSession = false;
412 user_context.SetAuthFlow(UserContext::AUTH_FLOW_GAIA_WITHOUT_SAML); 412 user_context.SetAuthFlow(UserContext::AUTH_FLOW_GAIA_WITHOUT_SAML);
413 LoginUtils::Get()->PrepareProfile(user_context, 413 LoginUtils::Get()->PrepareProfile(user_context,
414 std::string(),
414 kHasCookies, 415 kHasCookies,
415 kHasActiveSession, 416 kHasActiveSession,
416 this); 417 this);
417 device_settings_test_helper.Flush(); 418 device_settings_test_helper.Flush();
418 RunUntilIdle(); 419 RunUntilIdle();
419 420
420 DeviceSettingsService::Get()->UnsetSessionManager(); 421 DeviceSettingsService::Get()->UnsetSessionManager();
421 } 422 }
422 423
423 net::TestURLFetcher* PrepareOAuthFetcher(const GURL& expected_url) { 424 net::TestURLFetcher* PrepareOAuthFetcher(const GURL& expected_url) {
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 } 698 }
698 699
699 INSTANTIATE_TEST_CASE_P( 700 INSTANTIATE_TEST_CASE_P(
700 LoginUtilsBlockingLoginTestInstance, 701 LoginUtilsBlockingLoginTestInstance,
701 LoginUtilsBlockingLoginTest, 702 LoginUtilsBlockingLoginTest,
702 testing::Values(0, 1, 2, 3, 4, 5)); 703 testing::Values(0, 1, 2, 3, 4, 5));
703 704
704 } // namespace 705 } // namespace
705 706
706 } // namespace chromeos 707 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/login_utils.cc ('k') | chrome/browser/chromeos/login/mock_login_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698