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

Unified Diff: device/bluetooth/test/mock_bluetooth_adapter.cc

Issue 1353053002: Handle RESCAN events from the Bluetooth chooser by starting or extending a discovery session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Rename StartDiscovery to StartDeviceDiscovery. Created 5 years, 3 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
« no previous file with comments | « device/bluetooth/test/mock_bluetooth_adapter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/test/mock_bluetooth_adapter.cc
diff --git a/device/bluetooth/test/mock_bluetooth_adapter.cc b/device/bluetooth/test/mock_bluetooth_adapter.cc
index 8054d6905ba7724383590a4d5545d257e1ad8141..26ae68b83ce4e98ca6dae21c2516c0d1f311e986 100644
--- a/device/bluetooth/test/mock_bluetooth_adapter.cc
+++ b/device/bluetooth/test/mock_bluetooth_adapter.cc
@@ -8,10 +8,21 @@
namespace device {
+using testing::Invoke;
+using testing::_;
+
MockBluetoothAdapter::Observer::Observer() {}
MockBluetoothAdapter::Observer::~Observer() {}
MockBluetoothAdapter::MockBluetoothAdapter() {
+ ON_CALL(*this, AddObserver(_))
+ .WillByDefault(Invoke([this](BluetoothAdapter::Observer* observer) {
+ this->BluetoothAdapter::AddObserver(observer);
+ }));
+ ON_CALL(*this, RemoveObserver(_))
+ .WillByDefault(Invoke([this](BluetoothAdapter::Observer* observer) {
+ this->BluetoothAdapter::RemoveObserver(observer);
+ }));
armansito 2015/09/18 23:33:49 Do you ever need MockBluetoothAdapter::AddObserver
Jeffrey Yasskin 2015/09/19 00:16:47 My tests don't need it; let's see if anyone else's
}
MockBluetoothAdapter::~MockBluetoothAdapter() {}
« no previous file with comments | « device/bluetooth/test/mock_bluetooth_adapter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698