pc/rtptransport_unittest.cc
// Test that SignalPacketReceived fires with rtcp=true when a RTCP packet is
// received.
Test that SignalPacketReceived fires with rtcp=true when a RTCP packet is
received.
Test that SignalPacketReceived fires with rtcp = true when a RTCP packet is received .
TEST(RtpTransportTest, SignalDemuxedRtcp) {
  RtpTransport transport(kMuxDisabled);
  SignalPacketReceivedCounter observer(&transport);
  rtc::FakePacketTransport fake_rtp("fake_rtp");
  fake_rtp.SetDestination(&fake_rtp, true);
  transport.SetRtpPacketTransport(&fake_rtp);
  const char data[] = {0, 73, 0, 0};
  const int len = 4;
  const rtc::PacketOptions options;
  const int flags = 0;
  fake_rtp.SendPacket(data, len, options, flags);
  EXPECT_EQ(0, observer.rtp_count());
  EXPECT_EQ(1, observer.rtcp_count());
}
TEST ( RtpTransportTest , SignalDemuxedRtcp ) { RtpTransport transport ( kMuxDisabled ) ; SignalPacketReceivedCounter observer ( & transport ) ; rtc :: FakePacketTransport fake_rtp ( " " ) ; fake_rtp . SetDestination ( & fake_rtp , true ) ; transport . SetRtpPacketTransport ( & fake_rtp ) ; const char data [ ] = { 0 , 73 , 0 , 0 } ; const int len = 4 ; const rtc :: PacketOptions options ; const int flags = 0 ; fake_rtp . SendPacket ( data , len , options , flags ) ; EXPECT_EQ ( 0 , observer . rtp_count ( ) ) ; EXPECT_EQ ( 1 , observer . rtcp_count ( ) ) ; }
Test that SignalPacketReceived fires with rtcp=true when a RTCP packet is
received.
Test that SignalPacketReceived fires with rtcp = true when a RTCP packet is received .
// An rtcp packet.