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

Unified Diff: media/cast/rtcp/rtcp_receiver_unittest.cc

Issue 69603002: Incorporating logging into Cast (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding scoped_ptr include Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cast/rtcp/rtcp_receiver.cc ('k') | media/cast/rtcp/rtcp_sender.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/rtcp/rtcp_receiver_unittest.cc
diff --git a/media/cast/rtcp/rtcp_receiver_unittest.cc b/media/cast/rtcp/rtcp_receiver_unittest.cc
index 538b35d9a3babf42382f5b04aea6aca60424c558..f3d45f0c1da42e8e78f89617eee95fbc9f46339d 100644
--- a/media/cast/rtcp/rtcp_receiver_unittest.cc
+++ b/media/cast/rtcp/rtcp_receiver_unittest.cc
@@ -3,11 +3,14 @@
// found in the LICENSE file.
#include "base/memory/scoped_ptr.h"
+#include "base/test/simple_test_tick_clock.h"
+#include "media/cast/cast_environment.h"
#include "media/cast/rtcp/mock_rtcp_receiver_feedback.h"
#include "media/cast/rtcp/mock_rtcp_sender_feedback.h"
#include "media/cast/rtcp/rtcp_receiver.h"
#include "media/cast/rtcp/rtcp_utility.h"
#include "media/cast/rtcp/test_rtcp_packet_builder.h"
+#include "media/cast/test/fake_task_runner.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace media {
@@ -61,7 +64,12 @@ class SenderFeedbackCastVerification : public RtcpSenderFeedback {
class RtcpReceiverTest : public ::testing::Test {
protected:
RtcpReceiverTest()
- : rtcp_receiver_(new RtcpReceiver(&mock_sender_feedback_,
+ : task_runner_(new test::FakeTaskRunner(&testing_clock_)),
+ cast_environment_(new CastEnvironment(&testing_clock_, task_runner_,
+ task_runner_, task_runner_, task_runner_, task_runner_,
+ GetDefaultCastLoggingConfig())),
+ rtcp_receiver_(new RtcpReceiver(cast_environment_,
+ &mock_sender_feedback_,
&mock_receiver_feedback_,
&mock_rtt_feedback_,
kSourceSsrc)) {
@@ -104,6 +112,9 @@ class RtcpReceiverTest : public ::testing::Test {
rtcp_receiver_->IncomingRtcpPacket(&rtcp_parser);
}
+ base::SimpleTestTickClock testing_clock_;
+ scoped_refptr<test::FakeTaskRunner> task_runner_;
+ scoped_refptr<CastEnvironment> cast_environment_;
MockRtcpReceiverFeedback mock_receiver_feedback_;
MockRtcpRttFeedback mock_rtt_feedback_;
MockRtcpSenderFeedback mock_sender_feedback_;
@@ -323,7 +334,8 @@ TEST_F(RtcpReceiverTest, InjectReceiverReportPacketWithCastFeedback) {
TEST_F(RtcpReceiverTest, InjectReceiverReportPacketWithCastVerification) {
SenderFeedbackCastVerification sender_feedback_cast_verification;
- RtcpReceiver rtcp_receiver(&sender_feedback_cast_verification,
+ RtcpReceiver rtcp_receiver(cast_environment_,
+ &sender_feedback_cast_verification,
&mock_receiver_feedback_,
&mock_rtt_feedback_,
kSourceSsrc);
« no previous file with comments | « media/cast/rtcp/rtcp_receiver.cc ('k') | media/cast/rtcp/rtcp_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698