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

Unified Diff: device/bluetooth/bluetooth_chromeos_unittest.cc

Issue 49773003: ChromeOS: Remove MockDBusThreadManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: device/bluetooth/bluetooth_chromeos_unittest.cc
diff --git a/device/bluetooth/bluetooth_chromeos_unittest.cc b/device/bluetooth/bluetooth_chromeos_unittest.cc
index 3adaacb529403d516634deadb14076b14da8ad13..44025cca63463b34dc567d3bf86bce1e8836fda5 100644
--- a/device/bluetooth/bluetooth_chromeos_unittest.cc
+++ b/device/bluetooth/bluetooth_chromeos_unittest.cc
@@ -208,13 +208,14 @@ class TestPairingDelegate : public BluetoothDevice::PairingDelegate {
class BluetoothChromeOSTest : public testing::Test {
public:
virtual void SetUp() {
- fake_dbus_thread_manager_ = new FakeDBusThreadManager();
- DBusThreadManager::InitializeForTesting(fake_dbus_thread_manager_);
-
- fake_bluetooth_adapter_client_ =
- fake_dbus_thread_manager_->fake_bluetooth_adapter_client();
- fake_bluetooth_device_client_ =
- fake_dbus_thread_manager_->fake_bluetooth_device_client();
+ FakeDBusThreadManager* fake_dbus_thread_manager = new FakeDBusThreadManager;
+ fake_bluetooth_adapter_client_ = new FakeBluetoothAdapterClient;
+ fake_dbus_thread_manager_->SetBluetoothAdapterClient(
+ scoped_ptr<BluetoothAdapterClient>(fake_bluetooth_adapter_client_));
+ fake_bluetooth_device_client_ = new FakeBluetoothDeviceClient;
+ fake_dbus_thread_manager_->SetBluetoothDeviceClient(
+ scoped_ptr<BluetoothDeviceClient>(fake_bluetooth_device_client_));
+ DBusThreadManager::InitializeForTesting(fake_dbus_thread_manager);
callback_count_ = 0;
error_callback_count_ = 0;

Powered by Google App Engine
This is Rietveld 408576698