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); |
+ })); |
} |
MockBluetoothAdapter::~MockBluetoothAdapter() {} |