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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtcp_packet_unittest.cc

Issue 1430013003: rtcp::Bye packet moved to own file and got a Parse function (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 1 month 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/modules/rtp_rtcp/source/rtcp_packet_unittest.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet_unittest.cc
index 4c1d55e049be0bb33f4d75f61945c34ccd4a3f18..3cf3feacd6f4219dbe9e96b585742f03a7030244 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_packet_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet_unittest.cc
@@ -15,6 +15,7 @@
#include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h"
#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/app.h"
+#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/bye.h"
#include "webrtc/test/rtcp_packet_parser.h"
using ::testing::ElementsAre;
@@ -571,43 +572,6 @@ TEST(RtcpPacketTest, AppendPacketWithOwnAppendedPacket) {
EXPECT_EQ(1, parser.fir()->num_packets());
}
-TEST(RtcpPacketTest, Bye) {
- Bye bye;
- bye.From(kSenderSsrc);
-
- rtc::scoped_ptr<RawPacket> packet(bye.Build());
- RtcpPacketParser parser;
- parser.Parse(packet->Buffer(), packet->Length());
- EXPECT_EQ(1, parser.bye()->num_packets());
- EXPECT_EQ(kSenderSsrc, parser.bye()->Ssrc());
-}
-
-TEST(RtcpPacketTest, ByeWithCsrcs) {
- Fir fir;
- Bye bye;
- bye.From(kSenderSsrc);
- EXPECT_TRUE(bye.WithCsrc(0x22222222));
- EXPECT_TRUE(bye.WithCsrc(0x33333333));
- bye.Append(&fir);
-
- rtc::scoped_ptr<RawPacket> packet(bye.Build());
- RtcpPacketParser parser;
- parser.Parse(packet->Buffer(), packet->Length());
- EXPECT_EQ(1, parser.bye()->num_packets());
- EXPECT_EQ(kSenderSsrc, parser.bye()->Ssrc());
- EXPECT_EQ(1, parser.fir()->num_packets());
-}
-
-TEST(RtcpPacketTest, ByeWithTooManyCsrcs) {
- Bye bye;
- bye.From(kSenderSsrc);
- const int kMaxCsrcs = (1 << 5) - 2; // 5 bit len, first item is sender SSRC.
- for (int i = 0; i < kMaxCsrcs; ++i) {
- EXPECT_TRUE(bye.WithCsrc(i));
- }
- EXPECT_FALSE(bye.WithCsrc(kMaxCsrcs));
-}
-
TEST(RtcpPacketTest, BuildWithInputBuffer) {
Fir fir;
ReportBlock rb;
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_packet/bye_unittest.cc ('k') | webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698