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

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

Issue 1950033002: bluetooth: mac: Initial BluetoothRemoteGattCharacteristicMac implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@servicescan_cleanup
Patch Set: Updating the characteristic property conversion Created 4 years, 6 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_MAC_H_ 5 #ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_MAC_H_
6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_MAC_H_ 6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_MAC_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/test/test_simple_task_runner.h" 10 #include "base/test/test_simple_task_runner.h"
(...skipping 23 matching lines...) Expand all
34 BluetoothDevice* SimulateLowEnergyDevice(int device_ordinal) override; 34 BluetoothDevice* SimulateLowEnergyDevice(int device_ordinal) override;
35 void SimulateGattConnection(BluetoothDevice* device) override; 35 void SimulateGattConnection(BluetoothDevice* device) override;
36 void SimulateGattConnectionError( 36 void SimulateGattConnectionError(
37 BluetoothDevice* device, 37 BluetoothDevice* device,
38 BluetoothDevice::ConnectErrorCode errorCode) override; 38 BluetoothDevice::ConnectErrorCode errorCode) override;
39 void SimulateGattDisconnection(BluetoothDevice* device) override; 39 void SimulateGattDisconnection(BluetoothDevice* device) override;
40 void SimulateGattServicesDiscovered( 40 void SimulateGattServicesDiscovered(
41 BluetoothDevice* device, 41 BluetoothDevice* device,
42 const std::vector<std::string>& uuids) override; 42 const std::vector<std::string>& uuids) override;
43 void SimulateGattServiceRemoved(BluetoothRemoteGattService* service) override; 43 void SimulateGattServiceRemoved(BluetoothRemoteGattService* service) override;
44 void SimulateGattCharacteristic(BluetoothRemoteGattService* service,
45 const std::string& uuid,
46 int properties) override;
44 47
45 // Callback for the bluetooth central manager mock. 48 // Callback for the bluetooth central manager mock.
46 void OnFakeBluetoothDeviceConnectGattCalled(); 49 void OnFakeBluetoothDeviceConnectGattCalled();
47 void OnFakeBluetoothGattDisconnect(); 50 void OnFakeBluetoothGattDisconnect();
48 51
49 // Callback for the bluetooth peripheral mock. 52 // Callback for the bluetooth peripheral mock.
50 void OnFakeBluetoothServiceDiscovery(); 53 void OnFakeBluetoothServiceDiscovery();
51 54
52 protected: 55 protected:
53 class ScopedMockCentralManager; 56 class ScopedMockCentralManager;
54 57
55 // Utility function for finding CBUUIDs with relatively nice SHA256 hashes. 58 // Utility function for finding CBUUIDs with relatively nice SHA256 hashes.
56 std::string FindCBUUIDForHashTarget(); 59 std::string FindCBUUIDForHashTarget();
57 60
58 BluetoothAdapterMac* adapter_mac_ = NULL; 61 BluetoothAdapterMac* adapter_mac_ = NULL;
59 std::unique_ptr<ScopedMockCentralManager> mock_central_manager_; 62 std::unique_ptr<ScopedMockCentralManager> mock_central_manager_;
60 }; 63 };
61 64
62 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName). 65 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName).
63 typedef BluetoothTestMac BluetoothTest; 66 typedef BluetoothTestMac BluetoothTest;
64 67
65 } // namespace device 68 } // namespace device
66 69
67 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_MAC_H_ 70 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698