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

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

Issue 2205693003: bluetooth: Replace old advertised uuids (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Mac test and docs Created 4 years, 4 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 <memory> 10 #include <memory>
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // Simulates GattConnection disconnecting. 129 // Simulates GattConnection disconnecting.
130 virtual void SimulateGattDisconnection(BluetoothDevice* device) {} 130 virtual void SimulateGattDisconnection(BluetoothDevice* device) {}
131 131
132 // Simulates success of discovering services. |uuids| is used to create a 132 // Simulates success of discovering services. |uuids| is used to create a
133 // service for each UUID string. Multiple UUIDs with the same value produce 133 // service for each UUID string. Multiple UUIDs with the same value produce
134 // multiple service instances. 134 // multiple service instances.
135 virtual void SimulateGattServicesDiscovered( 135 virtual void SimulateGattServicesDiscovered(
136 BluetoothDevice* device, 136 BluetoothDevice* device,
137 const std::vector<std::string>& uuids) {} 137 const std::vector<std::string>& uuids) {}
138 138
139 // Simulates a GATT Services changed event.
140 virtual void SimulateGattServicesChanged(BluetoothDevice* device) {}
141
139 // Simulates remove of a |service|. 142 // Simulates remove of a |service|.
140 virtual void SimulateGattServiceRemoved(BluetoothRemoteGattService* service) { 143 virtual void SimulateGattServiceRemoved(BluetoothRemoteGattService* service) {
141 } 144 }
142 145
143 // Simulates failure to discover services. 146 // Simulates failure to discover services.
144 virtual void SimulateGattServicesDiscoveryError(BluetoothDevice* device) {} 147 virtual void SimulateGattServicesDiscoveryError(BluetoothDevice* device) {}
145 148
146 // Simulates a Characteristic on a service. 149 // Simulates a Characteristic on a service.
147 virtual void SimulateGattCharacteristic(BluetoothRemoteGattService* service, 150 virtual void SimulateGattCharacteristic(BluetoothRemoteGattService* service,
148 const std::string& uuid, 151 const std::string& uuid,
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 int actual_error_callback_calls_ = 0; 416 int actual_error_callback_calls_ = 0;
414 bool unexpected_success_callback_ = false; 417 bool unexpected_success_callback_ = false;
415 bool unexpected_error_callback_ = false; 418 bool unexpected_error_callback_ = false;
416 419
417 base::WeakPtrFactory<BluetoothTestBase> weak_factory_; 420 base::WeakPtrFactory<BluetoothTestBase> weak_factory_;
418 }; 421 };
419 422
420 } // namespace device 423 } // namespace device
421 424
422 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ 425 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698