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

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

Issue 11741003: Remove PrefServiceSimple, replacing it with PrefService and PrefRegistrySimple. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix double registration in Chrome Frame test. Created 7 years, 10 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 10 matching lines...) Expand all
21 #include "chrome/browser/chromeos/login/authenticator.h" 21 #include "chrome/browser/chromeos/login/authenticator.h"
22 #include "chrome/browser/chromeos/login/login_status_consumer.h" 22 #include "chrome/browser/chromeos/login/login_status_consumer.h"
23 #include "chrome/browser/chromeos/login/user_manager.h" 23 #include "chrome/browser/chromeos/login/user_manager.h"
24 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" 24 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h"
25 #include "chrome/browser/io_thread.h" 25 #include "chrome/browser/io_thread.h"
26 #include "chrome/browser/net/predictor.h" 26 #include "chrome/browser/net/predictor.h"
27 #include "chrome/browser/policy/browser_policy_connector.h" 27 #include "chrome/browser/policy/browser_policy_connector.h"
28 #include "chrome/browser/policy/enterprise_install_attributes.h" 28 #include "chrome/browser/policy/enterprise_install_attributes.h"
29 #include "chrome/browser/policy/policy_service.h" 29 #include "chrome/browser/policy/policy_service.h"
30 #include "chrome/browser/policy/proto/device_management_backend.pb.h" 30 #include "chrome/browser/policy/proto/device_management_backend.pb.h"
31 #include "chrome/browser/prefs/pref_registry_simple.h"
31 #include "chrome/browser/profiles/profile_manager.h" 32 #include "chrome/browser/profiles/profile_manager.h"
32 #include "chrome/browser/rlz/rlz.h" 33 #include "chrome/browser/rlz/rlz.h"
33 #include "chrome/common/chrome_notification_types.h" 34 #include "chrome/common/chrome_notification_types.h"
34 #include "chrome/common/chrome_paths.h" 35 #include "chrome/common/chrome_paths.h"
35 #include "chrome/common/chrome_switches.h" 36 #include "chrome/common/chrome_switches.h"
36 #include "chrome/common/pref_names.h" 37 #include "chrome/common/pref_names.h"
37 #include "chrome/test/base/testing_browser_process.h" 38 #include "chrome/test/base/testing_browser_process.h"
38 #include "chrome/test/base/testing_pref_service.h" 39 #include "chrome/test/base/testing_pref_service.h"
39 #include "chromeos/cryptohome/mock_async_method_caller.h" 40 #include "chromeos/cryptohome/mock_async_method_caller.h"
40 #include "chromeos/dbus/mock_cryptohome_client.h" 41 #include "chromeos/dbus/mock_cryptohome_client.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 181
181 ASSERT_TRUE(scoped_temp_dir_.CreateUniqueTempDir()); 182 ASSERT_TRUE(scoped_temp_dir_.CreateUniqueTempDir());
182 183
183 CommandLine* command_line = CommandLine::ForCurrentProcess(); 184 CommandLine* command_line = CommandLine::ForCurrentProcess();
184 command_line->AppendSwitchASCII(switches::kDeviceManagementUrl, kDMServer); 185 command_line->AppendSwitchASCII(switches::kDeviceManagementUrl, kDMServer);
185 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); 186 command_line->AppendSwitchASCII(switches::kLoginProfile, "user");
186 // TODO(mnissler): Figure out how to beat this test into submission on 187 // TODO(mnissler): Figure out how to beat this test into submission on
187 // OAuth2 path. 188 // OAuth2 path.
188 command_line->AppendSwitch(switches::kForceOAuth1); 189 command_line->AppendSwitch(switches::kForceOAuth1);
189 190
190 local_state_.Get()->RegisterStringPref(prefs::kApplicationLocale, "");
191
192 // DBusThreadManager should be initialized before io_thread_state_, as 191 // DBusThreadManager should be initialized before io_thread_state_, as
193 // DBusThreadManager is used from chromeos::ProxyConfigServiceImpl, 192 // DBusThreadManager is used from chromeos::ProxyConfigServiceImpl,
194 // which is part of io_thread_state_. 193 // which is part of io_thread_state_.
195 DBusThreadManager::InitializeForTesting(&mock_dbus_thread_manager_); 194 DBusThreadManager::InitializeForTesting(&mock_dbus_thread_manager_);
196 195
197 input_method::InitializeForTesting(&mock_input_method_manager_); 196 input_method::InitializeForTesting(&mock_input_method_manager_);
198 disks::DiskMountManager::InitializeForTesting(&mock_disk_mount_manager_); 197 disks::DiskMountManager::InitializeForTesting(&mock_disk_mount_manager_);
199 mock_disk_mount_manager_.SetupDefaultReplies(); 198 mock_disk_mount_manager_.SetupDefaultReplies();
200 199
201 // Likewise, SessionManagerClient should also be initialized before 200 // Likewise, SessionManagerClient should also be initialized before
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 } 666 }
668 667
669 INSTANTIATE_TEST_CASE_P( 668 INSTANTIATE_TEST_CASE_P(
670 LoginUtilsBlockingLoginTestInstance, 669 LoginUtilsBlockingLoginTestInstance,
671 LoginUtilsBlockingLoginTest, 670 LoginUtilsBlockingLoginTest,
672 testing::Values(0, 1, 2, 3, 4, 5)); 671 testing::Values(0, 1, 2, 3, 4, 5));
673 672
674 } // namespace 673 } // namespace
675 674
676 } 675 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/language_preferences.cc ('k') | chrome/browser/chromeos/login/user_image_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698