| 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 FakeDBusThreadManager* fake_dbus_thread_manager = | 411 FakeDBusThreadManager* fake_dbus_thread_manager = |
| 412 new FakeDBusThreadManager(); | 412 new FakeDBusThreadManager(); |
| 413 fake_dbus_thread_manager->SetFakeClients(); | 413 fake_dbus_thread_manager->SetFakeClients(); |
| 414 fake_session_manager_client_ = new FakeSessionManagerClient; | 414 fake_session_manager_client_ = new FakeSessionManagerClient; |
| 415 fake_dbus_thread_manager->SetSessionManagerClient( | 415 fake_dbus_thread_manager->SetSessionManagerClient( |
| 416 scoped_ptr<SessionManagerClient>(fake_session_manager_client_)); | 416 scoped_ptr<SessionManagerClient>(fake_session_manager_client_)); |
| 417 DBusThreadManager::InitializeForTesting(fake_dbus_thread_manager); | 417 DBusThreadManager::InitializeForTesting(fake_dbus_thread_manager); |
| 418 } | 418 } |
| 419 | 419 |
| 420 virtual void SetUpOnMainThread() OVERRIDE { | 420 virtual void SetUpOnMainThread() OVERRIDE { |
| 421 PrefServiceBuilder builder; | 421 base::PrefServiceBuilder builder; |
| 422 local_state_.reset(builder | 422 builder.set_user_prefs(make_scoped_refptr(new PrefStoreStub())); |
| 423 .WithUserPrefs(new PrefStoreStub()) | 423 local_state_ = builder.Create(new PrefRegistrySimple()).Pass(); |
| 424 .Create(new PrefRegistrySimple())); | |
| 425 WizardController::set_local_state_for_testing(local_state_.get()); | 424 WizardController::set_local_state_for_testing(local_state_.get()); |
| 426 | 425 |
| 427 WizardControllerTest::SetUpOnMainThread(); | 426 WizardControllerTest::SetUpOnMainThread(); |
| 428 | 427 |
| 429 // Make sure that OOBE is run as an "official" build. | 428 // Make sure that OOBE is run as an "official" build. |
| 430 WizardController::default_controller()->is_official_build_ = true; | 429 WizardController::default_controller()->is_official_build_ = true; |
| 431 } | 430 } |
| 432 | 431 |
| 433 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE { | 432 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE { |
| 434 WizardControllerTest::TearDownInProcessBrowserTestFixture(); | 433 WizardControllerTest::TearDownInProcessBrowserTestFixture(); |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 } | 666 } |
| 668 | 667 |
| 669 // TODO(dzhioev): Add test emaulating device with wrong HWID. | 668 // TODO(dzhioev): Add test emaulating device with wrong HWID. |
| 670 | 669 |
| 671 // TODO(nkostylev): Add test for WebUI accelerators http://crosbug.com/22571 | 670 // TODO(nkostylev): Add test for WebUI accelerators http://crosbug.com/22571 |
| 672 | 671 |
| 673 COMPILE_ASSERT(ScreenObserver::EXIT_CODES_COUNT == 19, | 672 COMPILE_ASSERT(ScreenObserver::EXIT_CODES_COUNT == 19, |
| 674 add_tests_for_new_control_flow_you_just_introduced); | 673 add_tests_for_new_control_flow_you_just_introduced); |
| 675 | 674 |
| 676 } // namespace chromeos | 675 } // namespace chromeos |
| OLD | NEW |