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

Unified Diff: components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc

Issue 2571763003: Reduce FakeArcBridgeService usage. (Closed)
Patch Set: Created 4 years 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 | « components/arc/arc_bridge_service.cc ('k') | components/arc/ime/arc_ime_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc
diff --git a/components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc b/components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc
index de022ecf691e299812fc4ad961be248218b8415e..861137143e61ef1c6ab8c4a82d3211c159fcea1f 100644
--- a/components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc
+++ b/components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc
@@ -11,9 +11,9 @@
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
+#include "components/arc/arc_bridge_service.h"
#include "components/arc/bluetooth/bluetooth_type_converters.h"
#include "components/arc/common/bluetooth.mojom.h"
-#include "components/arc/test/fake_arc_bridge_service.h"
#include "components/arc/test/fake_bluetooth_instance.h"
#include "device/bluetooth/dbus/bluez_dbus_manager.h"
#include "device/bluetooth/dbus/fake_bluetooth_adapter_client.h"
@@ -89,12 +89,12 @@ class ArcBluetoothBridgeTest : public testing::Test {
dbus_setter->SetBluetoothGattDescriptorClient(
base::MakeUnique<bluez::FakeBluetoothGattDescriptorClient>());
- fake_arc_bridge_service_.reset(new FakeArcBridgeService());
- fake_bluetooth_instance_.reset(new FakeBluetoothInstance());
- fake_arc_bridge_service_->bluetooth()->SetInstance(
+ arc_bridge_service_ = base::MakeUnique<ArcBridgeService>();
+ fake_bluetooth_instance_ = base::MakeUnique<FakeBluetoothInstance>();
+ arc_bridge_service_->bluetooth()->SetInstance(
fake_bluetooth_instance_.get(), 2);
- arc_bluetooth_bridge_.reset(
- new ArcBluetoothBridge(fake_arc_bridge_service_.get()));
+ arc_bluetooth_bridge_ =
+ base::MakeUnique<ArcBluetoothBridge>(arc_bridge_service_.get());
device::BluetoothAdapterFactory::GetAdapter(base::Bind(
&ArcBluetoothBridgeTest::OnAdapterInitialized, base::Unretained(this)));
@@ -166,7 +166,7 @@ class ArcBluetoothBridgeTest : public testing::Test {
int last_adv_handle_;
mojom::BluetoothGattStatus last_status_;
- std::unique_ptr<FakeArcBridgeService> fake_arc_bridge_service_;
+ std::unique_ptr<ArcBridgeService> arc_bridge_service_;
std::unique_ptr<FakeBluetoothInstance> fake_bluetooth_instance_;
std::unique_ptr<ArcBluetoothBridge> arc_bluetooth_bridge_;
scoped_refptr<device::BluetoothAdapter> adapter_;
« no previous file with comments | « components/arc/arc_bridge_service.cc ('k') | components/arc/ime/arc_ime_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698