summaryrefslogtreecommitdiff
path: root/media/base/rtpdataengine_unittest.cc
diff options
context:
space:
mode:
authorjiayl@webrtc.org <jiayl@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-01-29 17:45:53 +0000
committerjiayl@webrtc.org <jiayl@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-01-29 17:45:53 +0000
commit13a42bcb8b909faef285ec36b59740e5696a2295 (patch)
tree8894115a58093185f421058e7e8cccb24c8368aa /media/base/rtpdataengine_unittest.cc
parent153138428a27cf6093793ae4d2b717b949ebab58 (diff)
downloadtalk-13a42bcb8b909faef285ec36b59740e5696a2295.tar.gz
Enable SCTP and use OPENSSL on Anroid and NSS on other platforms.
It includes unit test fixes to properly initialize SSL if DTLS or SSL random number generator is used in the tests. The private key and certificate constant strings used in some tests are updated to be compatible with NSS. A few potentially overflow type conversions caused compiling warning on Windows and they are fixed by importing and using Chromium's checked_cast, which aborts the program if overflow occurs. It also fixes a leak in nssstreamadapter.cc by releasing the PRFileDesc* in StreamClose. BUG=2253 R=fischman@webrtc.org, juberti@google.com, wu@webrtc.org Review URL: https://webrtc-codereview.appspot.com/4679005 git-svn-id: http://webrtc.googlecode.com/svn/trunk/talk@5459 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'media/base/rtpdataengine_unittest.cc')
-rw-r--r--media/base/rtpdataengine_unittest.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/media/base/rtpdataengine_unittest.cc b/media/base/rtpdataengine_unittest.cc
index 3c83184..640c18d 100644
--- a/media/base/rtpdataengine_unittest.cc
+++ b/media/base/rtpdataengine_unittest.cc
@@ -31,6 +31,7 @@
#include "talk/base/gunit.h"
#include "talk/base/helpers.h"
#include "talk/base/scoped_ptr.h"
+#include "talk/base/ssladapter.h"
#include "talk/base/timing.h"
#include "talk/media/base/constants.h"
#include "talk/media/base/fakenetworkinterface.h"
@@ -82,6 +83,14 @@ class FakeDataReceiver : public sigslot::has_slots<> {
class RtpDataMediaChannelTest : public testing::Test {
protected:
+ static void SetUpTestCase() {
+ talk_base::InitializeSSL();
+ }
+
+ static void TearDownTestCase() {
+ talk_base::CleanupSSL();
+ }
+
virtual void SetUp() {
// Seed needed for each test to satisfy expectations.
iface_.reset(new cricket::FakeNetworkInterface());