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

Side by Side Diff: chromeos/dbus/mock_dbus_thread_manager.cc

Issue 31513002: dbus: Remove MockShillDeviceClient and MockShillIPConfigClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix the build Created 7 years, 2 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
« no previous file with comments | « chromeos/dbus/mock_dbus_thread_manager.h ('k') | chromeos/dbus/mock_shill_device_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chromeos/dbus/mock_dbus_thread_manager.h" 5 #include "chromeos/dbus/mock_dbus_thread_manager.h"
6 6
7 #include "chromeos/dbus/dbus_thread_manager_observer.h" 7 #include "chromeos/dbus/dbus_thread_manager_observer.h"
8 #include "chromeos/dbus/fake_bluetooth_adapter_client.h" 8 #include "chromeos/dbus/fake_bluetooth_adapter_client.h"
9 #include "chromeos/dbus/fake_bluetooth_agent_manager_client.h" 9 #include "chromeos/dbus/fake_bluetooth_agent_manager_client.h"
10 #include "chromeos/dbus/fake_bluetooth_device_client.h" 10 #include "chromeos/dbus/fake_bluetooth_device_client.h"
11 #include "chromeos/dbus/fake_bluetooth_input_client.h" 11 #include "chromeos/dbus/fake_bluetooth_input_client.h"
12 #include "chromeos/dbus/fake_bluetooth_profile_manager_client.h" 12 #include "chromeos/dbus/fake_bluetooth_profile_manager_client.h"
13 #include "chromeos/dbus/fake_gsm_sms_client.h" 13 #include "chromeos/dbus/fake_gsm_sms_client.h"
14 #include "chromeos/dbus/fake_shill_device_client.h"
15 #include "chromeos/dbus/fake_shill_ipconfig_client.h"
14 #include "chromeos/dbus/ibus/mock_ibus_client.h" 16 #include "chromeos/dbus/ibus/mock_ibus_client.h"
15 #include "chromeos/dbus/ibus/mock_ibus_engine_factory_service.h" 17 #include "chromeos/dbus/ibus/mock_ibus_engine_factory_service.h"
16 #include "chromeos/dbus/ibus/mock_ibus_engine_service.h" 18 #include "chromeos/dbus/ibus/mock_ibus_engine_service.h"
17 #include "chromeos/dbus/mock_cryptohome_client.h" 19 #include "chromeos/dbus/mock_cryptohome_client.h"
18 #include "chromeos/dbus/mock_shill_device_client.h"
19 #include "chromeos/dbus/mock_shill_ipconfig_client.h"
20 #include "chromeos/dbus/mock_shill_manager_client.h" 20 #include "chromeos/dbus/mock_shill_manager_client.h"
21 #include "chromeos/dbus/mock_shill_profile_client.h" 21 #include "chromeos/dbus/mock_shill_profile_client.h"
22 #include "chromeos/dbus/mock_shill_service_client.h" 22 #include "chromeos/dbus/mock_shill_service_client.h"
23 #include "chromeos/dbus/mock_session_manager_client.h" 23 #include "chromeos/dbus/mock_session_manager_client.h"
24 #include "chromeos/dbus/power_policy_controller.h" 24 #include "chromeos/dbus/power_policy_controller.h"
25 25
26 using ::testing::AnyNumber; 26 using ::testing::AnyNumber;
27 using ::testing::Return; 27 using ::testing::Return;
28 using ::testing::ReturnNull; 28 using ::testing::ReturnNull;
29 using ::testing::SetArgumentPointee; 29 using ::testing::SetArgumentPointee;
(...skipping 18 matching lines...) Expand all
48 48
49 MockDBusThreadManager::MockDBusThreadManager() 49 MockDBusThreadManager::MockDBusThreadManager()
50 : fake_bluetooth_adapter_client_(new FakeBluetoothAdapterClient), 50 : fake_bluetooth_adapter_client_(new FakeBluetoothAdapterClient),
51 fake_bluetooth_agent_manager_client_( 51 fake_bluetooth_agent_manager_client_(
52 new FakeBluetoothAgentManagerClient), 52 new FakeBluetoothAgentManagerClient),
53 fake_bluetooth_device_client_(new FakeBluetoothDeviceClient), 53 fake_bluetooth_device_client_(new FakeBluetoothDeviceClient),
54 fake_bluetooth_input_client_(new FakeBluetoothInputClient), 54 fake_bluetooth_input_client_(new FakeBluetoothInputClient),
55 fake_bluetooth_profile_manager_client_( 55 fake_bluetooth_profile_manager_client_(
56 new FakeBluetoothProfileManagerClient), 56 new FakeBluetoothProfileManagerClient),
57 fake_gsm_sms_client_(new FakeGsmSMSClient), 57 fake_gsm_sms_client_(new FakeGsmSMSClient),
58 fake_shill_device_client_(new FakeShillDeviceClient),
59 fake_shill_ipconfig_client_(new FakeShillIPConfigClient),
58 mock_cryptohome_client_(new MockCryptohomeClient), 60 mock_cryptohome_client_(new MockCryptohomeClient),
59 mock_shill_device_client_(new MockShillDeviceClient),
60 mock_shill_ipconfig_client_(new MockShillIPConfigClient),
61 mock_shill_manager_client_(new MockShillManagerClient), 61 mock_shill_manager_client_(new MockShillManagerClient),
62 mock_shill_profile_client_(new MockShillProfileClient), 62 mock_shill_profile_client_(new MockShillProfileClient),
63 mock_shill_service_client_(new MockShillServiceClient), 63 mock_shill_service_client_(new MockShillServiceClient),
64 mock_session_manager_client_(new MockSessionManagerClient) { 64 mock_session_manager_client_(new MockSessionManagerClient) {
65 EXPECT_CALL(*this, GetCryptohomeClient()) 65 EXPECT_CALL(*this, GetCryptohomeClient())
66 .WillRepeatedly(Return(mock_cryptohome_client())); 66 .WillRepeatedly(Return(mock_cryptohome_client()));
67 EXPECT_CALL(*this, GetBluetoothAdapterClient()) 67 EXPECT_CALL(*this, GetBluetoothAdapterClient())
68 .WillRepeatedly(Return(fake_bluetooth_adapter_client_.get())); 68 .WillRepeatedly(Return(fake_bluetooth_adapter_client_.get()));
69 EXPECT_CALL(*this, GetBluetoothAgentManagerClient()) 69 EXPECT_CALL(*this, GetBluetoothAgentManagerClient())
70 .WillRepeatedly(Return(fake_bluetooth_agent_manager_client())); 70 .WillRepeatedly(Return(fake_bluetooth_agent_manager_client()));
71 EXPECT_CALL(*this, GetBluetoothDeviceClient()) 71 EXPECT_CALL(*this, GetBluetoothDeviceClient())
72 .WillRepeatedly(Return(fake_bluetooth_device_client_.get())); 72 .WillRepeatedly(Return(fake_bluetooth_device_client_.get()));
73 EXPECT_CALL(*this, GetBluetoothInputClient()) 73 EXPECT_CALL(*this, GetBluetoothInputClient())
74 .WillRepeatedly(Return(fake_bluetooth_input_client_.get())); 74 .WillRepeatedly(Return(fake_bluetooth_input_client_.get()));
75 EXPECT_CALL(*this, GetBluetoothProfileManagerClient()) 75 EXPECT_CALL(*this, GetBluetoothProfileManagerClient())
76 .WillRepeatedly(Return(fake_bluetooth_profile_manager_client())); 76 .WillRepeatedly(Return(fake_bluetooth_profile_manager_client()));
77 EXPECT_CALL(*this, GetShillDeviceClient()) 77 EXPECT_CALL(*this, GetShillDeviceClient())
78 .WillRepeatedly(Return(mock_shill_device_client())); 78 .WillRepeatedly(Return(fake_shill_device_client()));
79 EXPECT_CALL(*this, GetShillIPConfigClient()) 79 EXPECT_CALL(*this, GetShillIPConfigClient())
80 .WillRepeatedly(Return(mock_shill_ipconfig_client())); 80 .WillRepeatedly(Return(fake_shill_ipconfig_client()));
81 EXPECT_CALL(*this, GetShillManagerClient()) 81 EXPECT_CALL(*this, GetShillManagerClient())
82 .WillRepeatedly(Return(mock_shill_manager_client())); 82 .WillRepeatedly(Return(mock_shill_manager_client()));
83 EXPECT_CALL(*this, GetShillProfileClient()) 83 EXPECT_CALL(*this, GetShillProfileClient())
84 .WillRepeatedly(Return(mock_shill_profile_client())); 84 .WillRepeatedly(Return(mock_shill_profile_client()));
85 EXPECT_CALL(*this, GetShillServiceClient()) 85 EXPECT_CALL(*this, GetShillServiceClient())
86 .WillRepeatedly(Return(mock_shill_service_client())); 86 .WillRepeatedly(Return(mock_shill_service_client()));
87 EXPECT_CALL(*this, GetGsmSMSClient()) 87 EXPECT_CALL(*this, GetGsmSMSClient())
88 .WillRepeatedly(Return(fake_gsm_sms_client())); 88 .WillRepeatedly(Return(fake_gsm_sms_client()));
89 EXPECT_CALL(*this, GetSessionManagerClient()) 89 EXPECT_CALL(*this, GetSessionManagerClient())
90 .WillRepeatedly(Return(mock_session_manager_client_.get())); 90 .WillRepeatedly(Return(mock_session_manager_client_.get()));
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 observers_.AddObserver(observer); 134 observers_.AddObserver(observer);
135 } 135 }
136 136
137 void MockDBusThreadManager::RemoveObserver( 137 void MockDBusThreadManager::RemoveObserver(
138 DBusThreadManagerObserver* observer) { 138 DBusThreadManagerObserver* observer) {
139 DCHECK(observer); 139 DCHECK(observer);
140 observers_.RemoveObserver(observer); 140 observers_.RemoveObserver(observer);
141 } 141 }
142 142
143 } // namespace chromeos 143 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/mock_dbus_thread_manager.h ('k') | chromeos/dbus/mock_shill_device_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698