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

Unified Diff: webrtc/modules/pacing/paced_sender_unittest.cc

Issue 2664213002: Don't send audio packets if the network is down. (Closed)
Patch Set: Created 3 years, 11 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 | « webrtc/modules/pacing/paced_sender.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/pacing/paced_sender_unittest.cc
diff --git a/webrtc/modules/pacing/paced_sender_unittest.cc b/webrtc/modules/pacing/paced_sender_unittest.cc
index cde5fd1febe2a5d357d911b20f8f65eba87366a4..c1421a57c15160d55c5dacc2b17f598ce1b4e894 100644
--- a/webrtc/modules/pacing/paced_sender_unittest.cc
+++ b/webrtc/modules/pacing/paced_sender_unittest.cc
@@ -629,28 +629,25 @@ TEST_F(PacedSenderTest, Pause) {
EXPECT_EQ(second_capture_time_ms - capture_time_ms,
send_bucket_->QueueInMs());
- // Expect only high priority packets to come out while paused.
- EXPECT_CALL(callback_, TimeToSendPadding(_, _)).Times(0);
- EXPECT_CALL(callback_, TimeToSendPacket(_, _, _, _, _)).Times(0);
- EXPECT_CALL(callback_,
- TimeToSendPacket(ssrc_high_priority, _, capture_time_ms, _, _))
- .Times(packets_to_send_per_interval)
- .WillRepeatedly(Return(true));
- EXPECT_CALL(callback_, TimeToSendPacket(ssrc_high_priority, _,
- second_capture_time_ms, _, _))
- .Times(packets_to_send_per_interval)
- .WillRepeatedly(Return(true));
-
for (int i = 0; i < 10; ++i) {
clock_.AdvanceTimeMilliseconds(5);
EXPECT_EQ(0, send_bucket_->TimeUntilNextProcess());
send_bucket_->Process();
}
- // Expect normal prio packets to come out first (in capture order)
- // followed by all low prio packets (in capture order).
+ // Expect high prio packets to come out first followed by normal
+ // prio packets and low prio packets (all in capture order).
{
::testing::InSequence sequence;
+ EXPECT_CALL(callback_,
+ TimeToSendPacket(ssrc_high_priority, _, capture_time_ms, _, _))
+ .Times(packets_to_send_per_interval)
+ .WillRepeatedly(Return(true));
+ EXPECT_CALL(callback_, TimeToSendPacket(ssrc_high_priority, _,
+ second_capture_time_ms, _, _))
+ .Times(packets_to_send_per_interval)
+ .WillRepeatedly(Return(true));
+
for (size_t i = 0; i < packets_to_send_per_interval; ++i) {
EXPECT_CALL(callback_, TimeToSendPacket(ssrc, _, capture_time_ms, _, _))
.Times(1)
« no previous file with comments | « webrtc/modules/pacing/paced_sender.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698