summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthorcarpenter@google.com <thorcarpenter@google.com>2014-09-19 17:54:00 +0000
committerthorcarpenter@google.com <thorcarpenter@google.com>2014-09-19 17:54:00 +0000
commit1a6b25ecc4c1c0af85cf879348cf8c965f3edf07 (patch)
tree7b85f658f6c7d483a979bd1c084013ea8bee12e7
parent0d6677d008740e801d3ee803e0b1ff076efd7e53 (diff)
downloadtalk-1a6b25ecc4c1c0af85cf879348cf8c965f3edf07.tar.gz
Fix the libjingle_media_unittest failure in Windows build by modifying libjingle_tests.gyp and sctpdataengine_unittests.cc instead of ssladapter.cc.
R=harryjin@google.com, pthatcher@webrtc.org, tpsiaki@google.com Review URL: https://webrtc-codereview.appspot.com/22699004 git-svn-id: http://webrtc.googlecode.com/svn/trunk/talk@7245 4adac7df-926f-26a2-2b94-8c16560cd09d
-rwxr-xr-xlibjingle_tests.gyp5
-rw-r--r--media/sctp/sctpdataengine_unittest.cc11
2 files changed, 16 insertions, 0 deletions
diff --git a/libjingle_tests.gyp b/libjingle_tests.gyp
index 45f08a9..44adec3 100755
--- a/libjingle_tests.gyp
+++ b/libjingle_tests.gyp
@@ -153,6 +153,11 @@
],
'conditions': [
['OS=="win"', {
+ 'dependencies': [
+ '<(DEPTH)/net/third_party/nss/ssl.gyp:libssl',
+ '<(DEPTH)/third_party/nss/nss.gyp:nspr',
+ '<(DEPTH)/third_party/nss/nss.gyp:nss',
+ ],
'msvs_settings': {
'VCLinkerTool': {
'AdditionalDependencies': [
diff --git a/media/sctp/sctpdataengine_unittest.cc b/media/sctp/sctpdataengine_unittest.cc
index eedb3cc..fb00650 100644
--- a/media/sctp/sctpdataengine_unittest.cc
+++ b/media/sctp/sctpdataengine_unittest.cc
@@ -45,6 +45,11 @@
#include "webrtc/base/ssladapter.h"
#include "webrtc/base/thread.h"
+#ifdef HAVE_NSS_SSL_H
+// TODO(thorcarpenter): Remove after webrtc switches over to BoringSSL.
+#include "webrtc/base/nssstreamadapter.h"
+#endif // HAVE_NSS_SSL_H
+
enum {
MSG_PACKET = 1,
};
@@ -218,6 +223,12 @@ class SctpDataMediaChannelTest : public testing::Test,
// usrsctp uses the NSS random number generator on non-Android platforms,
// so we need to initialize SSL.
static void SetUpTestCase() {
+#ifdef HAVE_NSS_SSL_H
+ // TODO(thorcarpenter): Remove after webrtc switches over to BoringSSL.
+ if (!rtc::NSSContext::InitializeSSL(NULL)) {
+ LOG(LS_WARNING) << "Unabled to initialize NSS.";
+ }
+#endif // HAVE_NSS_SSL_H
rtc::InitializeSSL();
}