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

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

Issue 2850573002: Landing Recent QUIC changes until 3:35 PM, Apr 26, 2017 UTC-4 (Closed)
Patch Set: Remove Disconnect from ~QuicTestClient 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') | net/tools/quic/quic_client_session_test.cc » ('j') | 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 db3b8f9f9a8ca87c72f3212763a4d97b9e33d9b4..255d1b722e0b737743183ed9d3d5a621501a363d 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -2003,7 +2003,6 @@ TEST_P(EndToEndTest, ServerSendPublicReset) {
GetPeerInMemoryConnectionId(connection_id);
header.public_header.reset_flag = true;
header.public_header.version_flag = false;
- header.rejected_packet_number = 10101;
QuicFramer framer(server_supported_versions_, QuicTime::Zero(),
Perspective::IS_SERVER);
std::unique_ptr<QuicEncryptedPacket> packet(
@@ -2037,7 +2036,6 @@ TEST_P(EndToEndTest, ServerSendPublicResetWithDifferentConnectionId) {
GetPeerInMemoryConnectionId(incorrect_connection_id);
header.public_header.reset_flag = true;
header.public_header.version_flag = false;
- header.rejected_packet_number = 10101;
QuicFramer framer(server_supported_versions_, QuicTime::Zero(),
Perspective::IS_SERVER);
std::unique_ptr<QuicEncryptedPacket> packet(
@@ -2073,7 +2071,6 @@ TEST_P(EndToEndTest, ClientSendPublicResetWithDifferentConnectionId) {
header.public_header.connection_id = incorrect_connection_id;
header.public_header.reset_flag = true;
header.public_header.version_flag = false;
- header.rejected_packet_number = 10101;
QuicFramer framer(server_supported_versions_, QuicTime::Zero(),
Perspective::IS_CLIENT);
std::unique_ptr<QuicEncryptedPacket> packet(
@@ -3023,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_reloadable_flag_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') | net/tools/quic/quic_client_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698