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 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1373 | 1373 |
1374 CongestionControlType expected_congestion_control_type = kReno; | 1374 CongestionControlType expected_congestion_control_type = kReno; |
1375 switch (GetParam().congestion_control_tag) { | 1375 switch (GetParam().congestion_control_tag) { |
1376 case kRENO: | 1376 case kRENO: |
1377 expected_congestion_control_type = kReno; | 1377 expected_congestion_control_type = kReno; |
1378 break; | 1378 break; |
1379 case kTBBR: | 1379 case kTBBR: |
1380 expected_congestion_control_type = kBBR; | 1380 expected_congestion_control_type = kBBR; |
1381 break; | 1381 break; |
1382 case kQBIC: | 1382 case kQBIC: |
1383 expected_congestion_control_type = kCubic; | 1383 expected_congestion_control_type = |
| 1384 FLAGS_quic_default_enable_cubic_bytes ? kCubicBytes : kCubic; |
1384 break; | 1385 break; |
1385 default: | 1386 default: |
1386 DLOG(FATAL) << "Unexpected congestion control tag"; | 1387 DLOG(FATAL) << "Unexpected congestion control tag"; |
1387 } | 1388 } |
1388 | 1389 |
1389 server_thread_->Pause(); | 1390 server_thread_->Pause(); |
1390 EXPECT_EQ(expected_congestion_control_type, | 1391 EXPECT_EQ(expected_congestion_control_type, |
1391 QuicSentPacketManagerPeer::GetSendAlgorithm( | 1392 QuicSentPacketManagerPeer::GetSendAlgorithm( |
1392 *static_cast<const QuicSentPacketManager*>( | 1393 *static_cast<const QuicSentPacketManager*>( |
1393 GetSentPacketManagerFromFirstServerSession())) | 1394 GetSentPacketManagerFromFirstServerSession())) |
(...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2983 client_->WaitForResponse(); | 2984 client_->WaitForResponse(); |
2984 EXPECT_EQ(kBarResponseBody, client_->response_body()); | 2985 EXPECT_EQ(kBarResponseBody, client_->response_body()); |
2985 QuicConnectionStats client_stats = | 2986 QuicConnectionStats client_stats = |
2986 client_->client()->session()->connection()->GetStats(); | 2987 client_->client()->session()->connection()->GetStats(); |
2987 EXPECT_EQ(0u, client_stats.packets_lost); | 2988 EXPECT_EQ(0u, client_stats.packets_lost); |
2988 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos()); | 2989 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos()); |
2989 } | 2990 } |
2990 } // namespace | 2991 } // namespace |
2991 } // namespace test | 2992 } // namespace test |
2992 } // namespace net | 2993 } // namespace net |
OLD | NEW |