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" |
11 #include "base/prefs/pref_service_builder.h" | 11 #include "base/prefs/pref_service_factory.h" |
12 #include "base/prefs/testing_pref_store.h" | 12 #include "base/prefs/testing_pref_store.h" |
13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
15 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
16 #include "chrome/browser/browser_shutdown.h" | 16 #include "chrome/browser/browser_shutdown.h" |
17 #include "chrome/browser/chrome_notification_types.h" | 17 #include "chrome/browser/chrome_notification_types.h" |
18 #include "chrome/browser/chromeos/base/locale_util.h" | 18 #include "chrome/browser/chromeos/base/locale_util.h" |
19 #include "chrome/browser/chromeos/login/enrollment/enrollment_screen.h" | 19 #include "chrome/browser/chromeos/login/enrollment/enrollment_screen.h" |
20 #include "chrome/browser/chromeos/login/enrollment/mock_enrollment_screen.h" | 20 #include "chrome/browser/chromeos/login/enrollment/mock_enrollment_screen.h" |
21 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 21 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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::InitializeForTesting(fake_dbus_thread_manager); |
458 } | 458 } |
459 | 459 |
460 virtual void SetUpOnMainThread() OVERRIDE { | 460 virtual void SetUpOnMainThread() OVERRIDE { |
461 PrefServiceBuilder builder; | 461 base::PrefServiceFactory factory; |
462 local_state_.reset(builder | 462 factory.set_user_prefs(make_scoped_refptr(new PrefStoreStub())); |
463 .WithUserPrefs(new PrefStoreStub()) | 463 local_state_ = factory.Create(new PrefRegistrySimple()).Pass(); |
464 .Create(new PrefRegistrySimple())); | |
465 WizardController::set_local_state_for_testing(local_state_.get()); | 464 WizardController::set_local_state_for_testing(local_state_.get()); |
466 | 465 |
467 WizardControllerTest::SetUpOnMainThread(); | 466 WizardControllerTest::SetUpOnMainThread(); |
468 | 467 |
469 // Make sure that OOBE is run as an "official" build. | 468 // Make sure that OOBE is run as an "official" build. |
470 WizardController::default_controller()->is_official_build_ = true; | 469 WizardController::default_controller()->is_official_build_ = true; |
471 } | 470 } |
472 | 471 |
473 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE { | 472 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE { |
474 WizardControllerTest::TearDownInProcessBrowserTestFixture(); | 473 WizardControllerTest::TearDownInProcessBrowserTestFixture(); |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 } | 706 } |
708 | 707 |
709 // TODO(dzhioev): Add test emaulating device with wrong HWID. | 708 // TODO(dzhioev): Add test emaulating device with wrong HWID. |
710 | 709 |
711 // TODO(nkostylev): Add test for WebUI accelerators http://crosbug.com/22571 | 710 // TODO(nkostylev): Add test for WebUI accelerators http://crosbug.com/22571 |
712 | 711 |
713 COMPILE_ASSERT(ScreenObserver::EXIT_CODES_COUNT == 19, | 712 COMPILE_ASSERT(ScreenObserver::EXIT_CODES_COUNT == 19, |
714 add_tests_for_new_control_flow_you_just_introduced); | 713 add_tests_for_new_control_flow_you_just_introduced); |
715 | 714 |
716 } // namespace chromeos | 715 } // namespace chromeos |
OLD | NEW |