| 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 <list> | 8 #include <list> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1187 ReliableQuicStreamPeer::SetStreamBytesWritten(3, stream); | 1187 ReliableQuicStreamPeer::SetStreamBytesWritten(3, stream); |
| 1188 | 1188 |
| 1189 client_->SendData("bar", true); | 1189 client_->SendData("bar", true); |
| 1190 client_->WaitForWriteToFlush(); | 1190 client_->WaitForWriteToFlush(); |
| 1191 | 1191 |
| 1192 // By default the stream protects itself from writes after terminte is set. | 1192 // By default the stream protects itself from writes after terminte is set. |
| 1193 // Override this to test the server handling buggy clients. | 1193 // Override this to test the server handling buggy clients. |
| 1194 ReliableQuicStreamPeer::SetWriteSideClosed(false, | 1194 ReliableQuicStreamPeer::SetWriteSideClosed(false, |
| 1195 client_->GetOrCreateStream()); | 1195 client_->GetOrCreateStream()); |
| 1196 | 1196 |
| 1197 EXPECT_DFATAL(client_->SendData("eep", true), "Fin already buffered"); | 1197 EXPECT_QUIC_BUG(client_->SendData("eep", true), "Fin already buffered"); |
| 1198 } | 1198 } |
| 1199 | 1199 |
| 1200 TEST_P(EndToEndTest, Timeout) { | 1200 TEST_P(EndToEndTest, Timeout) { |
| 1201 client_config_.SetIdleConnectionStateLifetime( | 1201 client_config_.SetIdleConnectionStateLifetime( |
| 1202 QuicTime::Delta::FromMicroseconds(500), | 1202 QuicTime::Delta::FromMicroseconds(500), |
| 1203 QuicTime::Delta::FromMicroseconds(500)); | 1203 QuicTime::Delta::FromMicroseconds(500)); |
| 1204 // Note: we do NOT ASSERT_TRUE: we may time out during initial handshake: | 1204 // Note: we do NOT ASSERT_TRUE: we may time out during initial handshake: |
| 1205 // that's enough to validate timeout in this case. | 1205 // that's enough to validate timeout in this case. |
| 1206 Initialize(); | 1206 Initialize(); |
| 1207 while (client_->client()->connected()) { | 1207 while (client_->client()->connected()) { |
| (...skipping 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2876 EXPECT_EQ(kBarResponseBody, client_->response_body()); | 2876 EXPECT_EQ(kBarResponseBody, client_->response_body()); |
| 2877 QuicConnectionStats client_stats = | 2877 QuicConnectionStats client_stats = |
| 2878 client_->client()->session()->connection()->GetStats(); | 2878 client_->client()->session()->connection()->GetStats(); |
| 2879 EXPECT_EQ(0u, client_stats.packets_lost); | 2879 EXPECT_EQ(0u, client_stats.packets_lost); |
| 2880 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos()); | 2880 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos()); |
| 2881 } | 2881 } |
| 2882 | 2882 |
| 2883 } // namespace | 2883 } // namespace |
| 2884 } // namespace test | 2884 } // namespace test |
| 2885 } // namespace net | 2885 } // namespace net |
| OLD | NEW |