| Index: device/bluetooth/test/mock_bluetooth_gatt_notify_session.h
|
| diff --git a/device/bluetooth/test/mock_bluetooth_gatt_notify_session.h b/device/bluetooth/test/mock_bluetooth_gatt_notify_session.h
|
| index 97c28e7bb6ef5f0bd33148b46c7c2a3e568cd3f8..c60a8421eba398002e5c9edf2d2d06f9e7d1c251 100644
|
| --- a/device/bluetooth/test/mock_bluetooth_gatt_notify_session.h
|
| +++ b/device/bluetooth/test/mock_bluetooth_gatt_notify_session.h
|
| @@ -8,11 +8,15 @@
|
| #include <string>
|
|
|
| #include "base/callback.h"
|
| +#include "base/timer/timer.h"
|
| #include "device/bluetooth/bluetooth_gatt_notify_session.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
|
|
| namespace device {
|
|
|
| +class MockBluetoothAdapter;
|
| +class MockBluetoothGattCharacteristic;
|
| +
|
| class MockBluetoothGattNotifySession : public BluetoothGattNotifySession {
|
| public:
|
| explicit MockBluetoothGattNotifySession(
|
| @@ -23,7 +27,20 @@ class MockBluetoothGattNotifySession : public BluetoothGattNotifySession {
|
| MOCK_METHOD0(IsActive, bool());
|
| MOCK_METHOD1(Stop, void(const base::Closure&));
|
|
|
| + // Starts notifying the adapter's observers that the characteristic's value
|
| + // changed.
|
| + void StartTestNotifications(MockBluetoothAdapter* adapter,
|
| + MockBluetoothGattCharacteristic* characteristic,
|
| + const std::vector<uint8_t>& value);
|
| + void StopTestNotifications();
|
| +
|
| private:
|
| + void TestNotify(MockBluetoothAdapter* adapter,
|
| + MockBluetoothGattCharacteristic* characteristic,
|
| + const std::vector<uint8_t>& value);
|
| +
|
| + base::RepeatingTimer test_notifications_timer_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(MockBluetoothGattNotifySession);
|
| };
|
|
|
|
|