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

Side by Side Diff: media/cast/rtp_sender/rtp_packetizer/rtp_packetizer_unittest.cc

Issue 25782002: Style fixes for cast_unittest to build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: NOTREACHED() and removed static_cast Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/cast/rtp_sender/rtp_packetizer/rtp_packetizer.h" 5 #include "media/cast/rtp_sender/rtp_packetizer/rtp_packetizer.h"
6 6
7 #include <gtest/gtest.h> 7 #include <gtest/gtest.h>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "media/cast/cast_config.h" 10 #include "media/cast/cast_config.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 packet_storage_(kMaxPacketStorageTimeMs) { 106 packet_storage_(kMaxPacketStorageTimeMs) {
107 config_.sequence_number = kSeqNum; 107 config_.sequence_number = kSeqNum;
108 config_.ssrc = kSsrc; 108 config_.ssrc = kSsrc;
109 config_.payload_type = kPayload; 109 config_.payload_type = kPayload;
110 config_.max_payload_length = kMaxPacketLength; 110 config_.max_payload_length = kMaxPacketLength;
111 transport_.reset(new TestRtpPacketTransport(config_)); 111 transport_.reset(new TestRtpPacketTransport(config_));
112 rtp_packetizer_.reset( 112 rtp_packetizer_.reset(
113 new RtpPacketizer(transport_.get(), &packet_storage_, config_)); 113 new RtpPacketizer(transport_.get(), &packet_storage_, config_));
114 } 114 }
115 115
116 ~RtpPacketizerTest() {} 116 virtual ~RtpPacketizerTest() {}
117 117
118 void SetUp() { 118 virtual void SetUp() {
119 video_frame_.key_frame = false; 119 video_frame_.key_frame = false;
120 video_frame_.last_referenced_frame_id = 255; 120 video_frame_.last_referenced_frame_id = 255;
121 video_frame_.data.assign(kFrameSize, 123); 121 video_frame_.data.assign(kFrameSize, 123);
122 } 122 }
123 123
124 scoped_ptr<RtpPacketizer> rtp_packetizer_; 124 scoped_ptr<RtpPacketizer> rtp_packetizer_;
125 RtpPacketizerConfig config_; 125 RtpPacketizerConfig config_;
126 scoped_ptr<TestRtpPacketTransport> transport_; 126 scoped_ptr<TestRtpPacketTransport> transport_;
127 EncodedVideoFrame video_frame_; 127 EncodedVideoFrame video_frame_;
128 PacketStorage packet_storage_; 128 PacketStorage packet_storage_;
(...skipping 17 matching lines...) Expand all
146 146
147 base::TimeTicks time; 147 base::TimeTicks time;
148 time += base::TimeDelta::FromMilliseconds(kTimestampMs); 148 time += base::TimeDelta::FromMilliseconds(kTimestampMs);
149 rtp_packetizer_->IncomingEncodedVideoFrame(&video_frame_, time); 149 rtp_packetizer_->IncomingEncodedVideoFrame(&video_frame_, time);
150 EXPECT_EQ(expected_num_of_packets, rtp_packetizer_->send_packets_count()); 150 EXPECT_EQ(expected_num_of_packets, rtp_packetizer_->send_packets_count());
151 EXPECT_EQ(kFrameSize, rtp_packetizer_->send_octet_count()); 151 EXPECT_EQ(kFrameSize, rtp_packetizer_->send_octet_count());
152 } 152 }
153 153
154 } // namespace cast 154 } // namespace cast
155 } // namespace media 155 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/rtp_sender/rtp_packetizer/rtp_packetizer_config.cc ('k') | media/cast/rtp_sender/rtp_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698