Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "device/bluetooth/bluetooth_device.h" | 5 #include "device/bluetooth/bluetooth_device.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1250 LOG(WARNING) << "Low Energy Bluetooth unavailable, skipping unit test."; | 1250 LOG(WARNING) << "Low Energy Bluetooth unavailable, skipping unit test."; |
| 1251 return; | 1251 return; |
| 1252 } | 1252 } |
| 1253 InitWithFakeAdapter(); | 1253 InitWithFakeAdapter(); |
| 1254 StartLowEnergyDiscoverySession(); | 1254 StartLowEnergyDiscoverySession(); |
| 1255 BluetoothDevice* device = SimulateLowEnergyDevice(3); | 1255 BluetoothDevice* device = SimulateLowEnergyDevice(3); |
| 1256 device->CreateGattConnection(GetGattConnectionCallback(Call::EXPECTED), | 1256 device->CreateGattConnection(GetGattConnectionCallback(Call::EXPECTED), |
| 1257 GetConnectErrorCallback(Call::NOT_EXPECTED)); | 1257 GetConnectErrorCallback(Call::NOT_EXPECTED)); |
| 1258 ResetEventCounts(); | 1258 ResetEventCounts(); |
| 1259 SimulateGattConnection(device); | 1259 SimulateGattConnection(device); |
| 1260 EXPECT_EQ(1, gatt_discovery_attempts_); | 1260 EXPECT_EQ(0, gatt_discovery_attempts_); |
|
scheib
2017/04/08 04:05:34
Hmm, know why this changed?
ortuno
2017/04/08 04:07:43
Should've added a comment. This change just breaks
| |
| 1261 | 1261 |
| 1262 SimulateGattDisconnection(device); | 1262 SimulateGattDisconnection(device); |
| 1263 | 1263 |
| 1264 SimulateGattServicesDiscoveryError(device); | 1264 SimulateGattServicesDiscoveryError(device); |
| 1265 EXPECT_FALSE(device->IsGattServicesDiscoveryComplete()); | 1265 EXPECT_FALSE(device->IsGattServicesDiscoveryComplete()); |
| 1266 EXPECT_EQ(0u, device->GetGattServices().size()); | 1266 EXPECT_EQ(0u, device->GetGattServices().size()); |
| 1267 } | 1267 } |
| 1268 #endif // defined(OS_ANDROID) || defined(OS_MACOSX) | 1268 #endif // defined(OS_ANDROID) || defined(OS_MACOSX) |
| 1269 | 1269 |
| 1270 #if defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_MACOSX) | 1270 #if defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_MACOSX) |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1332 | 1332 |
| 1333 BluetoothDevice* device2 = SimulateLowEnergyDevice(6); | 1333 BluetoothDevice* device2 = SimulateLowEnergyDevice(6); |
| 1334 EXPECT_EQ(BLUETOOTH_TRANSPORT_DUAL, device2->GetType()); | 1334 EXPECT_EQ(BLUETOOTH_TRANSPORT_DUAL, device2->GetType()); |
| 1335 | 1335 |
| 1336 BluetoothDevice* device3 = SimulateClassicDevice(); | 1336 BluetoothDevice* device3 = SimulateClassicDevice(); |
| 1337 EXPECT_EQ(BLUETOOTH_TRANSPORT_CLASSIC, device3->GetType()); | 1337 EXPECT_EQ(BLUETOOTH_TRANSPORT_CLASSIC, device3->GetType()); |
| 1338 } | 1338 } |
| 1339 #endif // defined(OS_CHROMEOS) || defined(OS_LINUX) | 1339 #endif // defined(OS_CHROMEOS) || defined(OS_LINUX) |
| 1340 | 1340 |
| 1341 } // namespace device | 1341 } // namespace device |
| OLD | NEW |