| 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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 QuicFlowControllerPeer::ReceiveWindowSize(server)); | 623 QuicFlowControllerPeer::ReceiveWindowSize(server)); |
| 624 EXPECT_EQ(QuicFlowControllerPeer::ReceiveWindowSize(client), | 624 EXPECT_EQ(QuicFlowControllerPeer::ReceiveWindowSize(client), |
| 625 QuicFlowControllerPeer::SendWindowSize(server)); | 625 QuicFlowControllerPeer::SendWindowSize(server)); |
| 626 } | 626 } |
| 627 | 627 |
| 628 // Must be called before Initialize to have effect. | 628 // Must be called before Initialize to have effect. |
| 629 void SetSpdyStreamFactory(QuicTestServer::StreamFactory* factory) { | 629 void SetSpdyStreamFactory(QuicTestServer::StreamFactory* factory) { |
| 630 stream_factory_ = factory; | 630 stream_factory_ = factory; |
| 631 } | 631 } |
| 632 | 632 |
| 633 QuicFlagSaver flags_; // Save/restore all QUIC flag values. |
| 633 bool initialized_; | 634 bool initialized_; |
| 634 IPEndPoint server_address_; | 635 IPEndPoint server_address_; |
| 635 string server_hostname_; | 636 string server_hostname_; |
| 636 std::unique_ptr<ServerThread> server_thread_; | 637 std::unique_ptr<ServerThread> server_thread_; |
| 637 std::unique_ptr<QuicTestClient> client_; | 638 std::unique_ptr<QuicTestClient> client_; |
| 638 PacketDroppingTestWriter* client_writer_; | 639 PacketDroppingTestWriter* client_writer_; |
| 639 PacketDroppingTestWriter* server_writer_; | 640 PacketDroppingTestWriter* server_writer_; |
| 640 bool server_started_; | 641 bool server_started_; |
| 641 QuicConfig client_config_; | 642 QuicConfig client_config_; |
| 642 QuicConfig server_config_; | 643 QuicConfig server_config_; |
| (...skipping 2273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2916 EXPECT_EQ(kBarResponseBody, client_->response_body()); | 2917 EXPECT_EQ(kBarResponseBody, client_->response_body()); |
| 2917 QuicConnectionStats client_stats = | 2918 QuicConnectionStats client_stats = |
| 2918 client_->client()->session()->connection()->GetStats(); | 2919 client_->client()->session()->connection()->GetStats(); |
| 2919 EXPECT_EQ(0u, client_stats.packets_lost); | 2920 EXPECT_EQ(0u, client_stats.packets_lost); |
| 2920 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos()); | 2921 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos()); |
| 2921 } | 2922 } |
| 2922 | 2923 |
| 2923 } // namespace | 2924 } // namespace |
| 2924 } // namespace test | 2925 } // namespace test |
| 2925 } // namespace net | 2926 } // namespace net |
| OLD | NEW |