Fix flakiness in chaos protection test

This test would sometimes fail because chaos protection isn't guaranteed to always create this many CRYPTO, PING or PADDING frames if it runs out of available space. To resolve this, the test now checks if any of the symptoms of chaos protection is present, which is enough to ascertain that chaos protection was indeed performed.

Prior to this change, any run of this test with --runs_per_test=25 would reproduce the failure. With this fix, testing with --runs_per_test=1000 passes.

This CL also fixes a spelling mistake in a debug-only chaos protection log.

PiperOrigin-RevId: 707138040
diff --git a/quiche/quic/core/http/end_to_end_test.cc b/quiche/quic/core/http/end_to_end_test.cc
index 7270ede..105f0b3 100644
--- a/quiche/quic/core/http/end_to_end_test.cc
+++ b/quiche/quic/core/http/end_to_end_test.cc
@@ -6757,9 +6757,11 @@
   auto& packet1 = copying_writer->initial_packets()[0];
   EXPECT_EQ(packet1->was_dropped, drop_first_packet);
   EXPECT_EQ(packet1->packet_number, 1u);
-  EXPECT_GE(packet1->num_crypto_frames, 3u);
-  EXPECT_GE(packet1->num_ping_frames, 2u);
-  EXPECT_GE(packet1->num_padding_frames, 1u);
+  EXPECT_TRUE(packet1->num_crypto_frames > 2 || packet1->num_ping_frames > 0 ||
+              packet1->num_padding_frames > 1)
+      << "crypto=" << packet1->num_crypto_frames
+      << ", ping=" << packet1->num_ping_frames
+      << ", pad=" << packet1->num_padding_frames;
   EXPECT_EQ(packet1->min_crypto_offset(), 0u);
   EXPECT_GE(packet1->max_crypto_data(), discard_length);
   EXPECT_GE(packet1->total_crypto_data_length, 500u);
@@ -6768,8 +6770,11 @@
   EXPECT_FALSE(packet2->was_dropped);
   EXPECT_EQ(packet2->packet_number, 2u);
   if (num_packets == 2) {
-    EXPECT_GE(packet2->num_crypto_frames, 3u);
-    EXPECT_GE(packet2->num_ping_frames, 2u);
+    EXPECT_TRUE(packet2->num_crypto_frames > 2 ||
+                packet2->num_ping_frames > 0 || packet2->num_padding_frames > 1)
+        << "crypto=" << packet2->num_crypto_frames
+        << ", ping=" << packet2->num_ping_frames
+        << ", pad=" << packet2->num_padding_frames;
   } else {
     EXPECT_GE(packet2->num_crypto_frames, 1u);
   }
@@ -6781,9 +6786,11 @@
     auto& packet3 = copying_writer->initial_packets()[2];
     EXPECT_FALSE(packet3->was_dropped);
     EXPECT_EQ(packet3->packet_number, 3u);
-    EXPECT_GE(packet3->num_crypto_frames, 3u);
-    EXPECT_GE(packet3->num_ping_frames, 2u);
-    EXPECT_GE(packet3->num_padding_frames, 1u);
+    EXPECT_TRUE(packet3->num_crypto_frames > 2 ||
+                packet3->num_ping_frames > 0 || packet3->num_padding_frames > 1)
+        << "crypto=" << packet3->num_crypto_frames
+        << ", ping=" << packet3->num_ping_frames
+        << ", pad=" << packet3->num_padding_frames;
     EXPECT_GT(packet3->min_crypto_offset(), 0u);
     EXPECT_LT(packet3->max_crypto_data(), discard_length);
     EXPECT_GE(packet3->total_crypto_data_length, 500u);
diff --git a/quiche/quic/core/quic_packet_creator.cc b/quiche/quic/core/quic_packet_creator.cc
index 80c1dc4..5ce9033 100644
--- a/quiche/quic/core/quic_packet_creator.cc
+++ b/quiche/quic/core/quic_packet_creator.cc
@@ -1687,7 +1687,7 @@
     return 0;
   }
   QUIC_DVLOG(1) << "Performed multi-packet Chaos Protection for "
-                << write_length << " bytes accross " << num_packets
+                << write_length << " bytes across " << num_packets
                 << " packets (first=" << first_frame_length
                 << ", last=" << last_frame_length << ")";
   return remaining_bytes_consumed + last_frame_length;