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

Unified Diff: webrtc/call/bitrate_allocator_unittest.cc

Issue 2704323003: Reland of Fixes a bug where a video stream can get stuck in the suspended state. (Closed)
Patch Set: Created 3 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 | « webrtc/call/bitrate_allocator.cc ('k') | webrtc/call/rampup_tests.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/call/bitrate_allocator_unittest.cc
diff --git a/webrtc/call/bitrate_allocator_unittest.cc b/webrtc/call/bitrate_allocator_unittest.cc
index 751ec93657d54c815c3b268744a46773c968bf3f..ead4cbdf94234197851261219a0ed065f5cfe6f4 100644
--- a/webrtc/call/bitrate_allocator_unittest.cc
+++ b/webrtc/call/bitrate_allocator_unittest.cc
@@ -98,8 +98,6 @@
true);
EXPECT_EQ(4000000, allocator_->GetStartBitrate(&bitrate_observer));
- EXPECT_CALL(limit_observer_,
- OnAllocationLimitsChanged(kMinSendBitrateBps, 0));
allocator_->AddObserver(&bitrate_observer, kMinSendBitrateBps, 1500000, 0,
true);
EXPECT_EQ(3000000, allocator_->GetStartBitrate(&bitrate_observer));
@@ -183,7 +181,7 @@
TestBitrateObserver bitrate_observer_1;
// Expect OnAllocationLimitsChanged with |min_send_bitrate_bps| = 0 since
// AddObserver is called with |enforce_min_bitrate| = false.
- EXPECT_CALL(limit_observer_, OnAllocationLimitsChanged(0, 0));
+ EXPECT_CALL(limit_observer_, OnAllocationLimitsChanged(0, 120000));
allocator_->AddObserver(&bitrate_observer_1, 100000, 400000, 0, false);
EXPECT_EQ(300000, allocator_->GetStartBitrate(&bitrate_observer_1));
@@ -264,7 +262,7 @@
TestBitrateObserver bitrate_observer;
// Expect OnAllocationLimitsChanged with |min_send_bitrate_bps| = 0 since
// AddObserver is called with |enforce_min_bitrate| = false.
- EXPECT_CALL(limit_observer_, OnAllocationLimitsChanged(0, 0));
+ EXPECT_CALL(limit_observer_, OnAllocationLimitsChanged(0, 168000));
allocator_->AddObserver(
&bitrate_observer, 100000, 400000, 0, false);
EXPECT_EQ(300000, allocator_->GetStartBitrate(&bitrate_observer));
@@ -292,6 +290,7 @@
EXPECT_EQ(0u, bitrate_observer.last_bitrate_bps_);
// Just enough to enable video again.
+ EXPECT_CALL(limit_observer_, OnAllocationLimitsChanged(0, 0));
allocator_->OnNetworkChanged(168000, 0, fraction_loss,
kDefaultProbingIntervalMs);
EXPECT_EQ(168000u, bitrate_observer.last_bitrate_bps_);
@@ -304,7 +303,6 @@
allocator_->OnNetworkChanged(139000, 0, 0, kDefaultProbingIntervalMs);
EXPECT_EQ(139000u, bitrate_observer.last_bitrate_bps_);
- EXPECT_CALL(limit_observer_, OnAllocationLimitsChanged(0, 0));
allocator_->RemoveObserver(&bitrate_observer);
}
« no previous file with comments | « webrtc/call/bitrate_allocator.cc ('k') | webrtc/call/rampup_tests.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698