| 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 "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
| 6 #include "base/test/simple_test_tick_clock.h" | 6 #include "base/test/simple_test_tick_clock.h" |
| 7 #include "media/cast/cast_environment.h" | 7 #include "media/cast/cast_environment.h" |
| 8 #include "media/cast/net/cast_transport_defines.h" | 8 #include "media/cast/net/cast_transport_defines.h" |
| 9 #include "media/cast/net/rtcp/rtcp_utility.h" | 9 #include "media/cast/net/rtcp/rtcp_utility.h" |
| 10 #include "media/cast/net/rtcp/test_rtcp_packet_builder.h" | 10 #include "media/cast/net/rtcp/test_rtcp_packet_builder.h" |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 // Expected to be ignored since the source ssrc does not match our | 240 // Expected to be ignored since the source ssrc does not match our |
| 241 // local ssrc. | 241 // local ssrc. |
| 242 RtcpParser parser1(kSourceSsrc, 0); | 242 RtcpParser parser1(kSourceSsrc, 0); |
| 243 EXPECT_TRUE(parser1.Parse(p.Reader())); | 243 EXPECT_TRUE(parser1.Parse(p.Reader())); |
| 244 EXPECT_FALSE(HasAnything(parser1)); | 244 EXPECT_FALSE(HasAnything(parser1)); |
| 245 | 245 |
| 246 // Expected to be pass through since the sender ssrc match our local ssrc. | 246 // Expected to be pass through since the sender ssrc match our local ssrc. |
| 247 RtcpParser parser2(kSourceSsrc, kSenderSsrc); | 247 RtcpParser parser2(kSourceSsrc, kSenderSsrc); |
| 248 EXPECT_TRUE(parser2.Parse(p.Reader())); | 248 EXPECT_TRUE(parser2.Parse(p.Reader())); |
| 249 ExpectSenderInfo(parser2); | 249 ExpectSenderInfo(parser2); |
| 250 ExpectLastReport(parser2); | 250 // DLRRs are ignored. |
| 251 EXPECT_FALSE(parser2.has_last_report()); |
| 251 } | 252 } |
| 252 | 253 |
| 253 TEST_F(RtcpParserTest, InjectReceiverReportPacketWithRrtr) { | 254 TEST_F(RtcpParserTest, InjectReceiverReportPacketWithRrtr) { |
| 254 TestRtcpPacketBuilder p1; | 255 TestRtcpPacketBuilder p1; |
| 255 p1.AddRr(kSenderSsrc, 1); | 256 p1.AddRr(kSenderSsrc, 1); |
| 256 p1.AddRb(kUnknownSsrc); | 257 p1.AddRb(kUnknownSsrc); |
| 257 p1.AddXrHeader(kSenderSsrc); | 258 p1.AddXrHeader(kSenderSsrc); |
| 258 p1.AddXrRrtrBlock(); | 259 p1.AddXrRrtrBlock(); |
| 259 | 260 |
| 260 // Expected to be ignored since the source ssrc does not match our | 261 // Expected to be ignored since the source ssrc does not match our |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 p.AddReceiverEventLog(kDelayDeltaMs, FRAME_ACK_SENT, 0); | 393 p.AddReceiverEventLog(kDelayDeltaMs, FRAME_ACK_SENT, 0); |
| 393 } | 394 } |
| 394 | 395 |
| 395 RtcpParser parser(kSourceSsrc, kSenderSsrc); | 396 RtcpParser parser(kSourceSsrc, kSenderSsrc); |
| 396 EXPECT_TRUE(parser.Parse(p.Reader())); | 397 EXPECT_TRUE(parser.Parse(p.Reader())); |
| 397 ExpectReceiverLog(parser, receiver_log); | 398 ExpectReceiverLog(parser, receiver_log); |
| 398 } | 399 } |
| 399 | 400 |
| 400 } // namespace cast | 401 } // namespace cast |
| 401 } // namespace media | 402 } // namespace media |
| OLD | NEW |