OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h" | 10 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h" |
11 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h" | 11 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h" |
12 | 12 |
13 #include "webrtc/base/random.h" | |
14 #include "webrtc/modules/rtp_rtcp/include/rtp_header_extension_map.h" | 13 #include "webrtc/modules/rtp_rtcp/include/rtp_header_extension_map.h" |
15 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h" | 14 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h" |
| 15 #include "webrtc/rtc_base/random.h" |
16 #include "webrtc/test/gmock.h" | 16 #include "webrtc/test/gmock.h" |
17 #include "webrtc/test/gtest.h" | 17 #include "webrtc/test/gtest.h" |
18 | 18 |
19 namespace webrtc { | 19 namespace webrtc { |
20 namespace { | 20 namespace { |
21 using ::testing::ElementsAreArray; | 21 using ::testing::ElementsAreArray; |
22 using ::testing::IsEmpty; | 22 using ::testing::IsEmpty; |
23 using ::testing::make_tuple; | 23 using ::testing::make_tuple; |
24 | 24 |
25 constexpr int8_t kPayloadType = 100; | 25 constexpr int8_t kPayloadType = 100; |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 ASSERT_TRUE(packet.Parse(kPacket, sizeof(kPacket))); | 456 ASSERT_TRUE(packet.Parse(kPacket, sizeof(kPacket))); |
457 | 457 |
458 EXPECT_FALSE(packet.HasRawExtension(kInvalidId)); | 458 EXPECT_FALSE(packet.HasRawExtension(kInvalidId)); |
459 EXPECT_THAT(packet.GetRawExtension(kInvalidId), IsEmpty()); | 459 EXPECT_THAT(packet.GetRawExtension(kInvalidId), IsEmpty()); |
460 const uint8_t kExtension[] = {'e', 'x', 't'}; | 460 const uint8_t kExtension[] = {'e', 'x', 't'}; |
461 EXPECT_FALSE(packet.SetRawExtension(kInvalidId, kExtension)); | 461 EXPECT_FALSE(packet.SetRawExtension(kInvalidId, kExtension)); |
462 EXPECT_THAT(packet.AllocateRawExtension(kInvalidId, 3), IsEmpty()); | 462 EXPECT_THAT(packet.AllocateRawExtension(kInvalidId, 3), IsEmpty()); |
463 } | 463 } |
464 | 464 |
465 } // namespace webrtc | 465 } // namespace webrtc |
OLD | NEW |