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

Unified Diff: webrtc/call/bitrate_allocator_unittest.cc

Issue 2703393002: Revert 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 ead4cbdf94234197851261219a0ed065f5cfe6f4..751ec93657d54c815c3b268744a46773c968bf3f 100644
--- a/webrtc/call/bitrate_allocator_unittest.cc
+++ b/webrtc/call/bitrate_allocator_unittest.cc
@@ -98,6 +98,8 @@
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));
@@ -181,7 +183,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, 120000));
+ EXPECT_CALL(limit_observer_, OnAllocationLimitsChanged(0, 0));
allocator_->AddObserver(&bitrate_observer_1, 100000, 400000, 0, false);
EXPECT_EQ(300000, allocator_->GetStartBitrate(&bitrate_observer_1));
@@ -262,7 +264,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, 168000));
+ EXPECT_CALL(limit_observer_, OnAllocationLimitsChanged(0, 0));
allocator_->AddObserver(
&bitrate_observer, 100000, 400000, 0, false);
EXPECT_EQ(300000, allocator_->GetStartBitrate(&bitrate_observer));
@@ -290,7 +292,6 @@
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_);
@@ -303,6 +304,7 @@
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