| Index: device/bluetooth/bluetooth_adapter_mac_unittest.mm
|
| diff --git a/device/bluetooth/bluetooth_adapter_mac_unittest.mm b/device/bluetooth/bluetooth_adapter_mac_unittest.mm
|
| index bc6349999cdd4b10d00f45b75bccd7ecc50850cf..f855e7262c588110cb0b0ea200a693b0bee64390 100644
|
| --- a/device/bluetooth/bluetooth_adapter_mac_unittest.mm
|
| +++ b/device/bluetooth/bluetooth_adapter_mac_unittest.mm
|
| @@ -116,9 +116,11 @@ class BluetoothAdapterMacTest : public testing::Test {
|
| LOG(WARNING) << "Low Energy Bluetooth unavailable, skipping unit test.";
|
| return false;
|
| }
|
| - mock_central_manager_ = [[MockCentralManager alloc] init];
|
| + mock_central_manager_.reset([[MockCentralManager alloc] init]);
|
| [mock_central_manager_ setState:desired_state];
|
| - adapter_mac_->SetCentralManagerForTesting(mock_central_manager_);
|
| + CBCentralManager* centralManager =
|
| + (CBCentralManager*)mock_central_manager_.get();
|
| + adapter_mac_->SetCentralManagerForTesting(centralManager);
|
| return true;
|
| }
|
|
|
| @@ -153,7 +155,7 @@ class BluetoothAdapterMacTest : public testing::Test {
|
| BluetoothAdapterMac* adapter_mac_;
|
|
|
| // Owned by |adapter_mac_|.
|
| - id mock_central_manager_ = NULL;
|
| + base::scoped_nsobject<MockCentralManager> mock_central_manager_;
|
|
|
| int callback_count_;
|
| int error_callback_count_;
|
|
|