OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_WIN_H_ | 5 #ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_WIN_H_ |
6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_WIN_H_ | 6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_WIN_H_ |
7 | 7 |
8 #include "device/bluetooth/test/bluetooth_test.h" | 8 #include "device/bluetooth/test/bluetooth_test.h" |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 void SimulateGattServicesDiscovered( | 34 void SimulateGattServicesDiscovered( |
35 BluetoothDevice* device, | 35 BluetoothDevice* device, |
36 const std::vector<std::string>& uuids) override; | 36 const std::vector<std::string>& uuids) override; |
37 void SimulateGattServiceRemoved(BluetoothGattService* service) override; | 37 void SimulateGattServiceRemoved(BluetoothGattService* service) override; |
38 void SimulateGattCharacteristic(BluetoothGattService* service, | 38 void SimulateGattCharacteristic(BluetoothGattService* service, |
39 const std::string& uuid, | 39 const std::string& uuid, |
40 int properties) override; | 40 int properties) override; |
41 void SimulateGattCharacteristicRemoved( | 41 void SimulateGattCharacteristicRemoved( |
42 BluetoothGattService* service, | 42 BluetoothGattService* service, |
43 BluetoothGattCharacteristic* characteristic) override; | 43 BluetoothGattCharacteristic* characteristic) override; |
| 44 void SimulateGattDescriptor(BluetoothGattCharacteristic* characteristic, |
| 45 const std::string& uuid) override; |
44 | 46 |
45 private: | 47 private: |
46 scoped_refptr<base::TestSimpleTaskRunner> ui_task_runner_; | 48 scoped_refptr<base::TestSimpleTaskRunner> ui_task_runner_; |
47 scoped_refptr<base::TestSimpleTaskRunner> bluetooth_task_runner_; | 49 scoped_refptr<base::TestSimpleTaskRunner> bluetooth_task_runner_; |
48 BluetoothAdapterWin* adapter_win_; | 50 BluetoothAdapterWin* adapter_win_; |
49 | 51 |
50 win::BluetoothClassicWrapperFake* fake_bt_classic_wrapper_; | 52 win::BluetoothClassicWrapperFake* fake_bt_classic_wrapper_; |
51 win::BluetoothLowEnergyWrapperFake* fake_bt_le_wrapper_; | 53 win::BluetoothLowEnergyWrapperFake* fake_bt_le_wrapper_; |
52 | 54 |
53 void AdapterInitCallback(); | 55 void AdapterInitCallback(); |
54 win::BLEGattService* GetSimulatedService(win::BLEDevice* device, | 56 win::GattService* GetSimulatedService(win::BLEDevice* device, |
55 BluetoothGattService* service); | 57 BluetoothGattService* service); |
| 58 win::GattCharacteristic* GetSimulatedCharacteristic( |
| 59 BluetoothGattCharacteristic* characteristic); |
56 void ForceRefreshDevice(); | 60 void ForceRefreshDevice(); |
| 61 void FinishPendingTasks(); |
57 }; | 62 }; |
58 | 63 |
59 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName). | 64 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName). |
60 typedef BluetoothTestWin BluetoothTest; | 65 typedef BluetoothTestWin BluetoothTest; |
61 | 66 |
62 } // namespace device | 67 } // namespace device |
63 | 68 |
64 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_WIN_H_ | 69 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_WIN_H_ |
OLD | NEW |