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: media/cast/net/rtp/rtp_packetizer_unittest.cc

Issue 623263003: replace OVERRIDE and FINAL with override and final in media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « media/cast/net/rtp/receiver_stats.h ('k') | media/cast/net/udp_transport.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/net/rtp/rtp_packetizer.h" 5 #include "media/cast/net/rtp/rtp_packetizer.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/test/simple_test_tick_clock.h" 10 #include "base/test/simple_test_tick_clock.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 void VerifyCastRtpHeader(const RtpCastTestHeader& rtp_header) { 55 void VerifyCastRtpHeader(const RtpCastTestHeader& rtp_header) {
56 EXPECT_FALSE(rtp_header.is_key_frame); 56 EXPECT_FALSE(rtp_header.is_key_frame);
57 EXPECT_EQ(expected_frame_id_, rtp_header.frame_id); 57 EXPECT_EQ(expected_frame_id_, rtp_header.frame_id);
58 EXPECT_EQ(expected_packet_id_, rtp_header.packet_id); 58 EXPECT_EQ(expected_packet_id_, rtp_header.packet_id);
59 EXPECT_EQ(expected_number_of_packets_ - 1, rtp_header.max_packet_id); 59 EXPECT_EQ(expected_number_of_packets_ - 1, rtp_header.max_packet_id);
60 EXPECT_TRUE(rtp_header.is_reference); 60 EXPECT_TRUE(rtp_header.is_reference);
61 EXPECT_EQ(expected_frame_id_ - 1u, rtp_header.reference_frame_id); 61 EXPECT_EQ(expected_frame_id_ - 1u, rtp_header.reference_frame_id);
62 } 62 }
63 63
64 virtual bool SendPacket(PacketRef packet, const base::Closure& cb) OVERRIDE { 64 virtual bool SendPacket(PacketRef packet, const base::Closure& cb) override {
65 ++packets_sent_; 65 ++packets_sent_;
66 RtpHeaderParser parser(&packet->data[0], packet->data.size()); 66 RtpHeaderParser parser(&packet->data[0], packet->data.size());
67 RtpCastTestHeader rtp_header; 67 RtpCastTestHeader rtp_header;
68 parser.Parse(&rtp_header); 68 parser.Parse(&rtp_header);
69 VerifyRtpHeader(rtp_header); 69 VerifyRtpHeader(rtp_header);
70 ++sequence_number_; 70 ++sequence_number_;
71 ++expected_packet_id_; 71 ++expected_packet_id_;
72 return true; 72 return true;
73 } 73 }
74 74
75 virtual int64 GetBytesSent() OVERRIDE { 75 virtual int64 GetBytesSent() override {
76 return 0; 76 return 0;
77 } 77 }
78 78
79 size_t number_of_packets_received() const { return packets_sent_; } 79 size_t number_of_packets_received() const { return packets_sent_; }
80 80
81 void set_expected_number_of_packets(size_t expected_number_of_packets) { 81 void set_expected_number_of_packets(size_t expected_number_of_packets) {
82 expected_number_of_packets_ = expected_number_of_packets; 82 expected_number_of_packets_ = expected_number_of_packets;
83 } 83 }
84 84
85 void set_rtp_timestamp(uint32 rtp_timestamp) { 85 void set_rtp_timestamp(uint32 rtp_timestamp) {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 video_frame_.reference_time = testing_clock_.NowTicks(); 170 video_frame_.reference_time = testing_clock_.NowTicks();
171 rtp_packetizer_->SendFrameAsPackets(video_frame_); 171 rtp_packetizer_->SendFrameAsPackets(video_frame_);
172 RunTasks(33 + 1); 172 RunTasks(33 + 1);
173 EXPECT_EQ(expected_num_of_packets, rtp_packetizer_->send_packet_count()); 173 EXPECT_EQ(expected_num_of_packets, rtp_packetizer_->send_packet_count());
174 EXPECT_EQ(kFrameSize, rtp_packetizer_->send_octet_count()); 174 EXPECT_EQ(kFrameSize, rtp_packetizer_->send_octet_count());
175 EXPECT_EQ(expected_num_of_packets, transport_->number_of_packets_received()); 175 EXPECT_EQ(expected_num_of_packets, transport_->number_of_packets_received());
176 } 176 }
177 177
178 } // namespace cast 178 } // namespace cast
179 } // namespace media 179 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/net/rtp/receiver_stats.h ('k') | media/cast/net/udp_transport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698