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

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

Issue 2685783014: Replace NULL with nullptr in all C++ files. (Closed)
Patch Set: Fixing android. Created 3 years, 10 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
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
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 } 571 }
572 572
573 #if defined(ENABLE_EXTERNAL_AUTH) 573 #if defined(ENABLE_EXTERNAL_AUTH)
574 TEST_F(SrtpFilterTest, TestGetSendAuthParams) { 574 TEST_F(SrtpFilterTest, TestGetSendAuthParams) {
575 EXPECT_TRUE(f1_.SetRtpParams(rtc::SRTP_AES128_CM_SHA1_32, kTestKey1, 575 EXPECT_TRUE(f1_.SetRtpParams(rtc::SRTP_AES128_CM_SHA1_32, kTestKey1,
576 kTestKeyLen, rtc::SRTP_AES128_CM_SHA1_32, 576 kTestKeyLen, rtc::SRTP_AES128_CM_SHA1_32,
577 kTestKey2, kTestKeyLen)); 577 kTestKey2, kTestKeyLen));
578 EXPECT_TRUE(f1_.SetRtcpParams(rtc::SRTP_AES128_CM_SHA1_32, kTestKey1, 578 EXPECT_TRUE(f1_.SetRtcpParams(rtc::SRTP_AES128_CM_SHA1_32, kTestKey1,
579 kTestKeyLen, rtc::SRTP_AES128_CM_SHA1_32, 579 kTestKeyLen, rtc::SRTP_AES128_CM_SHA1_32,
580 kTestKey2, kTestKeyLen)); 580 kTestKey2, kTestKeyLen));
581 uint8_t* auth_key = NULL; 581 uint8_t* auth_key = nullptr;
582 int auth_key_len = 0, auth_tag_len = 0; 582 int auth_key_len = 0, auth_tag_len = 0;
583 EXPECT_TRUE(f1_.GetRtpAuthParams(&auth_key, &auth_key_len, &auth_tag_len)); 583 EXPECT_TRUE(f1_.GetRtpAuthParams(&auth_key, &auth_key_len, &auth_tag_len));
584 EXPECT_TRUE(auth_key != NULL); 584 EXPECT_TRUE(auth_key != nullptr);
585 EXPECT_EQ(20, auth_key_len); 585 EXPECT_EQ(20, auth_key_len);
586 EXPECT_EQ(4, auth_tag_len); 586 EXPECT_EQ(4, auth_tag_len);
587 } 587 }
588 #endif 588 #endif
589 589
590 class SrtpSessionTest : public testing::Test { 590 class SrtpSessionTest : public testing::Test {
591 protected: 591 protected:
592 virtual void SetUp() { 592 virtual void SetUp() {
593 rtp_len_ = sizeof(kPcmuFrame); 593 rtp_len_ = sizeof(kPcmuFrame);
594 rtcp_len_ = sizeof(kRtcpReport); 594 rtcp_len_ = sizeof(kRtcpReport);
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 srtp_stat_.AddUnprotectRtcpResult(srtp_err_status_fail); 932 srtp_stat_.AddUnprotectRtcpResult(srtp_err_status_fail);
933 EXPECT_EQ(-1, mode_); 933 EXPECT_EQ(-1, mode_);
934 EXPECT_EQ(cricket::SrtpFilter::ERROR_NONE, error_); 934 EXPECT_EQ(cricket::SrtpFilter::ERROR_NONE, error_);
935 // Now the error will be triggered again. 935 // Now the error will be triggered again.
936 Reset(); 936 Reset();
937 rtc::Thread::Current()->SleepMs(210); 937 rtc::Thread::Current()->SleepMs(210);
938 srtp_stat_.AddUnprotectRtcpResult(srtp_err_status_fail); 938 srtp_stat_.AddUnprotectRtcpResult(srtp_err_status_fail);
939 EXPECT_EQ(cricket::SrtpFilter::UNPROTECT, mode_); 939 EXPECT_EQ(cricket::SrtpFilter::UNPROTECT, mode_);
940 EXPECT_EQ(cricket::SrtpFilter::ERROR_FAIL, error_); 940 EXPECT_EQ(cricket::SrtpFilter::ERROR_FAIL, error_);
941 } 941 }
OLDNEW
« webrtc/base/event.cc ('K') | « webrtc/pc/sctputils.cc ('k') | webrtc/pc/statscollector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698