Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(579)

Side by Side Diff: webrtc/pc/srtpfilter_unittest.cc

Issue 1913043003: Revert of Remove the rtc_relative_path GYP variable and similar defines (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/pc/srtpfilter.cc ('k') | webrtc/webrtc_tests.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/gunit.h" 12 #include "webrtc/base/gunit.h"
13 #include "webrtc/base/thread.h" 13 #include "webrtc/base/thread.h"
14 #include "webrtc/media/base/cryptoparams.h" 14 #include "webrtc/media/base/cryptoparams.h"
15 #include "webrtc/media/base/fakertp.h" 15 #include "webrtc/media/base/fakertp.h"
16 #include "webrtc/p2p/base/sessiondescription.h" 16 #include "webrtc/p2p/base/sessiondescription.h"
17 #include "webrtc/pc/srtpfilter.h" 17 #include "webrtc/pc/srtpfilter.h"
18 extern "C" { 18 extern "C" {
19 #ifdef SRTP_RELATIVE_PATH
20 #include "crypto/include/err.h"
21 #else
19 #include "third_party/libsrtp/srtp/crypto/include/err.h" 22 #include "third_party/libsrtp/srtp/crypto/include/err.h"
23 #endif
20 } 24 }
21 25
22 using rtc::CS_AES_CM_128_HMAC_SHA1_80; 26 using rtc::CS_AES_CM_128_HMAC_SHA1_80;
23 using rtc::CS_AES_CM_128_HMAC_SHA1_32; 27 using rtc::CS_AES_CM_128_HMAC_SHA1_32;
24 using cricket::CryptoParams; 28 using cricket::CryptoParams;
25 using cricket::CS_LOCAL; 29 using cricket::CS_LOCAL;
26 using cricket::CS_REMOTE; 30 using cricket::CS_REMOTE;
27 31
28 static const uint8_t kTestKey1[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234"; 32 static const uint8_t kTestKey1[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234";
29 static const uint8_t kTestKey2[] = "4321ZYXWVUTSRQPONMLKJIHGFEDCBA"; 33 static const uint8_t kTestKey2[] = "4321ZYXWVUTSRQPONMLKJIHGFEDCBA";
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 srtp_stat_.AddUnprotectRtcpResult(err_status_fail); 899 srtp_stat_.AddUnprotectRtcpResult(err_status_fail);
896 EXPECT_EQ(-1, mode_); 900 EXPECT_EQ(-1, mode_);
897 EXPECT_EQ(cricket::SrtpFilter::ERROR_NONE, error_); 901 EXPECT_EQ(cricket::SrtpFilter::ERROR_NONE, error_);
898 // Now the error will be triggered again. 902 // Now the error will be triggered again.
899 Reset(); 903 Reset();
900 rtc::Thread::Current()->SleepMs(210); 904 rtc::Thread::Current()->SleepMs(210);
901 srtp_stat_.AddUnprotectRtcpResult(err_status_fail); 905 srtp_stat_.AddUnprotectRtcpResult(err_status_fail);
902 EXPECT_EQ(cricket::SrtpFilter::UNPROTECT, mode_); 906 EXPECT_EQ(cricket::SrtpFilter::UNPROTECT, mode_);
903 EXPECT_EQ(cricket::SrtpFilter::ERROR_FAIL, error_); 907 EXPECT_EQ(cricket::SrtpFilter::ERROR_FAIL, error_);
904 } 908 }
OLDNEW
« no previous file with comments | « webrtc/pc/srtpfilter.cc ('k') | webrtc/webrtc_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698