Avoid sending huge chunks of data in EndToEndTest.PostZeroRTTRequestDuringHandshake.

The big POST body slows down test execution and is not necessary for the regression test.

PiperOrigin-RevId: 329606834
Change-Id: I66cff1754d785d3181804701bd23b26f6a962353
diff --git a/quic/core/http/end_to_end_test.cc b/quic/core/http/end_to_end_test.cc
index 33bfee0..1d636d6 100644
--- a/quic/core/http/end_to_end_test.cc
+++ b/quic/core/http/end_to_end_test.cc
@@ -1607,7 +1607,7 @@
 }
 
 // This is a regression test for b/162595387
-TEST_P(EndToEndTest, LargePostZeroRTTRequestDuringHandshake) {
+TEST_P(EndToEndTest, PostZeroRTTRequestDuringHandshake) {
   if (!version_.UsesTls()) {
     // This test is TLS specific.
     ASSERT_TRUE(Initialize());
@@ -1619,15 +1619,7 @@
   connection_debug_visitor_ = &visitor;
   ASSERT_TRUE(Initialize());
 
-  std::string body(20480, 'a');
-  SpdyHeaderBlock headers;
-  headers[":method"] = "POST";
-  headers[":path"] = "/foo";
-  headers[":scheme"] = "https";
-  headers[":authority"] = server_hostname_;
-
-  EXPECT_EQ(kFooResponseBody,
-            client_->SendCustomSynchronousRequest(headers, body));
+  SendSynchronousFooRequestAndCheckResponse();
   QuicSpdyClientSession* client_session = GetClientSession();
   ASSERT_TRUE(client_session);
   EXPECT_FALSE(client_session->EarlyDataAccepted());
@@ -1639,8 +1631,7 @@
 
   // The 0-RTT handshake should succeed.
   ON_CALL(visitor, OnCryptoFrame(_))
-      .WillByDefault(Invoke([this, &headers,
-                             &body](const QuicCryptoFrame& frame) {
+      .WillByDefault(Invoke([this](const QuicCryptoFrame& frame) {
         if (frame.level != ENCRYPTION_HANDSHAKE) {
           return;
         }
@@ -1653,9 +1644,14 @@
         EXPECT_TRUE(
             GetClientConnection()->framer().HasEncrypterOfEncryptionLevel(
                 ENCRYPTION_HANDSHAKE));
-        EXPECT_GT(client_->SendMessage(headers, body, /*fin*/ true,
-                                       /*flush*/ false),
-                  0);
+        SpdyHeaderBlock headers;
+        headers[":method"] = "POST";
+        headers[":path"] = "/foo";
+        headers[":scheme"] = "https";
+        headers[":authority"] = server_hostname_;
+        EXPECT_GT(
+            client_->SendMessage(headers, "", /*fin*/ true, /*flush*/ false),
+            0);
       }));
   client_->Connect();
   ASSERT_TRUE(client_->client()->WaitForOneRttKeysAvailable());
@@ -1671,7 +1667,7 @@
 }
 
 // Regression test for b/166836136.
-TEST_P(EndToEndTest, LargePostZeroRTTRejectRequestDuringHandshake) {
+TEST_P(EndToEndTest, RetransmissionAfterZeroRTTRejectBeforeOneRtt) {
   if (!version_.UsesTls()) {
     // This test is TLS specific.
     ASSERT_TRUE(Initialize());