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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtcp_packet/app_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 11 matching lines...) Expand all
22 22
23 namespace webrtc { 23 namespace webrtc {
24 namespace { 24 namespace {
25 25
26 const uint32_t kName = ((uint32_t)'n' << 24) | ((uint32_t)'a' << 16) | 26 const uint32_t kName = ((uint32_t)'n' << 24) | ((uint32_t)'a' << 16) |
27 ((uint32_t)'m' << 8) | (uint32_t)'e'; 27 ((uint32_t)'m' << 8) | (uint32_t)'e';
28 const uint32_t kSenderSsrc = 0x12345678; 28 const uint32_t kSenderSsrc = 0x12345678;
29 29
30 class RtcpPacketAppTest : public ::testing::Test { 30 class RtcpPacketAppTest : public ::testing::Test {
31 protected: 31 protected:
32 void BuildPacket() { packet = app.Build().Pass(); } 32 void BuildPacket() { packet = app.Build(); }
33 void ParsePacket() { 33 void ParsePacket() {
34 RtcpCommonHeader header; 34 RtcpCommonHeader header;
35 EXPECT_TRUE( 35 EXPECT_TRUE(
36 RtcpParseCommonHeader(packet->Buffer(), packet->Length(), &header)); 36 RtcpParseCommonHeader(packet->Buffer(), packet->Length(), &header));
37 // Check there is exactly one RTCP packet in the buffer. 37 // Check there is exactly one RTCP packet in the buffer.
38 EXPECT_EQ(header.BlockSize(), packet->Length()); 38 EXPECT_EQ(header.BlockSize(), packet->Length());
39 EXPECT_TRUE(parsed_.Parse( 39 EXPECT_TRUE(parsed_.Parse(
40 header, packet->Buffer() + RtcpCommonHeader::kHeaderSizeBytes)); 40 header, packet->Buffer() + RtcpCommonHeader::kHeaderSizeBytes));
41 } 41 }
42 42
(...skipping 29 matching lines...) Expand all
72 ParsePacket(); 72 ParsePacket();
73 73
74 EXPECT_EQ(30U, parsed().sub_type()); 74 EXPECT_EQ(30U, parsed().sub_type());
75 EXPECT_EQ(kName, parsed().name()); 75 EXPECT_EQ(kName, parsed().name());
76 EXPECT_EQ(kDataLength, parsed().data_size()); 76 EXPECT_EQ(kDataLength, parsed().data_size());
77 EXPECT_EQ(0, memcmp(kData, parsed().data(), kDataLength)); 77 EXPECT_EQ(0, memcmp(kData, parsed().data(), kDataLength));
78 } 78 }
79 79
80 } // namespace 80 } // namespace
81 } // namespace webrtc 81 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698