Change IETF Frame/QUIC_VERSION_99 tests to be symbolic.
This CL replaces checks for QUIC_VERSION_99 that are controlling the IETF frames and their associated functionality with a function call . The function has a name that is indicative of the features for which the version is being checked -- VersionHasIetfQuicFrames().
gfe-relnote: N/A just changes the text by which we test if IETF QUIC has been negotiated.
PiperOrigin-RevId: 253767805
Change-Id: I08ae6738411ac151f90d5d085ea69af90d79fb80
diff --git a/quic/tools/quic_simple_server_stream_test.cc b/quic/tools/quic_simple_server_stream_test.cc
index 9ce38fb..7e4af32 100644
--- a/quic/tools/quic_simple_server_stream_test.cc
+++ b/quic/tools/quic_simple_server_stream_test.cc
@@ -99,7 +99,7 @@
crypto_config,
compressed_certs_cache,
quic_simple_server_backend) {
- if (connection->transport_version() == QUIC_VERSION_99) {
+ if (VersionHasIetfQuicFrames(connection->transport_version())) {
QuicSessionPeer::SetMaxOpenIncomingUnidirectionalStreams(
this, kMaxStreamsForTest);
QuicSessionPeer::SetMaxOpenIncomingBidirectionalStreams(
@@ -217,10 +217,6 @@
return (*stream_->mutable_headers())[key].as_string();
}
- bool IsVersion99() const {
- return connection_->transport_version() == QUIC_VERSION_99;
- }
-
bool HasFrameHeader() const {
return VersionHasDataFrameHeader(connection_->transport_version());
}
@@ -684,7 +680,7 @@
QuicRstStreamFrame rst_frame(kInvalidControlFrameId, stream_->id(),
QUIC_STREAM_CANCELLED, 1234);
stream_->OnStreamReset(rst_frame);
- if (IsVersion99()) {
+ if (VersionHasIetfQuicFrames(connection_->transport_version())) {
// For V99 receiving a RST_STREAM causes a 1-way close; the test requires
// a full close. A CloseWriteSide closes the other half of the stream.
// Everything should then work properly.