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

Unified Diff: device/bluetooth/bluetooth_remote_gatt_characteristic_unittest.cc

Issue 2089313006: bluetooth: Avoid use of lambda to work around clang bug. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_remote_gatt_characteristic_unittest.cc
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_unittest.cc b/device/bluetooth/bluetooth_remote_gatt_characteristic_unittest.cc
index 37f205f6c8c8095b011244ae1b6863ad2bf7898d..f76af7fbcb9457cacb40d1b5c4b1539b535c1aff 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_unittest.cc
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_unittest.cc
@@ -398,6 +398,16 @@ TEST_F(BluetoothRemoteGattCharacteristicTest, ReadRemoteCharacteristic) {
#endif // defined(OS_ANDROID) || defined(OS_WIN)
#if defined(OS_ANDROID) || defined(OS_WIN)
+// Callback that make sure GattCharacteristicValueChanged has been called
+// before the callback runs.
+static void test_callback(
ortuno 2016/06/25 00:19:36 Since this is no longer a lambda you can remove th
pcc1 2016/06/25 00:26:39 Done.
+ BluetoothRemoteGattCharacteristic::ValueCallback callback,
+ const TestBluetoothAdapterObserver& callback_observer,
+ const std::vector<uint8_t>& value) {
+ EXPECT_EQ(1, callback_observer.gatt_characteristic_value_changed_count());
+ callback.Run(value);
+}
+
// Tests that ReadRemoteCharacteristic results in a
// GattCharacteristicValueChanged call.
TEST_F(BluetoothRemoteGattCharacteristicTest,
@@ -407,16 +417,6 @@ TEST_F(BluetoothRemoteGattCharacteristicTest,
TestBluetoothAdapterObserver observer(adapter_);
- // Callback that make sure GattCharacteristicValueChanged has been called
- // before the callback runs.
- auto test_callback = [](
- BluetoothRemoteGattCharacteristic::ValueCallback callback,
- const TestBluetoothAdapterObserver& callback_observer,
- const std::vector<uint8_t>& value) {
- EXPECT_EQ(1, callback_observer.gatt_characteristic_value_changed_count());
- callback.Run(value);
- };
-
characteristic1_->ReadRemoteCharacteristic(
base::Bind((void (*)(BluetoothRemoteGattCharacteristic::ValueCallback,
const TestBluetoothAdapterObserver&,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698