| 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/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // however, at one point in the test, temporarily set the message | 103 // however, at one point in the test, temporarily set the message |
| 104 // loop for the IO thread. | 104 // loop for the IO thread. |
| 105 LoginUtilsTest() | 105 LoginUtilsTest() |
| 106 : loop_(MessageLoop::TYPE_IO), | 106 : loop_(MessageLoop::TYPE_IO), |
| 107 browser_process_( | 107 browser_process_( |
| 108 static_cast<TestingBrowserProcess*>(g_browser_process)), | 108 static_cast<TestingBrowserProcess*>(g_browser_process)), |
| 109 local_state_(browser_process_), | 109 local_state_(browser_process_), |
| 110 ui_thread_(content::BrowserThread::UI, &loop_), | 110 ui_thread_(content::BrowserThread::UI, &loop_), |
| 111 file_thread_(content::BrowserThread::FILE, &loop_), | 111 file_thread_(content::BrowserThread::FILE, &loop_), |
| 112 io_thread_(content::BrowserThread::IO), | 112 io_thread_(content::BrowserThread::IO), |
| 113 db_thread_(content::BrowserThread::DB), |
| 113 mock_async_method_caller_(NULL), | 114 mock_async_method_caller_(NULL), |
| 114 connector_(NULL), | 115 connector_(NULL), |
| 115 cryptohome_(NULL), | 116 cryptohome_(NULL), |
| 116 prepared_profile_(NULL) {} | 117 prepared_profile_(NULL) {} |
| 117 | 118 |
| 118 virtual void SetUp() OVERRIDE { | 119 virtual void SetUp() OVERRIDE { |
| 119 ASSERT_TRUE(scoped_temp_dir_.CreateUniqueTempDir()); | 120 ASSERT_TRUE(scoped_temp_dir_.CreateUniqueTempDir()); |
| 120 | 121 |
| 121 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 122 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 122 command_line->AppendSwitch(switches::kEnableDevicePolicy); | 123 command_line->AppendSwitch(switches::kEnableDevicePolicy); |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 protected: | 364 protected: |
| 364 ScopedStubCrosEnabler stub_cros_enabler_; | 365 ScopedStubCrosEnabler stub_cros_enabler_; |
| 365 | 366 |
| 366 MessageLoop loop_; | 367 MessageLoop loop_; |
| 367 TestingBrowserProcess* browser_process_; | 368 TestingBrowserProcess* browser_process_; |
| 368 ScopedTestingLocalState local_state_; | 369 ScopedTestingLocalState local_state_; |
| 369 | 370 |
| 370 content::TestBrowserThread ui_thread_; | 371 content::TestBrowserThread ui_thread_; |
| 371 content::TestBrowserThread file_thread_; | 372 content::TestBrowserThread file_thread_; |
| 372 content::TestBrowserThread io_thread_; | 373 content::TestBrowserThread io_thread_; |
| 374 content::TestBrowserThread db_thread_; |
| 373 scoped_ptr<IOThread> io_thread_state_; | 375 scoped_ptr<IOThread> io_thread_state_; |
| 374 | 376 |
| 375 MockDBusThreadManager mock_dbus_thread_manager_; | 377 MockDBusThreadManager mock_dbus_thread_manager_; |
| 376 input_method::MockInputMethodManager mock_input_method_manager_; | 378 input_method::MockInputMethodManager mock_input_method_manager_; |
| 377 TestURLFetcherFactory test_url_fetcher_factory_; | 379 TestURLFetcherFactory test_url_fetcher_factory_; |
| 378 | 380 |
| 379 cryptohome::MockAsyncMethodCaller* mock_async_method_caller_; | 381 cryptohome::MockAsyncMethodCaller* mock_async_method_caller_; |
| 380 | 382 |
| 381 policy::BrowserPolicyConnector* connector_; | 383 policy::BrowserPolicyConnector* connector_; |
| 382 MockCryptohomeLibrary* cryptohome_; | 384 MockCryptohomeLibrary* cryptohome_; |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 } | 527 } |
| 526 | 528 |
| 527 INSTANTIATE_TEST_CASE_P( | 529 INSTANTIATE_TEST_CASE_P( |
| 528 LoginUtilsBlockingLoginTestInstance, | 530 LoginUtilsBlockingLoginTestInstance, |
| 529 LoginUtilsBlockingLoginTest, | 531 LoginUtilsBlockingLoginTest, |
| 530 testing::Values(0, 1, 2, 3, 4, 5)); | 532 testing::Values(0, 1, 2, 3, 4, 5)); |
| 531 | 533 |
| 532 } // namespace | 534 } // namespace |
| 533 | 535 |
| 534 } | 536 } |
| OLD | NEW |