chromium/net/third_party/quiche/src/quiche/http2/adapter/test_utils.cc

#include "quiche/http2/adapter/test_utils.h"

#include <cstring>
#include <optional>
#include <ostream>
#include <vector>

#include "absl/strings/str_format.h"
#include "quiche/http2/adapter/http2_visitor_interface.h"
#include "quiche/http2/hpack/hpack_encoder.h"
#include "quiche/common/quiche_data_reader.h"
#include "quiche/spdy/core/spdy_protocol.h"

namespace http2 {
namespace adapter {
namespace test {
namespace {

ConnectionError;

std::string EncodeHeaders(const quiche::HttpHeaderBlock& entries) {}

}  // anonymous namespace

TestVisitor::DataFrameHeaderInfo TestVisitor::OnReadyToSendDataForStream(
    Http2StreamId stream_id, size_t max_length) {}

bool TestVisitor::SendDataFrame(Http2StreamId stream_id,
                                absl::string_view frame_header,
                                size_t payload_bytes) {}

void TestVisitor::AppendPayloadForStream(Http2StreamId stream_id,
                                         absl::string_view payload) {}

void TestVisitor::SetEndData(Http2StreamId stream_id, bool end_stream) {}

void TestVisitor::SimulateError(Http2StreamId stream_id) {}

std::pair<int64_t, bool> TestVisitor::PackMetadataForStream(
    Http2StreamId stream_id, uint8_t* dest, size_t dest_len) {}

void TestVisitor::AppendMetadataForStream(
    Http2StreamId stream_id, const quiche::HttpHeaderBlock& payload) {}

VisitorDataSource::VisitorDataSource(Http2VisitorInterface& visitor,
                                     Http2StreamId stream_id)
    :{}

bool VisitorDataSource::send_fin() const {}

std::pair<int64_t, bool> VisitorDataSource::SelectPayloadLength(
    size_t max_length) {}

bool VisitorDataSource::Send(absl::string_view frame_header,
                             size_t payload_length) {}

TestMetadataSource::TestMetadataSource(const quiche::HttpHeaderBlock& entries)
    :{}

std::pair<int64_t, bool> TestMetadataSource::Pack(uint8_t* dest,
                                                  size_t dest_len) {}

namespace {

TypeAndOptionalLength;

std::ostream& operator<<(
    std::ostream& os,
    const std::vector<TypeAndOptionalLength>& types_and_lengths) {}

std::string FrameTypeToString(uint8_t frame_type) {}

// Custom gMock matcher, used to implement EqualsFrames().
class SpdyControlFrameMatcher
    : public testing::MatcherInterface<absl::string_view> {};

}  // namespace

testing::Matcher<absl::string_view> EqualsFrames(
    std::vector<std::pair<spdy::SpdyFrameType, std::optional<size_t>>>
        types_and_lengths) {}

testing::Matcher<absl::string_view> EqualsFrames(
    std::vector<spdy::SpdyFrameType> types) {}

}  // namespace test
}  // namespace adapter
}  // namespace http2