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

Unified Diff: device/bluetooth/test/mock_bluetooth_gatt_characteristic.h

Issue 2466223002: Implement WebBluetooth getDescriptor[s] (Closed)
Patch Set: Addressing code review comments from ortuno (still working on test changes) Created 4 years, 1 month 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: device/bluetooth/test/mock_bluetooth_gatt_characteristic.h
diff --git a/device/bluetooth/test/mock_bluetooth_gatt_characteristic.h b/device/bluetooth/test/mock_bluetooth_gatt_characteristic.h
index 021cc599bdc42861c9ccad9f5ca812fafb0f673e..4409a4d0724f5c88ebc658662156171c8703945e 100644
--- a/device/bluetooth/test/mock_bluetooth_gatt_characteristic.h
+++ b/device/bluetooth/test/mock_bluetooth_gatt_characteristic.h
@@ -12,7 +12,9 @@
#include "base/callback.h"
#include "base/macros.h"
+#include "base/memory/scoped_vector.h"
#include "device/bluetooth/bluetooth_remote_gatt_characteristic.h"
+#include "device/bluetooth/bluetooth_remote_gatt_descriptor.h"
#include "device/bluetooth/bluetooth_uuid.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -20,6 +22,7 @@ namespace device {
class BluetoothRemoteGattDescriptor;
class BluetoothRemoteGattService;
+class MockBluetoothGattDescriptor;
class MockBluetoothGattService;
class MockBluetoothGattCharacteristic
@@ -58,6 +61,12 @@ class MockBluetoothGattCharacteristic
const base::Closure&,
const ErrorCallback&));
+ void AddMockDescriptor(
+ std::unique_ptr<MockBluetoothGattDescriptor> mock_descriptor);
+ std::vector<BluetoothRemoteGattDescriptor*> GetMockDescriptors() const;
+ BluetoothRemoteGattDescriptor* GetMockDescriptor(
+ const std::string& identifier) const;
+
protected:
MOCK_METHOD3(SubscribeToNotifications,
void(BluetoothRemoteGattDescriptor*,
@@ -69,6 +78,9 @@ class MockBluetoothGattCharacteristic
const ErrorCallback&));
private:
+ // dougt TODO
ortuno 2016/11/22 03:02:02 I think you are forgetting something here?
dougt 2016/11/29 22:50:48 Done.
+ ScopedVector<MockBluetoothGattDescriptor> mock_descriptors_;
+
DISALLOW_COPY_AND_ASSIGN(MockBluetoothGattCharacteristic);
};

Powered by Google App Engine
This is Rietveld 408576698