OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/string_number_conversions.h" | 6 #include "base/strings/string_number_conversions.h" |
7 #include "device/bluetooth/bluetooth_service_record_win.h" | 7 #include "device/bluetooth/bluetooth_service_record_win.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 | 9 |
10 namespace { | 10 namespace { |
11 | 11 |
12 const char kTestNoRfcommSdpBytes[] = | 12 const char kTestNoRfcommSdpBytes[] = |
13 "35510900000a00010001090001350319110a09000435103506190100090019350619001909" | 13 "35510900000a00010001090001350319110a09000435103506190100090019350619001909" |
14 "010209000535031910020900093508350619110d090102090100250c417564696f20536f75" | 14 "010209000535031910020900093508350619110d090102090100250c417564696f20536f75" |
15 "726365090311090001"; | 15 "726365090311090001"; |
16 const int kTestNoRfcommSdpBytesSize = sizeof(kTestNoRfcommSdpBytes) / 2; | 16 const int kTestNoRfcommSdpBytesSize = sizeof(kTestNoRfcommSdpBytes) / 2; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 uint8 sdp_bytes_array[kTestRfcommSdpBytesSize]; | 67 uint8 sdp_bytes_array[kTestRfcommSdpBytesSize]; |
68 ConvertSdpBytes(kTestRfcommSdpBytes, sdp_bytes_array); | 68 ConvertSdpBytes(kTestRfcommSdpBytes, sdp_bytes_array); |
69 BluetoothServiceRecordWin service_record("Sdp", | 69 BluetoothServiceRecordWin service_record("Sdp", |
70 "01:02:03:0A:10:A0", | 70 "01:02:03:0A:10:A0", |
71 kTestRfcommSdpBytesSize, | 71 kTestRfcommSdpBytesSize, |
72 sdp_bytes_array); | 72 sdp_bytes_array); |
73 EXPECT_EQ(1108152553632, service_record.bth_addr()); | 73 EXPECT_EQ(1108152553632, service_record.bth_addr()); |
74 } | 74 } |
75 | 75 |
76 } // namespace device | 76 } // namespace device |
OLD | NEW |