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

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

Issue 2638653002: Bluetooth: macOS: DidModifyServices can happens while scanning (Closed)
Patch Set: Removing useless modification Created 3 years, 8 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: device/bluetooth/test/bluetooth_test_mac.h
diff --git a/device/bluetooth/test/bluetooth_test_mac.h b/device/bluetooth/test/bluetooth_test_mac.h
index 46e168a4d7c103432301130a05f5c1e113bd6085..a45ff64c9830ffbb8cf1ddf52794813802ab8292 100644
--- a/device/bluetooth/test/bluetooth_test_mac.h
+++ b/device/bluetooth/test/bluetooth_test_mac.h
@@ -91,8 +91,24 @@ class BluetoothTestMac : public BluetoothTestBase {
// macOS is the only platform for which we need to discover each set of
// attributes individually so we need a method to simulate discovering each
// set of attributes.
- void SimulateDidDiscoverServices(BluetoothDevice* device,
- const std::vector<std::string>& uuids);
+ // Simulates service discovery for a device.
+ void SimulateDidDiscoverServices(BluetoothDevice* device);
+ // Simulates characteristic discovery for a service.
+ void SimulateDidDiscoverCharacteristics(BluetoothRemoteGattService* service);
+ // Simulates descriptor discovery for a characteristic.
+ void SimulateDidDiscoverDescriptors(
+ BluetoothRemoteGattCharacteristic* characteristic);
+ // Adds services in MockCBPeripheral.
+ void AddServicesToDevice(BluetoothDevice* device,
+ const std::vector<std::string>& uuids);
+ // Adds a characteristic in MockCBService.
+ void AddCharacteristicToService(BluetoothRemoteGattService* service,
+ const std::string& characteristic_uuid,
+ int properties);
+ // Adds a descriptor in MockCBCharacteristic.
+ void AddDescriptorToCharacteristic(
+ BluetoothRemoteGattCharacteristic* characteristic,
+ const std::string& uuid);
// Callback for the bluetooth central manager mock.
void OnFakeBluetoothDeviceConnectGattCalled();
@@ -124,9 +140,6 @@ class BluetoothTestMac : public BluetoothTestBase {
// Returns MockCBCharacteristic from BluetoothRemoteGattCharacteristic.
MockCBCharacteristic* GetCBMockCharacteristic(
BluetoothRemoteGattCharacteristic* characteristic) const;
- // Adds services in MockCBPeripheral.
- void AddServicesToDevice(BluetoothDevice* device,
- const std::vector<std::string>& uuids);
// Utility function for finding CBUUIDs with relatively nice SHA256 hashes.
std::string FindCBUUIDForHashTarget();

Powered by Google App Engine
This is Rietveld 408576698