OLD | NEW |
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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 BluetoothRemoteGattCharacteristic* characteristic); | 357 BluetoothRemoteGattCharacteristic* characteristic); |
358 base::Callback<void(BluetoothGattService::GattErrorCode)> | 358 base::Callback<void(BluetoothGattService::GattErrorCode)> |
359 GetReentrantStartNotifySessionErrorCallback( | 359 GetReentrantStartNotifySessionErrorCallback( |
360 Call expected, | 360 Call expected, |
361 BluetoothRemoteGattCharacteristic* characteristic, | 361 BluetoothRemoteGattCharacteristic* characteristic, |
362 bool error_in_reentrant); | 362 bool error_in_reentrant); |
363 | 363 |
364 // Reset all event count members to 0. | 364 // Reset all event count members to 0. |
365 void ResetEventCounts(); | 365 void ResetEventCounts(); |
366 | 366 |
| 367 void RemoveTimedOutDevices(); |
| 368 |
367 // A Message loop is required by some implementations that will PostTasks and | 369 // A Message loop is required by some implementations that will PostTasks and |
368 // by base::RunLoop().RunUntilIdle() use in this fixture. | 370 // by base::RunLoop().RunUntilIdle() use in this fixture. |
369 base::MessageLoop message_loop_; | 371 base::MessageLoop message_loop_; |
370 | 372 |
371 scoped_refptr<BluetoothAdapter> adapter_; | 373 scoped_refptr<BluetoothAdapter> adapter_; |
372 ScopedVector<BluetoothDiscoverySession> discovery_sessions_; | 374 ScopedVector<BluetoothDiscoverySession> discovery_sessions_; |
373 ScopedVector<BluetoothGattConnection> gatt_connections_; | 375 ScopedVector<BluetoothGattConnection> gatt_connections_; |
374 enum BluetoothDevice::ConnectErrorCode last_connect_error_code_ = | 376 enum BluetoothDevice::ConnectErrorCode last_connect_error_code_ = |
375 BluetoothDevice::ERROR_UNKNOWN; | 377 BluetoothDevice::ERROR_UNKNOWN; |
376 ScopedVector<BluetoothGattNotifySession> notify_sessions_; | 378 ScopedVector<BluetoothGattNotifySession> notify_sessions_; |
(...skipping 20 matching lines...) Expand all Loading... |
397 int actual_error_callback_calls_ = 0; | 399 int actual_error_callback_calls_ = 0; |
398 bool unexpected_success_callback_ = false; | 400 bool unexpected_success_callback_ = false; |
399 bool unexpected_error_callback_ = false; | 401 bool unexpected_error_callback_ = false; |
400 | 402 |
401 base::WeakPtrFactory<BluetoothTestBase> weak_factory_; | 403 base::WeakPtrFactory<BluetoothTestBase> weak_factory_; |
402 }; | 404 }; |
403 | 405 |
404 } // namespace device | 406 } // namespace device |
405 | 407 |
406 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ | 408 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ |
OLD | NEW |