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

Unified Diff: device/bluetooth/test/bluetooth_test.h

Issue 1973703002: Implement //device/bt changes for notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@notifications_dbus
Patch Set: Created 4 years, 7 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
Index: device/bluetooth/test/bluetooth_test.h
diff --git a/device/bluetooth/test/bluetooth_test.h b/device/bluetooth/test/bluetooth_test.h
index 31a6443b3ba222152e720af7beeb2ca21b8c054c..a410ce34a8f67673bc20412cf2de77c81b68a85c 100644
--- a/device/bluetooth/test/bluetooth_test.h
+++ b/device/bluetooth/test/bluetooth_test.h
@@ -254,6 +254,21 @@ class BluetoothTestBase : public testing::Test {
const base::Closure& success_callback,
const base::Closure& error_callback) {}
+ // Simulates starting or stopping a notification session for a locally
+ // hosted GATT characteristic by a remote device. Returns false if we were
+ // not able to start or stop notifications.
+ virtual bool SimulateLocalGattCharacteristicNotificationsRequest(
+ BluetoothLocalGattService* service,
+ BluetoothLocalGattCharacteristic* characteristic,
+ bool start);
+
+ // Simulates sending a value updated notification to a remote device. Returns
scheib 2016/05/12 16:53:19 I think tests should call characteristic_->NotifyV
rkc 2016/05/12 20:12:49 The BlueZ implementation does check the result. I'
scheib 2016/05/12 20:38:27 I'm not feeling good about this approach. The meth
rkc 2016/05/12 21:19:18 Actually we don't really need to simulate a notifi
+ // false if the send was unsuccessful.
+ virtual bool SimulateLocalGattCharacteristicSendValueUpdate(
+ BluetoothLocalGattService* service,
+ BluetoothLocalGattCharacteristic* characteristic,
+ const std::vector<uint8_t>& new_value);
+
// Remembers |descriptor|'s platform specific object to be used in a
// subsequent call to methods such as SimulateGattDescriptorRead that
// accept a nullptr value to select this remembered descriptor. This

Powered by Google App Engine
This is Rietveld 408576698