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