diff options
author | krstnmnlsn <krstnmnlsn@chromium.org> | 2015-07-15 13:42:44 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-15 20:43:30 +0000 |
commit | b53d5d2078793f80b78ee4b6229c22fae731add1 (patch) | |
tree | edde29fa9e88c9aa7facc921b87f6222138fd628 /device/bluetooth/bluetooth_adapter_mac_unittest.mm | |
parent | d458a7cfcfbbfde91d23d8689dbc7e79bd41022e (diff) | |
download | chromium_src-b53d5d2078793f80b78ee4b6229c22fae731add1.zip chromium_src-b53d5d2078793f80b78ee4b6229c22fae731add1.tar.gz chromium_src-b53d5d2078793f80b78ee4b6229c22fae731add1.tar.bz2 |
Added runtime checks to BluetoothLowEnergyDeviceMac and
BluetoothDiscoveryManagerMac so that CoreBluetooth, particularly the class
CBCentralManager, is only used if on OS X 10.10 or later. This is done to
address crbug.com/506287 as well as a previous issue where
CBCentralManager caused a crash on the mac_chromium_rel_ng trybot
(running 10.9.5).
BUG=506287
Review URL: https://codereview.chromium.org/1228863002
Cr-Commit-Position: refs/heads/master@{#338908}
Diffstat (limited to 'device/bluetooth/bluetooth_adapter_mac_unittest.mm')
-rw-r--r-- | device/bluetooth/bluetooth_adapter_mac_unittest.mm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/device/bluetooth/bluetooth_adapter_mac_unittest.mm b/device/bluetooth/bluetooth_adapter_mac_unittest.mm index 3e7ab68..ee01cd67 100644 --- a/device/bluetooth/bluetooth_adapter_mac_unittest.mm +++ b/device/bluetooth/bluetooth_adapter_mac_unittest.mm @@ -25,9 +25,8 @@ class BluetoothAdapterMacTest : public testing::Test { // Helper methods for setup and access to BluetoothAdapterMacTest's members. bool SetMockCentralManager() { - Class aClass = NSClassFromString(@"CBCentralManager"); - if (aClass == nil) { - LOG(WARNING) << "CoreBluetooth not available, skipping unit test."; + if (!BluetoothAdapterMac::IsLowEnergyAvailable()) { + LOG(WARNING) << "Low Energy Bluetooth unavailable, skipping unit test."; return false; } mock_central_manager_ = [[MockCentralManager alloc] init]; |