gfe-relnote: Implement sending the MAX_PUSH_ID frame when the client sets a non-zero maximum push id.

PiperOrigin-RevId: 263372703
Change-Id: If68ed7819648fdd7bd5ec968592d04f88467f5d2
diff --git a/quic/core/http/end_to_end_test.cc b/quic/core/http/end_to_end_test.cc
index 14dd32c..d6c8486 100644
--- a/quic/core/http/end_to_end_test.cc
+++ b/quic/core/http/end_to_end_test.cc
@@ -280,7 +280,9 @@
     }
     client->UseConnectionIdLength(override_server_connection_id_length_);
     client->UseClientConnectionIdLength(override_client_connection_id_length_);
-    client->client()->set_max_allowed_push_id(kMaxQuicStreamId);
+    if (support_server_push_) {
+      client->client()->set_max_allowed_push_id(kMaxQuicStreamId);
+    }
     client->Connect();
     return client;
   }
@@ -4114,6 +4116,29 @@
   EXPECT_EQ(QUIC_INVALID_STREAM_ID, client_->connection_error());
 }
 
+TEST_P(EndToEndTest, TestMaxPushId) {
+  // Has to be before version test, see EndToEndTest::TearDown()
+  ASSERT_TRUE(Initialize());
+  if (!VersionHasIetfQuicFrames(negotiated_version_.transport_version)) {
+    // Only runs for IETF QUIC.
+    return;
+  }
+
+  EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed());
+  static_cast<QuicSpdySession*>(client_->client()->session())
+      ->set_max_allowed_push_id(kMaxQuicStreamId);
+
+  client_->SendSynchronousRequest("/foo");
+
+  EXPECT_EQ(kMaxQuicStreamId,
+            static_cast<QuicSpdySession*>(client_->client()->session())
+                ->max_allowed_push_id());
+
+  EXPECT_EQ(
+      kMaxQuicStreamId,
+      static_cast<QuicSpdySession*>(GetServerSession())->max_allowed_push_id());
+}
+
 }  // namespace
 }  // namespace test
 }  // namespace quic