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

Unified Diff: device/bluetooth/test/bluetooth_test.h

Issue 2339253002: bluetooth: mac: add connected LE devices to chooser (Closed)
Patch Set: Nit for the tests Created 4 years, 1 month 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
« no previous file with comments | « device/bluetooth/bluetooth_low_energy_device_mac.mm ('k') | device/bluetooth/test/bluetooth_test_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/test/bluetooth_test.h
diff --git a/device/bluetooth/test/bluetooth_test.h b/device/bluetooth/test/bluetooth_test.h
index 9f5468ef7c1fb3b44700ee5aad8d9d434ef945c2..c85ab5d55ced88f2d1ecc999691cf5a10f2ef88d 100644
--- a/device/bluetooth/test/bluetooth_test.h
+++ b/device/bluetooth/test/bluetooth_test.h
@@ -41,6 +41,21 @@ class BluetoothTestBase : public testing::Test {
public:
enum class Call { EXPECTED, NOT_EXPECTED };
+ // List of devices that can be simulated with
+ // SimulateConnectedLowEnergyDevice().
+ // GENERIC_DEVICE:
+ // - Name: kTestDeviceName
+ // - Address: kTestPeripheralUUID1
+ // - Services: [ kTestUUIDGenericAccess ]
+ // HEART_RATE_DEVICE:
+ // - Name: kTestDeviceName
+ // - Address: kTestPeripheralUUID2
+ // - Services: [ kTestUUIDGenericAccess, kTestUUIDHeartRate]
+ enum class ConnectedDeviceType {
+ GENERIC_DEVICE,
+ HEART_RATE_DEVICE,
+ };
+
static const std::string kTestAdapterName;
static const std::string kTestAdapterAddress;
@@ -150,6 +165,11 @@ class BluetoothTestBase : public testing::Test {
// Supports BR/EDR and LE.
virtual BluetoothDevice* SimulateLowEnergyDevice(int device_ordinal);
+ // Simulates a connected low energy device. Used before starting a low energy
+ // discovey session.
+ virtual void SimulateConnectedLowEnergyDevice(
+ ConnectedDeviceType device_ordinal){};
+
// Create a fake classic device and discover it. The device will have
// name kTestDeviceName, no advertised UUIDs and address kTestDeviceAddress3.
virtual BluetoothDevice* SimulateClassicDevice();
« no previous file with comments | « device/bluetooth/bluetooth_low_energy_device_mac.mm ('k') | device/bluetooth/test/bluetooth_test_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698