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

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

Issue 15695010: Add ProfileManager::AllowGetDefaultProfile() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix browsertest Created 7 years, 7 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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 loop.Run(); 403 loop.Run();
404 EXPECT_EQ(policy::EnterpriseInstallAttributes::LOCK_SUCCESS, result); 404 EXPECT_EQ(policy::EnterpriseInstallAttributes::LOCK_SUCCESS, result);
405 RunUntilIdle(); 405 RunUntilIdle();
406 } 406 }
407 407
408 void PrepareProfile(const std::string& username) { 408 void PrepareProfile(const std::string& username) {
409 // Normally this would happen during browser startup, but for tests 409 // Normally this would happen during browser startup, but for tests
410 // we need to trigger creation of Profile-related services. 410 // we need to trigger creation of Profile-related services.
411 ChromeBrowserMainExtraPartsProfiles:: 411 ChromeBrowserMainExtraPartsProfiles::
412 EnsureBrowserContextKeyedServiceFactoriesBuilt(); 412 EnsureBrowserContextKeyedServiceFactoriesBuilt();
413 ProfileManager::AllowGetDefaultProfile();
413 414
414 DeviceSettingsTestHelper device_settings_test_helper; 415 DeviceSettingsTestHelper device_settings_test_helper;
415 DeviceSettingsService::Get()->SetSessionManager( 416 DeviceSettingsService::Get()->SetSessionManager(
416 &device_settings_test_helper, new MockOwnerKeyUtil()); 417 &device_settings_test_helper, new MockOwnerKeyUtil());
417 418
418 EXPECT_CALL(*cryptohome_, GetSystemSalt()) 419 EXPECT_CALL(*cryptohome_, GetSystemSalt())
419 .WillRepeatedly(Return(std::string("stub_system_salt"))); 420 .WillRepeatedly(Return(std::string("stub_system_salt")));
420 EXPECT_CALL(*mock_async_method_caller_, AsyncMount(_, _, _, _)) 421 EXPECT_CALL(*mock_async_method_caller_, AsyncMount(_, _, _, _))
421 .WillRepeatedly(Return()); 422 .WillRepeatedly(Return());
422 EXPECT_CALL(*mock_async_method_caller_, AsyncGetSanitizedUsername(_, _)) 423 EXPECT_CALL(*mock_async_method_caller_, AsyncGetSanitizedUsername(_, _))
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 } 718 }
718 719
719 INSTANTIATE_TEST_CASE_P( 720 INSTANTIATE_TEST_CASE_P(
720 LoginUtilsBlockingLoginTestInstance, 721 LoginUtilsBlockingLoginTestInstance,
721 LoginUtilsBlockingLoginTest, 722 LoginUtilsBlockingLoginTest,
722 testing::Values(0, 1, 2, 3, 4, 5)); 723 testing::Values(0, 1, 2, 3, 4, 5));
723 724
724 } // namespace 725 } // namespace
725 726
726 } 727 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/input_method/input_method_persistence_unittest.cc ('k') | chrome/browser/profiles/profile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698