#include "quiche/http2/test_tools/hpack_entry_collector.h"
#include <ostream>
#include <string>
#include "absl/strings/str_cat.h"
#include "quiche/http2/hpack/http2_hpack_constants.h"
#include "quiche/http2/test_tools/hpack_string_collector.h"
#include "quiche/http2/test_tools/verify_macros.h"
#include "quiche/common/platform/api/quiche_logging.h"
#include "quiche/common/platform/api/quiche_test.h"
AssertionResult;
namespace http2 {
namespace test {
namespace {
const HpackEntryType kInvalidHeaderType = …;
const size_t kInvalidIndex = …;
}
HpackEntryCollector::HpackEntryCollector() { … }
HpackEntryCollector::HpackEntryCollector(const HpackEntryCollector& other) =
default;
HpackEntryCollector::HpackEntryCollector(HpackEntryType type,
size_t index_or_size)
: … { … }
HpackEntryCollector::HpackEntryCollector(HpackEntryType type, size_t index,
bool value_huffman,
const std::string& value)
: … { … }
HpackEntryCollector::HpackEntryCollector(HpackEntryType type, bool name_huffman,
const std::string& name,
bool value_huffman,
const std::string& value)
: … { … }
HpackEntryCollector::~HpackEntryCollector() = default;
void HpackEntryCollector::OnIndexedHeader(size_t index) { … }
void HpackEntryCollector::OnStartLiteralHeader(HpackEntryType header_type,
size_t maybe_name_index) { … }
void HpackEntryCollector::OnNameStart(bool huffman_encoded, size_t len) { … }
void HpackEntryCollector::OnNameData(const char* data, size_t len) { … }
void HpackEntryCollector::OnNameEnd() { … }
void HpackEntryCollector::OnValueStart(bool huffman_encoded, size_t len) { … }
void HpackEntryCollector::OnValueData(const char* data, size_t len) { … }
void HpackEntryCollector::OnValueEnd() { … }
void HpackEntryCollector::OnDynamicTableSizeUpdate(size_t size) { … }
void HpackEntryCollector::Clear() { … }
bool HpackEntryCollector::IsClear() const { … }
bool HpackEntryCollector::IsComplete() const { … }
bool HpackEntryCollector::LiteralNameExpected() const { … }
bool HpackEntryCollector::LiteralValueExpected() const { … }
AssertionResult HpackEntryCollector::ValidateIndexedHeader(
size_t expected_index) const { … }
AssertionResult HpackEntryCollector::ValidateLiteralValueHeader(
HpackEntryType expected_type, size_t expected_index,
bool expected_value_huffman, absl::string_view expected_value) const { … }
AssertionResult HpackEntryCollector::ValidateLiteralNameValueHeader(
HpackEntryType expected_type, bool expected_name_huffman,
absl::string_view expected_name, bool expected_value_huffman,
absl::string_view expected_value) const { … }
AssertionResult HpackEntryCollector::ValidateDynamicTableSizeUpdate(
size_t size) const { … }
void HpackEntryCollector::AppendToHpackBlockBuilder(
HpackBlockBuilder* hbb) const { … }
std::string HpackEntryCollector::ToString() const { … }
void HpackEntryCollector::Init(HpackEntryType type, size_t maybe_index) { … }
bool operator==(const HpackEntryCollector& a, const HpackEntryCollector& b) { … }
bool operator!=(const HpackEntryCollector& a, const HpackEntryCollector& b) { … }
std::ostream& operator<<(std::ostream& out, const HpackEntryCollector& v) { … }
}
}