OLD | NEW |
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 "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
6 #include "base/test/simple_test_tick_clock.h" | 6 #include "base/test/simple_test_tick_clock.h" |
7 #include "media/cast/framer/cast_message_builder.h" | 7 #include "media/cast/framer/cast_message_builder.h" |
8 #include "media/cast/rtcp/rtcp.h" | 8 #include "media/cast/rtcp/rtcp.h" |
9 #include "media/cast/rtp_common/rtp_defines.h" | 9 #include "media/cast/rtp_common/rtp_defines.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 kSsrc, | 76 kSsrc, |
77 true, | 77 true, |
78 0)) { | 78 0)) { |
79 rtp_header_.webrtc.header.ssrc = kSsrc; | 79 rtp_header_.webrtc.header.ssrc = kSsrc; |
80 rtp_header_.is_key_frame = false; | 80 rtp_header_.is_key_frame = false; |
81 testing_clock_.Advance( | 81 testing_clock_.Advance( |
82 base::TimeDelta::FromMilliseconds(kStartMillisecond)); | 82 base::TimeDelta::FromMilliseconds(kStartMillisecond)); |
83 cast_msg_builder_->set_clock(&testing_clock_); | 83 cast_msg_builder_->set_clock(&testing_clock_); |
84 } | 84 } |
85 | 85 |
86 ~CastMessageBuilderTest() {} | 86 virtual ~CastMessageBuilderTest() {} |
87 | 87 |
88 void SetFrameId(uint8 frame_id) { | 88 void SetFrameId(uint8 frame_id) { |
89 rtp_header_.frame_id = frame_id; | 89 rtp_header_.frame_id = frame_id; |
90 } | 90 } |
91 | 91 |
92 void SetPacketId(uint16 packet_id) { | 92 void SetPacketId(uint16 packet_id) { |
93 rtp_header_.packet_id = packet_id; | 93 rtp_header_.packet_id = packet_id; |
94 } | 94 } |
95 | 95 |
96 void SetMaxPacketId(uint16 max_packet_id) { | 96 void SetMaxPacketId(uint16 max_packet_id) { |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 SetFrameId(frame_id); | 494 SetFrameId(frame_id); |
495 InsertPacket(); | 495 InsertPacket(); |
496 testing_clock_.Advance( | 496 testing_clock_.Advance( |
497 base::TimeDelta::FromMilliseconds(kShortTimeIncrementMs)); | 497 base::TimeDelta::FromMilliseconds(kShortTimeIncrementMs)); |
498 EXPECT_TRUE(feedback_.triggered()); | 498 EXPECT_TRUE(feedback_.triggered()); |
499 EXPECT_EQ(frame_id, feedback_.last_frame_acked()); | 499 EXPECT_EQ(frame_id, feedback_.last_frame_acked()); |
500 } | 500 } |
501 | 501 |
502 } // namespace cast | 502 } // namespace cast |
503 } // namespace media | 503 } // namespace media |
OLD | NEW |