OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "device/bluetooth/bluetooth_service_record_mac.h" | 5 #include "device/bluetooth/bluetooth_service_record_mac.h" |
6 | 6 |
7 #import <IOBluetooth/objc/IOBluetoothSDPDataElement.h> | 7 #import <IOBluetooth/objc/IOBluetoothSDPDataElement.h> |
8 #import <IOBluetooth/objc/IOBluetoothSDPServiceRecord.h> | 8 #import <IOBluetooth/objc/IOBluetoothSDPServiceRecord.h> |
9 #import <IOBluetooth/objc/IOBluetoothSDPUUID.h> | 9 #import <IOBluetooth/objc/IOBluetoothSDPUUID.h> |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "base/strings/sys_string_conversions.h" | 15 #include "base/strings/sys_string_conversions.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 const BluetoothSDPServiceAttributeID kServiceClassIDAttributeId = 0x0001; | 20 const BluetoothSDPServiceAttributeID kServiceClassIDAttributeId = 0x0001; |
21 const BluetoothSDPServiceAttributeID kProtocolDescriptorListAttributeId = | 21 const BluetoothSDPServiceAttributeID kProtocolDescriptorListAttributeId = |
22 0x0004; | 22 0x0004; |
23 const BluetoothSDPServiceAttributeID kServiceNameAttributeId = 0x0100; | 23 const BluetoothSDPServiceAttributeID kServiceNameAttributeId = 0x0100; |
24 | 24 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 BluetoothServiceRecordMac record(GetServiceRecord(upper_case_uuid, false)); | 143 BluetoothServiceRecordMac record(GetServiceRecord(upper_case_uuid, false)); |
144 EXPECT_EQ(kExpectedRfcommUuid, record.uuid()); | 144 EXPECT_EQ(kExpectedRfcommUuid, record.uuid()); |
145 } | 145 } |
146 | 146 |
147 TEST_F(BluetoothServiceRecordMacTest, InvalidUuid) { | 147 TEST_F(BluetoothServiceRecordMacTest, InvalidUuid) { |
148 BluetoothServiceRecordMac record(GetServiceRecord(nil, false)); | 148 BluetoothServiceRecordMac record(GetServiceRecord(nil, false)); |
149 EXPECT_EQ("", record.uuid()); | 149 EXPECT_EQ("", record.uuid()); |
150 } | 150 } |
151 | 151 |
152 } // namespace device | 152 } // namespace device |
OLD | NEW |