Commit 51302060 authored by jlebel's avatar jlebel Committed by Commit bot

Creating a CBCentralManager mock for all tests.

BUG=

Review URL: https://codereview.chromium.org/1645653003

Cr-Commit-Position: refs/heads/master@{#371852}
parent 93e29f7d
......@@ -251,6 +251,8 @@ TEST_F(BluetoothAdapterMacTest, RemoveDiscoverySessionWithLowEnergyFilterFail) {
}
TEST_F(BluetoothAdapterMacTest, CheckGetPeripheralHashAddress) {
if (!SetMockCentralManager(CBCentralManagerStatePoweredOn))
return;
base::scoped_nsobject<id> mock_peripheral(CreateMockPeripheral(kTestNSUUID));
if (mock_peripheral.get() == nil)
return;
......@@ -258,6 +260,8 @@ TEST_F(BluetoothAdapterMacTest, CheckGetPeripheralHashAddress) {
}
TEST_F(BluetoothAdapterMacTest, LowEnergyDeviceUpdatedNewDevice) {
if (!SetMockCentralManager(CBCentralManagerStatePoweredOn))
return;
base::scoped_nsobject<id> mock_peripheral(CreateMockPeripheral(kTestNSUUID));
if (mock_peripheral.get() == nil)
return;
......@@ -272,6 +276,8 @@ TEST_F(BluetoothAdapterMacTest, LowEnergyDeviceUpdatedNewDevice) {
}
TEST_F(BluetoothAdapterMacTest, LowEnergyDeviceUpdatedOldDevice) {
if (!SetMockCentralManager(CBCentralManagerStatePoweredOn))
return;
base::scoped_nsobject<id> mock_peripheral(CreateMockPeripheral(kTestNSUUID));
if (mock_peripheral.get() == nil)
return;
......@@ -302,6 +308,8 @@ TEST_F(BluetoothAdapterMacTest, LowEnergyDeviceUpdatedOldDevice) {
}
TEST_F(BluetoothAdapterMacTest, UpdateDevicesRemovesLowEnergyDevice) {
if (!SetMockCentralManager(CBCentralManagerStatePoweredOn))
return;
base::scoped_nsobject<id> mock_peripheral(CreateMockPeripheral(kTestNSUUID));
if (mock_peripheral.get() == nil)
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment