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

Side by Side Diff: media/cast/rtp_receiver/receiver_stats_unittest.cc

Issue 25544003: Fix code style and gyp files in cast to build cast_unittest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed gyp files 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 <gtest/gtest.h> 5 #include <gtest/gtest.h>
6 6
7 #include "base/test/simple_test_tick_clock.h" 7 #include "base/test/simple_test_tick_clock.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "media/cast/rtp_common/rtp_defines.h" 9 #include "media/cast/rtp_common/rtp_defines.h"
10 #include "media/cast/rtp_receiver/receiver_stats.h" 10 #include "media/cast/rtp_receiver/receiver_stats.h"
(...skipping 12 matching lines...) Expand all
23 rtp_header_(), 23 rtp_header_(),
24 fraction_lost_(0), 24 fraction_lost_(0),
25 cumulative_lost_(0), 25 cumulative_lost_(0),
26 extended_high_sequence_number_(0), 26 extended_high_sequence_number_(0),
27 jitter_(0) { 27 jitter_(0) {
28 testing_clock_.Advance( 28 testing_clock_.Advance(
29 base::TimeDelta::FromMilliseconds(kStartMillisecond)); 29 base::TimeDelta::FromMilliseconds(kStartMillisecond));
30 start_time_ = testing_clock_.NowTicks(); 30 start_time_ = testing_clock_.NowTicks();
31 delta_increments_ = base::TimeDelta::FromMilliseconds(kStdTimeIncrementMs); 31 delta_increments_ = base::TimeDelta::FromMilliseconds(kStdTimeIncrementMs);
32 } 32 }
33 ~ReceiverStatsTest() {} 33 virtual ~ReceiverStatsTest() {}
34 34
35 virtual void SetUp() { 35 virtual void SetUp() {
36 rtp_header_.webrtc.header.sequenceNumber = 0; 36 rtp_header_.webrtc.header.sequenceNumber = 0;
37 rtp_header_.webrtc.header.timestamp = 0; 37 rtp_header_.webrtc.header.timestamp = 0;
38 rtp_header_.webrtc.header.ssrc = kSsrc; 38 rtp_header_.webrtc.header.ssrc = kSsrc;
39 } 39 }
40 40
41 uint32 ExpectedJitter(uint32 const_interval, int num_packets) { 41 uint32 ExpectedJitter(uint32 const_interval, int num_packets) {
42 float jitter = 0; 42 float jitter = 0;
43 // Assume timestamps have a constant kStdTimeIncrementMs interval. 43 // Assume timestamps have a constant kStdTimeIncrementMs interval.
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 EXPECT_FALSE(fraction_lost_); 148 EXPECT_FALSE(fraction_lost_);
149 EXPECT_FALSE(cumulative_lost_); 149 EXPECT_FALSE(cumulative_lost_);
150 // Build extended sequence number (one wrap cycle). 150 // Build extended sequence number (one wrap cycle).
151 uint32 extended_seq_num = rtp_header_.webrtc.header.sequenceNumber - 1; 151 uint32 extended_seq_num = rtp_header_.webrtc.header.sequenceNumber - 1;
152 EXPECT_EQ(extended_seq_num, extended_high_sequence_number_); 152 EXPECT_EQ(extended_seq_num, extended_high_sequence_number_);
153 EXPECT_EQ(ExpectedJitter(kStdTimeIncrementMs, 300), jitter_); 153 EXPECT_EQ(ExpectedJitter(kStdTimeIncrementMs, 300), jitter_);
154 } 154 }
155 155
156 } // namespace cast 156 } // namespace cast
157 } // namespace media 157 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/rtp_common/mock_rtp_payload_feedback.cc ('k') | media/cast/rtp_receiver/rtp_parser/rtp_parser.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698