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

Unified Diff: talk/app/webrtc/sctputils_unittest.cc

Issue 1393563002: Moving MediaStreamSignaling logic into PeerConnection. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Cleaning up comments, fixing naming, etc. Created 5 years, 2 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: talk/app/webrtc/sctputils_unittest.cc
diff --git a/talk/app/webrtc/sctputils_unittest.cc b/talk/app/webrtc/sctputils_unittest.cc
index 164f6dd23bd35888a084662f242447e43c94e0b5..93491822a7a110f6701449fe3950c9531c1b7f38 100644
--- a/talk/app/webrtc/sctputils_unittest.cc
+++ b/talk/app/webrtc/sctputils_unittest.cc
@@ -159,3 +159,20 @@ TEST_F(SctpUtilsTest, WriteParseAckMessage) {
EXPECT_TRUE(webrtc::ParseDataChannelOpenAckMessage(packet));
}
+
+TEST_F(SctpUtilsTest, TestIsOpenMessage) {
+ rtc::ByteBuffer open;
+ open.WriteUInt8(0x03);
+ EXPECT_TRUE(webrtc::IsOpenMessage(open));
+
+ rtc::ByteBuffer openAck;
+ openAck.WriteUInt8(0x02);
+ EXPECT_FALSE(webrtc::IsOpenMessage(open));
+
+ rtc::ByteBuffer invalid;
+ openAck.WriteUInt8(0x01);
+ EXPECT_FALSE(webrtc::IsOpenMessage(invalid));
+
+ rtc::ByteBuffer empty;
+ EXPECT_FALSE(webrtc::IsOpenMessage(empty));
+}

Powered by Google App Engine
This is Rietveld 408576698