| 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_BLUEZ_H_ | 5 #ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_BLUEZ_H_ |
| 6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_BLUEZ_H_ | 6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_BLUEZ_H_ |
| 7 | 7 |
| 8 #include <cstdint> | 8 #include <cstdint> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
| 12 #include "device/bluetooth/bluetooth_device.h" | 12 #include "device/bluetooth/bluetooth_device.h" |
| 13 #include "device/bluetooth/bluetooth_local_gatt_characteristic.h" | 13 #include "device/bluetooth/bluetooth_local_gatt_characteristic.h" |
| 14 #include "device/bluetooth/bluetooth_local_gatt_descriptor.h" | 14 #include "device/bluetooth/bluetooth_local_gatt_descriptor.h" |
| 15 #include "device/bluetooth/test/bluetooth_test.h" | 15 #include "device/bluetooth/test/bluetooth_test.h" |
| 16 | 16 |
| 17 namespace bluez { | 17 namespace bluez { |
| 18 class FakeBluetoothDeviceClient; | 18 class FakeBluetoothDeviceClient; |
| 19 class FakeBluetoothAdapterClient; |
| 19 } | 20 } |
| 20 | 21 |
| 21 namespace device { | 22 namespace device { |
| 22 | 23 |
| 23 // BlueZ implementation of BluetoothTestBase. | 24 // BlueZ implementation of BluetoothTestBase. |
| 24 class BluetoothTestBlueZ : public BluetoothTestBase { | 25 class BluetoothTestBlueZ : public BluetoothTestBase { |
| 25 public: | 26 public: |
| 26 BluetoothTestBlueZ(); | 27 BluetoothTestBlueZ(); |
| 27 ~BluetoothTestBlueZ() override; | 28 ~BluetoothTestBlueZ() override; |
| 28 | 29 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 59 const base::Closure& error_callback) override; | 60 const base::Closure& error_callback) override; |
| 60 bool SimulateLocalGattCharacteristicNotificationsRequest( | 61 bool SimulateLocalGattCharacteristicNotificationsRequest( |
| 61 BluetoothLocalGattCharacteristic* characteristic, | 62 BluetoothLocalGattCharacteristic* characteristic, |
| 62 bool start) override; | 63 bool start) override; |
| 63 std::vector<uint8_t> LastNotifactionValueForCharacteristic( | 64 std::vector<uint8_t> LastNotifactionValueForCharacteristic( |
| 64 BluetoothLocalGattCharacteristic* characteristic) override; | 65 BluetoothLocalGattCharacteristic* characteristic) override; |
| 65 std::vector<BluetoothLocalGattService*> RegisteredGattServices() override; | 66 std::vector<BluetoothLocalGattService*> RegisteredGattServices() override; |
| 66 | 67 |
| 67 private: | 68 private: |
| 68 bluez::FakeBluetoothDeviceClient* fake_bluetooth_device_client_; | 69 bluez::FakeBluetoothDeviceClient* fake_bluetooth_device_client_; |
| 70 bluez::FakeBluetoothAdapterClient* fake_bluetooth_adapter_client_; |
| 69 }; | 71 }; |
| 70 | 72 |
| 71 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName). | 73 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName). |
| 72 using BluetoothTest = BluetoothTestBlueZ; | 74 using BluetoothTest = BluetoothTestBlueZ; |
| 73 | 75 |
| 74 } // namespace device | 76 } // namespace device |
| 75 | 77 |
| 76 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_BLUEZ_H_ | 78 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_BLUEZ_H_ |
| OLD | NEW |