| 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/test/simple_test_tick_clock.h" | 5 #include "base/test/simple_test_tick_clock.h" |
| 6 #include "media/cast/cast_defines.h" | 6 #include "media/cast/cast_defines.h" |
| 7 #include "media/cast/cast_environment.h" | 7 #include "media/cast/cast_environment.h" |
| 8 #include "media/cast/rtcp/mock_rtcp_receiver_feedback.h" | 8 #include "media/cast/rtcp/mock_rtcp_receiver_feedback.h" |
| 9 #include "media/cast/rtcp/mock_rtcp_sender_feedback.h" | 9 #include "media/cast/rtcp/mock_rtcp_sender_feedback.h" |
| 10 #include "media/cast/rtcp/rtcp.h" | 10 #include "media/cast/rtcp/rtcp.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 using Rtcp::CheckForWrapAround; | 97 using Rtcp::CheckForWrapAround; |
| 98 using Rtcp::OnReceivedLipSyncInfo; | 98 using Rtcp::OnReceivedLipSyncInfo; |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 class RtcpTest : public ::testing::Test { | 101 class RtcpTest : public ::testing::Test { |
| 102 protected: | 102 protected: |
| 103 RtcpTest() | 103 RtcpTest() |
| 104 : task_runner_(new test::FakeTaskRunner(&testing_clock_)), | 104 : task_runner_(new test::FakeTaskRunner(&testing_clock_)), |
| 105 cast_environment_(new CastEnvironment(&testing_clock_, task_runner_, | 105 cast_environment_(new CastEnvironment(&testing_clock_, task_runner_, |
| 106 task_runner_, task_runner_, task_runner_, task_runner_, | 106 task_runner_, task_runner_, task_runner_, task_runner_, |
| 107 task_runner_, GetDefaultCastLoggingConfig())), | 107 task_runner_, GetDefaultCastSenderLoggingConfig())), |
| 108 transport_(cast_environment_, &testing_clock_) { | 108 transport_(cast_environment_, &testing_clock_) { |
| 109 testing_clock_.Advance( | 109 testing_clock_.Advance( |
| 110 base::TimeDelta::FromMilliseconds(kStartMillisecond)); | 110 base::TimeDelta::FromMilliseconds(kStartMillisecond)); |
| 111 } | 111 } |
| 112 | 112 |
| 113 virtual ~RtcpTest() {} | 113 virtual ~RtcpTest() {} |
| 114 | 114 |
| 115 virtual void SetUp() { | 115 virtual void SetUp() { |
| 116 EXPECT_CALL(mock_sender_feedback_, OnReceivedCastFeedback(_)).Times(0); | 116 EXPECT_CALL(mock_sender_feedback_, OnReceivedCastFeedback(_)).Times(0); |
| 117 } | 117 } |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 rtcp_peer.OnReceivedLipSyncInfo(rtp_timestamp, ntp_seconds, ntp_fractions); | 532 rtcp_peer.OnReceivedLipSyncInfo(rtp_timestamp, ntp_seconds, ntp_fractions); |
| 533 rtp_timestamp = 64000; | 533 rtp_timestamp = 64000; |
| 534 EXPECT_TRUE(rtcp_peer.RtpTimestampInSenderTime(frequency, rtp_timestamp, | 534 EXPECT_TRUE(rtcp_peer.RtpTimestampInSenderTime(frequency, rtp_timestamp, |
| 535 &rtp_timestamp_in_ticks)); | 535 &rtp_timestamp_in_ticks)); |
| 536 EXPECT_EQ(input_time + base::TimeDelta::FromMilliseconds(4000), | 536 EXPECT_EQ(input_time + base::TimeDelta::FromMilliseconds(4000), |
| 537 rtp_timestamp_in_ticks); | 537 rtp_timestamp_in_ticks); |
| 538 } | 538 } |
| 539 | 539 |
| 540 } // namespace cast | 540 } // namespace cast |
| 541 } // namespace media | 541 } // namespace media |
| OLD | NEW |