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

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

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