| 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 2200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2211 QuicDispatcherPeer::GetAndClearLastError(dispatcher)); | 2211 QuicDispatcherPeer::GetAndClearLastError(dispatcher)); |
| 2212 server_thread_->Resume(); | 2212 server_thread_->Resume(); |
| 2213 | 2213 |
| 2214 // The connection should not be terminated. | 2214 // The connection should not be terminated. |
| 2215 EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo")); | 2215 EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo")); |
| 2216 EXPECT_EQ("200", client_->response_headers()->find(":status")->second); | 2216 EXPECT_EQ("200", client_->response_headers()->find(":status")->second); |
| 2217 } | 2217 } |
| 2218 | 2218 |
| 2219 TEST_P(EndToEndTest, CanceledStreamDoesNotBecomeZombie) { | 2219 TEST_P(EndToEndTest, CanceledStreamDoesNotBecomeZombie) { |
| 2220 ASSERT_TRUE(Initialize()); | 2220 ASSERT_TRUE(Initialize()); |
| 2221 if (GetParam().force_hol_blocking) { | |
| 2222 return; | |
| 2223 } | |
| 2224 EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed()); | 2221 EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed()); |
| 2225 // Lose the request. | 2222 // Lose the request. |
| 2226 SetPacketLossPercentage(100); | 2223 SetPacketLossPercentage(100); |
| 2227 SpdyHeaderBlock headers; | 2224 SpdyHeaderBlock headers; |
| 2228 headers[":method"] = "POST"; | 2225 headers[":method"] = "POST"; |
| 2229 headers[":path"] = "/foo"; | 2226 headers[":path"] = "/foo"; |
| 2230 headers[":scheme"] = "https"; | 2227 headers[":scheme"] = "https"; |
| 2231 headers[":authority"] = server_hostname_; | 2228 headers[":authority"] = server_hostname_; |
| 2232 client_->SendMessage(headers, "test_body", /*fin=*/false); | 2229 client_->SendMessage(headers, "test_body", /*fin=*/false); |
| 2233 QuicSpdyClientStream* stream = client_->GetOrCreateStream(); | 2230 QuicSpdyClientStream* stream = client_->GetOrCreateStream(); |
| (...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3082 client_->WaitForResponse(); | 3079 client_->WaitForResponse(); |
| 3083 EXPECT_EQ(kBarResponseBody, client_->response_body()); | 3080 EXPECT_EQ(kBarResponseBody, client_->response_body()); |
| 3084 QuicConnectionStats client_stats = | 3081 QuicConnectionStats client_stats = |
| 3085 client_->client()->session()->connection()->GetStats(); | 3082 client_->client()->session()->connection()->GetStats(); |
| 3086 EXPECT_EQ(0u, client_stats.packets_lost); | 3083 EXPECT_EQ(0u, client_stats.packets_lost); |
| 3087 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos()); | 3084 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos()); |
| 3088 } | 3085 } |
| 3089 } // namespace | 3086 } // namespace |
| 3090 } // namespace test | 3087 } // namespace test |
| 3091 } // namespace net | 3088 } // namespace net |
| OLD | NEW |