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

Side by Side Diff: components/arc/bluetooth/bluetooth_struct_traits_unittest.cc

Issue 2394153002: Bluetooth: Disabling test due to leak. (Closed)
Patch Set: 2ndTry Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/macros.h" 7 #include "base/macros.h"
8 #include "device/bluetooth/bluetooth_uuid.h" 8 #include "device/bluetooth/bluetooth_uuid.h"
9 #include "mojo/public/cpp/bindings/array.h" 9 #include "mojo/public/cpp/bindings/array.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 device::BluetoothUUID uuid_device; 60 device::BluetoothUUID uuid_device;
61 EXPECT_TRUE(ConvertFromMojo(std::move(uuid_mojo), &uuid_device)); 61 EXPECT_TRUE(ConvertFromMojo(std::move(uuid_mojo), &uuid_device));
62 EXPECT_EQ(std::string(kUuidStr), uuid_device.canonical_value()); 62 EXPECT_EQ(std::string(kUuidStr), uuid_device.canonical_value());
63 63
64 // Size checks are performed in serialization code. UUIDs with a length 64 // Size checks are performed in serialization code. UUIDs with a length
65 // other than 16 bytes will not make it through the mojo deserialization 65 // other than 16 bytes will not make it through the mojo deserialization
66 // code since arc::mojom::BluetoothUUID::uuid is defined as 66 // code since arc::mojom::BluetoothUUID::uuid is defined as
67 // array<uint8, 16>. 67 // array<uint8, 16>.
68 } 68 }
69 69
70 TEST(BluetoothStructTraitsTest, DeserializeBluetoothAdvertisement) { 70 // Disabled due to memory leak, see http://crbug.com/653480.
71 TEST(BluetoothStructTraitsTest, DISABLED_DeserializeBluetoothAdvertisement) {
71 arc::mojom::BluetoothAdvertisementPtr advertisement_mojo = 72 arc::mojom::BluetoothAdvertisementPtr advertisement_mojo =
72 arc::mojom::BluetoothAdvertisement::New(); 73 arc::mojom::BluetoothAdvertisement::New();
73 mojo::Array<arc::mojom::BluetoothAdvertisingDataPtr> adv_data; 74 mojo::Array<arc::mojom::BluetoothAdvertisingDataPtr> adv_data;
74 75
75 // Create service UUIDs. 76 // Create service UUIDs.
76 arc::mojom::BluetoothAdvertisingDataPtr data = 77 arc::mojom::BluetoothAdvertisingDataPtr data =
77 arc::mojom::BluetoothAdvertisingData::New(); 78 arc::mojom::BluetoothAdvertisingData::New();
78 std::vector<device::BluetoothUUID> service_uuids; 79 std::vector<device::BluetoothUUID> service_uuids;
79 service_uuids.push_back((device::BluetoothUUID(kUuidStr))); 80 service_uuids.push_back((device::BluetoothUUID(kUuidStr)));
80 data->set_service_uuids(service_uuids); 81 data->set_service_uuids(service_uuids);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 145
145 advertisement_mojo->type = 146 advertisement_mojo->type =
146 arc::mojom::BluetoothAdvertisementType::ADV_TYPE_CONNECTABLE; 147 arc::mojom::BluetoothAdvertisementType::ADV_TYPE_CONNECTABLE;
147 advertisement_mojo->data = std::move(adv_data); 148 advertisement_mojo->data = std::move(adv_data);
148 149
149 std::unique_ptr<device::BluetoothAdvertisement::Data> advertisement; 150 std::unique_ptr<device::BluetoothAdvertisement::Data> advertisement;
150 EXPECT_FALSE(ConvertFromMojo(std::move(advertisement_mojo), &advertisement)); 151 EXPECT_FALSE(ConvertFromMojo(std::move(advertisement_mojo), &advertisement));
151 } 152 }
152 153
153 } // namespace mojo 154 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698