| 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 19 matching lines...) Expand all Loading... |
| 30 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" | 30 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" |
| 31 #include "chrome/browser/chromeos/settings/mock_owner_key_util.h" | 31 #include "chrome/browser/chromeos/settings/mock_owner_key_util.h" |
| 32 #include "chrome/browser/io_thread.h" | 32 #include "chrome/browser/io_thread.h" |
| 33 #include "chrome/browser/net/predictor.h" | 33 #include "chrome/browser/net/predictor.h" |
| 34 #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h" | 34 #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h" |
| 35 #include "chrome/browser/profiles/profile_manager.h" | 35 #include "chrome/browser/profiles/profile_manager.h" |
| 36 #include "chrome/browser/rlz/rlz.h" | 36 #include "chrome/browser/rlz/rlz.h" |
| 37 #include "chrome/common/chrome_paths.h" | 37 #include "chrome/common/chrome_paths.h" |
| 38 #include "chrome/common/chrome_switches.h" | 38 #include "chrome/common/chrome_switches.h" |
| 39 #include "chrome/common/pref_names.h" | 39 #include "chrome/common/pref_names.h" |
| 40 #include "chrome/test/base/chrome_unit_test_suite.h" |
| 40 #include "chrome/test/base/scoped_testing_local_state.h" | 41 #include "chrome/test/base/scoped_testing_local_state.h" |
| 41 #include "chrome/test/base/testing_browser_process.h" | 42 #include "chrome/test/base/testing_browser_process.h" |
| 42 #include "chromeos/chromeos_switches.h" | 43 #include "chromeos/chromeos_switches.h" |
| 43 #include "chromeos/cryptohome/mock_async_method_caller.h" | 44 #include "chromeos/cryptohome/mock_async_method_caller.h" |
| 44 #include "chromeos/cryptohome/system_salt_getter.h" | 45 #include "chromeos/cryptohome/system_salt_getter.h" |
| 45 #include "chromeos/dbus/fake_dbus_thread_manager.h" | 46 #include "chromeos/dbus/fake_dbus_thread_manager.h" |
| 46 #include "chromeos/disks/disk_mount_manager.h" | 47 #include "chromeos/disks/disk_mount_manager.h" |
| 47 #include "chromeos/disks/mock_disk_mount_manager.h" | 48 #include "chromeos/disks/mock_disk_mount_manager.h" |
| 48 #include "chromeos/login/login_state.h" | 49 #include "chromeos/login/login_state.h" |
| 49 #include "chromeos/network/network_handler.h" | 50 #include "chromeos/network/network_handler.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 local_state_(browser_process_), | 155 local_state_(browser_process_), |
| 155 ui_thread_(BrowserThread::UI, &loop_), | 156 ui_thread_(BrowserThread::UI, &loop_), |
| 156 db_thread_(BrowserThread::DB, &loop_), | 157 db_thread_(BrowserThread::DB, &loop_), |
| 157 file_thread_(BrowserThread::FILE, &loop_), | 158 file_thread_(BrowserThread::FILE, &loop_), |
| 158 mock_input_method_manager_(NULL), | 159 mock_input_method_manager_(NULL), |
| 159 mock_async_method_caller_(NULL), | 160 mock_async_method_caller_(NULL), |
| 160 connector_(NULL), | 161 connector_(NULL), |
| 161 prepared_profile_(NULL) {} | 162 prepared_profile_(NULL) {} |
| 162 | 163 |
| 163 virtual void SetUp() OVERRIDE { | 164 virtual void SetUp() OVERRIDE { |
| 165 ChromeUnitTestSuite::InitializeProviders(); |
| 166 ChromeUnitTestSuite::InitializeResourceBundle(); |
| 164 // This test is not a full blown InProcessBrowserTest, and doesn't have | 167 // This test is not a full blown InProcessBrowserTest, and doesn't have |
| 165 // all the usual threads running. However a lot of subsystems pulled from | 168 // all the usual threads running. However a lot of subsystems pulled from |
| 166 // ProfileImpl post to IO (usually from ProfileIOData), and DCHECK that | 169 // ProfileImpl post to IO (usually from ProfileIOData), and DCHECK that |
| 167 // those tasks were posted. Those tasks in turn depend on a lot of other | 170 // those tasks were posted. Those tasks in turn depend on a lot of other |
| 168 // components that aren't there during this test, so this kludge is used to | 171 // components that aren't there during this test, so this kludge is used to |
| 169 // have a running IO loop that doesn't really execute any tasks. | 172 // have a running IO loop that doesn't really execute any tasks. |
| 170 // | 173 // |
| 171 // See InvokeOnIO() below for a way to perform specific tasks on IO, when | 174 // See InvokeOnIO() below for a way to perform specific tasks on IO, when |
| 172 // that's necessary. | 175 // that's necessary. |
| 173 | 176 |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 LoginUtilsBlockingLoginTest, | 708 LoginUtilsBlockingLoginTest, |
| 706 testing::Values(0, 1, 2, 3, 4, 5)); | 709 testing::Values(0, 1, 2, 3, 4, 5)); |
| 707 | 710 |
| 708 INSTANTIATE_TEST_CASE_P(LoginUtilsParamTestInstantiation, | 711 INSTANTIATE_TEST_CASE_P(LoginUtilsParamTestInstantiation, |
| 709 LoginUtilsParamTest, | 712 LoginUtilsParamTest, |
| 710 testing::Bool()); | 713 testing::Bool()); |
| 711 | 714 |
| 712 } // namespace | 715 } // namespace |
| 713 | 716 |
| 714 } // namespace chromeos | 717 } // namespace chromeos |
| OLD | NEW |