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

Unified Diff: device/bluetooth/bluetooth_device_win_unittest.cc

Issue 224893002: device/bluetooth: Rename device::bluetooth_utils::UUID to device::BluetoothUUID (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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') | device/bluetooth/bluetooth_gatt_characteristic.h » ('j') | 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 651bfd79193bfaa6bf5d8407a56af472368bed27..45a4a81a31b6280d35ebaf45b2da03a4411e5e46 100644
--- a/device/bluetooth/bluetooth_device_win_unittest.cc
+++ b/device/bluetooth/bluetooth_device_win_unittest.cc
@@ -10,6 +10,7 @@
#include "device/bluetooth/bluetooth_device_win.h"
#include "device/bluetooth/bluetooth_service_record.h"
#include "device/bluetooth/bluetooth_task_manager_win.h"
+#include "device/bluetooth/bluetooth_uuid.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -23,7 +24,7 @@ const char kTestAudioSdpBytes[] =
"35510900000a00010001090001350319110a09000435103506190100090019350619001909"
"010209000535031910020900093508350619110d090102090100250c417564696f20536f75"
"726365090311090001";
-const char kTestAudioSdpUuid[] = "0000110a-0000-1000-8000-00805f9b34fb";
+const device::BluetoothUUID kTestAudioSdpUuid("110a");
const char kTestVideoSdpName[] = "Video";
const char kTestVideoSdpAddress[] = "A0:10:0A:03:02:01";
@@ -31,7 +32,7 @@ const char kTestVideoSdpBytes[] =
"354b0900000a000100030900013506191112191203090004350c3503190100350519000308"
"0b090005350319100209000935083506191108090100090100250d566f6963652047617465"
"776179";
-const char kTestVideoSdpUuid[] = "00001112-0000-1000-8000-00805f9b34fb";
+const device::BluetoothUUID kTestVideoSdpUuid("1112");
} // namespace
@@ -44,6 +45,7 @@ class BluetoothDeviceWinTest : public testing::Test {
device_state.name = kDeviceName;
device_state.address = kDeviceAddress;
+ // Add device with audio/video services.
BluetoothTaskManagerWin::ServiceRecordState* audio_state =
new BluetoothTaskManagerWin::ServiceRecordState();
audio_state->name = kTestAudioSdpName;
@@ -59,6 +61,10 @@ class BluetoothDeviceWinTest : public testing::Test {
device_state.service_record_states.push_back(video_state);
device_.reset(new BluetoothDeviceWin(device_state));
+
+ // Add empty device.
+ device_state.service_record_states.clear();
+ empty_device_.reset(new BluetoothDeviceWin(device_state));
}
protected:
@@ -70,8 +76,8 @@ TEST_F(BluetoothDeviceWinTest, GetUUIDs) {
BluetoothDevice::UUIDList uuids = device_->GetUUIDs();
EXPECT_EQ(2, uuids.size());
- EXPECT_STREQ(kTestAudioSdpUuid, uuids[0].c_str());
- EXPECT_STREQ(kTestVideoSdpUuid, uuids[1].c_str());
+ EXPECT_EQ(kTestAudioSdpUuid, uuids[0]);
+ EXPECT_EQ(kTestVideoSdpUuid, uuids[1]);
uuids = empty_device_->GetUUIDs();
EXPECT_EQ(0, uuids.size());
« no previous file with comments | « device/bluetooth/bluetooth_device_win.cc ('k') | device/bluetooth/bluetooth_gatt_characteristic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698