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

Unified Diff: webrtc/pc/rtcpmuxfilter_unittest.cc

Issue 2890263003: Move RTP/RTCP demuxing logic from BaseChannel to RtpTransport. (Closed)
Patch Set: Move more demuxing logic from BaseChannel to RtpTransport. Created 3 years, 7 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
Index: webrtc/pc/rtcpmuxfilter_unittest.cc
diff --git a/webrtc/pc/rtcpmuxfilter_unittest.cc b/webrtc/pc/rtcpmuxfilter_unittest.cc
index b0ba88a983409c0bd168920910c0e05b82b9a223..807103a14563547a5edc4421d7de7fd395b1bd31 100644
--- a/webrtc/pc/rtcpmuxfilter_unittest.cc
+++ b/webrtc/pc/rtcpmuxfilter_unittest.cc
@@ -12,72 +12,6 @@
#include "webrtc/media/base/testutils.h"
#include "webrtc/pc/rtcpmuxfilter.h"
-TEST(RtcpMuxFilterTest, DemuxRtcpSender) {
- cricket::RtcpMuxFilter filter;
- const char data[] = { 0, 73, 0, 0 };
- const int len = 4;
-
- // Init state - refuse to demux
- EXPECT_FALSE(filter.DemuxRtcp(data, len));
- // After sent offer, demux should be enabled
- filter.SetOffer(true, cricket::CS_LOCAL);
- EXPECT_TRUE(filter.DemuxRtcp(data, len));
- // Remote accepted, demux should be enabled
- filter.SetAnswer(true, cricket::CS_REMOTE);
- EXPECT_TRUE(filter.DemuxRtcp(data, len));
-}
-
-TEST(RtcpMuxFilterTest, DemuxRtcpReceiver) {
- cricket::RtcpMuxFilter filter;
- const char data[] = { 0, 73, 0, 0 };
- const int len = 4;
-
- // Init state - refuse to demux
- EXPECT_FALSE(filter.DemuxRtcp(data, len));
- // After received offer, demux should not be enabled
- filter.SetOffer(true, cricket::CS_REMOTE);
- EXPECT_FALSE(filter.DemuxRtcp(data, len));
- // We accept, demux is now enabled
- filter.SetAnswer(true, cricket::CS_LOCAL);
- EXPECT_TRUE(filter.DemuxRtcp(data, len));
-}
-
-TEST(RtcpMuxFilterTest, DemuxRtcpSenderProvisionalAnswer) {
- cricket::RtcpMuxFilter filter;
- const char data[] = { 0, 73, 0, 0 };
- const int len = 4;
-
- filter.SetOffer(true, cricket::CS_REMOTE);
- // Received provisional answer without mux enabled.
- filter.SetProvisionalAnswer(false, cricket::CS_LOCAL);
- EXPECT_FALSE(filter.DemuxRtcp(data, len));
- // Received provisional answer with mux enabled.
- filter.SetProvisionalAnswer(true, cricket::CS_LOCAL);
- EXPECT_TRUE(filter.DemuxRtcp(data, len));
- // Remote accepted, demux should be enabled.
- filter.SetAnswer(true, cricket::CS_LOCAL);
- EXPECT_TRUE(filter.DemuxRtcp(data, len));
-}
-
-TEST(RtcpMuxFilterTest, DemuxRtcpReceiverProvisionalAnswer) {
- cricket::RtcpMuxFilter filter;
- const char data[] = { 0, 73, 0, 0 };
- const int len = 4;
-
- filter.SetOffer(true, cricket::CS_LOCAL);
- // Received provisional answer without mux enabled.
- filter.SetProvisionalAnswer(false, cricket::CS_REMOTE);
- // After sent offer, demux should be enabled until we have received a
- // final answer.
- EXPECT_TRUE(filter.DemuxRtcp(data, len));
- // Received provisional answer with mux enabled.
- filter.SetProvisionalAnswer(true, cricket::CS_REMOTE);
- EXPECT_TRUE(filter.DemuxRtcp(data, len));
- // Remote accepted, demux should be enabled.
- filter.SetAnswer(true, cricket::CS_REMOTE);
- EXPECT_TRUE(filter.DemuxRtcp(data, len));
-}
Taylor Brandstetter 2017/05/25 16:14:25 We should replace these with equivalent tests in r
Zach Stein 2017/05/30 21:50:55 I don't think these tests are needed anymore. Ther
Taylor Brandstetter 2017/05/31 08:25:03 The new "Signal..." tests are just what I had in m
-
TEST(RtcpMuxFilterTest, IsActiveSender) {
cricket::RtcpMuxFilter filter;
// Init state - not active
@@ -222,12 +156,9 @@ TEST(RtcpMuxFilterTest, KeepFilterDisabledDuringUpdate) {
// Test that we can SetActive and then can't deactivate.
TEST(RtcpMuxFilterTest, SetActiveCantDeactivate) {
cricket::RtcpMuxFilter filter;
- const char data[] = { 0, 73, 0, 0 };
- const int len = 4;
filter.SetActive();
EXPECT_TRUE(filter.IsActive());
- EXPECT_TRUE(filter.DemuxRtcp(data, len));
EXPECT_FALSE(filter.SetOffer(false, cricket::CS_LOCAL));
EXPECT_TRUE(filter.IsActive());

Powered by Google App Engine
This is Rietveld 408576698