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

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..802284276954f33e2ab000f9d5fc8c8f579f3cc8 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<DBusThreadManagerSetter> dbus_setter =
+ chromeos::DBusThreadManager::GetSetterForTesting();
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_setter->SetBluetoothDeviceClient(
scoped_ptr<BluetoothDeviceClient>(
fake_bluetooth_device_client_));
- fake_dbus_thread_manager->SetBluetoothGattServiceClient(
+ dbus_setter->SetBluetoothGattServiceClient(
scoped_ptr<BluetoothGattServiceClient>(
fake_bluetooth_gatt_service_client_));
- fake_dbus_thread_manager->SetBluetoothGattCharacteristicClient(
+ dbus_setter->SetBluetoothGattCharacteristicClient(
scoped_ptr<BluetoothGattCharacteristicClient>(
fake_bluetooth_gatt_characteristic_client_));
- fake_dbus_thread_manager->SetBluetoothGattDescriptorClient(
+ dbus_setter->SetBluetoothGattDescriptorClient(
scoped_ptr<BluetoothGattDescriptorClient>(
fake_bluetooth_gatt_descriptor_client_));
- fake_dbus_thread_manager->SetBluetoothAdapterClient(
+ dbus_setter->SetBluetoothAdapterClient(
scoped_ptr<BluetoothAdapterClient>(new FakeBluetoothAdapterClient));
- fake_dbus_thread_manager->SetBluetoothInputClient(
+ dbus_setter->SetBluetoothInputClient(
scoped_ptr<BluetoothInputClient>(new FakeBluetoothInputClient));
- fake_dbus_thread_manager->SetBluetoothAgentManagerClient(
+ dbus_setter->SetBluetoothAgentManagerClient(
scoped_ptr<BluetoothAgentManagerClient>(
new FakeBluetoothAgentManagerClient));
- DBusThreadManager::InitializeForTesting(fake_dbus_thread_manager);
GetAdapter();
« no previous file with comments | « device/bluetooth/bluetooth_chromeos_unittest.cc ('k') | device/bluetooth/bluetooth_socket_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698