Index: device/bluetooth/test/bluetooth_test_mac.h |
diff --git a/device/bluetooth/test/bluetooth_test_mac.h b/device/bluetooth/test/bluetooth_test_mac.h |
index fd354dab315bd69eaa0a502e3f2209ba4bbd3101..37c293bfa7c3a39a49b38c49e4e3764c60c523d6 100644 |
--- a/device/bluetooth/test/bluetooth_test_mac.h |
+++ b/device/bluetooth/test/bluetooth_test_mac.h |
@@ -8,6 +8,12 @@ |
#include "base/test/test_simple_task_runner.h" |
#include "device/bluetooth/test/bluetooth_test.h" |
+#ifdef __OBJC__ |
+@class MockCentralManager; |
+#else |
+class MockCentralManager; |
+#endif // __OBJC__ |
+ |
namespace device { |
class BluetoothAdapterMac; |
@@ -30,12 +36,22 @@ class BluetoothTestMac : public BluetoothTestBase { |
void InitWithoutDefaultAdapter() override; |
void InitWithFakeAdapter() override; |
BluetoothDevice* DiscoverLowEnergyDevice(int device_ordinal) override; |
+ void SimulateGattConnection(BluetoothDevice* device) override; |
+ void SimulateGattDisconnection(BluetoothDevice* device) override; |
+ void SimulateGattConnectionError( |
+ BluetoothDevice* device, |
+ BluetoothDevice::ConnectErrorCode errorCode) override; |
+ |
+ // Callback for the bluetooth central manager mock. |
+ void OnFakeBluetoothDeviceConnectGattCalled(); |
+ void OnFakeBluetoothGattDisconnect(); |
protected: |
// Utility function for finding CBUUIDs with relatively nice SHA256 hashes. |
std::string FindCBUUIDForHashTarget(); |
BluetoothAdapterMac* adapter_mac_ = NULL; |
+ MockCentralManager* mock_central_manager_ = NULL; |
}; |
// Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName). |