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 "chromeos/dbus/mock_dbus_thread_manager.h" | 5 #include "chromeos/dbus/mock_dbus_thread_manager.h" |
6 | 6 |
7 #include "chromeos/dbus/ibus/mock_ibus_client.h" | 7 #include "chromeos/dbus/ibus/mock_ibus_client.h" |
8 #include "chromeos/dbus/ibus/mock_ibus_input_context_client.h" | 8 #include "chromeos/dbus/ibus/mock_ibus_input_context_client.h" |
9 #include "chromeos/dbus/mock_bluetooth_adapter_client.h" | 9 #include "chromeos/dbus/mock_bluetooth_adapter_client.h" |
10 #include "chromeos/dbus/mock_bluetooth_device_client.h" | 10 #include "chromeos/dbus/mock_bluetooth_device_client.h" |
11 #include "chromeos/dbus/mock_bluetooth_input_client.h" | 11 #include "chromeos/dbus/mock_bluetooth_input_client.h" |
12 #include "chromeos/dbus/mock_bluetooth_manager_client.h" | 12 #include "chromeos/dbus/mock_bluetooth_manager_client.h" |
13 #include "chromeos/dbus/mock_bluetooth_node_client.h" | 13 #include "chromeos/dbus/mock_bluetooth_node_client.h" |
14 #include "chromeos/dbus/mock_cashew_client.h" | 14 #include "chromeos/dbus/mock_cashew_client.h" |
15 #include "chromeos/dbus/mock_cros_disks_client.h" | 15 #include "chromeos/dbus/mock_cros_disks_client.h" |
16 #include "chromeos/dbus/mock_cryptohome_client.h" | 16 #include "chromeos/dbus/mock_cryptohome_client.h" |
17 #include "chromeos/dbus/mock_debug_daemon_client.h" | 17 #include "chromeos/dbus/mock_debug_daemon_client.h" |
18 #include "chromeos/dbus/mock_flimflam_device_client.h" | 18 #include "chromeos/dbus/mock_flimflam_device_client.h" |
19 #include "chromeos/dbus/mock_flimflam_ipconfig_client.h" | 19 #include "chromeos/dbus/mock_flimflam_ipconfig_client.h" |
20 #include "chromeos/dbus/mock_flimflam_manager_client.h" | 20 #include "chromeos/dbus/mock_flimflam_manager_client.h" |
21 #include "chromeos/dbus/mock_flimflam_network_client.h" | 21 #include "chromeos/dbus/mock_flimflam_network_client.h" |
22 #include "chromeos/dbus/mock_flimflam_profile_client.h" | 22 #include "chromeos/dbus/mock_flimflam_profile_client.h" |
23 #include "chromeos/dbus/mock_flimflam_service_client.h" | 23 #include "chromeos/dbus/mock_flimflam_service_client.h" |
24 #include "chromeos/dbus/mock_gsm_sms_client.h" | 24 #include "chromeos/dbus/mock_gsm_sms_client.h" |
25 #include "chromeos/dbus/mock_image_burner_client.h" | 25 #include "chromeos/dbus/mock_image_burner_client.h" |
26 #include "chromeos/dbus/mock_introspectable_client.h" | 26 #include "chromeos/dbus/mock_introspectable_client.h" |
| 27 #include "chromeos/dbus/mock_modem_messaging_client.h" |
27 #include "chromeos/dbus/mock_power_manager_client.h" | 28 #include "chromeos/dbus/mock_power_manager_client.h" |
28 #include "chromeos/dbus/mock_session_manager_client.h" | 29 #include "chromeos/dbus/mock_session_manager_client.h" |
| 30 #include "chromeos/dbus/mock_sms_client.h" |
29 #include "chromeos/dbus/mock_speech_synthesizer_client.h" | 31 #include "chromeos/dbus/mock_speech_synthesizer_client.h" |
30 #include "chromeos/dbus/mock_update_engine_client.h" | 32 #include "chromeos/dbus/mock_update_engine_client.h" |
31 | 33 |
32 using ::testing::AnyNumber; | 34 using ::testing::AnyNumber; |
33 using ::testing::Return; | 35 using ::testing::Return; |
34 using ::testing::_; | 36 using ::testing::_; |
35 | 37 |
36 namespace chromeos { | 38 namespace chromeos { |
37 | 39 |
38 MockDBusThreadManager::MockDBusThreadManager() | 40 MockDBusThreadManager::MockDBusThreadManager() |
39 : mock_bluetooth_adapter_client_(new MockBluetoothAdapterClient), | 41 : mock_bluetooth_adapter_client_(new MockBluetoothAdapterClient), |
40 mock_bluetooth_device_client_(new MockBluetoothDeviceClient), | 42 mock_bluetooth_device_client_(new MockBluetoothDeviceClient), |
41 mock_bluetooth_input_client_(new MockBluetoothInputClient), | 43 mock_bluetooth_input_client_(new MockBluetoothInputClient), |
42 mock_bluetooth_manager_client_(new MockBluetoothManagerClient), | 44 mock_bluetooth_manager_client_(new MockBluetoothManagerClient), |
43 mock_bluetooth_node_client_(new MockBluetoothNodeClient), | 45 mock_bluetooth_node_client_(new MockBluetoothNodeClient), |
44 mock_cashew_client_(new MockCashewClient), | 46 mock_cashew_client_(new MockCashewClient), |
45 mock_cros_disks_client_(new MockCrosDisksClient), | 47 mock_cros_disks_client_(new MockCrosDisksClient), |
46 mock_cryptohome_client_(new MockCryptohomeClient), | 48 mock_cryptohome_client_(new MockCryptohomeClient), |
47 mock_debugdaemon_client_(new MockDebugDaemonClient), | 49 mock_debugdaemon_client_(new MockDebugDaemonClient), |
48 mock_flimflam_device_client_(new MockFlimflamDeviceClient), | 50 mock_flimflam_device_client_(new MockFlimflamDeviceClient), |
49 mock_flimflam_ipconfig_client_(new MockFlimflamIPConfigClient), | 51 mock_flimflam_ipconfig_client_(new MockFlimflamIPConfigClient), |
50 mock_flimflam_manager_client_(new MockFlimflamManagerClient), | 52 mock_flimflam_manager_client_(new MockFlimflamManagerClient), |
51 mock_flimflam_network_client_(new MockFlimflamNetworkClient), | 53 mock_flimflam_network_client_(new MockFlimflamNetworkClient), |
52 mock_flimflam_profile_client_(new MockFlimflamProfileClient), | 54 mock_flimflam_profile_client_(new MockFlimflamProfileClient), |
53 mock_flimflam_service_client_(new MockFlimflamServiceClient), | 55 mock_flimflam_service_client_(new MockFlimflamServiceClient), |
54 mock_gsm_sms_client_(new MockGsmSMSClient), | 56 mock_gsm_sms_client_(new MockGsmSMSClient), |
55 mock_image_burner_client_(new MockImageBurnerClient), | 57 mock_image_burner_client_(new MockImageBurnerClient), |
56 mock_introspectable_client_(new MockIntrospectableClient), | 58 mock_introspectable_client_(new MockIntrospectableClient), |
| 59 mock_modem_messaging_client_(new MockModemMessagingClient), |
57 mock_power_manager_client_(new MockPowerManagerClient), | 60 mock_power_manager_client_(new MockPowerManagerClient), |
58 mock_session_manager_client_(new MockSessionManagerClient), | 61 mock_session_manager_client_(new MockSessionManagerClient), |
| 62 mock_sms_client_(new MockSMSClient), |
59 mock_speech_synthesizer_client_(new MockSpeechSynthesizerClient), | 63 mock_speech_synthesizer_client_(new MockSpeechSynthesizerClient), |
60 mock_update_engine_client_(new MockUpdateEngineClient), | 64 mock_update_engine_client_(new MockUpdateEngineClient), |
61 mock_ibus_client_(new MockIBusClient), | 65 mock_ibus_client_(new MockIBusClient), |
62 mock_ibus_input_context_client_(new MockIBusInputContextClient) { | 66 mock_ibus_input_context_client_(new MockIBusInputContextClient) { |
63 EXPECT_CALL(*this, GetBluetoothAdapterClient()) | 67 EXPECT_CALL(*this, GetBluetoothAdapterClient()) |
64 .WillRepeatedly(Return(mock_bluetooth_adapter_client_.get())); | 68 .WillRepeatedly(Return(mock_bluetooth_adapter_client_.get())); |
65 EXPECT_CALL(*this, GetBluetoothDeviceClient()) | 69 EXPECT_CALL(*this, GetBluetoothDeviceClient()) |
66 .WillRepeatedly(Return(mock_bluetooth_device_client_.get())); | 70 .WillRepeatedly(Return(mock_bluetooth_device_client_.get())); |
67 EXPECT_CALL(*this, GetBluetoothInputClient()) | 71 EXPECT_CALL(*this, GetBluetoothInputClient()) |
68 .WillRepeatedly(Return(mock_bluetooth_input_client_.get())); | 72 .WillRepeatedly(Return(mock_bluetooth_input_client_.get())); |
(...skipping 20 matching lines...) Expand all Loading... |
89 EXPECT_CALL(*this, GetFlimflamProfileClient()) | 93 EXPECT_CALL(*this, GetFlimflamProfileClient()) |
90 .WillRepeatedly(Return(mock_flimflam_profile_client())); | 94 .WillRepeatedly(Return(mock_flimflam_profile_client())); |
91 EXPECT_CALL(*this, GetFlimflamServiceClient()) | 95 EXPECT_CALL(*this, GetFlimflamServiceClient()) |
92 .WillRepeatedly(Return(mock_flimflam_service_client())); | 96 .WillRepeatedly(Return(mock_flimflam_service_client())); |
93 EXPECT_CALL(*this, GetGsmSMSClient()) | 97 EXPECT_CALL(*this, GetGsmSMSClient()) |
94 .WillRepeatedly(Return(mock_gsm_sms_client())); | 98 .WillRepeatedly(Return(mock_gsm_sms_client())); |
95 EXPECT_CALL(*this, GetImageBurnerClient()) | 99 EXPECT_CALL(*this, GetImageBurnerClient()) |
96 .WillRepeatedly(Return(mock_image_burner_client())); | 100 .WillRepeatedly(Return(mock_image_burner_client())); |
97 EXPECT_CALL(*this, GetIntrospectableClient()) | 101 EXPECT_CALL(*this, GetIntrospectableClient()) |
98 .WillRepeatedly(Return(mock_introspectable_client())); | 102 .WillRepeatedly(Return(mock_introspectable_client())); |
| 103 EXPECT_CALL(*this, GetModemMessagingClient()) |
| 104 .WillRepeatedly(Return(mock_modem_messaging_client())); |
99 EXPECT_CALL(*this, GetPowerManagerClient()) | 105 EXPECT_CALL(*this, GetPowerManagerClient()) |
100 .WillRepeatedly(Return(mock_power_manager_client_.get())); | 106 .WillRepeatedly(Return(mock_power_manager_client_.get())); |
101 EXPECT_CALL(*this, GetSessionManagerClient()) | 107 EXPECT_CALL(*this, GetSessionManagerClient()) |
102 .WillRepeatedly(Return(mock_session_manager_client_.get())); | 108 .WillRepeatedly(Return(mock_session_manager_client_.get())); |
| 109 EXPECT_CALL(*this, GetSMSClient()) |
| 110 .WillRepeatedly(Return(mock_sms_client_.get())); |
103 EXPECT_CALL(*this, GetSpeechSynthesizerClient()) | 111 EXPECT_CALL(*this, GetSpeechSynthesizerClient()) |
104 .WillRepeatedly(Return(mock_speech_synthesizer_client_.get())); | 112 .WillRepeatedly(Return(mock_speech_synthesizer_client_.get())); |
105 EXPECT_CALL(*this, GetUpdateEngineClient()) | 113 EXPECT_CALL(*this, GetUpdateEngineClient()) |
106 .WillRepeatedly(Return(mock_update_engine_client_.get())); | 114 .WillRepeatedly(Return(mock_update_engine_client_.get())); |
107 EXPECT_CALL(*this, GetIBusClient()) | 115 EXPECT_CALL(*this, GetIBusClient()) |
108 .WillRepeatedly(Return(mock_ibus_client_.get())); | 116 .WillRepeatedly(Return(mock_ibus_client_.get())); |
109 EXPECT_CALL(*this, GetIBusInputContextClient()) | 117 EXPECT_CALL(*this, GetIBusInputContextClient()) |
110 .WillRepeatedly(Return(mock_ibus_input_context_client_.get())); | 118 .WillRepeatedly(Return(mock_ibus_input_context_client_.get())); |
111 | 119 |
112 // These observers calls are used in ChromeBrowserMainPartsChromeos. | 120 // These observers calls are used in ChromeBrowserMainPartsChromeos. |
(...skipping 15 matching lines...) Expand all Loading... |
128 .Times(AnyNumber()); | 136 .Times(AnyNumber()); |
129 | 137 |
130 // Called from DiskMountManager::Initialize(), ChromeBrowserMainPartsChromeos. | 138 // Called from DiskMountManager::Initialize(), ChromeBrowserMainPartsChromeos. |
131 EXPECT_CALL(*mock_cros_disks_client_.get(), SetUpConnections(_, _)) | 139 EXPECT_CALL(*mock_cros_disks_client_.get(), SetUpConnections(_, _)) |
132 .Times(AnyNumber()); | 140 .Times(AnyNumber()); |
133 } | 141 } |
134 | 142 |
135 MockDBusThreadManager::~MockDBusThreadManager() {} | 143 MockDBusThreadManager::~MockDBusThreadManager() {} |
136 | 144 |
137 } // namespace chromeos | 145 } // namespace chromeos |
OLD | NEW |