Index: chromeos/dbus/mock_dbus_thread_manager_without_gmock.cc |
diff --git a/chromeos/dbus/mock_dbus_thread_manager_without_gmock.cc b/chromeos/dbus/mock_dbus_thread_manager_without_gmock.cc |
index 8b5f00a169df1bf6f9107f403b4354bfab4b32ea..2ab9668fcd338edbe25c6e5fda4f1ddbebeb0878 100644 |
--- a/chromeos/dbus/mock_dbus_thread_manager_without_gmock.cc |
+++ b/chromeos/dbus/mock_dbus_thread_manager_without_gmock.cc |
@@ -4,6 +4,9 @@ |
#include "chromeos/dbus/mock_dbus_thread_manager_without_gmock.h" |
+#include "chromeos/dbus/bluetooth_adapter_client.h" |
+#include "chromeos/dbus/bluetooth_device_client.h" |
+#include "chromeos/dbus/bluetooth_manager_client.h" |
#include "chromeos/dbus/dbus_thread_manager_observer.h" |
#include "chromeos/dbus/fake_bluetooth_adapter_client.h" |
#include "chromeos/dbus/fake_bluetooth_agent_manager_client.h" |
@@ -11,13 +14,17 @@ |
#include "chromeos/dbus/fake_bluetooth_input_client.h" |
#include "chromeos/dbus/fake_bluetooth_profile_manager_client.h" |
#include "chromeos/dbus/fake_cros_disks_client.h" |
+#include "chromeos/dbus/fake_power_manager_client.h" |
+#include "chromeos/dbus/fake_session_manager_client.h" |
#include "chromeos/dbus/fake_shill_manager_client.h" |
+#include "chromeos/dbus/fake_update_engine_client.h" |
#include "chromeos/dbus/ibus/mock_ibus_client.h" |
#include "chromeos/dbus/ibus/mock_ibus_config_client.h" |
#include "chromeos/dbus/ibus/mock_ibus_engine_factory_service.h" |
#include "chromeos/dbus/ibus/mock_ibus_engine_service.h" |
#include "chromeos/dbus/ibus/mock_ibus_input_context_client.h" |
#include "chromeos/dbus/ibus/mock_ibus_panel_service.h" |
+#include "chromeos/dbus/power_policy_controller.h" |
#include "dbus/fake_bus.h" |
namespace chromeos { |
@@ -30,14 +37,27 @@ MockDBusThreadManagerWithoutGMock::MockDBusThreadManagerWithoutGMock() |
fake_bluetooth_profile_manager_client_( |
new FakeBluetoothProfileManagerClient()), |
fake_cros_disks_client_(new FakeCrosDisksClient), |
+ fake_power_manager_client_(new FakePowerManagerClient), |
+ fake_session_manager_client_(new FakeSessionManagerClient), |
fake_shill_manager_client_(new FakeShillManagerClient), |
+ fake_update_engine_client_(new FakeUpdateEngineClient), |
mock_ibus_client_(new MockIBusClient), |
mock_ibus_config_client_(new MockIBusConfigClient), |
mock_ibus_input_context_client_(new MockIBusInputContextClient), |
mock_ibus_engine_service_(new MockIBusEngineService), |
mock_ibus_engine_factory_service_(new MockIBusEngineFactoryService), |
mock_ibus_panel_service_(new MockIBusPanelService), |
+ stub_bluetooth_manager_client_( |
+ BluetoothManagerClient::Create(STUB_DBUS_CLIENT_IMPLEMENTATION, NULL)), |
satorux1
2013/04/26 04:44:40
please do: new FakeBluetoothManagerClient
|
+ stub_bluetooth_adapter_client_( |
+ BluetoothAdapterClient::Create(STUB_DBUS_CLIENT_IMPLEMENTATION, NULL, |
+ stub_bluetooth_manager_client_.get())), |
+ stub_bluetooth_device_client_( |
+ BluetoothDeviceClient::Create(STUB_DBUS_CLIENT_IMPLEMENTATION, NULL, |
+ stub_bluetooth_adapter_client_.get())), |
ibus_bus_(NULL) { |
+ power_policy_controller_.reset( |
+ new PowerPolicyController(this, fake_power_manager_client_.get())); |
} |
MockDBusThreadManagerWithoutGMock::~MockDBusThreadManagerWithoutGMock() { |
@@ -74,14 +94,12 @@ dbus::Bus* MockDBusThreadManagerWithoutGMock::GetIBusBus() { |
BluetoothAdapterClient* |
MockDBusThreadManagerWithoutGMock::GetBluetoothAdapterClient() { |
- NOTIMPLEMENTED(); |
- return NULL; |
+ return stub_bluetooth_adapter_client_.get(); |
} |
BluetoothDeviceClient* |
MockDBusThreadManagerWithoutGMock::GetBluetoothDeviceClient() { |
- NOTIMPLEMENTED(); |
- return NULL; |
+ return stub_bluetooth_device_client_.get(); |
} |
BluetoothInputClient* |
@@ -92,8 +110,7 @@ BluetoothInputClient* |
BluetoothManagerClient* |
MockDBusThreadManagerWithoutGMock::GetBluetoothManagerClient() { |
- NOTIMPLEMENTED(); |
- return NULL; |
+ return stub_bluetooth_manager_client_.get(); |
} |
BluetoothNodeClient* |
@@ -206,20 +223,17 @@ PermissionBrokerClient* |
} |
PowerManagerClient* MockDBusThreadManagerWithoutGMock::GetPowerManagerClient() { |
- NOTIMPLEMENTED(); |
- return NULL; |
+ return fake_power_manager_client_.get(); |
} |
PowerPolicyController* |
MockDBusThreadManagerWithoutGMock::GetPowerPolicyController() { |
- NOTIMPLEMENTED(); |
- return NULL; |
+ return power_policy_controller_.get(); |
} |
SessionManagerClient* |
MockDBusThreadManagerWithoutGMock::GetSessionManagerClient() { |
- NOTIMPLEMENTED(); |
- return NULL; |
+ return fake_session_manager_client_.get(); |
} |
SMSClient* MockDBusThreadManagerWithoutGMock::GetSMSClient() { |
@@ -233,8 +247,7 @@ SystemClockClient* MockDBusThreadManagerWithoutGMock::GetSystemClockClient() { |
} |
UpdateEngineClient* MockDBusThreadManagerWithoutGMock::GetUpdateEngineClient() { |
- NOTIMPLEMENTED(); |
- return NULL; |
+ return fake_update_engine_client_.get(); |
} |
BluetoothOutOfBandClient* |