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

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

Issue 1765773002: bluetooth: Refactor GetDescriptorForUUID to GetDescriptorsForUUID. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bta-notify-tommyt-
Patch Set: Created 4 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 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_H_ 5 #ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_
6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ 6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // accept a nullptr value to select this remembered characteristic. This 134 // accept a nullptr value to select this remembered characteristic. This
135 // enables tests where the platform attempts to reference characteristic 135 // enables tests where the platform attempts to reference characteristic
136 // objects after the Chrome objects have been deleted, e.g. with DeleteDevice. 136 // objects after the Chrome objects have been deleted, e.g. with DeleteDevice.
137 virtual void RememberCharacteristicForSubsequentAction( 137 virtual void RememberCharacteristicForSubsequentAction(
138 BluetoothGattCharacteristic* characteristic) {} 138 BluetoothGattCharacteristic* characteristic) {}
139 139
140 // Simulates a Characteristic Set Notify success. 140 // Simulates a Characteristic Set Notify success.
141 virtual void SimulateGattNotifySessionStarted( 141 virtual void SimulateGattNotifySessionStarted(
142 BluetoothGattCharacteristic* characteristic) {} 142 BluetoothGattCharacteristic* characteristic) {}
143 143
144 // Simulates a Characteristic Set Notify error.
145 virtual void SimulateGattNotifySessionStartError(
146 BluetoothGattCharacteristic* characteristic,
147 BluetoothGattService::GattErrorCode error_code) {}
148
144 // Simulates a Characteristic Set Notify operation failing synchronously once 149 // Simulates a Characteristic Set Notify operation failing synchronously once
145 // for an unknown reason. 150 // for an unknown reason.
146 virtual void SimulateGattCharacteristicSetNotifyWillFailSynchronouslyOnce( 151 virtual void SimulateGattCharacteristicSetNotifyWillFailSynchronouslyOnce(
147 BluetoothGattCharacteristic* characteristic) {} 152 BluetoothGattCharacteristic* characteristic) {}
148 153
149 // Simulates a Characteristic Changed operation with updated |value|. 154 // Simulates a Characteristic Changed operation with updated |value|.
150 virtual void SimulateGattCharacteristicChanged( 155 virtual void SimulateGattCharacteristicChanged(
151 BluetoothGattCharacteristic* characteristic, 156 BluetoothGattCharacteristic* characteristic,
152 const std::vector<uint8_t>& value) {} 157 const std::vector<uint8_t>& value) {}
153 158
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 int actual_error_callback_calls_ = 0; 301 int actual_error_callback_calls_ = 0;
297 bool unexpected_success_callback_ = false; 302 bool unexpected_success_callback_ = false;
298 bool unexpected_error_callback_ = false; 303 bool unexpected_error_callback_ = false;
299 304
300 base::WeakPtrFactory<BluetoothTestBase> weak_factory_; 305 base::WeakPtrFactory<BluetoothTestBase> weak_factory_;
301 }; 306 };
302 307
303 } // namespace device 308 } // namespace device
304 309
305 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ 310 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698