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

Unified Diff: device/bluetooth/bluetooth_device_win_unittest.cc

Issue 21089002: Fix bluetooth GetServiceRecord with uuid. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 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/bluetooth_device_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_device_win_unittest.cc
diff --git a/device/bluetooth/bluetooth_device_win_unittest.cc b/device/bluetooth/bluetooth_device_win_unittest.cc
index 93fd990e296805e1c12c2dcfca38a7413208be52..20be2ada182fb67b939fcd3dd990f4ec00ffcde3 100644
--- a/device/bluetooth/bluetooth_device_win_unittest.cc
+++ b/device/bluetooth/bluetooth_device_win_unittest.cc
@@ -101,6 +101,23 @@ TEST_F(BluetoothDeviceWinTest, GetServiceRecords) {
EXPECT_EQ(2, service_records_->size());
EXPECT_STREQ(kTestAudioSdpUuid, (*service_records_)[0]->uuid().c_str());
EXPECT_STREQ(kTestVideoSdpUuid, (*service_records_)[1]->uuid().c_str());
+
+ BluetoothDeviceWin* device_win =
+ reinterpret_cast<BluetoothDeviceWin*>(device_.get());
+
+ const BluetoothServiceRecord* audio_device =
+ device_win->GetServiceRecord(kTestAudioSdpUuid);
+ ASSERT_TRUE(audio_device != NULL);
+ EXPECT_EQ((*service_records_)[0], audio_device);
+
+ const BluetoothServiceRecord* video_device =
+ device_win->GetServiceRecord(kTestVideoSdpUuid);
+ ASSERT_TRUE(video_device != NULL);
+ EXPECT_EQ((*service_records_)[1], video_device);
+
+ const BluetoothServiceRecord* invalid_device =
+ device_win->GetServiceRecord(kTestVideoSdpAddress);
+ EXPECT_TRUE(invalid_device == NULL);
}
TEST_F(BluetoothDeviceWinTest, ProvidesServiceWithName) {
« no previous file with comments | « device/bluetooth/bluetooth_device_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698