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

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

Issue 1979163002: Add DBus plumbing and tests for sending devices with ATT read/writes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@devices
Patch Set: gyp fix Created 4 years, 7 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
« no previous file with comments | « device/bluetooth/test/bluetooth_test.h ('k') | device/bluetooth/test/bluetooth_test_bluez.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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
(...skipping 17 matching lines...) Expand all
28 28
29 // Test overrides: 29 // Test overrides:
30 void SetUp() override; 30 void SetUp() override;
31 void TearDown() override; 31 void TearDown() override;
32 32
33 // BluetoothTestBase overrides: 33 // BluetoothTestBase overrides:
34 bool PlatformSupportsLowEnergy() override; 34 bool PlatformSupportsLowEnergy() override;
35 void InitWithFakeAdapter() override; 35 void InitWithFakeAdapter() override;
36 BluetoothDevice* SimulateLowEnergyDevice(int device_ordinal) override; 36 BluetoothDevice* SimulateLowEnergyDevice(int device_ordinal) override;
37 void SimulateLocalGattCharacteristicValueReadRequest( 37 void SimulateLocalGattCharacteristicValueReadRequest(
38 BluetoothDevice* from_device,
38 BluetoothLocalGattCharacteristic* characteristic, 39 BluetoothLocalGattCharacteristic* characteristic,
39 const BluetoothLocalGattService::Delegate::ValueCallback& value_callback, 40 const BluetoothLocalGattService::Delegate::ValueCallback& value_callback,
40 const base::Closure& error_callback) override; 41 const base::Closure& error_callback) override;
41 void SimulateLocalGattCharacteristicValueWriteRequest( 42 void SimulateLocalGattCharacteristicValueWriteRequest(
43 BluetoothDevice* from_device,
42 BluetoothLocalGattCharacteristic* characteristic, 44 BluetoothLocalGattCharacteristic* characteristic,
43 const std::vector<uint8_t>& value_to_write, 45 const std::vector<uint8_t>& value_to_write,
44 const base::Closure& success_callback, 46 const base::Closure& success_callback,
45 const base::Closure& error_callback) override; 47 const base::Closure& error_callback) override;
46 void SimulateLocalGattDescriptorValueReadRequest( 48 void SimulateLocalGattDescriptorValueReadRequest(
49 BluetoothDevice* from_device,
47 BluetoothLocalGattDescriptor* descriptor, 50 BluetoothLocalGattDescriptor* descriptor,
48 const BluetoothLocalGattService::Delegate::ValueCallback& value_callback, 51 const BluetoothLocalGattService::Delegate::ValueCallback& value_callback,
49 const base::Closure& error_callback) override; 52 const base::Closure& error_callback) override;
50 void SimulateLocalGattDescriptorValueWriteRequest( 53 void SimulateLocalGattDescriptorValueWriteRequest(
54 BluetoothDevice* from_device,
51 BluetoothLocalGattDescriptor* descriptor, 55 BluetoothLocalGattDescriptor* descriptor,
52 const std::vector<uint8_t>& value_to_write, 56 const std::vector<uint8_t>& value_to_write,
53 const base::Closure& success_callback, 57 const base::Closure& success_callback,
54 const base::Closure& error_callback) override; 58 const base::Closure& error_callback) override;
55 bool SimulateLocalGattCharacteristicNotificationsRequest( 59 bool SimulateLocalGattCharacteristicNotificationsRequest(
56 BluetoothLocalGattCharacteristic* characteristic, 60 BluetoothLocalGattCharacteristic* characteristic,
57 bool start) override; 61 bool start) override;
58 std::vector<uint8_t> LastNotifactionValueForCharacteristic( 62 std::vector<uint8_t> LastNotifactionValueForCharacteristic(
59 BluetoothLocalGattCharacteristic* characteristic) override; 63 BluetoothLocalGattCharacteristic* characteristic) override;
60 std::vector<BluetoothLocalGattService*> RegisteredGattServices() override; 64 std::vector<BluetoothLocalGattService*> RegisteredGattServices() override;
61 65
62 private: 66 private:
63 bluez::FakeBluetoothDeviceClient* fake_bluetooth_device_client_; 67 bluez::FakeBluetoothDeviceClient* fake_bluetooth_device_client_;
64 }; 68 };
65 69
66 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName). 70 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName).
67 using BluetoothTest = BluetoothTestBlueZ; 71 using BluetoothTest = BluetoothTestBlueZ;
68 72
69 } // namespace device 73 } // namespace device
70 74
71 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_BLUEZ_H_ 75 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_BLUEZ_H_
OLDNEW
« no previous file with comments | « device/bluetooth/test/bluetooth_test.h ('k') | device/bluetooth/test/bluetooth_test_bluez.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698