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

Unified Diff: device/bluetooth/bluetooth_profile_chromeos_unittest.cc

Issue 49773003: ChromeOS: Remove MockDBusThreadManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed tests. Created 7 years, 1 month 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
« no previous file with comments | « device/bluetooth/bluetooth_chromeos_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_profile_chromeos_unittest.cc
diff --git a/device/bluetooth/bluetooth_profile_chromeos_unittest.cc b/device/bluetooth/bluetooth_profile_chromeos_unittest.cc
index bd91b8691733ba935ebd37214e8114a3785ba586..1792cdac807e2a3e65edb6f339df3c2433d6b8b2 100644
--- a/device/bluetooth/bluetooth_profile_chromeos_unittest.cc
+++ b/device/bluetooth/bluetooth_profile_chromeos_unittest.cc
@@ -3,7 +3,9 @@
// found in the LICENSE file.
#include "base/message_loop/message_loop.h"
+#include "chromeos/dbus/fake_bluetooth_adapter_client.h"
#include "chromeos/dbus/fake_bluetooth_device_client.h"
+#include "chromeos/dbus/fake_bluetooth_input_client.h"
#include "chromeos/dbus/fake_bluetooth_profile_manager_client.h"
#include "chromeos/dbus/fake_bluetooth_profile_service_provider.h"
#include "chromeos/dbus/fake_dbus_thread_manager.h"
@@ -38,11 +40,19 @@ class BluetoothProfileChromeOSTest : public testing::Test {
last_device_(NULL) {}
virtual void SetUp() {
- fake_dbus_thread_manager_ = new FakeDBusThreadManager();
- DBusThreadManager::InitializeForTesting(fake_dbus_thread_manager_);
-
+ FakeDBusThreadManager* fake_dbus_thread_manager = new FakeDBusThreadManager;
fake_bluetooth_profile_manager_client_ =
- fake_dbus_thread_manager_->fake_bluetooth_profile_manager_client();
+ new FakeBluetoothProfileManagerClient;
+ fake_dbus_thread_manager->SetBluetoothProfileManagerClient(
+ scoped_ptr<BluetoothProfileManagerClient>(
+ fake_bluetooth_profile_manager_client_));
+ fake_dbus_thread_manager->SetBluetoothAdapterClient(
+ scoped_ptr<BluetoothAdapterClient>(new FakeBluetoothAdapterClient));
+ fake_dbus_thread_manager->SetBluetoothDeviceClient(
+ scoped_ptr<BluetoothDeviceClient>(new FakeBluetoothDeviceClient));
+ fake_dbus_thread_manager->SetBluetoothInputClient(
+ scoped_ptr<BluetoothInputClient>(new FakeBluetoothInputClient));
+ DBusThreadManager::InitializeForTesting(fake_dbus_thread_manager);
device::BluetoothAdapterFactory::GetAdapter(
base::Bind(&BluetoothProfileChromeOSTest::AdapterCallback,
@@ -95,7 +105,6 @@ class BluetoothProfileChromeOSTest : public testing::Test {
base::MessageLoop message_loop_;
FakeBluetoothProfileManagerClient* fake_bluetooth_profile_manager_client_;
- FakeDBusThreadManager* fake_dbus_thread_manager_;
scoped_refptr<BluetoothAdapter> adapter_;
unsigned int callback_count_;
« no previous file with comments | « device/bluetooth/bluetooth_chromeos_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698