| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | |
| 11 #include "testing/gmock/include/gmock/gmock.h" | |
| 12 | |
| 13 namespace dbus { | |
| 14 | |
| 15 class Bus; | |
| 16 | |
| 17 } // namespace dbus | |
| 18 | |
| 19 namespace chromeos { | |
| 20 | |
| 21 class MockBluetoothAdapterClient; | |
| 22 class MockBluetoothDeviceClient; | |
| 23 class MockBluetoothInputClient; | |
| 24 class MockBluetoothManagerClient; | |
| 25 class MockBluetoothNodeClient; | |
| 26 class MockCashewClient; | |
| 27 class MockCrosDisksClient; | |
| 28 class MockCryptohomeClient; | |
| 29 class MockDebugDaemonClient; | |
| 30 class MockFlimflamIPConfigClient; | |
| 31 class MockFlimflamNetworkClient; | |
| 32 class MockFlimflamProfileClient; | |
| 33 class MockImageBurnerClient; | |
| 34 class MockIntrospectableClient; | |
| 35 class MockPowerManagerClient; | |
| 36 class MockSessionManagerClient; | |
| 37 class MockSpeechSynthesizerClient; | |
| 38 class MockUpdateEngineClient; | |
| 39 | |
| 40 // This class provides a mock DBusThreadManager with mock clients | |
| 41 // installed. You can customize the behaviors of mock clients with | |
| 42 // mock_foo_client() functions. | |
| 43 class MockDBusThreadManager : public DBusThreadManager { | |
| 44 public: | |
| 45 MockDBusThreadManager(); | |
| 46 virtual ~MockDBusThreadManager(); | |
| 47 | |
| 48 MOCK_METHOD0(GetSystemBus, dbus::Bus*(void)); | |
| 49 MOCK_METHOD0(GetBluetoothAdapterClient, BluetoothAdapterClient*(void)); | |
| 50 MOCK_METHOD0(GetBluetoothDeviceClient, BluetoothDeviceClient*(void)); | |
| 51 MOCK_METHOD0(GetBluetoothInputClient, BluetoothInputClient*(void)); | |
| 52 MOCK_METHOD0(GetBluetoothManagerClient, BluetoothManagerClient*(void)); | |
| 53 MOCK_METHOD0(GetBluetoothNodeClient, BluetoothNodeClient*(void)); | |
| 54 MOCK_METHOD0(GetCashewClient, CashewClient*(void)); | |
| 55 MOCK_METHOD0(GetCrosDisksClient, CrosDisksClient*(void)); | |
| 56 MOCK_METHOD0(GetCryptohomeClient, CryptohomeClient*(void)); | |
| 57 MOCK_METHOD0(GetDebugDaemonClient, DebugDaemonClient*(void)); | |
| 58 MOCK_METHOD0(GetFlimflamIPConfigClient, FlimflamIPConfigClient*(void)); | |
| 59 MOCK_METHOD0(GetFlimflamNetworkClient, FlimflamNetworkClient*(void)); | |
| 60 MOCK_METHOD0(GetFlimflamProfileClient, FlimflamProfileClient*(void)); | |
| 61 MOCK_METHOD0(GetImageBurnerClient, ImageBurnerClient*(void)); | |
| 62 MOCK_METHOD0(GetIntrospectableClient, IntrospectableClient*(void)); | |
| 63 MOCK_METHOD0(GetPowerManagerClient, PowerManagerClient*(void)); | |
| 64 MOCK_METHOD0(GetSessionManagerClient, SessionManagerClient*(void)); | |
| 65 MOCK_METHOD0(GetSpeechSynthesizerClient, SpeechSynthesizerClient*(void)); | |
| 66 MOCK_METHOD0(GetUpdateEngineClient, UpdateEngineClient*(void)); | |
| 67 | |
| 68 MockBluetoothAdapterClient* mock_bluetooth_adapter_client() { | |
| 69 return mock_bluetooth_adapter_client_.get(); | |
| 70 } | |
| 71 MockBluetoothDeviceClient* mock_bluetooth_device_client() { | |
| 72 return mock_bluetooth_device_client_.get(); | |
| 73 } | |
| 74 MockBluetoothInputClient* mock_bluetooth_input_client() { | |
| 75 return mock_bluetooth_input_client_.get(); | |
| 76 } | |
| 77 MockBluetoothManagerClient* mock_bluetooth_manager_client() { | |
| 78 return mock_bluetooth_manager_client_.get(); | |
| 79 } | |
| 80 MockBluetoothNodeClient* mock_bluetooth_node_client() { | |
| 81 return mock_bluetooth_node_client_.get(); | |
| 82 } | |
| 83 MockCashewClient* mock_cashew_client() { | |
| 84 return mock_cashew_client_.get(); | |
| 85 } | |
| 86 MockCrosDisksClient* mock_cros_disks_client() { | |
| 87 return mock_cros_disks_client_.get(); | |
| 88 } | |
| 89 MockCryptohomeClient* mock_cryptohome_client() { | |
| 90 return mock_cryptohome_client_.get(); | |
| 91 } | |
| 92 MockDebugDaemonClient* mock_debugdaemon_client() { | |
| 93 return mock_debugdaemon_client_.get(); | |
| 94 } | |
| 95 MockFlimflamIPConfigClient* mock_flimflam_ipconfig_client() { | |
| 96 return mock_flimflam_ipconfig_client_.get(); | |
| 97 } | |
| 98 MockFlimflamNetworkClient* mock_flimflam_network_client() { | |
| 99 return mock_flimflam_network_client_.get(); | |
| 100 } | |
| 101 MockFlimflamProfileClient* mock_flimflam_profile_client() { | |
| 102 return mock_flimflam_profile_client_.get(); | |
| 103 } | |
| 104 MockImageBurnerClient* mock_image_burner_client() { | |
| 105 return mock_image_burner_client_.get(); | |
| 106 } | |
| 107 MockIntrospectableClient* mock_introspectable_client() { | |
| 108 return mock_introspectable_client_.get(); | |
| 109 } | |
| 110 MockPowerManagerClient* mock_power_manager_client() { | |
| 111 return mock_power_manager_client_.get(); | |
| 112 } | |
| 113 MockSessionManagerClient* mock_session_manager_client() { | |
| 114 return mock_session_manager_client_.get(); | |
| 115 } | |
| 116 MockSpeechSynthesizerClient* mock_speech_synthesizer_client() { | |
| 117 return mock_speech_synthesizer_client_.get(); | |
| 118 } | |
| 119 MockUpdateEngineClient* mock_update_engine_client() { | |
| 120 return mock_update_engine_client_.get(); | |
| 121 } | |
| 122 | |
| 123 private: | |
| 124 scoped_ptr<MockBluetoothAdapterClient> mock_bluetooth_adapter_client_; | |
| 125 scoped_ptr<MockBluetoothDeviceClient> mock_bluetooth_device_client_; | |
| 126 scoped_ptr<MockBluetoothInputClient> mock_bluetooth_input_client_; | |
| 127 scoped_ptr<MockBluetoothManagerClient> mock_bluetooth_manager_client_; | |
| 128 scoped_ptr<MockBluetoothNodeClient> mock_bluetooth_node_client_; | |
| 129 scoped_ptr<MockCashewClient> mock_cashew_client_; | |
| 130 scoped_ptr<MockCrosDisksClient> mock_cros_disks_client_; | |
| 131 scoped_ptr<MockCryptohomeClient> mock_cryptohome_client_; | |
| 132 scoped_ptr<MockDebugDaemonClient> mock_debugdaemon_client_; | |
| 133 scoped_ptr<MockFlimflamIPConfigClient> mock_flimflam_ipconfig_client_; | |
| 134 scoped_ptr<MockFlimflamNetworkClient> mock_flimflam_network_client_; | |
| 135 scoped_ptr<MockFlimflamProfileClient> mock_flimflam_profile_client_; | |
| 136 scoped_ptr<MockImageBurnerClient> mock_image_burner_client_; | |
| 137 scoped_ptr<MockIntrospectableClient> mock_introspectable_client_; | |
| 138 scoped_ptr<MockPowerManagerClient> mock_power_manager_client_; | |
| 139 scoped_ptr<MockSessionManagerClient> mock_session_manager_client_; | |
| 140 scoped_ptr<MockSpeechSynthesizerClient> mock_speech_synthesizer_client_; | |
| 141 scoped_ptr<MockUpdateEngineClient> mock_update_engine_client_; | |
| 142 | |
| 143 DISALLOW_COPY_AND_ASSIGN(MockDBusThreadManager); | |
| 144 }; | |
| 145 | |
| 146 } // namespace chromeos | |
| 147 | |
| 148 #endif // CHROME_BROWSER_CHROMEOS_DBUS_MOCK_DBUS_THREAD_MANAGER_H_ | |
| OLD | NEW |