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 "webrtc/base/byteorder.h" | 11 #include "webrtc/base/byteorder.h" |
| 12 #include "webrtc/base/constructormagic.h" |
12 #include "webrtc/base/gunit.h" | 13 #include "webrtc/base/gunit.h" |
13 #include "webrtc/base/thread.h" | 14 #include "webrtc/base/thread.h" |
14 #include "webrtc/media/base/cryptoparams.h" | 15 #include "webrtc/media/base/cryptoparams.h" |
15 #include "webrtc/media/base/fakertp.h" | 16 #include "webrtc/media/base/fakertp.h" |
16 #include "webrtc/p2p/base/sessiondescription.h" | 17 #include "webrtc/p2p/base/sessiondescription.h" |
17 #include "webrtc/pc/srtpfilter.h" | 18 #include "webrtc/pc/srtpfilter.h" |
18 extern "C" { | 19 extern "C" { |
19 #ifdef SRTP_RELATIVE_PATH | 20 #ifdef SRTP_RELATIVE_PATH |
20 #include "crypto/include/err.h" | 21 #include "crypto/include/err.h" |
21 #else | 22 #else |
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
899 srtp_stat_.AddUnprotectRtcpResult(err_status_fail); | 900 srtp_stat_.AddUnprotectRtcpResult(err_status_fail); |
900 EXPECT_EQ(-1, mode_); | 901 EXPECT_EQ(-1, mode_); |
901 EXPECT_EQ(cricket::SrtpFilter::ERROR_NONE, error_); | 902 EXPECT_EQ(cricket::SrtpFilter::ERROR_NONE, error_); |
902 // Now the error will be triggered again. | 903 // Now the error will be triggered again. |
903 Reset(); | 904 Reset(); |
904 rtc::Thread::Current()->SleepMs(210); | 905 rtc::Thread::Current()->SleepMs(210); |
905 srtp_stat_.AddUnprotectRtcpResult(err_status_fail); | 906 srtp_stat_.AddUnprotectRtcpResult(err_status_fail); |
906 EXPECT_EQ(cricket::SrtpFilter::UNPROTECT, mode_); | 907 EXPECT_EQ(cricket::SrtpFilter::UNPROTECT, mode_); |
907 EXPECT_EQ(cricket::SrtpFilter::ERROR_FAIL, error_); | 908 EXPECT_EQ(cricket::SrtpFilter::ERROR_FAIL, error_); |
908 } | 909 } |
OLD | NEW |