Support LengthPrefixedConnectionIds in v99

This CL adds support for the invariants change from draft-22. It introduces a new parsing method QuicFramer::ParsePublicHeader which can parse both old and new formats, and uses it for v99 and also for all versions when gfe2_reloadable_flag_quic_use_parse_public_header is true.

gfe-relnote: change v99 encoding, protected by disabled v99 flag and by gfe2_reloadable_flag_quic_use_parse_public_header.
PiperOrigin-RevId: 260871822
Change-Id: I680d12141b2731401a818ed335af03e7c5365219
diff --git a/quic/core/quic_packet_creator_test.cc b/quic/core/quic_packet_creator_test.cc
index 802c07b..bd49182 100644
--- a/quic/core/quic_packet_creator_test.cc
+++ b/quic/core/quic_packet_creator_test.cc
@@ -813,8 +813,11 @@
   versions.push_back(test::QuicVersionMax());
   const bool ietf_quic =
       VersionHasIetfInvariantHeader(GetParam().version.transport_version);
+  const bool has_length_prefix =
+      GetParam().version.HasLengthPrefixedConnectionIds();
   std::unique_ptr<QuicEncryptedPacket> encrypted(
-      creator_.SerializeVersionNegotiationPacket(ietf_quic, versions));
+      creator_.SerializeVersionNegotiationPacket(ietf_quic, has_length_prefix,
+                                                 versions));
 
   {
     InSequence s;
@@ -1820,6 +1823,9 @@
   if (QuicVersionHasLongHeaderLengths(version)) {
     expected_largest_payload -= 2;
   }
+  if (GetParam().version.HasLengthPrefixedConnectionIds()) {
+    expected_largest_payload -= 1;
+  }
   EXPECT_EQ(expected_largest_payload,
             creator_.GetGuaranteedLargestMessagePayload());
 }