| Index: net/tools/quic/end_to_end_test.cc
|
| diff --git a/net/tools/quic/end_to_end_test.cc b/net/tools/quic/end_to_end_test.cc
|
| index aead33ad2735e599576a30db6af4401c0240ba5f..53430f590c26c5b30610c42a17a949b2d4698512 100644
|
| --- a/net/tools/quic/end_to_end_test.cc
|
| +++ b/net/tools/quic/end_to_end_test.cc
|
| @@ -3020,6 +3020,48 @@ TEST_P(EndToEndTest, WayTooLongRequestHeaders) {
|
| client_->connection_error());
|
| }
|
|
|
| +class WindowUpdateObserver : public QuicConnectionDebugVisitor {
|
| + public:
|
| + WindowUpdateObserver() : num_window_update_frames_(0) {}
|
| +
|
| + size_t num_window_update_frames() const { return num_window_update_frames_; }
|
| +
|
| + void OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) override {
|
| + ++num_window_update_frames_;
|
| + }
|
| +
|
| + private:
|
| + size_t num_window_update_frames_;
|
| +};
|
| +
|
| +TEST_P(EndToEndTest, WindowUpdateInAck) {
|
| + FLAGS_quic_reloadable_flag_quic_enable_version_38 = true;
|
| + FLAGS_quic_enable_version_39 = true;
|
| + ASSERT_TRUE(Initialize());
|
| + EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed());
|
| + WindowUpdateObserver observer;
|
| + QuicConnection* client_connection =
|
| + client_->client()->session()->connection();
|
| + client_connection->set_debug_visitor(&observer);
|
| + QuicVersion version = client_connection->version();
|
| + // 100KB body.
|
| + string body(100 * 1024, 'a');
|
| + SpdyHeaderBlock headers;
|
| + headers[":method"] = "POST";
|
| + headers[":path"] = "/foo";
|
| + headers[":scheme"] = "https";
|
| + headers[":authority"] = server_hostname_;
|
| +
|
| + EXPECT_EQ(kFooResponseBody,
|
| + client_->SendCustomSynchronousRequest(headers, body));
|
| + client_->Disconnect();
|
| + if (version > QUIC_VERSION_38) {
|
| + EXPECT_LT(0u, observer.num_window_update_frames());
|
| + } else {
|
| + EXPECT_EQ(0u, observer.num_window_update_frames());
|
| + }
|
| +}
|
| +
|
| class EndToEndBufferedPacketsTest : public EndToEndTest {
|
| public:
|
| void CreateClientWithWriter() override {
|
|
|