Pass maximum table capacity and max blocked streams in QpackDecoder constructor.
These two limits are set by the decoder using SETTINGS_QPACK_MAX_TABLE_CAPACITY
and SETTINGS_QPACK_BLOCKED_STREAMS, therefore they can be decided by
QuicSpdyStream or higher layers by the time QpackDecoder is constructed.
Therefore the constructor seems the most appropriate place to communicate these
to QpackDecoder.
(This is in contrast with the value of these settings in the encoder, which
are received via SETTINGS from the peer after QpackEncoder is instantiated.)
gfe-relnote: n/a, change to QUIC v99-only code. Protected by existing disabled gfe2_reloadable_flag_quic_enable_version_99.
PiperOrigin-RevId: 261601336
Change-Id: I1449b63e67e387714a3bc30b6488571277281475
diff --git a/quic/core/qpack/qpack_round_trip_test.cc b/quic/core/qpack/qpack_round_trip_test.cc
index 1e9de2d..6ad6003 100644
--- a/quic/core/qpack/qpack_round_trip_test.cc
+++ b/quic/core/qpack/qpack_round_trip_test.cc
@@ -37,9 +37,12 @@
TestHeadersHandler handler;
NoopEncoderStreamErrorDelegate encoder_stream_error_delegate;
NoopQpackStreamSenderDelegate decoder_stream_sender_delegate;
- QpackDecode(&encoder_stream_error_delegate, &decoder_stream_sender_delegate,
- &handler, FragmentModeToFragmentSizeGenerator(GetParam()),
- encoded_header_block);
+ // TODO(b/112770235): Test dynamic table and blocked streams.
+ QpackDecode(
+ /* maximum_dynamic_table_capacity = */ 0,
+ /* maximum_blocked_streams = */ 0, &encoder_stream_error_delegate,
+ &decoder_stream_sender_delegate, &handler,
+ FragmentModeToFragmentSizeGenerator(GetParam()), encoded_header_block);
EXPECT_TRUE(handler.decoding_completed());
EXPECT_FALSE(handler.decoding_error_detected());