| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include <stddef.h> | 5 #include <stddef.h> | 
| 6 #include <sys/epoll.h> | 6 #include <sys/epoll.h> | 
| 7 | 7 | 
| 8 #include <cstdint> | 8 #include <cstdint> | 
| 9 #include <list> | 9 #include <list> | 
| 10 #include <memory> | 10 #include <memory> | 
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 548     // server_writer_->set_fake_reorder_percentage(reorder); | 548     // server_writer_->set_fake_reorder_percentage(reorder); | 
| 549   } | 549   } | 
| 550 | 550 | 
| 551   // Verifies that the client and server connections were both free of packets | 551   // Verifies that the client and server connections were both free of packets | 
| 552   // being discarded, based on connection stats. | 552   // being discarded, based on connection stats. | 
| 553   // Calls server_thread_ Pause() and Resume(), which may only be called once | 553   // Calls server_thread_ Pause() and Resume(), which may only be called once | 
| 554   // per test. | 554   // per test. | 
| 555   void VerifyCleanConnection(bool had_packet_loss) { | 555   void VerifyCleanConnection(bool had_packet_loss) { | 
| 556     QuicConnectionStats client_stats = | 556     QuicConnectionStats client_stats = | 
| 557         client_->client()->session()->connection()->GetStats(); | 557         client_->client()->session()->connection()->GetStats(); | 
| 558     if (!had_packet_loss) { | 558     // TODO(ianswett): Determine why this becomes even more flaky with BBR | 
|  | 559     // enabled.  b/62141144 | 
|  | 560     if (!had_packet_loss && !FLAGS_quic_reloadable_flag_quic_default_to_bbr) { | 
| 559       EXPECT_EQ(0u, client_stats.packets_lost); | 561       EXPECT_EQ(0u, client_stats.packets_lost); | 
| 560     } | 562     } | 
| 561     EXPECT_EQ(0u, client_stats.packets_discarded); | 563     EXPECT_EQ(0u, client_stats.packets_discarded); | 
| 562     // When doing 0-RTT with stateless rejects, the encrypted requests cause | 564     // When doing 0-RTT with stateless rejects, the encrypted requests cause | 
| 563     // a retranmission of the SREJ packets which are dropped by the client. | 565     // a retranmission of the SREJ packets which are dropped by the client. | 
| 564     if (!BothSidesSupportStatelessRejects()) { | 566     if (!BothSidesSupportStatelessRejects()) { | 
| 565       EXPECT_EQ(0u, client_stats.packets_dropped); | 567       EXPECT_EQ(0u, client_stats.packets_dropped); | 
| 566     } | 568     } | 
| 567     EXPECT_EQ(client_stats.packets_received, client_stats.packets_processed); | 569     EXPECT_EQ(client_stats.packets_received, client_stats.packets_processed); | 
| 568 | 570 | 
| (...skipping 2544 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3113   client_->WaitForResponse(); | 3115   client_->WaitForResponse(); | 
| 3114   EXPECT_EQ(kBarResponseBody, client_->response_body()); | 3116   EXPECT_EQ(kBarResponseBody, client_->response_body()); | 
| 3115   QuicConnectionStats client_stats = | 3117   QuicConnectionStats client_stats = | 
| 3116       client_->client()->session()->connection()->GetStats(); | 3118       client_->client()->session()->connection()->GetStats(); | 
| 3117   EXPECT_EQ(0u, client_stats.packets_lost); | 3119   EXPECT_EQ(0u, client_stats.packets_lost); | 
| 3118   EXPECT_EQ(1, client_->client()->GetNumSentClientHellos()); | 3120   EXPECT_EQ(1, client_->client()->GetNumSentClientHellos()); | 
| 3119 } | 3121 } | 
| 3120 }  // namespace | 3122 }  // namespace | 
| 3121 }  // namespace test | 3123 }  // namespace test | 
| 3122 }  // namespace net | 3124 }  // namespace net | 
| OLD | NEW | 
|---|