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

Unified Diff: device/bluetooth/test/bluetooth_test_mac.mm

Issue 2339253002: bluetooth: mac: add connected LE devices to chooser (Closed)
Patch Set: Adding BluetoothAdapter::RetrievedConnectedPeripherals() and the implementation in BluetoothAdapter… Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/test/bluetooth_test_mac.mm
diff --git a/device/bluetooth/test/bluetooth_test_mac.mm b/device/bluetooth/test/bluetooth_test_mac.mm
index d7e6f4b63ad6020d8ebfeed19d13e4afb3bd52ee..1ac1174950c43f3ac1fb1e80f11026787e9dee8e 100644
--- a/device/bluetooth/test/bluetooth_test_mac.mm
+++ b/device/bluetooth/test/bluetooth_test_mac.mm
@@ -144,6 +144,18 @@ void BluetoothTestMac::InitWithFakeAdapter() {
}
}
+void BluetoothTestMac::SimulateConnectedLowEnergyDevice() {
+ const char* identifier;
+ NSString* name;
+ identifier = kTestPeripheralUUID1.c_str();
+ name = @(kTestDeviceName.c_str());
+ scoped_nsobject<MockCBPeripheral> mock_peripheral([[MockCBPeripheral alloc]
+ initWithUTF8StringIdentifier:identifier
+ name:name]);
+ mock_peripheral.get().bluetoothTestMac = this;
+ [mock_central_manager_->get() addConnectedMockPeripheral:mock_peripheral];
+}
+
BluetoothDevice* BluetoothTestMac::SimulateLowEnergyDevice(int device_ordinal) {
TestBluetoothAdapterObserver observer(adapter_);
CBCentralManager* central_manager = adapter_mac_->low_energy_central_manager_;

Powered by Google App Engine
This is Rietveld 408576698