Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2156)

Unified Diff: net/tools/quic/end_to_end_test.cc

Issue 2846033002: Part of QUIC v39 change: 1) do not ack acks. 2) Send a WINDOW_UPDATE frame every 20 packets which d… (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/test_tools/simulator/quic_endpoint.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « net/quic/test_tools/simulator/quic_endpoint.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698