src/net/third_party/quiche/src/quic/core/http/quic_receive_control_stream_test.cc
// Regression test for b/137554973: unknown frames should be consumed.
Regression test for b/137554973: unknown frames should be consumed.
Regression test for b / 137554973 : unknown frames should be consumed .
TEST_P(QuicReceiveControlStreamTest, ConsumeUnknownFrame) {
  EXPECT_EQ(1u, NumBytesConsumed());
  QuicStreamOffset offset = 1;
  std::string settings_frame = EncodeSettings({});
  receive_control_stream_->OnStreamFrame(
      QuicStreamFrame(receive_control_stream_->id(),  false, offset,
                      settings_frame));
  offset += settings_frame.length();
  EXPECT_EQ(offset, NumBytesConsumed());
  std::string unknown_frame = quiche::QuicheTextUtils::HexDecode(
      "21"        
      "03"        
      "666f6f");  
  receive_control_stream_->OnStreamFrame(QuicStreamFrame(
      receive_control_stream_->id(),  false, offset, unknown_frame));
  offset += unknown_frame.size();
  EXPECT_EQ(offset, NumBytesConsumed());
}
TEST_P ( QuicReceiveControlStreamTest , ConsumeUnknownFrame ) { EXPECT_EQ ( 1u , NumBytesConsumed ( ) ) ; QuicStreamOffset offset = 1 ; std :: string settings_frame = EncodeSettings ( { } ) ; receive_control_stream_ -> OnStreamFrame ( QuicStreamFrame ( receive_control_stream_ -> id ( ) , false , offset , settings_frame ) ) ; offset += settings_frame . length ( ) ; EXPECT_EQ ( offset , NumBytesConsumed ( ) ) ; std :: string unknown_frame = quiche :: QuicheTextUtils :: HexDecode ( " " " " " " ) ; receive_control_stream_ -> OnStreamFrame ( QuicStreamFrame ( receive_control_stream_ -> id ( ) , false , offset , unknown_frame ) ) ; offset += unknown_frame . size ( ) ; EXPECT_EQ ( offset , NumBytesConsumed ( ) ) ; }
Regression test for b/137554973: unknown frames should be consumed.
Regression test for b / 137554973 : unknown frames should be consumed .
// Receive SETTINGS frame. /* fin = */ // SETTINGS frame is consumed. // Receive unknown frame. // reserved frame type // payload length // payload "foo" /* fin = */ // Unknown frame is consumed.