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

Side by Side Diff: device/bluetooth/test/bluetooth_test_mac.h

Issue 2695573002: Adding BluetoothTestBase::CheckNotifySessionValue() method (Closed)
Patch Set: Fixing tests 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_MAC_H_ 5 #ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_MAC_H_
6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_MAC_H_ 6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_MAC_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/test/test_simple_task_runner.h" 10 #include "base/test/test_simple_task_runner.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 BluetoothRemoteGattCharacteristic* characteristic) override; 77 BluetoothRemoteGattCharacteristic* characteristic) override;
78 void SimulateGattNotifySessionStopError( 78 void SimulateGattNotifySessionStopError(
79 BluetoothRemoteGattCharacteristic* characteristic, 79 BluetoothRemoteGattCharacteristic* characteristic,
80 BluetoothRemoteGattService::GattErrorCode error_code) override; 80 BluetoothRemoteGattService::GattErrorCode error_code) override;
81 void SimulateGattCharacteristicChanged( 81 void SimulateGattCharacteristicChanged(
82 BluetoothRemoteGattCharacteristic* characteristic, 82 BluetoothRemoteGattCharacteristic* characteristic,
83 const std::vector<uint8_t>& value) override; 83 const std::vector<uint8_t>& value) override;
84 void SimulateGattCharacteristicRemoved( 84 void SimulateGattCharacteristicRemoved(
85 BluetoothRemoteGattService* service, 85 BluetoothRemoteGattService* service,
86 BluetoothRemoteGattCharacteristic* characteristic) override; 86 BluetoothRemoteGattCharacteristic* characteristic) override;
87 void CheckNotifySessionValue(uint16_t expected_config_descriptor_value,
88 int attempts) override;
87 89
88 // Callback for the bluetooth central manager mock. 90 // Callback for the bluetooth central manager mock.
89 void OnFakeBluetoothDeviceConnectGattCalled(); 91 void OnFakeBluetoothDeviceConnectGattCalled();
90 void OnFakeBluetoothGattDisconnect(); 92 void OnFakeBluetoothGattDisconnect();
91 93
92 // Callback for the bluetooth peripheral mock. 94 // Callback for the bluetooth peripheral mock.
93 void OnFakeBluetoothServiceDiscovery(); 95 void OnFakeBluetoothServiceDiscovery();
94 void OnFakeBluetoothCharacteristicReadValue(); 96 void OnFakeBluetoothCharacteristicReadValue();
95 void OnFakeBluetoothCharacteristicWriteValue(std::vector<uint8_t> value); 97 void OnFakeBluetoothCharacteristicWriteValue(std::vector<uint8_t> value);
96 void OnFakeBluetoothGattSetCharacteristicNotification(bool notify_value); 98 void OnFakeBluetoothGattSetCharacteristicNotification(bool notify_value);
(...skipping 25 matching lines...) Expand all
122 // Value set by -[CBPeripheral setNotifyValue:forCharacteristic:] call. 124 // Value set by -[CBPeripheral setNotifyValue:forCharacteristic:] call.
123 bool last_notify_value = false; 125 bool last_notify_value = false;
124 }; 126 };
125 127
126 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName). 128 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName).
127 typedef BluetoothTestMac BluetoothTest; 129 typedef BluetoothTestMac BluetoothTest;
128 130
129 } // namespace device 131 } // namespace device
130 132
131 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_MAC_H_ 133 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698