| Index: device/bluetooth/test/bluetooth_test_mac.mm
|
| diff --git a/device/bluetooth/test/bluetooth_test_mac.mm b/device/bluetooth/test/bluetooth_test_mac.mm
|
| index eb4bf905e330bb81166f50a4af60aa57b42aeeff..a468c7eb536115efc484a01e7bc417c3e5fc67e9 100644
|
| --- a/device/bluetooth/test/bluetooth_test_mac.mm
|
| +++ b/device/bluetooth/test/bluetooth_test_mac.mm
|
| @@ -133,6 +133,12 @@ void BluetoothTestMac::InitWithFakeAdapter() {
|
| }
|
| }
|
|
|
| +void BluetoothTestMac::ResetEventCounts() {
|
| + BluetoothTestBase::ResetEventCounts();
|
| + last_notify_value = false;
|
| + gatt_notify_characteristic_attempts_ = 0;
|
| +}
|
| +
|
| BluetoothDevice* BluetoothTestMac::SimulateLowEnergyDevice(int device_ordinal) {
|
| TestBluetoothAdapterObserver observer(adapter_);
|
| CBCentralManager* central_manager = adapter_mac_->low_energy_central_manager_;
|
| @@ -465,6 +471,23 @@ void BluetoothTestMac::SimulateGattCharacteristicRemoved(
|
| [peripheral_mock mockDidDiscoverEvents];
|
| }
|
|
|
| +void BluetoothTestMac::ExpectedChangeNotifyValueAttempts(int attempts) {
|
| + EXPECT_EQ(attempts, gatt_notify_characteristic_attempts_);
|
| +}
|
| +
|
| +void BluetoothTestMac::ExpectedNotifyValue(
|
| + NotifyValueState expected_value_state) {
|
| + switch (expected_value_state) {
|
| + case NotifyValueState::NONE:
|
| + EXPECT_FALSE(last_notify_value);
|
| + break;
|
| + case NotifyValueState::NOTIFY:
|
| + case NotifyValueState::INDICATE:
|
| + EXPECT_TRUE(last_notify_value);
|
| + break;
|
| + }
|
| +}
|
| +
|
| void BluetoothTestMac::OnFakeBluetoothDeviceConnectGattCalled() {
|
| gatt_connection_attempts_++;
|
| }
|
|
|