| 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 2346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2357 } | 2357 } |
| 2358 | 2358 |
| 2359 SendResponse(); | 2359 SendResponse(); |
| 2360 } | 2360 } |
| 2361 }; | 2361 }; |
| 2362 | 2362 |
| 2363 class ServerStreamThatDropsBodyFactory : public QuicTestServer::StreamFactory { | 2363 class ServerStreamThatDropsBodyFactory : public QuicTestServer::StreamFactory { |
| 2364 public: | 2364 public: |
| 2365 ServerStreamThatDropsBodyFactory() {} | 2365 ServerStreamThatDropsBodyFactory() {} |
| 2366 | 2366 |
| 2367 ~ServerStreamThatDropsBodyFactory() override{}; | 2367 ~ServerStreamThatDropsBodyFactory() override {} |
| 2368 | 2368 |
| 2369 QuicSimpleServerStream* CreateStream( | 2369 QuicSimpleServerStream* CreateStream( |
| 2370 QuicStreamId id, | 2370 QuicStreamId id, |
| 2371 QuicSpdySession* session, | 2371 QuicSpdySession* session, |
| 2372 QuicHttpResponseCache* response_cache) override { | 2372 QuicHttpResponseCache* response_cache) override { |
| 2373 return new ServerStreamThatDropsBody(id, session, response_cache); | 2373 return new ServerStreamThatDropsBody(id, session, response_cache); |
| 2374 } | 2374 } |
| 2375 }; | 2375 }; |
| 2376 | 2376 |
| 2377 // A test server stream that sends response with body size greater than 4GB. | 2377 // A test server stream that sends response with body size greater than 4GB. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 2400 // talking to a 32-bit client. | 2400 // talking to a 32-bit client. |
| 2401 int64_t body_bytes_; | 2401 int64_t body_bytes_; |
| 2402 }; | 2402 }; |
| 2403 | 2403 |
| 2404 class ServerStreamThatSendsHugeResponseFactory | 2404 class ServerStreamThatSendsHugeResponseFactory |
| 2405 : public QuicTestServer::StreamFactory { | 2405 : public QuicTestServer::StreamFactory { |
| 2406 public: | 2406 public: |
| 2407 explicit ServerStreamThatSendsHugeResponseFactory(int64_t body_bytes) | 2407 explicit ServerStreamThatSendsHugeResponseFactory(int64_t body_bytes) |
| 2408 : body_bytes_(body_bytes) {} | 2408 : body_bytes_(body_bytes) {} |
| 2409 | 2409 |
| 2410 ~ServerStreamThatSendsHugeResponseFactory() override{}; | 2410 ~ServerStreamThatSendsHugeResponseFactory() override {} |
| 2411 | 2411 |
| 2412 QuicSimpleServerStream* CreateStream( | 2412 QuicSimpleServerStream* CreateStream( |
| 2413 QuicStreamId id, | 2413 QuicStreamId id, |
| 2414 QuicSpdySession* session, | 2414 QuicSpdySession* session, |
| 2415 QuicHttpResponseCache* response_cache) override { | 2415 QuicHttpResponseCache* response_cache) override { |
| 2416 return new ServerStreamThatSendsHugeResponse(id, session, response_cache, | 2416 return new ServerStreamThatSendsHugeResponse(id, session, response_cache, |
| 2417 body_bytes_); | 2417 body_bytes_); |
| 2418 } | 2418 } |
| 2419 | 2419 |
| 2420 int64_t body_bytes_; | 2420 int64_t body_bytes_; |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3115 client_->WaitForResponse(); | 3115 client_->WaitForResponse(); |
| 3116 EXPECT_EQ(kBarResponseBody, client_->response_body()); | 3116 EXPECT_EQ(kBarResponseBody, client_->response_body()); |
| 3117 QuicConnectionStats client_stats = | 3117 QuicConnectionStats client_stats = |
| 3118 client_->client()->session()->connection()->GetStats(); | 3118 client_->client()->session()->connection()->GetStats(); |
| 3119 EXPECT_EQ(0u, client_stats.packets_lost); | 3119 EXPECT_EQ(0u, client_stats.packets_lost); |
| 3120 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos()); | 3120 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos()); |
| 3121 } | 3121 } |
| 3122 } // namespace | 3122 } // namespace |
| 3123 } // namespace test | 3123 } // namespace test |
| 3124 } // namespace net | 3124 } // namespace net |
| OLD | NEW |