| 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 client_versions.front(), | 252 client_versions.front(), |
| 253 client_supports_stateless_rejects, | 253 client_supports_stateless_rejects, |
| 254 server_uses_stateless_rejects_if_peer_supported, | 254 server_uses_stateless_rejects_if_peer_supported, |
| 255 congestion_control_tag, disable_hpack_dynamic_table, | 255 congestion_control_tag, disable_hpack_dynamic_table, |
| 256 force_hol_blocking, use_cheap_stateless_reject, | 256 force_hol_blocking, use_cheap_stateless_reject, |
| 257 buffer_packet_till_chlo, small_client_mtu)); | 257 buffer_packet_till_chlo, small_client_mtu)); |
| 258 | 258 |
| 259 // Run version negotiation tests tests with no options, or | 259 // Run version negotiation tests tests with no options, or |
| 260 // all the options enabled to avoid a combinatorial | 260 // all the options enabled to avoid a combinatorial |
| 261 // explosion. | 261 // explosion. |
| 262 if (enabled_options > 0 && | 262 if (enabled_options > 1 && |
| 263 enabled_options < kMaxEnabledOptions) { | 263 enabled_options < kMaxEnabledOptions) { |
| 264 continue; | 264 continue; |
| 265 } | 265 } |
| 266 | 266 |
| 267 // Test client supporting all versions and server supporting | 267 // Test client supporting all versions and server supporting |
| 268 // 1 version. Simulate an old server and exercise version | 268 // 1 version. Simulate an old server and exercise version |
| 269 // downgrade in the client. Protocol negotiation should | 269 // downgrade in the client. Protocol negotiation should |
| 270 // occur. Skip the i = 0 case because it is essentially the | 270 // occur. Skip the i = 0 case because it is essentially the |
| 271 // same as the default case. | 271 // same as the default case. |
| 272 for (size_t i = 1; i < client_versions.size(); ++i) { | 272 for (size_t i = 1; i < client_versions.size(); ++i) { |
| (...skipping 2646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2919 EXPECT_EQ(kBarResponseBody, client_->response_body()); | 2919 EXPECT_EQ(kBarResponseBody, client_->response_body()); |
| 2920 QuicConnectionStats client_stats = | 2920 QuicConnectionStats client_stats = |
| 2921 client_->client()->session()->connection()->GetStats(); | 2921 client_->client()->session()->connection()->GetStats(); |
| 2922 EXPECT_EQ(0u, client_stats.packets_lost); | 2922 EXPECT_EQ(0u, client_stats.packets_lost); |
| 2923 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos()); | 2923 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos()); |
| 2924 } | 2924 } |
| 2925 | 2925 |
| 2926 } // namespace | 2926 } // namespace |
| 2927 } // namespace test | 2927 } // namespace test |
| 2928 } // namespace net | 2928 } // namespace net |
| OLD | NEW |