| 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/prefs/pref_registry_simple.h" | 9 #include "base/prefs/pref_registry_simple.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 | 447 |
| 448 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 448 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
| 449 WizardControllerTest::SetUpInProcessBrowserTestFixture(); | 449 WizardControllerTest::SetUpInProcessBrowserTestFixture(); |
| 450 | 450 |
| 451 FakeDBusThreadManager* fake_dbus_thread_manager = | 451 FakeDBusThreadManager* fake_dbus_thread_manager = |
| 452 new FakeDBusThreadManager(); | 452 new FakeDBusThreadManager(); |
| 453 fake_dbus_thread_manager->SetFakeClients(); | 453 fake_dbus_thread_manager->SetFakeClients(); |
| 454 fake_session_manager_client_ = new FakeSessionManagerClient; | 454 fake_session_manager_client_ = new FakeSessionManagerClient; |
| 455 fake_dbus_thread_manager->SetSessionManagerClient( | 455 fake_dbus_thread_manager->SetSessionManagerClient( |
| 456 scoped_ptr<SessionManagerClient>(fake_session_manager_client_)); | 456 scoped_ptr<SessionManagerClient>(fake_session_manager_client_)); |
| 457 DBusThreadManager::InitializeForTesting(fake_dbus_thread_manager); | 457 DBusThreadManager::SetInstanceForTesting(fake_dbus_thread_manager); |
| 458 } | 458 } |
| 459 | 459 |
| 460 virtual void SetUpOnMainThread() OVERRIDE { | 460 virtual void SetUpOnMainThread() OVERRIDE { |
| 461 base::PrefServiceFactory factory; | 461 base::PrefServiceFactory factory; |
| 462 factory.set_user_prefs(make_scoped_refptr(new PrefStoreStub())); | 462 factory.set_user_prefs(make_scoped_refptr(new PrefStoreStub())); |
| 463 local_state_ = factory.Create(new PrefRegistrySimple()).Pass(); | 463 local_state_ = factory.Create(new PrefRegistrySimple()).Pass(); |
| 464 WizardController::set_local_state_for_testing(local_state_.get()); | 464 WizardController::set_local_state_for_testing(local_state_.get()); |
| 465 | 465 |
| 466 WizardControllerTest::SetUpOnMainThread(); | 466 WizardControllerTest::SetUpOnMainThread(); |
| 467 | 467 |
| 468 // Make sure that OOBE is run as an "official" build. | 468 // Make sure that OOBE is run as an "official" build. |
| 469 WizardController::default_controller()->is_official_build_ = true; | 469 WizardController::default_controller()->is_official_build_ = true; |
| 470 } | 470 } |
| 471 | 471 |
| 472 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE { | 472 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE { |
| 473 WizardControllerTest::TearDownInProcessBrowserTestFixture(); | 473 WizardControllerTest::TearDownInProcessBrowserTestFixture(); |
| 474 DBusThreadManager::Shutdown(); | |
| 475 } | 474 } |
| 476 | 475 |
| 477 ErrorScreen* GetErrorScreen() { | 476 ErrorScreen* GetErrorScreen() { |
| 478 return ((ScreenObserver*) WizardController::default_controller())-> | 477 return ((ScreenObserver*) WizardController::default_controller())-> |
| 479 GetErrorScreen(); | 478 GetErrorScreen(); |
| 480 } | 479 } |
| 481 | 480 |
| 482 content::WebContents* GetWebContents() { | 481 content::WebContents* GetWebContents() { |
| 483 LoginDisplayHostImpl* host = static_cast<LoginDisplayHostImpl*>( | 482 LoginDisplayHostImpl* host = static_cast<LoginDisplayHostImpl*>( |
| 484 LoginDisplayHostImpl::default_host()); | 483 LoginDisplayHostImpl::default_host()); |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 706 } | 705 } |
| 707 | 706 |
| 708 // TODO(dzhioev): Add test emaulating device with wrong HWID. | 707 // TODO(dzhioev): Add test emaulating device with wrong HWID. |
| 709 | 708 |
| 710 // TODO(nkostylev): Add test for WebUI accelerators http://crosbug.com/22571 | 709 // TODO(nkostylev): Add test for WebUI accelerators http://crosbug.com/22571 |
| 711 | 710 |
| 712 COMPILE_ASSERT(ScreenObserver::EXIT_CODES_COUNT == 19, | 711 COMPILE_ASSERT(ScreenObserver::EXIT_CODES_COUNT == 19, |
| 713 add_tests_for_new_control_flow_you_just_introduced); | 712 add_tests_for_new_control_flow_you_just_introduced); |
| 714 | 713 |
| 715 } // namespace chromeos | 714 } // namespace chromeos |
| OLD | NEW |