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

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

Issue 2641133003: Bluetooth: macOS: Adding counter for service discovery callbacks. (Closed)
Patch Set: Adding BluetoothTestMac::SimulateDidDiscoverServices() Created 3 years, 10 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 daa0d4671b58e7b836e9c1691e260007b9e92f00..42efb9861f6dd28d66a697379bdc13907bca1282 100644
--- a/device/bluetooth/test/bluetooth_test_mac.h
+++ b/device/bluetooth/test/bluetooth_test_mac.h
@@ -88,12 +88,17 @@ class BluetoothTestMac : public BluetoothTestBase {
void ExpectedChangeNotifyValueAttempts(int attempts) override;
void ExpectedNotifyValue(NotifyValueState expected_value_state) override;
+ // Simulate -[id<CBPeripheralDelegate peripheral:didDiscoverServices:]
+ void SimulateDidDiscoverServices(BluetoothDevice* device,
ortuno 2017/03/06 09:49:55 Explain why this is specific to macOS e.g.: macOS
jlebel 2017/03/06 22:13:20 Done.
+ const std::vector<std::string>& uuids);
+
// Callback for the bluetooth central manager mock.
void OnFakeBluetoothDeviceConnectGattCalled();
void OnFakeBluetoothGattDisconnect();
// Callback for the bluetooth peripheral mock.
void OnFakeBluetoothServiceDiscovery();
+ void OnFakeBluetoothCharacteristicDiscovery();
void OnFakeBluetoothCharacteristicReadValue();
void OnFakeBluetoothCharacteristicWriteValue(std::vector<uint8_t> value);
void OnFakeBluetoothGattSetCharacteristicNotification(bool notify_value);
@@ -124,6 +129,7 @@ class BluetoothTestMac : public BluetoothTestBase {
// Value set by -[CBPeripheral setNotifyValue:forCharacteristic:] call.
bool last_notify_value_ = false;
+ int gatt_characteristic_discovery_attempts_ = 0;
};
// Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName).

Powered by Google App Engine
This is Rietveld 408576698