#include "device/fido/cable/fido_ble_transaction.h"
#include <stdint.h>
#include <memory>
#include <optional>
#include <utility>
#include <vector>
#include "base/memory/scoped_refptr.h"
#include "base/numerics/safe_conversions.h"
#include "base/test/task_environment.h"
#include "base/test/test_future.h"
#include "device/bluetooth/test/bluetooth_test.h"
#include "device/bluetooth/test/mock_bluetooth_adapter.h"
#include "device/fido/cable/fido_ble_connection.h"
#include "device/fido/cable/fido_ble_frames.h"
#include "device/fido/cable/mock_fido_ble_connection.h"
#include "device/fido/fido_constants.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace device {
namespace {
constexpr uint16_t kDefaultControlPointLength = …;
FrameFuture;
std::vector<std::vector<uint8_t>> ToByteFragments(const FidoBleFrame& frame) { … }
}
class FidoBleTransactionTest : public ::testing::Test { … };
TEST_F(FidoBleTransactionTest, WriteRequestFrame_FailWrite) { … }
TEST_F(FidoBleTransactionTest, WriteRequestFrame_Success) { … }
TEST_F(FidoBleTransactionTest, WriteRequestFrame_DelayedWriteAck) { … }
TEST_F(FidoBleTransactionTest, WriteRequestFrame_DelayedWriteAck_KeepAlive) { … }
TEST_F(FidoBleTransactionTest, WriteRequestFrame_ControlPointLength_TooSmall) { … }
TEST_F(FidoBleTransactionTest, WriteRequestFrame_IgnoreValidKeepAlives) { … }
TEST_F(FidoBleTransactionTest, WriteRequestFrame_InvalidKeepAlive_Fail) { … }
TEST_F(FidoBleTransactionTest, WriteRequestFrame_ValidErrorCommand) { … }
TEST_F(FidoBleTransactionTest, WriteRequestFrame_InvalidErrorCommand) { … }
TEST_F(FidoBleTransactionTest, WriteRequestFrame_InvalidResponseFrameCommand) { … }
TEST_F(FidoBleTransactionTest,
WriteRequestFrame_InvalidResponseInitializationFragment) { … }
TEST_F(FidoBleTransactionTest,
WriteRequestFrame_InvalidResponseContinuationFragment) { … }
TEST_F(FidoBleTransactionTest,
WriteRequestFrame_InvalidOrderResponseContinuationFragments) { … }
}