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

Unified Diff: device/bluetooth/test/test_bluetooth_local_gatt_service_delegate.cc

Issue 1973343005: Remove service, add device, in BluetoothLocalGattService::Delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
« no previous file with comments | « device/bluetooth/test/test_bluetooth_local_gatt_service_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/test/test_bluetooth_local_gatt_service_delegate.cc
diff --git a/device/bluetooth/test/test_bluetooth_local_gatt_service_delegate.cc b/device/bluetooth/test/test_bluetooth_local_gatt_service_delegate.cc
index 7a163257b0501a3b11581480df5f97cefe81ccb9..b1970646fe1087c2391672f556d95680c5e6d6e5 100644
--- a/device/bluetooth/test/test_bluetooth_local_gatt_service_delegate.cc
+++ b/device/bluetooth/test/test_bluetooth_local_gatt_service_delegate.cc
@@ -20,13 +20,13 @@ TestBluetoothLocalGattServiceDelegate::
~TestBluetoothLocalGattServiceDelegate() {}
void TestBluetoothLocalGattServiceDelegate::OnCharacteristicReadRequest(
- const BluetoothLocalGattService* service,
+ const BluetoothDevice* device,
const BluetoothLocalGattCharacteristic* characteristic,
int offset,
const ValueCallback& callback,
const ErrorCallback& error_callback) {
- EXPECT_EQ(expected_service_, service);
- EXPECT_EQ(expected_characteristic_, characteristic);
+ EXPECT_EQ(expected_characteristic_->GetIdentifier(),
+ characteristic->GetIdentifier());
if (should_fail_) {
error_callback.Run();
return;
@@ -35,14 +35,14 @@ void TestBluetoothLocalGattServiceDelegate::OnCharacteristicReadRequest(
}
void TestBluetoothLocalGattServiceDelegate::OnCharacteristicWriteRequest(
- const BluetoothLocalGattService* service,
+ const BluetoothDevice* device,
const BluetoothLocalGattCharacteristic* characteristic,
const std::vector<uint8_t>& value,
int offset,
const base::Closure& callback,
const ErrorCallback& error_callback) {
- EXPECT_EQ(expected_service_, service);
- EXPECT_EQ(expected_characteristic_, characteristic);
+ EXPECT_EQ(expected_characteristic_->GetIdentifier(),
+ characteristic->GetIdentifier());
if (should_fail_) {
error_callback.Run();
return;
@@ -52,13 +52,12 @@ void TestBluetoothLocalGattServiceDelegate::OnCharacteristicWriteRequest(
}
void TestBluetoothLocalGattServiceDelegate::OnDescriptorReadRequest(
- const BluetoothLocalGattService* service,
+ const BluetoothDevice* device,
const BluetoothLocalGattDescriptor* descriptor,
int offset,
const ValueCallback& callback,
const ErrorCallback& error_callback) {
- EXPECT_EQ(expected_service_, service);
- EXPECT_EQ(expected_descriptor_, descriptor);
+ EXPECT_EQ(expected_descriptor_->GetIdentifier(), descriptor->GetIdentifier());
if (should_fail_) {
error_callback.Run();
return;
@@ -67,14 +66,13 @@ void TestBluetoothLocalGattServiceDelegate::OnDescriptorReadRequest(
}
void TestBluetoothLocalGattServiceDelegate::OnDescriptorWriteRequest(
- const BluetoothLocalGattService* service,
+ const BluetoothDevice* device,
const BluetoothLocalGattDescriptor* descriptor,
const std::vector<uint8_t>& value,
int offset,
const base::Closure& callback,
const ErrorCallback& error_callback) {
- EXPECT_EQ(expected_service_, service);
- EXPECT_EQ(expected_descriptor_, descriptor);
+ EXPECT_EQ(expected_descriptor_->GetIdentifier(), descriptor->GetIdentifier());
if (should_fail_) {
error_callback.Run();
return;
@@ -84,19 +82,19 @@ void TestBluetoothLocalGattServiceDelegate::OnDescriptorWriteRequest(
}
void TestBluetoothLocalGattServiceDelegate::OnNotificationsStart(
- const BluetoothLocalGattService* service,
+ const BluetoothDevice* device,
const BluetoothLocalGattCharacteristic* characteristic) {
- EXPECT_EQ(expected_service_, service);
- EXPECT_EQ(expected_characteristic_, characteristic);
+ EXPECT_EQ(expected_characteristic_->GetIdentifier(),
+ characteristic->GetIdentifier());
notifications_started_for_characteristic_[characteristic->GetIdentifier()] =
true;
}
void TestBluetoothLocalGattServiceDelegate::OnNotificationsStop(
- const BluetoothLocalGattService* service,
+ const BluetoothDevice* device,
const BluetoothLocalGattCharacteristic* characteristic) {
- EXPECT_EQ(expected_service_, service);
- EXPECT_EQ(expected_characteristic_, characteristic);
+ EXPECT_EQ(expected_characteristic_->GetIdentifier(),
+ characteristic->GetIdentifier());
notifications_started_for_characteristic_[characteristic->GetIdentifier()] =
false;
}
« no previous file with comments | « device/bluetooth/test/test_bluetooth_local_gatt_service_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698