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

Unified Diff: device/bluetooth/bluetooth_gatt_chromeos_unittest.cc

Issue 477663004: Merged FakedDBusThreadManager with DBusThreadManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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: device/bluetooth/bluetooth_gatt_chromeos_unittest.cc
diff --git a/device/bluetooth/bluetooth_gatt_chromeos_unittest.cc b/device/bluetooth/bluetooth_gatt_chromeos_unittest.cc
index d3f78cbf180b1d5f5bad49a259b7a88ebb768ef2..eb6360458c81d66b0dad43b87bd672a9764ac21b 100644
--- a/device/bluetooth/bluetooth_gatt_chromeos_unittest.cc
+++ b/device/bluetooth/bluetooth_gatt_chromeos_unittest.cc
@@ -5,6 +5,7 @@
#include "base/memory/scoped_vector.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
+#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/fake_bluetooth_adapter_client.h"
#include "chromeos/dbus/fake_bluetooth_agent_manager_client.h"
#include "chromeos/dbus/fake_bluetooth_device_client.h"
@@ -12,7 +13,6 @@
#include "chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h"
#include "chromeos/dbus/fake_bluetooth_gatt_service_client.h"
#include "chromeos/dbus/fake_bluetooth_input_client.h"
-#include "chromeos/dbus/fake_dbus_thread_manager.h"
#include "dbus/object_path.h"
#include "device/bluetooth/bluetooth_adapter.h"
#include "device/bluetooth/bluetooth_adapter_factory.h"
@@ -281,7 +281,8 @@ class BluetoothGattChromeOSTest : public testing::Test {
}
virtual void SetUp() {
- FakeDBusThreadManager* fake_dbus_thread_manager = new FakeDBusThreadManager;
+ scoped_ptr<DBusThreadManagerTestHelper> dbus_helper =
+ chromeos::DBusThreadManager::InitializeForTesting();
fake_bluetooth_device_client_ = new FakeBluetoothDeviceClient;
fake_bluetooth_gatt_service_client_ =
new FakeBluetoothGattServiceClient;
@@ -289,26 +290,25 @@ class BluetoothGattChromeOSTest : public testing::Test {
new FakeBluetoothGattCharacteristicClient;
fake_bluetooth_gatt_descriptor_client_ =
new FakeBluetoothGattDescriptorClient;
- fake_dbus_thread_manager->SetBluetoothDeviceClient(
+ dbus_helper->SetBluetoothDeviceClient(
scoped_ptr<BluetoothDeviceClient>(
fake_bluetooth_device_client_));
- fake_dbus_thread_manager->SetBluetoothGattServiceClient(
+ dbus_helper->SetBluetoothGattServiceClient(
scoped_ptr<BluetoothGattServiceClient>(
fake_bluetooth_gatt_service_client_));
- fake_dbus_thread_manager->SetBluetoothGattCharacteristicClient(
+ dbus_helper->SetBluetoothGattCharacteristicClient(
scoped_ptr<BluetoothGattCharacteristicClient>(
fake_bluetooth_gatt_characteristic_client_));
- fake_dbus_thread_manager->SetBluetoothGattDescriptorClient(
+ dbus_helper->SetBluetoothGattDescriptorClient(
scoped_ptr<BluetoothGattDescriptorClient>(
fake_bluetooth_gatt_descriptor_client_));
- fake_dbus_thread_manager->SetBluetoothAdapterClient(
+ dbus_helper->SetBluetoothAdapterClient(
scoped_ptr<BluetoothAdapterClient>(new FakeBluetoothAdapterClient));
- fake_dbus_thread_manager->SetBluetoothInputClient(
+ dbus_helper->SetBluetoothInputClient(
scoped_ptr<BluetoothInputClient>(new FakeBluetoothInputClient));
- fake_dbus_thread_manager->SetBluetoothAgentManagerClient(
+ dbus_helper->SetBluetoothAgentManagerClient(
scoped_ptr<BluetoothAgentManagerClient>(
new FakeBluetoothAgentManagerClient));
- DBusThreadManager::InitializeForTesting(fake_dbus_thread_manager);
GetAdapter();

Powered by Google App Engine
This is Rietveld 408576698