chromium/net/third_party/quiche/src/quiche/quic/core/qpack/qpack_instruction_decoder_test.cc

// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "quiche/quic/core/qpack/qpack_instruction_decoder.h"

#include <algorithm>
#include <memory>
#include <string>

#include "absl/strings/escaping.h"
#include "absl/strings/string_view.h"
#include "quiche/quic/core/qpack/qpack_instructions.h"
#include "quiche/quic/platform/api/quic_logging.h"
#include "quiche/quic/platform/api/quic_test.h"
#include "quiche/quic/test_tools/qpack/qpack_test_utils.h"

_;
Eq;
Expectation;
InvokeWithoutArgs;
Return;
StrictMock;
Values;

namespace quic {
namespace test {
namespace {

// This instruction has three fields: an S bit and two varints.
const QpackInstruction* TestInstruction1() {}

// This instruction has two fields: a header name with a 6-bit prefix, and a
// header value with a 7-bit prefix, both preceded by a Huffman bit.
const QpackInstruction* TestInstruction2() {}

const QpackLanguage* TestLanguage() {}

class MockDelegate : public QpackInstructionDecoder::Delegate {};

class QpackInstructionDecoderTest : public QuicTestWithParam<FragmentMode> {};

INSTANTIATE_TEST_SUITE_P();

TEST_P(QpackInstructionDecoderTest, SBitAndVarint2) {}

TEST_P(QpackInstructionDecoderTest, NameAndValue) {}

TEST_P(QpackInstructionDecoderTest, InvalidHuffmanEncoding) {}

TEST_P(QpackInstructionDecoderTest, InvalidVarintEncoding) {}

TEST_P(QpackInstructionDecoderTest, StringLiteralTooLong) {}

TEST_P(QpackInstructionDecoderTest, DelegateSignalsError) {}

// QpackInstructionDecoder must not crash if it is destroyed from a
// Delegate::OnInstructionDecoded() call as long as it returns false.
TEST_P(QpackInstructionDecoderTest, DelegateSignalsErrorAndDestroysDecoder) {}

}  // namespace
}  // namespace test
}  // namespace quic