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/checks.h" |
15 #include "webrtc/base/fakesslidentity.h" | 16 #include "webrtc/base/fakesslidentity.h" |
16 #include "webrtc/base/gunit.h" | 17 #include "webrtc/base/gunit.h" |
17 #include "webrtc/base/messagedigest.h" | 18 #include "webrtc/base/messagedigest.h" |
18 #include "webrtc/base/ssladapter.h" | 19 #include "webrtc/base/ssladapter.h" |
19 #include "webrtc/media/base/codec.h" | 20 #include "webrtc/media/base/codec.h" |
20 #include "webrtc/media/base/testutils.h" | 21 #include "webrtc/media/base/testutils.h" |
21 #include "webrtc/p2p/base/p2pconstants.h" | 22 #include "webrtc/p2p/base/p2pconstants.h" |
22 #include "webrtc/p2p/base/transportdescription.h" | 23 #include "webrtc/p2p/base/transportdescription.h" |
23 #include "webrtc/p2p/base/transportinfo.h" | 24 #include "webrtc/p2p/base/transportinfo.h" |
24 #include "webrtc/pc/mediasession.h" | 25 #include "webrtc/pc/mediasession.h" |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 const AudioContentDescription* acd_answer = | 445 const AudioContentDescription* acd_answer = |
445 GetFirstAudioContentDescription(answer.get()); | 446 GetFirstAudioContentDescription(answer.get()); |
446 EXPECT_EQ(expected_direction_in_answer, acd_answer->direction()); | 447 EXPECT_EQ(expected_direction_in_answer, acd_answer->direction()); |
447 const VideoContentDescription* vcd_answer = | 448 const VideoContentDescription* vcd_answer = |
448 GetFirstVideoContentDescription(answer.get()); | 449 GetFirstVideoContentDescription(answer.get()); |
449 EXPECT_EQ(expected_direction_in_answer, vcd_answer->direction()); | 450 EXPECT_EQ(expected_direction_in_answer, vcd_answer->direction()); |
450 } | 451 } |
451 | 452 |
452 bool VerifyNoCNCodecs(const cricket::ContentInfo* content) { | 453 bool VerifyNoCNCodecs(const cricket::ContentInfo* content) { |
453 const cricket::ContentDescription* description = content->description; | 454 const cricket::ContentDescription* description = content->description; |
454 ASSERT(description != NULL); | 455 RTC_CHECK(description != NULL); |
455 const cricket::AudioContentDescription* audio_content_desc = | 456 const cricket::AudioContentDescription* audio_content_desc = |
456 static_cast<const cricket::AudioContentDescription*>(description); | 457 static_cast<const cricket::AudioContentDescription*>(description); |
457 ASSERT(audio_content_desc != NULL); | 458 RTC_CHECK(audio_content_desc != NULL); |
458 for (size_t i = 0; i < audio_content_desc->codecs().size(); ++i) { | 459 for (size_t i = 0; i < audio_content_desc->codecs().size(); ++i) { |
459 if (audio_content_desc->codecs()[i].name == "CN") | 460 if (audio_content_desc->codecs()[i].name == "CN") |
460 return false; | 461 return false; |
461 } | 462 } |
462 return true; | 463 return true; |
463 } | 464 } |
464 | 465 |
465 void TestVideoGcmCipher(bool gcm_offer, bool gcm_answer) { | 466 void TestVideoGcmCipher(bool gcm_offer, bool gcm_answer) { |
466 MediaSessionOptions offer_opts; | 467 MediaSessionOptions offer_opts; |
467 offer_opts.recv_video = true; | 468 offer_opts.recv_video = true; |
(...skipping 2511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2979 ::testing::Combine( | 2980 ::testing::Combine( |
2980 ::testing::Values(cricket::MD_SENDONLY, | 2981 ::testing::Values(cricket::MD_SENDONLY, |
2981 cricket::MD_RECVONLY, | 2982 cricket::MD_RECVONLY, |
2982 cricket::MD_SENDRECV, | 2983 cricket::MD_SENDRECV, |
2983 cricket::MD_INACTIVE), | 2984 cricket::MD_INACTIVE), |
2984 ::testing::Values(cricket::MD_SENDONLY, | 2985 ::testing::Values(cricket::MD_SENDONLY, |
2985 cricket::MD_RECVONLY, | 2986 cricket::MD_RECVONLY, |
2986 cricket::MD_SENDRECV, | 2987 cricket::MD_SENDRECV, |
2987 cricket::MD_INACTIVE), | 2988 cricket::MD_INACTIVE), |
2988 ::testing::Bool())); | 2989 ::testing::Bool())); |
OLD | NEW |