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

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: _ Created 8 years, 9 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_image_burner_client.h"
16 #include "chrome/browser/chromeos/dbus/mock_introspectable_client.h"
17 #include "chrome/browser/chromeos/dbus/mock_power_manager_client.h"
18 #include "chrome/browser/chromeos/dbus/mock_session_manager_client.h"
19 #include "chrome/browser/chromeos/dbus/mock_speech_synthesizer_client.h"
20 #include "chrome/browser/chromeos/dbus/mock_update_engine_client.h"
21
22 using ::testing::AnyNumber;
23 using ::testing::Return;
24 using ::testing::_;
25
26 namespace chromeos {
27
28 MockDBusThreadManager::MockDBusThreadManager()
29 : mock_bluetooth_adapter_client_(new MockBluetoothAdapterClient),
30 mock_bluetooth_device_client_(new MockBluetoothDeviceClient),
31 mock_bluetooth_input_client_(new MockBluetoothInputClient),
32 mock_bluetooth_manager_client_(new MockBluetoothManagerClient),
33 mock_bluetooth_node_client_(new MockBluetoothNodeClient),
34 mock_cashew_client_(new MockCashewClient),
35 mock_cros_disks_client_(new MockCrosDisksClient),
36 mock_cryptohome_client_(new MockCryptohomeClient),
37 mock_image_burner_client_(new MockImageBurnerClient),
38 mock_introspectable_client_(new MockIntrospectableClient),
39 mock_power_manager_client_(new MockPowerManagerClient),
40 mock_session_manager_client_(new MockSessionManagerClient),
41 mock_speech_synthesizer_client_(new MockSpeechSynthesizerClient),
42 mock_update_engine_client_(new MockUpdateEngineClient) {
43 EXPECT_CALL(*this, GetBluetoothAdapterClient())
44 .WillRepeatedly(Return(mock_bluetooth_adapter_client_.get()));
45 EXPECT_CALL(*this, GetBluetoothDeviceClient())
46 .WillRepeatedly(Return(mock_bluetooth_device_client_.get()));
47 EXPECT_CALL(*this, GetBluetoothInputClient())
48 .WillRepeatedly(Return(mock_bluetooth_input_client_.get()));
49 EXPECT_CALL(*this, GetBluetoothManagerClient())
50 .WillRepeatedly(Return(mock_bluetooth_manager_client()));
51 EXPECT_CALL(*this, GetBluetoothNodeClient())
52 .WillRepeatedly(Return(mock_bluetooth_node_client_.get()));
53 EXPECT_CALL(*this, GetCashewClient())
54 .WillRepeatedly(Return(mock_cashew_client()));
55 EXPECT_CALL(*this, GetCrosDisksClient())
56 .WillRepeatedly(Return(mock_cros_disks_client()));
57 EXPECT_CALL(*this, GetCryptohomeClient())
58 .WillRepeatedly(Return(mock_cryptohome_client()));
59 EXPECT_CALL(*this, GetImageBurnerClient())
60 .WillRepeatedly(Return(mock_image_burner_client()));
61 EXPECT_CALL(*this, GetIntrospectableClient())
62 .WillRepeatedly(Return(mock_introspectable_client()));
63 EXPECT_CALL(*this, GetPowerManagerClient())
64 .WillRepeatedly(Return(mock_power_manager_client_.get()));
65 EXPECT_CALL(*this, GetSessionManagerClient())
66 .WillRepeatedly(Return(mock_session_manager_client_.get()));
67 EXPECT_CALL(*this, GetSpeechSynthesizerClient())
68 .WillRepeatedly(Return(mock_speech_synthesizer_client_.get()));
69 EXPECT_CALL(*this, GetUpdateEngineClient())
70 .WillRepeatedly(Return(mock_update_engine_client_.get()));
71
72 // These observers calls are used in ChromeBrowserMainPartsChromeos.
73 EXPECT_CALL(*mock_power_manager_client_.get(), AddObserver(_))
74 .Times(AnyNumber());
75 EXPECT_CALL(*mock_power_manager_client_.get(), RemoveObserver(_))
76 .Times(AnyNumber());
77 EXPECT_CALL(*mock_session_manager_client_.get(), AddObserver(_))
78 .Times(AnyNumber());
79 EXPECT_CALL(*mock_session_manager_client_.get(), RemoveObserver(_))
80 .Times(AnyNumber());
81 EXPECT_CALL(*mock_update_engine_client_.get(), AddObserver(_))
82 .Times(AnyNumber());
83 EXPECT_CALL(*mock_update_engine_client_.get(), RemoveObserver(_))
84 .Times(AnyNumber());
85
86 // Called from PowerMenuButton ctor.
87 EXPECT_CALL(*mock_power_manager_client_.get(), RequestStatusUpdate(_))
88 .Times(AnyNumber());
89
90 // Called from DiskMountManager::Initialize(), ChromeBrowserMainPartsChromeos.
91 EXPECT_CALL(*mock_cros_disks_client_.get(), SetUpConnections(_, _))
92 .Times(AnyNumber());
93 }
94
95 MockDBusThreadManager::~MockDBusThreadManager() {}
96
97 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698