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

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: Fixing copyright header 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
« no previous file with comments | « talk/app/webrtc/sctputils.cc ('k') | talk/app/webrtc/statscollector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/sctputils_unittest.cc
diff --git a/talk/app/webrtc/sctputils_unittest.cc b/talk/app/webrtc/sctputils_unittest.cc
index e5f323aa226285cb8a010aed6e927a022784ca67..e0e203f5cd314c86742fdec53dd7de4abb4a29da 100644
--- a/talk/app/webrtc/sctputils_unittest.cc
+++ b/talk/app/webrtc/sctputils_unittest.cc
@@ -1,6 +1,6 @@
/*
* libjingle
- * Copyright 2013 Google Inc
+ * Copyright 2013 Google Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -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));
+}
« no previous file with comments | « talk/app/webrtc/sctputils.cc ('k') | talk/app/webrtc/statscollector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698