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

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

Issue 9838085: Move files inside chrome/browser/chromeos/dbus to chromeos/dbus (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 8 years, 8 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
OLDNEW
(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 #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_device_client.h"
9 #include "chrome/browser/chromeos/dbus/mock_bluetooth_input_client.h"
10 #include "chrome/browser/chromeos/dbus/mock_bluetooth_manager_client.h"
11 #include "chrome/browser/chromeos/dbus/mock_bluetooth_node_client.h"
12 #include "chrome/browser/chromeos/dbus/mock_cashew_client.h"
13 #include "chrome/browser/chromeos/dbus/mock_cros_disks_client.h"
14 #include "chrome/browser/chromeos/dbus/mock_cryptohome_client.h"
15 #include "chrome/browser/chromeos/dbus/mock_debug_daemon_client.h"
16 #include "chrome/browser/chromeos/dbus/mock_flimflam_ipconfig_client.h"
17 #include "chrome/browser/chromeos/dbus/mock_flimflam_network_client.h"
18 #include "chrome/browser/chromeos/dbus/mock_flimflam_profile_client.h"
19 #include "chrome/browser/chromeos/dbus/mock_image_burner_client.h"
20 #include "chrome/browser/chromeos/dbus/mock_introspectable_client.h"
21 #include "chrome/browser/chromeos/dbus/mock_power_manager_client.h"
22 #include "chrome/browser/chromeos/dbus/mock_session_manager_client.h"
23 #include "chrome/browser/chromeos/dbus/mock_speech_synthesizer_client.h"
24 #include "chrome/browser/chromeos/dbus/mock_update_engine_client.h"
25
26 using ::testing::AnyNumber;
27 using ::testing::Return;
28 using ::testing::_;
29
30 namespace chromeos {
31
32 MockDBusThreadManager::MockDBusThreadManager()
33 : mock_bluetooth_adapter_client_(new MockBluetoothAdapterClient),
34 mock_bluetooth_device_client_(new MockBluetoothDeviceClient),
35 mock_bluetooth_input_client_(new MockBluetoothInputClient),
36 mock_bluetooth_manager_client_(new MockBluetoothManagerClient),
37 mock_bluetooth_node_client_(new MockBluetoothNodeClient),
38 mock_cashew_client_(new MockCashewClient),
39 mock_cros_disks_client_(new MockCrosDisksClient),
40 mock_cryptohome_client_(new MockCryptohomeClient),
41 mock_debugdaemon_client_(new MockDebugDaemonClient),
42 mock_flimflam_ipconfig_client_(new MockFlimflamIPConfigClient),
43 mock_flimflam_network_client_(new MockFlimflamNetworkClient),
44 mock_flimflam_profile_client_(new MockFlimflamProfileClient),
45 mock_image_burner_client_(new MockImageBurnerClient),
46 mock_introspectable_client_(new MockIntrospectableClient),
47 mock_power_manager_client_(new MockPowerManagerClient),
48 mock_session_manager_client_(new MockSessionManagerClient),
49 mock_speech_synthesizer_client_(new MockSpeechSynthesizerClient),
50 mock_update_engine_client_(new MockUpdateEngineClient) {
51 EXPECT_CALL(*this, GetBluetoothAdapterClient())
52 .WillRepeatedly(Return(mock_bluetooth_adapter_client_.get()));
53 EXPECT_CALL(*this, GetBluetoothDeviceClient())
54 .WillRepeatedly(Return(mock_bluetooth_device_client_.get()));
55 EXPECT_CALL(*this, GetBluetoothInputClient())
56 .WillRepeatedly(Return(mock_bluetooth_input_client_.get()));
57 EXPECT_CALL(*this, GetBluetoothManagerClient())
58 .WillRepeatedly(Return(mock_bluetooth_manager_client()));
59 EXPECT_CALL(*this, GetBluetoothNodeClient())
60 .WillRepeatedly(Return(mock_bluetooth_node_client_.get()));
61 EXPECT_CALL(*this, GetCashewClient())
62 .WillRepeatedly(Return(mock_cashew_client()));
63 EXPECT_CALL(*this, GetCrosDisksClient())
64 .WillRepeatedly(Return(mock_cros_disks_client()));
65 EXPECT_CALL(*this, GetCryptohomeClient())
66 .WillRepeatedly(Return(mock_cryptohome_client()));
67 EXPECT_CALL(*this, GetDebugDaemonClient())
68 .WillRepeatedly(Return(mock_debugdaemon_client()));
69 EXPECT_CALL(*this, GetFlimflamIPConfigClient())
70 .WillRepeatedly(Return(mock_flimflam_ipconfig_client()));
71 EXPECT_CALL(*this, GetFlimflamNetworkClient())
72 .WillRepeatedly(Return(mock_flimflam_network_client()));
73 EXPECT_CALL(*this, GetFlimflamProfileClient())
74 .WillRepeatedly(Return(mock_flimflam_profile_client()));
75 EXPECT_CALL(*this, GetImageBurnerClient())
76 .WillRepeatedly(Return(mock_image_burner_client()));
77 EXPECT_CALL(*this, GetIntrospectableClient())
78 .WillRepeatedly(Return(mock_introspectable_client()));
79 EXPECT_CALL(*this, GetPowerManagerClient())
80 .WillRepeatedly(Return(mock_power_manager_client_.get()));
81 EXPECT_CALL(*this, GetSessionManagerClient())
82 .WillRepeatedly(Return(mock_session_manager_client_.get()));
83 EXPECT_CALL(*this, GetSpeechSynthesizerClient())
84 .WillRepeatedly(Return(mock_speech_synthesizer_client_.get()));
85 EXPECT_CALL(*this, GetUpdateEngineClient())
86 .WillRepeatedly(Return(mock_update_engine_client_.get()));
87
88 // These observers calls are used in ChromeBrowserMainPartsChromeos.
89 EXPECT_CALL(*mock_power_manager_client_.get(), AddObserver(_))
90 .Times(AnyNumber());
91 EXPECT_CALL(*mock_power_manager_client_.get(), RemoveObserver(_))
92 .Times(AnyNumber());
93 EXPECT_CALL(*mock_session_manager_client_.get(), AddObserver(_))
94 .Times(AnyNumber());
95 EXPECT_CALL(*mock_session_manager_client_.get(), RemoveObserver(_))
96 .Times(AnyNumber());
97 EXPECT_CALL(*mock_update_engine_client_.get(), AddObserver(_))
98 .Times(AnyNumber());
99 EXPECT_CALL(*mock_update_engine_client_.get(), RemoveObserver(_))
100 .Times(AnyNumber());
101
102 // Called from PowerMenuButton ctor.
103 EXPECT_CALL(*mock_power_manager_client_.get(), RequestStatusUpdate(_))
104 .Times(AnyNumber());
105
106 // Called from DiskMountManager::Initialize(), ChromeBrowserMainPartsChromeos.
107 EXPECT_CALL(*mock_cros_disks_client_.get(), SetUpConnections(_, _))
108 .Times(AnyNumber());
109 }
110
111 MockDBusThreadManager::~MockDBusThreadManager() {}
112
113 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/dbus/mock_dbus_thread_manager.h ('k') | chrome/browser/chromeos/dbus/mock_debug_daemon_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698