Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(413)

Side by Side Diff: media/cast/rtcp/rtcp_sender_unittest.cc

Issue 100823015: Cast: move net->transport (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clean up Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_defines.h" 7 #include "media/cast/cast_defines.h"
8 #include "media/cast/cast_environment.h" 8 #include "media/cast/cast_environment.h"
9 #include "media/cast/net/pacing/paced_sender.h"
10 #include "media/cast/rtcp/rtcp_sender.h" 9 #include "media/cast/rtcp/rtcp_sender.h"
11 #include "media/cast/rtcp/rtcp_utility.h" 10 #include "media/cast/rtcp/rtcp_utility.h"
12 #include "media/cast/rtcp/test_rtcp_packet_builder.h" 11 #include "media/cast/rtcp/test_rtcp_packet_builder.h"
13 #include "media/cast/test/fake_task_runner.h" 12 #include "media/cast/test/fake_task_runner.h"
13 #include "media/cast/transport/pacing/paced_sender.h"
14 #include "testing/gmock/include/gmock/gmock.h" 14 #include "testing/gmock/include/gmock/gmock.h"
15 15
16 namespace media { 16 namespace media {
17 namespace cast { 17 namespace cast {
18 18
19 namespace { 19 namespace {
20 static const uint32 kSendingSsrc = 0x12345678; 20 static const uint32 kSendingSsrc = 0x12345678;
21 static const uint32 kMediaSsrc = 0x87654321; 21 static const uint32 kMediaSsrc = 0x87654321;
22 static const std::string kCName("test@10.1.1.1"); 22 static const std::string kCName("test@10.1.1.1");
23 } // namespace 23 } // namespace
24 24
25 class TestRtcpTransport : public PacedPacketSender { 25 class TestRtcpTransport : public transport::PacedPacketSender {
26 public: 26 public:
27 TestRtcpTransport() 27 TestRtcpTransport()
28 : expected_packet_length_(0), 28 : expected_packet_length_(0),
29 packet_count_(0) { 29 packet_count_(0) {
30 } 30 }
31 31
32 virtual bool SendRtcpPacket(const Packet& packet) OVERRIDE { 32 virtual bool SendRtcpPacket(const Packet& packet) OVERRIDE {
33 EXPECT_EQ(expected_packet_length_, packet.size()); 33 EXPECT_EQ(expected_packet_length_, packet.size());
34 EXPECT_EQ(0, memcmp(expected_packet_, &(packet[0]), packet.size())); 34 EXPECT_EQ(0, memcmp(expected_packet_, &(packet[0]), packet.size()));
35 packet_count_++; 35 packet_count_++;
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 NULL, 581 NULL,
582 NULL, 582 NULL,
583 &receiver_log); 583 &receiver_log);
584 584
585 EXPECT_EQ(1, test_transport_.packet_count()); 585 EXPECT_EQ(1, test_transport_.packet_count());
586 EXPECT_EQ(81u, receiver_log.size()); 586 EXPECT_EQ(81u, receiver_log.size());
587 } 587 }
588 588
589 } // namespace cast 589 } // namespace cast
590 } // namespace media 590 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698