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

Unified Diff: webrtc/api/peerconnectioninterface_unittest.cc

Issue 1745003002: Move suspend_below_min_bitrate from VideoOptions to MediaConfig. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 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/api/peerconnection.cc ('k') | webrtc/api/webrtcsession.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/peerconnectioninterface_unittest.cc
diff --git a/webrtc/api/peerconnectioninterface_unittest.cc b/webrtc/api/peerconnectioninterface_unittest.cc
index 701ab3c001e6ab1cc08fd2ad9046314dca5e8707..8fad21e13949e22e6bc6300d9de89f1b020a9100 100644
--- a/webrtc/api/peerconnectioninterface_unittest.cc
+++ b/webrtc/api/peerconnectioninterface_unittest.cc
@@ -2383,8 +2383,9 @@ TEST_F(PeerConnectionMediaConfigTest, TestDefaults) {
TestCreatePeerConnection(config, &constraints);
EXPECT_FALSE(media_config.enable_dscp);
- EXPECT_TRUE(media_config.enable_cpu_overuse_detection);
- EXPECT_FALSE(media_config.disable_prerenderer_smoothing);
+ EXPECT_TRUE(media_config.video.enable_cpu_overuse_detection);
+ EXPECT_FALSE(media_config.video.disable_prerenderer_smoothing);
+ EXPECT_FALSE(media_config.video.suspend_below_min_bitrate);
}
// This test verifies the DSCP constraint is recognized and passed to
@@ -2411,7 +2412,7 @@ TEST_F(PeerConnectionMediaConfigTest, TestCpuOveruseConstraintFalse) {
const cricket::MediaConfig media_config =
TestCreatePeerConnection(config, &constraints);
- EXPECT_FALSE(media_config.enable_cpu_overuse_detection);
+ EXPECT_FALSE(media_config.video.enable_cpu_overuse_detection);
}
// This test verifies that the disable_prerenderer_smoothing flag is
@@ -2424,7 +2425,23 @@ TEST_F(PeerConnectionMediaConfigTest, TestDisablePrerendererSmoothingTrue) {
const cricket::MediaConfig& media_config =
TestCreatePeerConnection(config, &constraints);
- EXPECT_TRUE(media_config.disable_prerenderer_smoothing);
+ EXPECT_TRUE(media_config.video.disable_prerenderer_smoothing);
+}
+
+// This test verifies the suspend below min bitrate constraint is
+// recognized and passed to the CreateMediaController call.
+TEST_F(PeerConnectionMediaConfigTest,
+ TestSuspendBelowMinBitrateConstraintTrue) {
+ PeerConnectionInterface::RTCConfiguration config;
+ FakeConstraints constraints;
+
+ constraints.AddOptional(
+ webrtc::MediaConstraintsInterface::kEnableVideoSuspendBelowMinBitrate,
+ true);
+ const cricket::MediaConfig media_config =
+ TestCreatePeerConnection(config, &constraints);
+
+ EXPECT_TRUE(media_config.video.suspend_below_min_bitrate);
}
// The following tests verify that session options are created correctly.
« no previous file with comments | « webrtc/api/peerconnection.cc ('k') | webrtc/api/webrtcsession.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698