| 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 <string> | 6 #include <string> |
| 7 #include <sys/epoll.h> | 7 #include <sys/epoll.h> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 void ExpectFlowControlsSynced(QuicFlowController* client, | 491 void ExpectFlowControlsSynced(QuicFlowController* client, |
| 492 QuicFlowController* server) { | 492 QuicFlowController* server) { |
| 493 EXPECT_EQ(QuicFlowControllerPeer::SendWindowSize(client), | 493 EXPECT_EQ(QuicFlowControllerPeer::SendWindowSize(client), |
| 494 QuicFlowControllerPeer::ReceiveWindowSize(server)); | 494 QuicFlowControllerPeer::ReceiveWindowSize(server)); |
| 495 EXPECT_EQ(QuicFlowControllerPeer::ReceiveWindowSize(client), | 495 EXPECT_EQ(QuicFlowControllerPeer::ReceiveWindowSize(client), |
| 496 QuicFlowControllerPeer::SendWindowSize(server)); | 496 QuicFlowControllerPeer::SendWindowSize(server)); |
| 497 } | 497 } |
| 498 | 498 |
| 499 // Must be called before Initialize to have effect. | 499 // Must be called before Initialize to have effect. |
| 500 void SetSpdyStreamCreator(QuicTestServer::StreamCreationFunction function) { | 500 void SetSpdyStreamCreator(QuicTestServer::StreamCreationFunction function) { |
| 501 // TODO(rtenneti) use std::move when supported. |
| 501 stream_creator_ = function; | 502 stream_creator_ = function; |
| 502 } | 503 } |
| 503 | 504 |
| 504 bool initialized_; | 505 bool initialized_; |
| 505 IPEndPoint server_address_; | 506 IPEndPoint server_address_; |
| 506 string server_hostname_; | 507 string server_hostname_; |
| 507 scoped_ptr<ServerThread> server_thread_; | 508 scoped_ptr<ServerThread> server_thread_; |
| 508 scoped_ptr<QuicTestClient> client_; | 509 scoped_ptr<QuicTestClient> client_; |
| 509 PacketDroppingTestWriter* client_writer_; | 510 PacketDroppingTestWriter* client_writer_; |
| 510 PacketDroppingTestWriter* server_writer_; | 511 PacketDroppingTestWriter* server_writer_; |
| (...skipping 1574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2085 // There will be buffered data to write in the client's stream. | 2086 // There will be buffered data to write in the client's stream. |
| 2086 ReliableQuicStream* stream = client_->client()->session()->GetStream(5); | 2087 ReliableQuicStream* stream = client_->client()->session()->GetStream(5); |
| 2087 EXPECT_TRUE(stream != nullptr && stream->HasBufferedData()); | 2088 EXPECT_TRUE(stream != nullptr && stream->HasBufferedData()); |
| 2088 } | 2089 } |
| 2089 } | 2090 } |
| 2090 | 2091 |
| 2091 } // namespace | 2092 } // namespace |
| 2092 } // namespace test | 2093 } // namespace test |
| 2093 } // namespace tools | 2094 } // namespace tools |
| 2094 } // namespace net | 2095 } // namespace net |
| OLD | NEW |