OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 class MockSendPacketObserver : public SendPacketObserver { | 122 class MockSendPacketObserver : public SendPacketObserver { |
123 public: | 123 public: |
124 MOCK_METHOD3(OnSendPacket, void(uint16_t, int64_t, uint32_t)); | 124 MOCK_METHOD3(OnSendPacket, void(uint16_t, int64_t, uint32_t)); |
125 }; | 125 }; |
126 | 126 |
127 class MockTransportFeedbackObserver : public TransportFeedbackObserver { | 127 class MockTransportFeedbackObserver : public TransportFeedbackObserver { |
128 public: | 128 public: |
129 MOCK_METHOD3(AddPacket, void(uint16_t, size_t, const PacedPacketInfo&)); | 129 MOCK_METHOD3(AddPacket, void(uint16_t, size_t, const PacedPacketInfo&)); |
130 MOCK_METHOD1(OnTransportFeedback, void(const rtcp::TransportFeedback&)); | 130 MOCK_METHOD1(OnTransportFeedback, void(const rtcp::TransportFeedback&)); |
131 MOCK_CONST_METHOD0(GetTransportFeedbackVector, std::vector<PacketInfo>()); | 131 MOCK_CONST_METHOD0(GetTransportFeedbackVector, std::vector<PacketFeedback>()); |
132 }; | 132 }; |
133 | 133 |
134 class RtpSenderTest : public ::testing::Test { | 134 class RtpSenderTest : public ::testing::Test { |
135 protected: | 135 protected: |
136 RtpSenderTest() | 136 RtpSenderTest() |
137 : fake_clock_(kStartTime), | 137 : fake_clock_(kStartTime), |
138 mock_rtc_event_log_(), | 138 mock_rtc_event_log_(), |
139 mock_paced_sender_(), | 139 mock_paced_sender_(), |
140 retransmission_rate_limiter_(&fake_clock_, 1000), | 140 retransmission_rate_limiter_(&fake_clock_, 1000), |
141 rtp_sender_(), | 141 rtp_sender_(), |
(...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1518 | 1518 |
1519 // Requested padding size is too small, will send a larger one. | 1519 // Requested padding size is too small, will send a larger one. |
1520 const size_t kMinPaddingSize = 50; | 1520 const size_t kMinPaddingSize = 50; |
1521 EXPECT_CALL(transport, SendRtp(_, kMinPaddingSize + kRtpHeaderSize, _)) | 1521 EXPECT_CALL(transport, SendRtp(_, kMinPaddingSize + kRtpHeaderSize, _)) |
1522 .WillOnce(testing::Return(true)); | 1522 .WillOnce(testing::Return(true)); |
1523 EXPECT_EQ( | 1523 EXPECT_EQ( |
1524 kMinPaddingSize, | 1524 kMinPaddingSize, |
1525 rtp_sender_->TimeToSendPadding(kMinPaddingSize - 5, PacedPacketInfo())); | 1525 rtp_sender_->TimeToSendPadding(kMinPaddingSize - 5, PacedPacketInfo())); |
1526 } | 1526 } |
1527 } // namespace webrtc | 1527 } // namespace webrtc |
OLD | NEW |