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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtcp_sender_unittest.cc

Issue 1924443002: Revert of Replace the remaining scoped_ptr with unique_ptr in webrtc/modules/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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 (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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>
12
13 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
14 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
15 13
16 #include "webrtc/common_types.h" 14 #include "webrtc/common_types.h"
17 #include "webrtc/modules/rtp_rtcp/source/rtcp_sender.h" 15 #include "webrtc/modules/rtp_rtcp/source/rtcp_sender.h"
18 #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h" 16 #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h"
19 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h" 17 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h"
20 #include "webrtc/test/mock_transport.h" 18 #include "webrtc/test/mock_transport.h"
21 #include "webrtc/test/rtcp_packet_parser.h" 19 #include "webrtc/test/rtcp_packet_parser.h"
22 20
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } 249 }
252 250
253 test::RtcpPacketParser* parser() { return &test_transport_.parser_; } 251 test::RtcpPacketParser* parser() { return &test_transport_.parser_; }
254 252
255 RTCPSender::FeedbackState feedback_state() { 253 RTCPSender::FeedbackState feedback_state() {
256 return rtp_rtcp_impl_->GetFeedbackState(); 254 return rtp_rtcp_impl_->GetFeedbackState();
257 } 255 }
258 256
259 SimulatedClock clock_; 257 SimulatedClock clock_;
260 TestTransport test_transport_; 258 TestTransport test_transport_;
261 std::unique_ptr<ReceiveStatistics> receive_statistics_; 259 rtc::scoped_ptr<ReceiveStatistics> receive_statistics_;
262 std::unique_ptr<ModuleRtpRtcpImpl> rtp_rtcp_impl_; 260 rtc::scoped_ptr<ModuleRtpRtcpImpl> rtp_rtcp_impl_;
263 std::unique_ptr<RTCPSender> rtcp_sender_; 261 rtc::scoped_ptr<RTCPSender> rtcp_sender_;
264 }; 262 };
265 263
266 TEST_F(RtcpSenderTest, SetRtcpStatus) { 264 TEST_F(RtcpSenderTest, SetRtcpStatus) {
267 EXPECT_EQ(RtcpMode::kOff, rtcp_sender_->Status()); 265 EXPECT_EQ(RtcpMode::kOff, rtcp_sender_->Status());
268 rtcp_sender_->SetRTCPStatus(RtcpMode::kReducedSize); 266 rtcp_sender_->SetRTCPStatus(RtcpMode::kReducedSize);
269 EXPECT_EQ(RtcpMode::kReducedSize, rtcp_sender_->Status()); 267 EXPECT_EQ(RtcpMode::kReducedSize, rtcp_sender_->Status());
270 } 268 }
271 269
272 TEST_F(RtcpSenderTest, SetSendingStatus) { 270 TEST_F(RtcpSenderTest, SetSendingStatus) {
273 EXPECT_FALSE(rtcp_sender_->Sending()); 271 EXPECT_FALSE(rtcp_sender_->Sending());
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 rtcp_sender_->SetRemoteSSRC(kRemoteSsrc); 767 rtcp_sender_->SetRemoteSSRC(kRemoteSsrc);
770 768
771 // Set up XR VoIP metric to be included with BYE 769 // Set up XR VoIP metric to be included with BYE
772 rtcp_sender_->SetRTCPStatus(RtcpMode::kCompound); 770 rtcp_sender_->SetRTCPStatus(RtcpMode::kCompound);
773 RTCPVoIPMetric metric; 771 RTCPVoIPMetric metric;
774 EXPECT_EQ(0, rtcp_sender_->SetRTCPVoIPMetrics(&metric)); 772 EXPECT_EQ(0, rtcp_sender_->SetRTCPVoIPMetrics(&metric));
775 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state(), kRtcpBye)); 773 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state(), kRtcpBye));
776 } 774 }
777 775
778 } // namespace webrtc 776 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc ('k') | webrtc/modules/rtp_rtcp/source/rtcp_utility.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698