#include "quiche/http2/decoder/decode_http2_structures.h"
#include <stddef.h>
#include <string>
#include "absl/strings/string_view.h"
#include "quiche/http2/decoder/decode_buffer.h"
#include "quiche/http2/decoder/decode_status.h"
#include "quiche/http2/http2_constants.h"
#include "quiche/http2/test_tools/http2_frame_builder.h"
#include "quiche/http2/test_tools/http2_random.h"
#include "quiche/http2/test_tools/http2_structures_test_util.h"
#include "quiche/common/platform/api/quiche_logging.h"
#include "quiche/common/platform/api/quiche_test.h"
namespace http2 {
namespace test {
namespace {
template <typename T, size_t N>
absl::string_view ToStringPiece(T (&data)[N]) { … }
template <class S>
std::string SerializeStructure(const S& s) { … }
template <class S>
class StructureDecoderTest : public quiche::test::QuicheTest { … };
class FrameHeaderDecoderTest : public StructureDecoderTest<Http2FrameHeader> { … };
TEST_F(FrameHeaderDecoderTest, DecodesLiteral) { … }
TEST_F(FrameHeaderDecoderTest, DecodesRandomized) { … }
class PriorityFieldsDecoderTest
: public StructureDecoderTest<Http2PriorityFields> { … };
TEST_F(PriorityFieldsDecoderTest, DecodesLiteral) { … }
TEST_F(PriorityFieldsDecoderTest, DecodesRandomized) { … }
class RstStreamFieldsDecoderTest
: public StructureDecoderTest<Http2RstStreamFields> { … };
TEST_F(RstStreamFieldsDecoderTest, DecodesLiteral) { … }
TEST_F(RstStreamFieldsDecoderTest, DecodesRandomized) { … }
class SettingFieldsDecoderTest
: public StructureDecoderTest<Http2SettingFields> { … };
TEST_F(SettingFieldsDecoderTest, DecodesLiteral) { … }
TEST_F(SettingFieldsDecoderTest, DecodesRandomized) { … }
class PushPromiseFieldsDecoderTest
: public StructureDecoderTest<Http2PushPromiseFields> { … };
TEST_F(PushPromiseFieldsDecoderTest, DecodesLiteral) { … }
TEST_F(PushPromiseFieldsDecoderTest, DecodesRandomized) { … }
class PingFieldsDecoderTest : public StructureDecoderTest<Http2PingFields> { … };
TEST_F(PingFieldsDecoderTest, DecodesLiteral) { … }
TEST_F(PingFieldsDecoderTest, DecodesRandomized) { … }
class GoAwayFieldsDecoderTest : public StructureDecoderTest<Http2GoAwayFields> { … };
TEST_F(GoAwayFieldsDecoderTest, DecodesLiteral) { … }
TEST_F(GoAwayFieldsDecoderTest, DecodesRandomized) { … }
class WindowUpdateFieldsDecoderTest
: public StructureDecoderTest<Http2WindowUpdateFields> { … };
TEST_F(WindowUpdateFieldsDecoderTest, DecodesLiteral) { … }
TEST_F(WindowUpdateFieldsDecoderTest, DecodesRandomized) { … }
class AltSvcFieldsDecoderTest : public StructureDecoderTest<Http2AltSvcFields> { … };
TEST_F(AltSvcFieldsDecoderTest, DecodesLiteral) { … }
TEST_F(AltSvcFieldsDecoderTest, DecodesRandomized) { … }
}
}
}