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 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1399 | 1399 |
1400 private: | 1400 private: |
1401 bool has_been_notified_ = false; | 1401 bool has_been_notified_ = false; |
1402 }; | 1402 }; |
1403 | 1403 |
1404 TEST_P(EndToEndTest, AckNotifierWithPacketLossAndBlockedSocket) { | 1404 TEST_P(EndToEndTest, AckNotifierWithPacketLossAndBlockedSocket) { |
1405 // Verify that even in the presence of packet loss and occasionally blocked | 1405 // Verify that even in the presence of packet loss and occasionally blocked |
1406 // socket, an AckNotifierDelegate will get informed that the data it is | 1406 // socket, an AckNotifierDelegate will get informed that the data it is |
1407 // interested in has been ACKed. This tests end-to-end ACK notification, and | 1407 // interested in has been ACKed. This tests end-to-end ACK notification, and |
1408 // demonstrates that retransmissions do not break this functionality. | 1408 // demonstrates that retransmissions do not break this functionality. |
1409 ValueRestore<bool> old_flag(&FLAGS_quic_attach_ack_notifiers_to_packets, | |
1410 true); | |
1411 | |
1412 SetPacketLossPercentage(5); | 1409 SetPacketLossPercentage(5); |
1413 ASSERT_TRUE(Initialize()); | 1410 ASSERT_TRUE(Initialize()); |
1414 | 1411 |
1415 // Wait for the server SHLO before upping the packet loss. | 1412 // Wait for the server SHLO before upping the packet loss. |
1416 client_->client()->WaitForCryptoHandshakeConfirmed(); | 1413 client_->client()->WaitForCryptoHandshakeConfirmed(); |
1417 SetPacketLossPercentage(30); | 1414 SetPacketLossPercentage(30); |
1418 client_writer_->set_fake_blocked_socket_percentage(10); | 1415 client_writer_->set_fake_blocked_socket_percentage(10); |
1419 | 1416 |
1420 // Create a POST request and send the headers only. | 1417 // Create a POST request and send the headers only. |
1421 HTTPMessage request(HttpConstants::HTTP_1_1, HttpConstants::POST, "/foo"); | 1418 HTTPMessage request(HttpConstants::HTTP_1_1, HttpConstants::POST, "/foo"); |
(...skipping 24 matching lines...) Expand all Loading... |
1446 // Waits for up to 50 ms. | 1443 // Waits for up to 50 ms. |
1447 client_->client()->WaitForEvents(); | 1444 client_->client()->WaitForEvents(); |
1448 } | 1445 } |
1449 server_thread_->Resume(); | 1446 server_thread_->Resume(); |
1450 } | 1447 } |
1451 | 1448 |
1452 } // namespace | 1449 } // namespace |
1453 } // namespace test | 1450 } // namespace test |
1454 } // namespace tools | 1451 } // namespace tools |
1455 } // namespace net | 1452 } // namespace net |
OLD | NEW |