Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: chrome/browser/chromeos/login/wizard_controller_browsertest.cc

Issue 477663004: Merged FakedDBusThreadManager with DBusThreadManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" 46 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
47 #include "chrome/common/chrome_paths.h" 47 #include "chrome/common/chrome_paths.h"
48 #include "chrome/common/chrome_switches.h" 48 #include "chrome/common/chrome_switches.h"
49 #include "chrome/common/pref_names.h" 49 #include "chrome/common/pref_names.h"
50 #include "chrome/grit/generated_resources.h" 50 #include "chrome/grit/generated_resources.h"
51 #include "chrome/test/base/ui_test_utils.h" 51 #include "chrome/test/base/ui_test_utils.h"
52 #include "chromeos/audio/cras_audio_handler.h" 52 #include "chromeos/audio/cras_audio_handler.h"
53 #include "chromeos/chromeos_switches.h" 53 #include "chromeos/chromeos_switches.h"
54 #include "chromeos/chromeos_test_utils.h" 54 #include "chromeos/chromeos_test_utils.h"
55 #include "chromeos/dbus/dbus_thread_manager.h" 55 #include "chromeos/dbus/dbus_thread_manager.h"
56 #include "chromeos/dbus/fake_dbus_thread_manager.h"
57 #include "chromeos/dbus/fake_session_manager_client.h" 56 #include "chromeos/dbus/fake_session_manager_client.h"
58 #include "chromeos/login/auth/key.h" 57 #include "chromeos/login/auth/key.h"
59 #include "chromeos/login/auth/mock_auth_status_consumer.h" 58 #include "chromeos/login/auth/mock_auth_status_consumer.h"
60 #include "chromeos/login/auth/mock_authenticator.h" 59 #include "chromeos/login/auth/mock_authenticator.h"
61 #include "chromeos/login/auth/user_context.h" 60 #include "chromeos/login/auth/user_context.h"
62 #include "chromeos/network/network_state.h" 61 #include "chromeos/network/network_state.h"
63 #include "chromeos/network/network_state_handler.h" 62 #include "chromeos/network/network_state_handler.h"
64 #include "chromeos/settings/timezone_settings.h" 63 #include "chromeos/settings/timezone_settings.h"
65 #include "content/public/test/browser_test_utils.h" 64 #include "content/public/test/browser_test_utils.h"
66 #include "content/public/test/test_utils.h" 65 #include "content/public/test/test_utils.h"
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 protected: 791 protected:
793 WizardControllerBrokenLocalStateTest() 792 WizardControllerBrokenLocalStateTest()
794 : fake_session_manager_client_(NULL) { 793 : fake_session_manager_client_(NULL) {
795 } 794 }
796 795
797 virtual ~WizardControllerBrokenLocalStateTest() {} 796 virtual ~WizardControllerBrokenLocalStateTest() {}
798 797
799 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { 798 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
800 WizardControllerTest::SetUpInProcessBrowserTestFixture(); 799 WizardControllerTest::SetUpInProcessBrowserTestFixture();
801 800
802 FakeDBusThreadManager* fake_dbus_thread_manager =
803 new FakeDBusThreadManager();
804 fake_dbus_thread_manager->SetFakeClients();
805 fake_session_manager_client_ = new FakeSessionManagerClient; 801 fake_session_manager_client_ = new FakeSessionManagerClient;
806 fake_dbus_thread_manager->SetSessionManagerClient( 802 DBusThreadManager::GetSetterForTesting()->SetSessionManagerClient(
807 scoped_ptr<SessionManagerClient>(fake_session_manager_client_)); 803 scoped_ptr<SessionManagerClient>(fake_session_manager_client_));
808 DBusThreadManager::SetInstanceForTesting(fake_dbus_thread_manager);
809 } 804 }
810 805
811 virtual void SetUpOnMainThread() OVERRIDE { 806 virtual void SetUpOnMainThread() OVERRIDE {
812 base::PrefServiceFactory factory; 807 base::PrefServiceFactory factory;
813 factory.set_user_prefs(make_scoped_refptr(new PrefStoreStub())); 808 factory.set_user_prefs(make_scoped_refptr(new PrefStoreStub()));
814 local_state_ = factory.Create(new PrefRegistrySimple()).Pass(); 809 local_state_ = factory.Create(new PrefRegistrySimple()).Pass();
815 WizardController::set_local_state_for_testing(local_state_.get()); 810 WizardController::set_local_state_for_testing(local_state_.get());
816 811
817 WizardControllerTest::SetUpOnMainThread(); 812 WizardControllerTest::SetUpOnMainThread();
818 813
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 // TODO(merkulova): Add tests for bluetooth HID detection screen variations when 1095 // TODO(merkulova): Add tests for bluetooth HID detection screen variations when
1101 // UI and logic is ready. http://crbug.com/127016 1096 // UI and logic is ready. http://crbug.com/127016
1102 1097
1103 // TODO(dzhioev): Add tests for controller/host pairing flow. 1098 // TODO(dzhioev): Add tests for controller/host pairing flow.
1104 // http://crbug.com/375191 1099 // http://crbug.com/375191
1105 1100
1106 COMPILE_ASSERT(ScreenObserver::EXIT_CODES_COUNT == 23, 1101 COMPILE_ASSERT(ScreenObserver::EXIT_CODES_COUNT == 23,
1107 add_tests_for_new_control_flow_you_just_introduced); 1102 add_tests_for_new_control_flow_you_just_introduced);
1108 1103
1109 } // namespace chromeos 1104 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698