| 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 2409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2420 server_id, | 2420 server_id, |
| 2421 crypto_config, | 2421 crypto_config, |
| 2422 push_promise_index) {} | 2422 push_promise_index) {} |
| 2423 | 2423 |
| 2424 ~ClientSessionThatDropsBody() override {} | 2424 ~ClientSessionThatDropsBody() override {} |
| 2425 | 2425 |
| 2426 std::unique_ptr<QuicSpdyClientStream> CreateClientStream() override { | 2426 std::unique_ptr<QuicSpdyClientStream> CreateClientStream() override { |
| 2427 return QuicMakeUnique<ClientStreamThatDropsBody>(GetNextOutgoingStreamId(), | 2427 return QuicMakeUnique<ClientStreamThatDropsBody>(GetNextOutgoingStreamId(), |
| 2428 this); | 2428 this); |
| 2429 } | 2429 } |
| 2430 std::unique_ptr<QuicStream> CreateStream(QuicStreamId id) override { |
| 2431 return QuicMakeUnique<ClientStreamThatDropsBody>(id, this); |
| 2432 } |
| 2430 }; | 2433 }; |
| 2431 | 2434 |
| 2432 class MockableQuicClientThatDropsBody : public MockableQuicClient { | 2435 class MockableQuicClientThatDropsBody : public MockableQuicClient { |
| 2433 public: | 2436 public: |
| 2434 MockableQuicClientThatDropsBody(QuicSocketAddress server_address, | 2437 MockableQuicClientThatDropsBody(QuicSocketAddress server_address, |
| 2435 const QuicServerId& server_id, | 2438 const QuicServerId& server_id, |
| 2436 const QuicConfig& config, | 2439 const QuicConfig& config, |
| 2437 const QuicVersionVector& supported_versions, | 2440 const QuicVersionVector& supported_versions, |
| 2438 EpollServer* epoll_server) | 2441 EpollServer* epoll_server) |
| 2439 : MockableQuicClient(server_address, | 2442 : MockableQuicClient(server_address, |
| (...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3120 client_->WaitForResponse(); | 3123 client_->WaitForResponse(); |
| 3121 EXPECT_EQ(kBarResponseBody, client_->response_body()); | 3124 EXPECT_EQ(kBarResponseBody, client_->response_body()); |
| 3122 QuicConnectionStats client_stats = | 3125 QuicConnectionStats client_stats = |
| 3123 client_->client()->session()->connection()->GetStats(); | 3126 client_->client()->session()->connection()->GetStats(); |
| 3124 EXPECT_EQ(0u, client_stats.packets_lost); | 3127 EXPECT_EQ(0u, client_stats.packets_lost); |
| 3125 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos()); | 3128 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos()); |
| 3126 } | 3129 } |
| 3127 } // namespace | 3130 } // namespace |
| 3128 } // namespace test | 3131 } // namespace test |
| 3129 } // namespace net | 3132 } // namespace net |
| OLD | NEW |