| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 using net::test::CryptoTestUtils; | 66 using net::test::CryptoTestUtils; |
| 67 using net::test::GenerateBody; | 67 using net::test::GenerateBody; |
| 68 using net::test::Loopback4; | 68 using net::test::Loopback4; |
| 69 using net::test::MockQuicConnectionDebugVisitor; | 69 using net::test::MockQuicConnectionDebugVisitor; |
| 70 using net::test::QuicConnectionPeer; | 70 using net::test::QuicConnectionPeer; |
| 71 using net::test::QuicFlowControllerPeer; | 71 using net::test::QuicFlowControllerPeer; |
| 72 using net::test::QuicSentPacketManagerPeer; | 72 using net::test::QuicSentPacketManagerPeer; |
| 73 using net::test::QuicSessionPeer; | 73 using net::test::QuicSessionPeer; |
| 74 using net::test::QuicSpdySessionPeer; | 74 using net::test::QuicSpdySessionPeer; |
| 75 using net::test::ReliableQuicStreamPeer; | 75 using net::test::ReliableQuicStreamPeer; |
| 76 using net::test::ValueRestore; | |
| 77 using net::test::kClientDataStreamId1; | 76 using net::test::kClientDataStreamId1; |
| 78 using net::test::kInitialSessionFlowControlWindowForTest; | 77 using net::test::kInitialSessionFlowControlWindowForTest; |
| 79 using net::test::kInitialStreamFlowControlWindowForTest; | 78 using net::test::kInitialStreamFlowControlWindowForTest; |
| 80 using net::test::PacketDroppingTestWriter; | 79 using net::test::PacketDroppingTestWriter; |
| 81 using net::test::QuicDispatcherPeer; | 80 using net::test::QuicDispatcherPeer; |
| 82 using net::test::QuicServerPeer; | 81 using net::test::QuicServerPeer; |
| 83 using std::ostream; | 82 using std::ostream; |
| 84 using std::string; | 83 using std::string; |
| 85 using std::vector; | 84 using std::vector; |
| 86 | 85 |
| (...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1336 server_thread_->Pause(); | 1335 server_thread_->Pause(); |
| 1337 QuicDispatcher* dispatcher = | 1336 QuicDispatcher* dispatcher = |
| 1338 QuicServerPeer::GetDispatcher(server_thread_->server()); | 1337 QuicServerPeer::GetDispatcher(server_thread_->server()); |
| 1339 QuicSession* server_session = dispatcher->session_map().begin()->second; | 1338 QuicSession* server_session = dispatcher->session_map().begin()->second; |
| 1340 EXPECT_EQ(kClientMaxIncomingDynamicStreams, | 1339 EXPECT_EQ(kClientMaxIncomingDynamicStreams, |
| 1341 server_session->max_open_outgoing_streams()); | 1340 server_session->max_open_outgoing_streams()); |
| 1342 server_thread_->Resume(); | 1341 server_thread_->Resume(); |
| 1343 } | 1342 } |
| 1344 | 1343 |
| 1345 TEST_P(EndToEndTest, NegotiateCongestionControl) { | 1344 TEST_P(EndToEndTest, NegotiateCongestionControl) { |
| 1346 ValueRestore<bool> old_flag(&FLAGS_quic_allow_bbr, true); | 1345 FLAGS_quic_allow_bbr = true; |
| 1347 // Disable this flag because if connection uses multipath sent packet manager, | 1346 // Disable this flag because if connection uses multipath sent packet manager, |
| 1348 // static_cast here does not work. | 1347 // static_cast here does not work. |
| 1349 FLAGS_quic_enable_multipath = false; | 1348 FLAGS_quic_enable_multipath = false; |
| 1350 ASSERT_TRUE(Initialize()); | 1349 ASSERT_TRUE(Initialize()); |
| 1351 client_->client()->WaitForCryptoHandshakeConfirmed(); | 1350 client_->client()->WaitForCryptoHandshakeConfirmed(); |
| 1352 | 1351 |
| 1353 CongestionControlType expected_congestion_control_type = kReno; | 1352 CongestionControlType expected_congestion_control_type = kReno; |
| 1354 switch (GetParam().congestion_control_tag) { | 1353 switch (GetParam().congestion_control_tag) { |
| 1355 case kRENO: | 1354 case kRENO: |
| 1356 expected_congestion_control_type = kReno; | 1355 expected_congestion_control_type = kReno; |
| (...skipping 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2917 EXPECT_EQ(kBarResponseBody, client_->response_body()); | 2916 EXPECT_EQ(kBarResponseBody, client_->response_body()); |
| 2918 QuicConnectionStats client_stats = | 2917 QuicConnectionStats client_stats = |
| 2919 client_->client()->session()->connection()->GetStats(); | 2918 client_->client()->session()->connection()->GetStats(); |
| 2920 EXPECT_EQ(0u, client_stats.packets_lost); | 2919 EXPECT_EQ(0u, client_stats.packets_lost); |
| 2921 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos()); | 2920 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos()); |
| 2922 } | 2921 } |
| 2923 | 2922 |
| 2924 } // namespace | 2923 } // namespace |
| 2925 } // namespace test | 2924 } // namespace test |
| 2926 } // namespace net | 2925 } // namespace net |
| OLD | NEW |