OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include <memory> | 11 #include <memory> |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "webrtc/base/fakesslidentity.h" | 15 #include "webrtc/base/fakesslidentity.h" |
16 #include "webrtc/base/gunit.h" | 16 #include "webrtc/base/gunit.h" |
17 #include "webrtc/base/messagedigest.h" | 17 #include "webrtc/base/messagedigest.h" |
18 #include "webrtc/base/ssladapter.h" | 18 #include "webrtc/base/ssladapter.h" |
19 #include "webrtc/media/base/codec.h" | 19 #include "webrtc/media/base/codec.h" |
20 #include "webrtc/media/base/testutils.h" | 20 #include "webrtc/media/base/testutils.h" |
21 #include "webrtc/p2p/base/p2pconstants.h" | 21 #include "webrtc/p2p/base/p2pconstants.h" |
22 #include "webrtc/p2p/base/transportdescription.h" | 22 #include "webrtc/p2p/base/transportdescription.h" |
23 #include "webrtc/p2p/base/transportinfo.h" | 23 #include "webrtc/p2p/base/transportinfo.h" |
24 #include "webrtc/pc/mediasession.h" | 24 #include "webrtc/pc/mediasession.h" |
25 #include "webrtc/pc/srtpfilter.h" | 25 #include "webrtc/pc/srtpfilter.h" |
26 | 26 |
27 #ifdef HAVE_SRTP | 27 #ifdef HAVE_SRTP |
28 #define ASSERT_CRYPTO(cd, s, cs) \ | 28 #define ASSERT_CRYPTO(cd, s, cs) \ |
29 ASSERT_EQ(cricket::CT_NONE, cd->crypto_required()); \ | |
30 ASSERT_EQ(s, cd->cryptos().size()); \ | 29 ASSERT_EQ(s, cd->cryptos().size()); \ |
31 ASSERT_EQ(std::string(cs), cd->cryptos()[0].cipher_suite) | 30 ASSERT_EQ(std::string(cs), cd->cryptos()[0].cipher_suite) |
32 #else | 31 #else |
33 #define ASSERT_CRYPTO(cd, s, cs) \ | 32 #define ASSERT_CRYPTO(cd, s, cs) ASSERT_EQ(0, cd->cryptos().size()); |
34 ASSERT_EQ(cricket::CT_NONE, cd->crypto_required()); \ | |
35 ASSERT_EQ(0U, cd->cryptos().size()); | |
36 #endif | 33 #endif |
37 | 34 |
38 typedef std::vector<cricket::Candidate> Candidates; | 35 typedef std::vector<cricket::Candidate> Candidates; |
39 | 36 |
40 using cricket::MediaContentDescription; | 37 using cricket::MediaContentDescription; |
41 using cricket::MediaSessionDescriptionFactory; | 38 using cricket::MediaSessionDescriptionFactory; |
42 using cricket::MediaContentDirection; | 39 using cricket::MediaContentDirection; |
43 using cricket::MediaSessionOptions; | 40 using cricket::MediaSessionOptions; |
44 using cricket::MediaType; | 41 using cricket::MediaType; |
45 using cricket::SessionDescription; | 42 using cricket::SessionDescription; |
(...skipping 2936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2982 ::testing::Combine( | 2979 ::testing::Combine( |
2983 ::testing::Values(cricket::MD_SENDONLY, | 2980 ::testing::Values(cricket::MD_SENDONLY, |
2984 cricket::MD_RECVONLY, | 2981 cricket::MD_RECVONLY, |
2985 cricket::MD_SENDRECV, | 2982 cricket::MD_SENDRECV, |
2986 cricket::MD_INACTIVE), | 2983 cricket::MD_INACTIVE), |
2987 ::testing::Values(cricket::MD_SENDONLY, | 2984 ::testing::Values(cricket::MD_SENDONLY, |
2988 cricket::MD_RECVONLY, | 2985 cricket::MD_RECVONLY, |
2989 cricket::MD_SENDRECV, | 2986 cricket::MD_SENDRECV, |
2990 cricket::MD_INACTIVE), | 2987 cricket::MD_INACTIVE), |
2991 ::testing::Bool())); | 2988 ::testing::Bool())); |
OLD | NEW |