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

Unified Diff: chrome/browser/chromeos/dbus/mock_dbus_thread_manager.cc

Issue 8343069: chromeos: Add MockDBusThreadManager and mock clients. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add todo Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/dbus/mock_dbus_thread_manager.cc
diff --git a/chrome/browser/chromeos/dbus/mock_dbus_thread_manager.cc b/chrome/browser/chromeos/dbus/mock_dbus_thread_manager.cc
new file mode 100644
index 0000000000000000000000000000000000000000..aee4a24db70bd887832e35fde90fd1495a8a1ab3
--- /dev/null
+++ b/chrome/browser/chromeos/dbus/mock_dbus_thread_manager.cc
@@ -0,0 +1,41 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/chromeos/dbus/mock_dbus_thread_manager.h"
+
+#include "chrome/browser/chromeos/dbus/mock_bluetooth_adapter_client.h"
+#include "chrome/browser/chromeos/dbus/mock_bluetooth_manager_client.h"
+#include "chrome/browser/chromeos/dbus/mock_power_manager_client.h"
+#include "chrome/browser/chromeos/dbus/mock_sensors_client.h"
+#include "chrome/browser/chromeos/dbus/mock_session_manager_client.h"
+#include "chrome/browser/chromeos/dbus/mock_speech_synthesizer_client.h"
+
+using ::testing::Return;
+
+namespace chromeos {
+
+MockDBusThreadManager::MockDBusThreadManager()
+ : mock_bluetooth_adapter_client_(new MockBluetoothAdapterClient),
+ mock_bluetooth_manager_client_(new MockBluetoothManagerClient),
+ mock_power_manager_client_(new MockPowerManagerClient),
+ mock_sensors_client_(new MockSensorsClient),
+ mock_session_manager_client_(new MockSessionManagerClient),
+ mock_speech_synthesizer_client_(new MockSpeechSynthesizerClient) {
+ EXPECT_CALL(*this, bluetooth_adapter_client())
+ .WillRepeatedly(Return(mock_bluetooth_adapter_client_.get()));
+ EXPECT_CALL(*this, bluetooth_manager_client())
+ .WillRepeatedly(Return(mock_bluetooth_manager_client()));
+ EXPECT_CALL(*this, power_manager_client())
+ .WillRepeatedly(Return(mock_power_manager_client_.get()));
+ EXPECT_CALL(*this, sensors_client())
+ .WillRepeatedly(Return(mock_sensors_client_.get()));
+ EXPECT_CALL(*this, session_manager_client())
+ .WillRepeatedly(Return(mock_session_manager_client_.get()));
+ EXPECT_CALL(*this, speech_synthesizer_client())
+ .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
+}
+
+MockDBusThreadManager::~MockDBusThreadManager() {}
+
+} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/dbus/mock_dbus_thread_manager.h ('k') | chrome/browser/chromeos/dbus/mock_power_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698