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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtcp_packet/bye_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 12 matching lines...) Expand all
23 23
24 namespace webrtc { 24 namespace webrtc {
25 namespace { 25 namespace {
26 26
27 const uint32_t kSenderSsrc = 0x12345678; 27 const uint32_t kSenderSsrc = 0x12345678;
28 const uint32_t kCsrc1 = 0x22232425; 28 const uint32_t kCsrc1 = 0x22232425;
29 const uint32_t kCsrc2 = 0x33343536; 29 const uint32_t kCsrc2 = 0x33343536;
30 30
31 class RtcpPacketByeTest : public ::testing::Test { 31 class RtcpPacketByeTest : public ::testing::Test {
32 protected: 32 protected:
33 void BuildPacket() { packet = bye.Build().Pass(); } 33 void BuildPacket() { packet = bye.Build(); }
34 void ParsePacket() { 34 void ParsePacket() {
35 RtcpCommonHeader header; 35 RtcpCommonHeader header;
36 EXPECT_TRUE( 36 EXPECT_TRUE(
37 RtcpParseCommonHeader(packet->Buffer(), packet->Length(), &header)); 37 RtcpParseCommonHeader(packet->Buffer(), packet->Length(), &header));
38 // Check that there is exactly one RTCP packet in the buffer. 38 // Check that there is exactly one RTCP packet in the buffer.
39 EXPECT_EQ(header.BlockSize(), packet->Length()); 39 EXPECT_EQ(header.BlockSize(), packet->Length());
40 EXPECT_TRUE(parsed_bye.Parse( 40 EXPECT_TRUE(parsed_bye.Parse(
41 header, packet->Buffer() + RtcpCommonHeader::kHeaderSizeBytes)); 41 header, packet->Buffer() + RtcpCommonHeader::kHeaderSizeBytes));
42 } 42 }
43 43
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 RtcpCommonHeader header; 164 RtcpCommonHeader header;
165 RtcpParseCommonHeader(packet->Buffer(), packet->Length(), &header); 165 RtcpParseCommonHeader(packet->Buffer(), packet->Length(), &header);
166 header.payload_size_bytes -= 4; // Payload is usually 32bit aligned. 166 header.payload_size_bytes -= 4; // Payload is usually 32bit aligned.
167 167
168 EXPECT_FALSE(parsed_bye.Parse( 168 EXPECT_FALSE(parsed_bye.Parse(
169 header, packet->Buffer() + RtcpCommonHeader::kHeaderSizeBytes)); 169 header, packet->Buffer() + RtcpCommonHeader::kHeaderSizeBytes));
170 } 170 }
171 171
172 } // namespace 172 } // namespace
173 } // namespace webrtc 173 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698