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

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

Issue 2339253002: bluetooth: mac: add connected LE devices to chooser (Closed)
Patch Set: Adding BluetoothAdapter::RetrievedConnectedPeripherals() and the implementation in BluetoothAdapter… Created 4 years, 2 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 void SimulateGattNotifySessionStartError( 69 void SimulateGattNotifySessionStartError(
70 BluetoothRemoteGattCharacteristic* characteristic, 70 BluetoothRemoteGattCharacteristic* characteristic,
71 BluetoothRemoteGattService::GattErrorCode error_code) override; 71 BluetoothRemoteGattService::GattErrorCode error_code) override;
72 void SimulateGattCharacteristicChanged( 72 void SimulateGattCharacteristicChanged(
73 BluetoothRemoteGattCharacteristic* characteristic, 73 BluetoothRemoteGattCharacteristic* characteristic,
74 const std::vector<uint8_t>& value) override; 74 const std::vector<uint8_t>& value) override;
75 void SimulateGattCharacteristicRemoved( 75 void SimulateGattCharacteristicRemoved(
76 BluetoothRemoteGattService* service, 76 BluetoothRemoteGattService* service,
77 BluetoothRemoteGattCharacteristic* characteristic) override; 77 BluetoothRemoteGattCharacteristic* characteristic) override;
78 78
79 // Simulates a connected low energy device. Used before starting a low energy
80 // discovey session.
81 void SimulateConnectedLowEnergyDevice();
82
79 // Callback for the bluetooth central manager mock. 83 // Callback for the bluetooth central manager mock.
80 void OnFakeBluetoothDeviceConnectGattCalled(); 84 void OnFakeBluetoothDeviceConnectGattCalled();
81 void OnFakeBluetoothGattDisconnect(); 85 void OnFakeBluetoothGattDisconnect();
82 86
83 // Callback for the bluetooth peripheral mock. 87 // Callback for the bluetooth peripheral mock.
84 void OnFakeBluetoothServiceDiscovery(); 88 void OnFakeBluetoothServiceDiscovery();
85 void OnFakeBluetoothCharacteristicReadValue(); 89 void OnFakeBluetoothCharacteristicReadValue();
86 void OnFakeBluetoothCharacteristicWriteValue(std::vector<uint8_t> value); 90 void OnFakeBluetoothCharacteristicWriteValue(std::vector<uint8_t> value);
87 void OnFakeBluetoothGattSetCharacteristicNotification(); 91 void OnFakeBluetoothGattSetCharacteristicNotification();
88 92
(...skipping 13 matching lines...) Expand all
102 BluetoothAdapterMac* adapter_mac_ = nullptr; 106 BluetoothAdapterMac* adapter_mac_ = nullptr;
103 std::unique_ptr<ScopedMockCentralManager> mock_central_manager_; 107 std::unique_ptr<ScopedMockCentralManager> mock_central_manager_;
104 }; 108 };
105 109
106 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName). 110 // Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName).
107 typedef BluetoothTestMac BluetoothTest; 111 typedef BluetoothTestMac BluetoothTest;
108 112
109 } // namespace device 113 } // namespace device
110 114
111 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_MAC_H_ 115 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698