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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtcp_packet/receiver_report_unittest.cc

Issue 1460043002: Don't call the Pass methods of rtc::Buffer, rtc::scoped_ptr, and rtc::ScopedVector (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Restore the Pass methods Created 5 years 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) 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
(...skipping 21 matching lines...) Expand all
32 // above. 32 // above.
33 // Having this block allows to test Create and Parse separately. 33 // Having this block allows to test Create and Parse separately.
34 const uint8_t kPacket[] = {0x81, 201, 0x00, 0x07, 0x12, 0x34, 0x56, 0x78, 34 const uint8_t kPacket[] = {0x81, 201, 0x00, 0x07, 0x12, 0x34, 0x56, 0x78,
35 0x23, 0x45, 0x67, 0x89, 55, 0x11, 0x12, 0x13, 35 0x23, 0x45, 0x67, 0x89, 55, 0x11, 0x12, 0x13,
36 0x22, 0x23, 0x24, 0x25, 0x33, 0x34, 0x35, 0x36, 36 0x22, 0x23, 0x24, 0x25, 0x33, 0x34, 0x35, 0x36,
37 0x44, 0x45, 0x46, 0x47, 0x55, 0x56, 0x57, 0x58}; 37 0x44, 0x45, 0x46, 0x47, 0x55, 0x56, 0x57, 0x58};
38 const size_t kPacketLength = sizeof(kPacket); 38 const size_t kPacketLength = sizeof(kPacket);
39 39
40 class RtcpPacketReceiverReportTest : public ::testing::Test { 40 class RtcpPacketReceiverReportTest : public ::testing::Test {
41 protected: 41 protected:
42 void BuildPacket() { packet = rr.Build().Pass(); } 42 void BuildPacket() { packet = rr.Build(); }
43 void ParsePacket() { 43 void ParsePacket() {
44 RtcpCommonHeader header; 44 RtcpCommonHeader header;
45 EXPECT_TRUE( 45 EXPECT_TRUE(
46 RtcpParseCommonHeader(packet->Buffer(), packet->Length(), &header)); 46 RtcpParseCommonHeader(packet->Buffer(), packet->Length(), &header));
47 EXPECT_EQ(header.BlockSize(), packet->Length()); 47 EXPECT_EQ(header.BlockSize(), packet->Length());
48 EXPECT_TRUE(parsed_.Parse( 48 EXPECT_TRUE(parsed_.Parse(
49 header, packet->Buffer() + RtcpCommonHeader::kHeaderSizeBytes)); 49 header, packet->Buffer() + RtcpCommonHeader::kHeaderSizeBytes));
50 } 50 }
51 51
52 ReceiverReport rr; 52 ReceiverReport rr;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 for (size_t i = 0; i < kMaxReportBlocks; ++i) { 136 for (size_t i = 0; i < kMaxReportBlocks; ++i) {
137 rb.To(kRemoteSsrc + i); 137 rb.To(kRemoteSsrc + i);
138 EXPECT_TRUE(rr.WithReportBlock(rb)); 138 EXPECT_TRUE(rr.WithReportBlock(rb));
139 } 139 }
140 rb.To(kRemoteSsrc + kMaxReportBlocks); 140 rb.To(kRemoteSsrc + kMaxReportBlocks);
141 EXPECT_FALSE(rr.WithReportBlock(rb)); 141 EXPECT_FALSE(rr.WithReportBlock(rb));
142 } 142 }
143 143
144 } // namespace 144 } // namespace
145 } // namespace webrtc 145 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698