#include "quiche/http2/test_tools/frame_parts.h"
#include <optional>
#include <ostream>
#include <string>
#include <type_traits>
#include "absl/strings/escaping.h"
#include "quiche/http2/test_tools/http2_structures_test_util.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"
AssertionFailure;
AssertionResult;
AssertionSuccess;
ContainerEq;
namespace http2 {
namespace test {
namespace {
static_assert …;
template <class T>
AssertionResult VerifyOptionalEq(const T& opt_a, const T& opt_b) { … }
}
FrameParts::FrameParts(const Http2FrameHeader& header) : … { … }
FrameParts::FrameParts(const Http2FrameHeader& header,
absl::string_view payload)
: … { … }
FrameParts::FrameParts(const Http2FrameHeader& header,
absl::string_view payload, size_t total_pad_length)
: … { … }
FrameParts::FrameParts(const FrameParts& header) = default;
FrameParts::~FrameParts() = default;
AssertionResult FrameParts::VerifyEquals(const FrameParts& that) const { … }
void FrameParts::SetTotalPadLength(size_t total_pad_length) { … }
void FrameParts::SetAltSvcExpected(absl::string_view origin,
absl::string_view value) { … }
bool FrameParts::OnFrameHeader(const Http2FrameHeader& ) { … }
void FrameParts::OnDataStart(const Http2FrameHeader& header) { … }
void FrameParts::OnDataPayload(const char* data, size_t len) { … }
void FrameParts::OnDataEnd() { … }
void FrameParts::OnHeadersStart(const Http2FrameHeader& header) { … }
void FrameParts::OnHeadersPriority(const Http2PriorityFields& priority) { … }
void FrameParts::OnHpackFragment(const char* data, size_t len) { … }
void FrameParts::OnHeadersEnd() { … }
void FrameParts::OnPriorityFrame(const Http2FrameHeader& header,
const Http2PriorityFields& priority) { … }
void FrameParts::OnContinuationStart(const Http2FrameHeader& header) { … }
void FrameParts::OnContinuationEnd() { … }
void FrameParts::OnPadLength(size_t trailing_length) { … }
void FrameParts::OnPadding(const char* pad, size_t skipped_length) { … }
void FrameParts::OnRstStream(const Http2FrameHeader& header,
Http2ErrorCode error_code) { … }
void FrameParts::OnSettingsStart(const Http2FrameHeader& header) { … }
void FrameParts::OnSetting(const Http2SettingFields& setting_fields) { … }
void FrameParts::OnSettingsEnd() { … }
void FrameParts::OnSettingsAck(const Http2FrameHeader& header) { … }
void FrameParts::OnPushPromiseStart(const Http2FrameHeader& header,
const Http2PushPromiseFields& promise,
size_t total_padding_length) { … }
void FrameParts::OnPushPromiseEnd() { … }
void FrameParts::OnPing(const Http2FrameHeader& header,
const Http2PingFields& ping) { … }
void FrameParts::OnPingAck(const Http2FrameHeader& header,
const Http2PingFields& ping) { … }
void FrameParts::OnGoAwayStart(const Http2FrameHeader& header,
const Http2GoAwayFields& goaway) { … }
void FrameParts::OnGoAwayOpaqueData(const char* data, size_t len) { … }
void FrameParts::OnGoAwayEnd() { … }
void FrameParts::OnWindowUpdate(const Http2FrameHeader& header,
uint32_t increment) { … }
void FrameParts::OnAltSvcStart(const Http2FrameHeader& header,
size_t origin_length, size_t value_length) { … }
void FrameParts::OnAltSvcOriginData(const char* data, size_t len) { … }
void FrameParts::OnAltSvcValueData(const char* data, size_t len) { … }
void FrameParts::OnAltSvcEnd() { … }
void FrameParts::OnPriorityUpdateStart(
const Http2FrameHeader& header,
const Http2PriorityUpdateFields& priority_update) { … }
void FrameParts::OnPriorityUpdatePayload(const char* data, size_t len) { … }
void FrameParts::OnPriorityUpdateEnd() { … }
void FrameParts::OnUnknownStart(const Http2FrameHeader& header) { … }
void FrameParts::OnUnknownPayload(const char* data, size_t len) { … }
void FrameParts::OnUnknownEnd() { … }
void FrameParts::OnPaddingTooLong(const Http2FrameHeader& header,
size_t missing_length) { … }
void FrameParts::OnFrameSizeError(const Http2FrameHeader& header) { … }
void FrameParts::OutputTo(std::ostream& out) const { … }
AssertionResult FrameParts::StartFrameOfType(
const Http2FrameHeader& header, Http2FrameType expected_frame_type) { … }
AssertionResult FrameParts::InFrameOfType(Http2FrameType expected_frame_type) { … }
AssertionResult FrameParts::EndFrameOfType(Http2FrameType expected_frame_type) { … }
AssertionResult FrameParts::InPaddedFrame() { … }
AssertionResult FrameParts::AppendString(absl::string_view source,
std::string* target,
std::optional<size_t>* opt_length) { … }
std::ostream& operator<<(std::ostream& out, const FrameParts& v) { … }
}
}