| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 class EndToEndTest : public ::testing::TestWithParam<TestParams> { | 144 class EndToEndTest : public ::testing::TestWithParam<TestParams> { |
| 145 protected: | 145 protected: |
| 146 EndToEndTest() | 146 EndToEndTest() |
| 147 : server_started_(false), | 147 : server_started_(false), |
| 148 strike_register_no_startup_period_(false) { | 148 strike_register_no_startup_period_(false) { |
| 149 net::IPAddressNumber ip; | 149 net::IPAddressNumber ip; |
| 150 CHECK(net::ParseIPLiteralToNumber("127.0.0.1", &ip)); | 150 CHECK(net::ParseIPLiteralToNumber("127.0.0.1", &ip)); |
| 151 uint port = 0; | 151 uint port = 0; |
| 152 server_address_ = IPEndPoint(ip, port); | 152 server_address_ = IPEndPoint(ip, port); |
| 153 server_key_ = QuicSessionKey("example.com", port, false, | 153 server_key_ = QuicSessionKey("example.com", port, false, |
| 154 kPrivacyModeDisabled); | 154 PRIVACY_MODE_DISABLED); |
| 155 | 155 |
| 156 client_supported_versions_ = GetParam().client_supported_versions; | 156 client_supported_versions_ = GetParam().client_supported_versions; |
| 157 server_supported_versions_ = GetParam().server_supported_versions; | 157 server_supported_versions_ = GetParam().server_supported_versions; |
| 158 negotiated_version_ = GetParam().negotiated_version; | 158 negotiated_version_ = GetParam().negotiated_version; |
| 159 FLAGS_enable_quic_pacing = GetParam().use_pacing; | 159 FLAGS_enable_quic_pacing = GetParam().use_pacing; |
| 160 | 160 |
| 161 if (negotiated_version_ >= QUIC_VERSION_17) { | 161 if (negotiated_version_ >= QUIC_VERSION_17) { |
| 162 FLAGS_enable_quic_stream_flow_control = true; | 162 FLAGS_enable_quic_stream_flow_control = true; |
| 163 } | 163 } |
| 164 VLOG(1) << "Using Configuration: " << GetParam(); | 164 VLOG(1) << "Using Configuration: " << GetParam(); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 server_thread_.reset( | 241 server_thread_.reset( |
| 242 new ServerThread(server_address_, | 242 new ServerThread(server_address_, |
| 243 server_config_, | 243 server_config_, |
| 244 server_supported_versions_, | 244 server_supported_versions_, |
| 245 strike_register_no_startup_period_, | 245 strike_register_no_startup_period_, |
| 246 server_initial_flow_control_receive_window_)); | 246 server_initial_flow_control_receive_window_)); |
| 247 server_thread_->Initialize(); | 247 server_thread_->Initialize(); |
| 248 server_address_ = IPEndPoint(server_address_.address(), | 248 server_address_ = IPEndPoint(server_address_.address(), |
| 249 server_thread_->GetPort()); | 249 server_thread_->GetPort()); |
| 250 server_key_ = QuicSessionKey(server_key_.host(), server_thread_->GetPort(), | 250 server_key_ = QuicSessionKey(server_key_.host(), server_thread_->GetPort(), |
| 251 false, kPrivacyModeDisabled); | 251 false, PRIVACY_MODE_DISABLED); |
| 252 | 252 |
| 253 QuicDispatcher* dispatcher = | 253 QuicDispatcher* dispatcher = |
| 254 QuicServerPeer::GetDispatcher(server_thread_->server()); | 254 QuicServerPeer::GetDispatcher(server_thread_->server()); |
| 255 QuicDispatcherPeer::UseWriter(dispatcher, server_writer_); | 255 QuicDispatcherPeer::UseWriter(dispatcher, server_writer_); |
| 256 server_writer_->Initialize( | 256 server_writer_->Initialize( |
| 257 QuicDispatcherPeer::GetHelper(dispatcher), | 257 QuicDispatcherPeer::GetHelper(dispatcher), |
| 258 new ServerDelegate(dispatcher)); | 258 new ServerDelegate(dispatcher)); |
| 259 server_thread_->Start(); | 259 server_thread_->Start(); |
| 260 server_started_ = true; | 260 server_started_ = true; |
| 261 } | 261 } |
| (...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 QuicSession* session = dispatcher->session_map().begin()->second; | 940 QuicSession* session = dispatcher->session_map().begin()->second; |
| 941 EXPECT_EQ(kClientIFCW, | 941 EXPECT_EQ(kClientIFCW, |
| 942 session->config()->peer_initial_flow_control_window_bytes()); | 942 session->config()->peer_initial_flow_control_window_bytes()); |
| 943 server_thread_->Resume(); | 943 server_thread_->Resume(); |
| 944 } | 944 } |
| 945 | 945 |
| 946 } // namespace | 946 } // namespace |
| 947 } // namespace test | 947 } // namespace test |
| 948 } // namespace tools | 948 } // namespace tools |
| 949 } // namespace net | 949 } // namespace net |
| OLD | NEW |