OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 |
11 #include <map> | 11 #include <map> |
12 #include <memory> | 12 #include <memory> |
13 #include <set> | 13 #include <set> |
14 | 14 |
15 #include "webrtc/test/gmock.h" | |
16 #include "webrtc/test/gtest.h" | |
17 | |
18 #include "webrtc/base/rate_limiter.h" | 15 #include "webrtc/base/rate_limiter.h" |
19 #include "webrtc/common_types.h" | 16 #include "webrtc/common_types.h" |
20 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" | 17 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" |
21 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 18 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
22 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h" | 19 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h" |
23 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/nack.h" | 20 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/nack.h" |
24 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h" | 21 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h" |
| 22 #include "webrtc/test/gmock.h" |
| 23 #include "webrtc/test/gtest.h" |
25 #include "webrtc/test/rtcp_packet_parser.h" | 24 #include "webrtc/test/rtcp_packet_parser.h" |
26 | 25 |
27 using ::testing::_; | 26 using ::testing::_; |
28 using ::testing::ElementsAre; | 27 using ::testing::ElementsAre; |
29 using ::testing::NiceMock; | 28 using ::testing::NiceMock; |
30 using ::testing::Return; | 29 using ::testing::Return; |
31 using ::testing::SaveArg; | 30 using ::testing::SaveArg; |
32 | 31 |
33 namespace webrtc { | 32 namespace webrtc { |
34 namespace { | 33 namespace { |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 EXPECT_EQ(6U, receiver_.RtcpSent().unique_nack_requests); | 548 EXPECT_EQ(6U, receiver_.RtcpSent().unique_nack_requests); |
550 EXPECT_THAT(receiver_.LastNackListSent(), ElementsAre(11, 18, 20, 21)); | 549 EXPECT_THAT(receiver_.LastNackListSent(), ElementsAre(11, 18, 20, 21)); |
551 | 550 |
552 // Send module receives the request. | 551 // Send module receives the request. |
553 EXPECT_EQ(2U, sender_.RtcpReceived().nack_packets); | 552 EXPECT_EQ(2U, sender_.RtcpReceived().nack_packets); |
554 EXPECT_EQ(8U, sender_.RtcpReceived().nack_requests); | 553 EXPECT_EQ(8U, sender_.RtcpReceived().nack_requests); |
555 EXPECT_EQ(6U, sender_.RtcpReceived().unique_nack_requests); | 554 EXPECT_EQ(6U, sender_.RtcpReceived().unique_nack_requests); |
556 EXPECT_EQ(75, sender_.RtcpReceived().UniqueNackRequestsInPercent()); | 555 EXPECT_EQ(75, sender_.RtcpReceived().UniqueNackRequestsInPercent()); |
557 } | 556 } |
558 } // namespace webrtc | 557 } // namespace webrtc |
OLD | NEW |