Project import generated by Copybara.
PiperOrigin-RevId: 248265360
Change-Id: Ib862f0deab43c6175c46799be27bb6d2589f610f
diff --git a/quic/core/quic_packet_creator_test.cc b/quic/core/quic_packet_creator_test.cc
index 637960f..f87715b 100644
--- a/quic/core/quic_packet_creator_test.cc
+++ b/quic/core/quic_packet_creator_test.cc
@@ -653,7 +653,8 @@
const size_t overhead =
GetPacketHeaderOverhead(client_framer_.transport_version()) +
GetEncryptionOverhead();
- for (size_t i = overhead + creator_.MinPlaintextPacketSize();
+ for (size_t i = overhead + QuicPacketCreator::MinPlaintextPacketSize(
+ client_framer_.version());
i < overhead + 100; ++i) {
SCOPED_TRACE(i);
creator_.SetMaxPacketLength(i);
@@ -1862,6 +1863,16 @@
DeleteFrames(&frames_);
}
+TEST_P(QuicPacketCreatorTest, GetConnectionId) {
+ if (!GetQuicRestartFlag(quic_do_not_override_connection_id)) {
+ EXPECT_EQ(TestConnectionId(2), creator_.GetDestinationConnectionId());
+ EXPECT_EQ(TestConnectionId(2), creator_.GetSourceConnectionId());
+ return;
+ }
+ EXPECT_EQ(TestConnectionId(2), creator_.GetDestinationConnectionId());
+ EXPECT_EQ(EmptyQuicConnectionId(), creator_.GetSourceConnectionId());
+}
+
} // namespace
} // namespace test
} // namespace quic