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

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

Issue 2641133003: Bluetooth: macOS: Adding counter for service discovery callbacks. (Closed)
Patch Set: Adding comment Created 3 years, 9 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
« no previous file with comments | « device/bluetooth/bluetooth_low_energy_device_mac.mm ('k') | device/bluetooth/test/bluetooth_test_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..d4db9809a04bc87f3c7e0fd472fe40de6eee53f0 100644
--- a/device/bluetooth/test/bluetooth_test_mac.h
+++ b/device/bluetooth/test/bluetooth_test_mac.h
@@ -88,12 +88,19 @@ class BluetoothTestMac : public BluetoothTestBase {
void ExpectedChangeNotifyValueAttempts(int attempts) override;
void ExpectedNotifyValue(NotifyValueState expected_value_state) override;
+ // 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);
+
// 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 +131,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).
« no previous file with comments | « device/bluetooth/bluetooth_low_energy_device_mac.mm ('k') | device/bluetooth/test/bluetooth_test_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698