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

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

Issue 210303003: Cast: Remove LoggingStats in favor of event subscribers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile Created 6 years, 8 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
« no previous file with comments | « media/cast/logging/stats_util.cc ('k') | media/cast/rtcp/rtcp_receiver_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ref_counted.h" 5 #include "base/memory/ref_counted.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/test/simple_test_tick_clock.h" 7 #include "base/test/simple_test_tick_clock.h"
8 #include "base/time/tick_clock.h" 8 #include "base/time/tick_clock.h"
9 #include "media/cast/cast_environment.h" 9 #include "media/cast/cast_environment.h"
10 #include "media/cast/logging/logging_defines.h" 10 #include "media/cast/logging/logging_defines.h"
(...skipping 13 matching lines...) Expand all
24 24
25 class ReceiverRtcpEventSubscriberTest : public ::testing::Test { 25 class ReceiverRtcpEventSubscriberTest : public ::testing::Test {
26 protected: 26 protected:
27 ReceiverRtcpEventSubscriberTest() 27 ReceiverRtcpEventSubscriberTest()
28 : testing_clock_(new base::SimpleTestTickClock()), 28 : testing_clock_(new base::SimpleTestTickClock()),
29 task_runner_(new test::FakeSingleThreadTaskRunner(testing_clock_)), 29 task_runner_(new test::FakeSingleThreadTaskRunner(testing_clock_)),
30 cast_environment_(new CastEnvironment( 30 cast_environment_(new CastEnvironment(
31 scoped_ptr<base::TickClock>(testing_clock_).Pass(), 31 scoped_ptr<base::TickClock>(testing_clock_).Pass(),
32 task_runner_, 32 task_runner_,
33 task_runner_, 33 task_runner_,
34 task_runner_, 34 task_runner_)) {}
35 GetLoggingConfigWithRawEventsAndStatsEnabled())) {}
36 35
37 virtual ~ReceiverRtcpEventSubscriberTest() {} 36 virtual ~ReceiverRtcpEventSubscriberTest() {}
38 37
39 virtual void TearDown() OVERRIDE { 38 virtual void TearDown() OVERRIDE {
40 if (event_subscriber_) { 39 if (event_subscriber_) {
41 cast_environment_->Logging()->RemoveRawEventSubscriber( 40 cast_environment_->Logging()->RemoveRawEventSubscriber(
42 event_subscriber_.get()); 41 event_subscriber_.get());
43 } 42 }
44 } 43 }
45 44
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 for (uint32 i = 1u; i <= 10u; ++i) { 111 for (uint32 i = 1u; i <= 10u; ++i) {
113 cast_environment_->Logging()->InsertFrameEvent( 112 cast_environment_->Logging()->InsertFrameEvent(
114 testing_clock_->NowTicks(), kVideoFrameDecoded, 113 testing_clock_->NowTicks(), kVideoFrameDecoded,
115 /*rtp_timestamp*/ i * 10, /*frame_id*/ i); 114 /*rtp_timestamp*/ i * 10, /*frame_id*/ i);
116 } 115 }
117 EXPECT_EQ(10u, event_subscriber_->get_rtcp_events().size()); 116 EXPECT_EQ(10u, event_subscriber_->get_rtcp_events().size());
118 } 117 }
119 118
120 } // namespace cast 119 } // namespace cast
121 } // namespace media 120 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/logging/stats_util.cc ('k') | media/cast/rtcp/rtcp_receiver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698