Chromium Code Reviews| Index: device/bluetooth/test/bluetooth_test.h |
| diff --git a/device/bluetooth/test/bluetooth_test.h b/device/bluetooth/test/bluetooth_test.h |
| index 90f7c7ca81f9e13897fa31888bf4f1b2dc5080ef..0eeb7749fafeb93a9ef205326f5d6f15361ca2d4 100644 |
| --- a/device/bluetooth/test/bluetooth_test.h |
| +++ b/device/bluetooth/test/bluetooth_test.h |
| @@ -51,6 +51,15 @@ class BluetoothTestBase : public testing::Test { |
| static const std::string kTestDeviceAddress2; |
| static const std::string kTestDeviceAddress3; |
| + enum { kTestRSSI1 = -81 }; |
| + enum { kTestRSSI2 = -61 }; |
| + enum { kTestRSSI3 = -41 }; |
| + enum { kTestRSSI4 = -21 }; |
| + enum { kTestRSSI5 = -1 }; |
| + |
| + enum { kTestTxPower1 = -40 }; |
| + enum { kTestTxPower2 = -20 }; |
| + |
| static const std::string kTestUUIDGenericAccess; |
| static const std::string kTestUUIDGenericAttribute; |
| static const std::string kTestUUIDImmediateAlert; |
| @@ -95,20 +104,23 @@ class BluetoothTestBase : public testing::Test { |
| // Create a fake Low Energy device and discover it. |
| // |device_ordinal| selects between multiple fake device data sets to produce: |
| - // 1: kTestDeviceName with advertised UUIDs kTestUUIDGenericAccess, |
| - // kTestUUIDGenericAttribute, address kTestDeviceAddress1 and service |
| - // data of {kTestUUIDHeartRate: [1]}. |
| - // 2: kTestDeviceName with advertised UUIDs kTestUUIDImmediateAlert, |
| - // kTestUUIDLinkLoss, address kTestDeviceAddress1 and service data of |
| - // {kTestUUIDHeartRate: [2], kTestUUIDImmediateAlert: [0]}. |
| - // 3: kTestDeviceNameEmpty with no advertised UUIDs and address |
| - // kTestDeviceAddress1. |
| - // 4: kTestDeviceNameEmpty with no advertised UUIDs and address |
| - // kTestDeviceAddress2. |
| - // 5: Device with no name, with no advertised UUIDs and address |
| - // kTestDeviceAddress1. |
| - // 6: kTestDeviceName with no advertised UUIDs and address |
| - // kTestDeviceAddress2, but which also supports BR/EDR. |
| + // 1: kTestDeviceName with address kTestDeviceAddress1, RSSI of kTestRSSI1, |
|
Jeffrey Yasskin
2016/08/24 04:32:02
Could you write these as:
// 1: Name: kTestDevi
ortuno
2016/08/24 21:29:09
Done.
|
| + // advertised UUIDs kTestUUIDGenericAccess, kTestUUIDGenericAttribute, |
| + // service data of {kTestUUIDHeartRate: [1]} and a Tx Power of |
| + // kTestTxPower1. |
| + // 2: kTestDeviceName with address kTestDeviceAddress1, RSSI of kTestRSSI2, |
| + // advertised UUIDs kTestUUIDImmediateAlert, kTestUUIDLinkLoss, service |
| + // data of {kTestUUIDHeartRate: [2], kTestUUIDImmediateAlert: [0]} and |
| + // Tx Power of kTestTxPower2. |
| + // 3: kTestDeviceNameEmpty with address kTestDeviceAddress1, RSSI of |
| + // kTestRSSI3, no advertised UUIDs, no service data, and no Tx Power. |
| + // 4: kTestDeviceNameEmpty with address kTestDeviceAddress2, RSSI of |
| + // kTestRSSI4, no advertised UUIDs, no service data and no Tx Power. |
| + // 5: No name device with address kTestDeviceAddress1, RSSI of kTestRSSI5, |
| + // no advertised UUIDs, no service data and no Tx Power. |
| + // 6: kTestDeviceName with address kTestDeviceAddress2, RSSI of kTestRSSI1, |
| + // no advertised UUIDs, no service data, no Tx Power but which also |
| + // supports BR/EDR. |
| virtual BluetoothDevice* SimulateLowEnergyDevice(int device_ordinal); |
| // Create a fake classic device and discover it. The device will have |