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

Side by Side Diff: webrtc/video/payload_router_unittest.cc

Issue 1751903002: Replace scoped_ptr with unique_ptr in webrtc/video/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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/video/payload_router.h ('k') | webrtc/video/replay.cc » ('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 (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 #include "webrtc/base/scoped_ptr.h"
14 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" 15 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
15 #include "webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h" 16 #include "webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h"
16 #include "webrtc/video/payload_router.h" 17 #include "webrtc/video/payload_router.h"
17 18
18 using ::testing::_; 19 using ::testing::_;
19 using ::testing::AnyNumber; 20 using ::testing::AnyNumber;
20 using ::testing::NiceMock; 21 using ::testing::NiceMock;
21 using ::testing::Return; 22 using ::testing::Return;
22 23
23 namespace webrtc { 24 namespace webrtc {
24 25
25 class PayloadRouterTest : public ::testing::Test { 26 class PayloadRouterTest : public ::testing::Test {
26 protected: 27 protected:
27 virtual void SetUp() { 28 virtual void SetUp() {
28 payload_router_.reset(new PayloadRouter()); 29 payload_router_.reset(new PayloadRouter());
29 } 30 }
30 rtc::scoped_ptr<PayloadRouter> payload_router_; 31 std::unique_ptr<PayloadRouter> payload_router_;
31 }; 32 };
32 33
33 TEST_F(PayloadRouterTest, SendOnOneModule) { 34 TEST_F(PayloadRouterTest, SendOnOneModule) {
34 MockRtpRtcp rtp; 35 MockRtpRtcp rtp;
35 std::vector<RtpRtcp*> modules(1, &rtp); 36 std::vector<RtpRtcp*> modules(1, &rtp);
36 37
37 payload_router_->Init(modules); 38 payload_router_->Init(modules);
38 payload_router_->SetSendingRtpModules(modules.size()); 39 payload_router_->SetSendingRtpModules(modules.size());
39 40
40 uint8_t payload = 'a'; 41 uint8_t payload = 'a';
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 payload_router_->SetTargetSendBitrates(bitrates); 193 payload_router_->SetTargetSendBitrates(bitrates);
193 194
194 bitrates.resize(1); 195 bitrates.resize(1);
195 EXPECT_CALL(rtp_1, SetTargetSendBitrate(bitrate_1)) 196 EXPECT_CALL(rtp_1, SetTargetSendBitrate(bitrate_1))
196 .Times(1); 197 .Times(1);
197 EXPECT_CALL(rtp_2, SetTargetSendBitrate(bitrate_2)) 198 EXPECT_CALL(rtp_2, SetTargetSendBitrate(bitrate_2))
198 .Times(0); 199 .Times(0);
199 payload_router_->SetTargetSendBitrates(bitrates); 200 payload_router_->SetTargetSendBitrates(bitrates);
200 } 201 }
201 } // namespace webrtc 202 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/payload_router.h ('k') | webrtc/video/replay.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698