Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Unified Diff: net/quic/quic_connection_test.cc

Issue 965873004: Deprecate FLAGS_quic_record_send_time_before_write. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@QuicConnection_no_longer_owns_debug_visitor_86801250
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_connection.cc ('k') | net/quic/quic_flags.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection_test.cc
diff --git a/net/quic/quic_connection_test.cc b/net/quic/quic_connection_test.cc
index 66910a854ea3c1c9b700acffae11657f3f1d2f2d..1964e1ec4086332ef98dcf9be9934148541aecb4 100644
--- a/net/quic/quic_connection_test.cc
+++ b/net/quic/quic_connection_test.cc
@@ -1580,44 +1580,9 @@ TEST_P(QuicConnectionTest, BasicSending) {
EXPECT_EQ(7u, least_unacked());
}
-// If FLAGS_quic_record_send_time_before_write is disabled, QuicConnection
-// should record the packet sen-tdime after the packet is sent.
-TEST_P(QuicConnectionTest, RecordSentTimeAfterPacketSent) {
- ValueRestore<bool> old_flag(&FLAGS_quic_record_send_time_before_write, false);
- // We're using a MockClock for the tests, so we have complete control over the
- // time.
- // Our recorded timestamp for the last packet sent time will be passed in to
- // the send_algorithm. Make sure that it is set to the correct value.
- QuicTime actual_recorded_send_time = QuicTime::Zero();
- EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _))
- .WillOnce(DoAll(SaveArg<0>(&actual_recorded_send_time), Return(true)));
-
- // First send without any pause and check the result.
- QuicTime expected_recorded_send_time = clock_.Now();
- connection_.SendStreamDataWithString(1, "foo", 0, !kFin, nullptr);
- EXPECT_EQ(expected_recorded_send_time, actual_recorded_send_time)
- << "Expected time = " << expected_recorded_send_time.ToDebuggingValue()
- << ". Actual time = " << actual_recorded_send_time.ToDebuggingValue();
-
- // Now pause during the write, and check the results.
- actual_recorded_send_time = QuicTime::Zero();
- const QuicTime::Delta kWritePauseTimeDelta =
- QuicTime::Delta::FromMilliseconds(5000);
- SetWritePauseTimeDelta(kWritePauseTimeDelta);
- expected_recorded_send_time = clock_.Now().Add(kWritePauseTimeDelta);
-
- EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _))
- .WillOnce(DoAll(SaveArg<0>(&actual_recorded_send_time), Return(true)));
- connection_.SendStreamDataWithString(2, "baz", 0, !kFin, nullptr);
- EXPECT_EQ(expected_recorded_send_time, actual_recorded_send_time)
- << "Expected time = " << expected_recorded_send_time.ToDebuggingValue()
- << ". Actual time = " << actual_recorded_send_time.ToDebuggingValue();
-}
-
-// If FLAGS_quic_record_send_time_before_write is enabled, QuicConnection should
-// record the the packet sent-time prior to sending the packet.
+// QuicConnection should record the the packet sent-time prior to sending the
+// packet.
TEST_P(QuicConnectionTest, RecordSentTimeBeforePacketSent) {
- ValueRestore<bool> old_flag(&FLAGS_quic_record_send_time_before_write, true);
// We're using a MockClock for the tests, so we have complete control over the
// time.
// Our recorded timestamp for the last packet sent time will be passed in to
« no previous file with comments | « net/quic/quic_connection.cc ('k') | net/quic/quic_flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698