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

Side by Side Diff: components/cryptauth/ble/bluetooth_low_energy_weave_packet_generator_unittest.cc

Issue 2561203002: Migrate weave-related classes from proximity_auth/ble to cryptauth/ble. (Closed)
Patch Set: Created 4 years 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
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/proximity_auth/ble/bluetooth_low_energy_weave_packet_genera tor.h" 5 #include "components/cryptauth/ble/bluetooth_low_energy_weave_packet_generator.h "
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "testing/gmock/include/gmock/gmock.h" 12 #include "testing/gmock/include/gmock/gmock.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 namespace proximity_auth { 15 namespace cryptauth {
16 namespace weave { 16 namespace weave {
17 17
18 class ProximityAuthBluetoothLowEnergyWeavePacketGeneratorTest 18 class ProximityAuthBluetoothLowEnergyWeavePacketGeneratorTest
19 : public testing::Test { 19 : public testing::Test {
20 protected: 20 protected:
21 ProximityAuthBluetoothLowEnergyWeavePacketGeneratorTest() {} 21 ProximityAuthBluetoothLowEnergyWeavePacketGeneratorTest() {}
22 22
23 void TestConnectionCloseWithReason(ReasonForClose reason_for_close, 23 void TestConnectionCloseWithReason(ReasonForClose reason_for_close,
24 uint8_t expected_reason_for_close) { 24 uint8_t expected_reason_for_close) {
25 std::unique_ptr<BluetoothLowEnergyWeavePacketGenerator> generator = 25 std::unique_ptr<BluetoothLowEnergyWeavePacketGenerator> generator =
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 262
263 for (uint8_t i = 0; i < kNumPackets; ++i) { 263 for (uint8_t i = 0; i < kNumPackets; ++i) {
264 uint8_t header = packets[i][0]; 264 uint8_t header = packets[i][0];
265 EXPECT_EQ(i % kMaxPacketCounter, GetCounterFromHeader(header)); 265 EXPECT_EQ(i % kMaxPacketCounter, GetCounterFromHeader(header));
266 EXPECT_EQ(kDataType, GetPacketType(header)); 266 EXPECT_EQ(kDataType, GetPacketType(header));
267 } 267 }
268 } 268 }
269 269
270 } // namespace weave 270 } // namespace weave
271 271
272 } // namespace proximity_auth 272 } // namespace cryptauth
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698