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

Side by Side Diff: net/quic/core/quic_session_test.cc

Issue 2228783004: Fix memory corruption from SetMaxPacingRate by inlining PacingSender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@129351671
Patch Set: git pull from upper stream Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « net/quic/core/quic_sent_packet_manager.cc ('k') | net/quic/test_tools/quic_connection_peer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "net/quic/core/quic_session.h" 5 #include "net/quic/core/quic_session.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/rand_util.h" 10 #include "base/rand_util.h"
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 TestStream* stream6 = session_.CreateOutgoingDynamicStream(kDefaultPriority); 508 TestStream* stream6 = session_.CreateOutgoingDynamicStream(kDefaultPriority);
509 509
510 session_.MarkConnectionLevelWriteBlocked(stream2->id()); 510 session_.MarkConnectionLevelWriteBlocked(stream2->id());
511 session_.MarkConnectionLevelWriteBlocked(stream6->id()); 511 session_.MarkConnectionLevelWriteBlocked(stream6->id());
512 session_.MarkConnectionLevelWriteBlocked(stream4->id()); 512 session_.MarkConnectionLevelWriteBlocked(stream4->id());
513 513
514 EXPECT_CALL(*send_algorithm, TimeUntilSend(_, _)) 514 EXPECT_CALL(*send_algorithm, TimeUntilSend(_, _))
515 .WillRepeatedly(Return(QuicTime::Delta::Zero())); 515 .WillRepeatedly(Return(QuicTime::Delta::Zero()));
516 EXPECT_CALL(*send_algorithm, GetCongestionWindow()) 516 EXPECT_CALL(*send_algorithm, GetCongestionWindow())
517 .WillRepeatedly(Return(kMaxPacketSize * 10)); 517 .WillRepeatedly(Return(kMaxPacketSize * 10));
518 EXPECT_CALL(*send_algorithm, InRecovery()).WillRepeatedly(Return(false));
518 EXPECT_CALL(*stream2, OnCanWrite()) 519 EXPECT_CALL(*stream2, OnCanWrite())
519 .WillOnce(testing::IgnoreResult( 520 .WillOnce(testing::IgnoreResult(
520 Invoke(CreateFunctor(&TestSession::SendStreamData, 521 Invoke(CreateFunctor(&TestSession::SendStreamData,
521 base::Unretained(&session_), stream2)))); 522 base::Unretained(&session_), stream2))));
522 EXPECT_CALL(*stream4, OnCanWrite()) 523 EXPECT_CALL(*stream4, OnCanWrite())
523 .WillOnce(testing::IgnoreResult( 524 .WillOnce(testing::IgnoreResult(
524 Invoke(CreateFunctor(&TestSession::SendStreamData, 525 Invoke(CreateFunctor(&TestSession::SendStreamData,
525 base::Unretained(&session_), stream4)))); 526 base::Unretained(&session_), stream4))));
526 EXPECT_CALL(*stream6, OnCanWrite()) 527 EXPECT_CALL(*stream6, OnCanWrite())
527 .WillOnce(testing::IgnoreResult( 528 .WillOnce(testing::IgnoreResult(
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
1253 if (version() <= QUIC_VERSION_35) { 1254 if (version() <= QUIC_VERSION_35) {
1254 EXPECT_FALSE(session_.force_hol_blocking()); 1255 EXPECT_FALSE(session_.force_hol_blocking());
1255 } else { 1256 } else {
1256 EXPECT_TRUE(session_.force_hol_blocking()); 1257 EXPECT_TRUE(session_.force_hol_blocking());
1257 } 1258 }
1258 } 1259 }
1259 1260
1260 } // namespace 1261 } // namespace
1261 } // namespace test 1262 } // namespace test
1262 } // namespace net 1263 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_sent_packet_manager.cc ('k') | net/quic/test_tools/quic_connection_peer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698