OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2011 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 #include "chrome/browser/chromeos/dbus/mock_dbus_thread_manager.h" | |
6 | |
7 #include "chrome/browser/chromeos/dbus/mock_bluetooth_adapter_client.h" | |
8 #include "chrome/browser/chromeos/dbus/mock_bluetooth_manager_client.h" | |
9 #include "chrome/browser/chromeos/dbus/mock_power_manager_client.h" | |
10 #include "chrome/browser/chromeos/dbus/mock_sensors_client.h" | |
11 #include "chrome/browser/chromeos/dbus/mock_session_manager_client.h" | |
12 #include "chrome/browser/chromeos/dbus/mock_speech_synthesizer_client.h" | |
13 | |
14 using ::testing::Return; | |
15 | |
16 namespace chromeos { | |
17 | |
18 MockDBusThreadManager::MockDBusThreadManager() | |
19 : mock_bluetooth_adapter_client_(new MockBluetoothAdapterClient), | |
20 mock_bluetooth_manager_client_(new MockBluetoothManagerClient), | |
21 mock_power_manager_client_(new MockPowerManagerClient), | |
22 mock_sensors_client_(new MockSensorsClient), | |
23 mock_session_manager_client_(new MockSessionManagerClient), | |
24 mock_speech_synthesizer_client_(new MockSpeechSynthesizerClient) { | |
25 EXPECT_CALL(*this, bluetooth_adapter_client()) | |
26 .WillRepeatedly(Return(mock_bluetooth_adapter_client_.get())); | |
27 EXPECT_CALL(*this, bluetooth_manager_client()) | |
28 .WillRepeatedly(Return(mock_bluetooth_manager_client())); | |
29 EXPECT_CALL(*this, power_manager_client()) | |
30 .WillRepeatedly(Return(mock_power_manager_client_.get())); | |
31 EXPECT_CALL(*this, sensors_client()) | |
32 .WillRepeatedly(Return(mock_sensors_client_.get())); | |
33 EXPECT_CALL(*this, session_manager_client()) | |
34 .WillRepeatedly(Return(mock_session_manager_client_.get())); | |
35 EXPECT_CALL(*this, speech_synthesizer_client()) | |
36 .WillRepeatedly(Return(mock_speech_synthesizer_client_.get())); | |
oshima
2011/10/29 00:05:52
Maybe
DBusThreadManager::InitializeForTesting(th
satorux1
2011/10/29 00:08:10
I'd rather do it from tests explicitly. Thank you
| |
37 } | |
38 | |
39 MockDBusThreadManager::~MockDBusThreadManager() {} | |
40 | |
41 } // namespace chromeos | |
OLD | NEW |