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

Side by Side Diff: components/cryptauth/ble/bluetooth_low_energy_weave_packet_receiver_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_receiv er.h" 5 #include "components/cryptauth/ble/bluetooth_low_energy_weave_packet_receiver.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 "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace proximity_auth { 14 namespace cryptauth {
15 namespace weave { 15 namespace weave {
16 namespace { 16 namespace {
17 17
18 typedef BluetoothLowEnergyWeavePacketReceiver::ReceiverType ReceiverType; 18 typedef BluetoothLowEnergyWeavePacketReceiver::ReceiverType ReceiverType;
19 typedef BluetoothLowEnergyWeavePacketReceiver::State State; 19 typedef BluetoothLowEnergyWeavePacketReceiver::State State;
20 typedef BluetoothLowEnergyWeavePacketReceiver::ReceiverError ReceiverError; 20 typedef BluetoothLowEnergyWeavePacketReceiver::ReceiverError ReceiverError;
21 21
22 const uint8_t kCloseWithoutError = 0; 22 const uint8_t kCloseWithoutError = 0;
23 23
24 // uWeave Header: 24 // uWeave Header:
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 kByteSelectMaxPacketSize}; 1051 kByteSelectMaxPacketSize};
1052 receiver->ReceivePacket(p1); 1052 receiver->ReceivePacket(p1);
1053 EXPECT_EQ(State::ERROR_DETECTED, receiver->GetState()); 1053 EXPECT_EQ(State::ERROR_DETECTED, receiver->GetState());
1054 EXPECT_EQ(ReasonForClose::UNKNOWN_ERROR, receiver->GetReasonToClose()); 1054 EXPECT_EQ(ReasonForClose::UNKNOWN_ERROR, receiver->GetReasonToClose());
1055 EXPECT_EQ(ReceiverError::INVALID_CONTROL_COMMAND_IN_DATA_TRANSACTION, 1055 EXPECT_EQ(ReceiverError::INVALID_CONTROL_COMMAND_IN_DATA_TRANSACTION,
1056 receiver->GetReceiverError()); 1056 receiver->GetReceiverError());
1057 } 1057 }
1058 1058
1059 } // namespace weave 1059 } // namespace weave
1060 1060
1061 } // namespace proximity_auth 1061 } // namespace cryptauth
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698