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

Unified Diff: device/bluetooth/bluetooth_adapter_mac_unittest.mm

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_adapter_mac.mm ('k') | device/bluetooth/bluetooth_device_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « device/bluetooth/bluetooth_adapter_mac.mm ('k') | device/bluetooth/bluetooth_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698