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

Unified Diff: components/arc/test/fake_arc_bridge_service.cc

Issue 2046283003: Add unit test for ArcBluetoothBridge and TypeConverter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bt
Patch Set: Use fake dbus client instead of mock Bluetooth type Created 4 years, 6 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: components/arc/test/fake_arc_bridge_service.cc
diff --git a/components/arc/test/fake_arc_bridge_service.cc b/components/arc/test/fake_arc_bridge_service.cc
index 64d17b03544f7921a7eae0926f8279751e33f64e..409c6a39afc1c347bde09c3319d0f8550f9095ab 100644
--- a/components/arc/test/fake_arc_bridge_service.cc
+++ b/components/arc/test/fake_arc_bridge_service.cc
@@ -6,8 +6,9 @@
namespace arc {
-FakeArcBridgeService::FakeArcBridgeService() {
-}
+FakeArcBridgeService::FakeArcBridgeService()
+ : bluetooth_instance_(base::WrapUnique(new FakeBluetoothInstance())),
+ bluetooth_version_(2) {}
FakeArcBridgeService::~FakeArcBridgeService() {
SetStopped();
@@ -25,6 +26,14 @@ void FakeArcBridgeService::Shutdown() {
SetStopped();
}
+mojom::BluetoothInstance* FakeArcBridgeService::bluetooth_instance() {
+ return bluetooth_instance_.get();
+}
+
+int32_t FakeArcBridgeService::bluetooth_version() const {
+ return bluetooth_version_;
+}
+
void FakeArcBridgeService::SetReady() {
if (state() != State::READY)
SetState(State::READY);

Powered by Google App Engine
This is Rietveld 408576698