OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/arc/bluetooth/bluetooth_struct_traits.h" | 5 #include "components/arc/bluetooth/bluetooth_struct_traits.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "device/bluetooth/bluetooth_uuid.h" | 11 #include "device/bluetooth/bluetooth_uuid.h" |
12 #include "mojo/public/cpp/bindings/array.h" | |
13 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
14 | 13 |
15 namespace { | 14 namespace { |
16 | 15 |
17 constexpr char kUuidStr[] = "12345678-1234-5678-9abc-def123456789"; | 16 constexpr char kUuidStr[] = "12345678-1234-5678-9abc-def123456789"; |
18 constexpr uint8_t kUuidArray[] = {0x12, 0x34, 0x56, 0x78, 0x12, 0x34, | 17 constexpr uint8_t kUuidArray[] = {0x12, 0x34, 0x56, 0x78, 0x12, 0x34, |
19 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf1, | 18 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf1, |
20 0x23, 0x45, 0x67, 0x89}; | 19 0x23, 0x45, 0x67, 0x89}; |
21 constexpr size_t kUuidSize = 16; | 20 constexpr size_t kUuidSize = 16; |
22 | 21 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 146 |
148 advertisement_mojo->type = | 147 advertisement_mojo->type = |
149 arc::mojom::BluetoothAdvertisementType::ADV_TYPE_CONNECTABLE; | 148 arc::mojom::BluetoothAdvertisementType::ADV_TYPE_CONNECTABLE; |
150 advertisement_mojo->data = std::move(adv_data); | 149 advertisement_mojo->data = std::move(adv_data); |
151 | 150 |
152 std::unique_ptr<device::BluetoothAdvertisement::Data> advertisement; | 151 std::unique_ptr<device::BluetoothAdvertisement::Data> advertisement; |
153 EXPECT_FALSE(ConvertFromMojo(std::move(advertisement_mojo), &advertisement)); | 152 EXPECT_FALSE(ConvertFromMojo(std::move(advertisement_mojo), &advertisement)); |
154 } | 153 } |
155 | 154 |
156 } // namespace mojo | 155 } // namespace mojo |
OLD | NEW |