OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stdint.h> |
| 6 |
| 7 #include "base/macros.h" |
| 8 #include "media/cast/net/cast_transport_defines.h" |
5 #include "media/cast/net/rtp/frame_buffer.h" | 9 #include "media/cast/net/rtp/frame_buffer.h" |
6 #include "media/cast/net/cast_transport_defines.h" | |
7 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
8 | 11 |
9 namespace media { | 12 namespace media { |
10 namespace cast { | 13 namespace cast { |
11 | 14 |
12 class FrameBufferTest : public ::testing::Test { | 15 class FrameBufferTest : public ::testing::Test { |
13 protected: | 16 protected: |
14 FrameBufferTest() { | 17 FrameBufferTest() { |
15 payload_.assign(kMaxIpPacketSize, 0); | 18 payload_.assign(kMaxIpPacketSize, 0); |
16 } | 19 } |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 buffer_.InsertPacket(&payload_[0], payload_.size(), rtp_header_); | 85 buffer_.InsertPacket(&payload_[0], payload_.size(), rtp_header_); |
83 EXPECT_FALSE(buffer_.Complete()); | 86 EXPECT_FALSE(buffer_.Complete()); |
84 // Insert missing packet. | 87 // Insert missing packet. |
85 rtp_header_.packet_id = 2; | 88 rtp_header_.packet_id = 2; |
86 buffer_.InsertPacket(&payload_[0], payload_.size(), rtp_header_); | 89 buffer_.InsertPacket(&payload_[0], payload_.size(), rtp_header_); |
87 EXPECT_TRUE(buffer_.Complete()); | 90 EXPECT_TRUE(buffer_.Complete()); |
88 } | 91 } |
89 | 92 |
90 } // namespace media | 93 } // namespace media |
91 } // namespace cast | 94 } // namespace cast |
OLD | NEW |