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

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

Issue 1538173003: Implementing GATT connection/disconnect on OS X. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Skip tests if Bluetooth Low Energy is not available Created 4 years, 9 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
« no previous file with comments | « device/bluetooth/bluetooth_low_energy_device_mac.mm ('k') | device/bluetooth/test/bluetooth_test_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1b40b2b01b5696109e0ce32a9570a6d47b4a177f 100644
--- a/device/bluetooth/test/bluetooth_test_mac.h
+++ b/device/bluetooth/test/bluetooth_test_mac.h
@@ -5,6 +5,7 @@
#ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_MAC_H_
#define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_MAC_H_
+#include "base/memory/scoped_ptr.h"
#include "base/test/test_simple_task_runner.h"
#include "device/bluetooth/test/bluetooth_test.h"
@@ -30,12 +31,24 @@ 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:
+ class ScopedMockCentralManager;
+
// Utility function for finding CBUUIDs with relatively nice SHA256 hashes.
std::string FindCBUUIDForHashTarget();
BluetoothAdapterMac* adapter_mac_ = NULL;
+ scoped_ptr<ScopedMockCentralManager> mock_central_manager_;
};
// Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName).
« no previous file with comments | « device/bluetooth/bluetooth_low_energy_device_mac.mm ('k') | device/bluetooth/test/bluetooth_test_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698