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

Side by Side Diff: media/cast/transport/rtcp/rtcp_builder_unittest.cc

Issue 126843003: Revert of Cast:Adding cast_transport_config and cleaning up (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months 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/rtcp/rtcp_utility.h" 9 #include "media/cast/rtcp/rtcp_utility.h"
10 #include "media/cast/rtcp/test_rtcp_packet_builder.h" 10 #include "media/cast/rtcp/test_rtcp_packet_builder.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 void SetExpectedRtcpPacket(const uint8* rtcp_buffer, size_t length) { 46 void SetExpectedRtcpPacket(const uint8* rtcp_buffer, size_t length) {
47 expected_packet_length_ = length; 47 expected_packet_length_ = length;
48 memcpy(expected_packet_, rtcp_buffer, length); 48 memcpy(expected_packet_, rtcp_buffer, length);
49 } 49 }
50 50
51 int packet_count() const { return packet_count_; } 51 int packet_count() const { return packet_count_; }
52 52
53 private: 53 private:
54 uint8 expected_packet_[kMaxIpPacketSize]; 54 uint8 expected_packet_[kIpPacketSize];
55 size_t expected_packet_length_; 55 size_t expected_packet_length_;
56 int packet_count_; 56 int packet_count_;
57 }; 57 };
58 58
59 class RtcpBuilderTest : public ::testing::Test { 59 class RtcpBuilderTest : public ::testing::Test {
60 protected: 60 protected:
61 RtcpBuilderTest() 61 RtcpBuilderTest()
62 : task_runner_(new test::FakeTaskRunner(&testing_clock_)), 62 : task_runner_(new test::FakeTaskRunner(&testing_clock_)),
63 cast_environment_(new CastEnvironment(&testing_clock_, task_runner_, 63 cast_environment_(new CastEnvironment(&testing_clock_, task_runner_,
64 task_runner_, task_runner_, task_runner_, task_runner_, 64 task_runner_, task_runner_, task_runner_, task_runner_,
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 &sender_info, 199 &sender_info,
200 NULL, 200 NULL,
201 &sender_log); 201 &sender_log);
202 202
203 EXPECT_EQ(1, test_transport_.packet_count()); 203 EXPECT_EQ(1, test_transport_.packet_count());
204 EXPECT_EQ(41u, sender_log.size()); 204 EXPECT_EQ(41u, sender_log.size());
205 } 205 }
206 206
207 } // namespace cast 207 } // namespace cast
208 } // namespace media 208 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/transport/rtcp/rtcp_builder.cc ('k') | media/cast/transport/rtp_sender/packet_storage/packet_storage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698