Passes a SpdyHeadersHandlerInterface to HpackDecoderAdapter in hpack_round_trip_test.cc. This is how HpackDecoderAdapter is used in production code to process header block payloads. PiperOrigin-RevId: 595766340
diff --git a/quiche/spdy/core/hpack/hpack_round_trip_test.cc b/quiche/spdy/core/hpack/hpack_round_trip_test.cc index f638a1b..4c044d5 100644 --- a/quiche/spdy/core/hpack/hpack_round_trip_test.cc +++ b/quiche/spdy/core/hpack/hpack_round_trip_test.cc
@@ -13,6 +13,7 @@ #include "quiche/spdy/core/hpack/hpack_decoder_adapter.h" #include "quiche/spdy/core/hpack/hpack_encoder.h" #include "quiche/spdy/core/http2_header_block.h" +#include "quiche/spdy/core/recording_headers_handler.h" namespace spdy { namespace test { @@ -35,6 +36,7 @@ std::string encoded = encoder_.EncodeHeaderBlock(header_set); bool success = true; + decoder_.HandleControlFrameHeadersStart(&handler_); if (GetParam() == ALL_INPUT) { // Pass all the input to the decoder at once. success = decoder_.HandleControlFrameHeadersData(encoded.data(), @@ -61,7 +63,7 @@ success = decoder_.HandleControlFrameHeadersComplete(); } - EXPECT_EQ(header_set, decoder_.decoded_block()); + EXPECT_EQ(header_set, handler_.decoded_block()); return success; } @@ -73,6 +75,7 @@ http2::test::Http2Random random_; HpackEncoder encoder_; HpackDecoderAdapter decoder_; + RecordingHeadersHandler handler_; }; INSTANTIATE_TEST_SUITE_P(Tests, HpackRoundTripTest,