| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
| 22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | 22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | 23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
| 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
| 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #include <string> | 28 #include <string> |
| 29 #include <vector> | 29 #include <vector> |
| 30 | 30 |
| 31 #include "talk/media/base/codec.h" | |
| 32 #include "talk/media/base/testutils.h" | |
| 33 #include "webrtc/p2p/base/constants.h" | |
| 34 #include "webrtc/p2p/base/transportdescription.h" | |
| 35 #include "webrtc/p2p/base/transportinfo.h" | |
| 36 #include "talk/session/media/mediasession.h" | 31 #include "talk/session/media/mediasession.h" |
| 37 #include "talk/session/media/srtpfilter.h" | 32 #include "talk/session/media/srtpfilter.h" |
| 38 #include "webrtc/base/fakesslidentity.h" | 33 #include "webrtc/base/fakesslidentity.h" |
| 39 #include "webrtc/base/gunit.h" | 34 #include "webrtc/base/gunit.h" |
| 40 #include "webrtc/base/messagedigest.h" | 35 #include "webrtc/base/messagedigest.h" |
| 41 #include "webrtc/base/ssladapter.h" | 36 #include "webrtc/base/ssladapter.h" |
| 37 #include "webrtc/media/base/codec.h" |
| 38 #include "webrtc/media/base/testutils.h" |
| 39 #include "webrtc/p2p/base/constants.h" |
| 40 #include "webrtc/p2p/base/transportdescription.h" |
| 41 #include "webrtc/p2p/base/transportinfo.h" |
| 42 | 42 |
| 43 #ifdef HAVE_SRTP | 43 #ifdef HAVE_SRTP |
| 44 #define ASSERT_CRYPTO(cd, s, cs) \ | 44 #define ASSERT_CRYPTO(cd, s, cs) \ |
| 45 ASSERT_EQ(cricket::CT_NONE, cd->crypto_required()); \ | 45 ASSERT_EQ(cricket::CT_NONE, cd->crypto_required()); \ |
| 46 ASSERT_EQ(s, cd->cryptos().size()); \ | 46 ASSERT_EQ(s, cd->cryptos().size()); \ |
| 47 ASSERT_EQ(std::string(cs), cd->cryptos()[0].cipher_suite) | 47 ASSERT_EQ(std::string(cs), cd->cryptos()[0].cipher_suite) |
| 48 #else | 48 #else |
| 49 #define ASSERT_CRYPTO(cd, s, cs) \ | 49 #define ASSERT_CRYPTO(cd, s, cs) \ |
| 50 ASSERT_EQ(cricket::CT_NONE, cd->crypto_required()); \ | 50 ASSERT_EQ(cricket::CT_NONE, cd->crypto_required()); \ |
| 51 ASSERT_EQ(0U, cd->cryptos().size()); | 51 ASSERT_EQ(0U, cd->cryptos().size()); |
| (...skipping 2283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2335 const ContentInfo* audio_content = GetFirstAudioContent(updated_offer.get()); | 2335 const ContentInfo* audio_content = GetFirstAudioContent(updated_offer.get()); |
| 2336 const ContentInfo* video_content = GetFirstVideoContent(updated_offer.get()); | 2336 const ContentInfo* video_content = GetFirstVideoContent(updated_offer.get()); |
| 2337 const ContentInfo* data_content = GetFirstDataContent(updated_offer.get()); | 2337 const ContentInfo* data_content = GetFirstDataContent(updated_offer.get()); |
| 2338 ASSERT_TRUE(audio_content != nullptr); | 2338 ASSERT_TRUE(audio_content != nullptr); |
| 2339 ASSERT_TRUE(video_content != nullptr); | 2339 ASSERT_TRUE(video_content != nullptr); |
| 2340 ASSERT_TRUE(data_content != nullptr); | 2340 ASSERT_TRUE(data_content != nullptr); |
| 2341 EXPECT_EQ("audio_modified", audio_content->name); | 2341 EXPECT_EQ("audio_modified", audio_content->name); |
| 2342 EXPECT_EQ("video_modified", video_content->name); | 2342 EXPECT_EQ("video_modified", video_content->name); |
| 2343 EXPECT_EQ("data_modified", data_content->name); | 2343 EXPECT_EQ("data_modified", data_content->name); |
| 2344 } | 2344 } |
| OLD | NEW |