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

Side by Side Diff: media/cast/logging/encoding_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/cast_environment.cc ('k') | media/cast/logging/logging.gyp » ('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/encoding_event_subscriber.h" 10 #include "media/cast/logging/encoding_event_subscriber.h"
(...skipping 19 matching lines...) Expand all
30 30
31 class EncodingEventSubscriberTest : public ::testing::Test { 31 class EncodingEventSubscriberTest : public ::testing::Test {
32 protected: 32 protected:
33 EncodingEventSubscriberTest() 33 EncodingEventSubscriberTest()
34 : testing_clock_(new base::SimpleTestTickClock()), 34 : testing_clock_(new base::SimpleTestTickClock()),
35 task_runner_(new test::FakeSingleThreadTaskRunner(testing_clock_)), 35 task_runner_(new test::FakeSingleThreadTaskRunner(testing_clock_)),
36 cast_environment_(new CastEnvironment( 36 cast_environment_(new CastEnvironment(
37 scoped_ptr<base::TickClock>(testing_clock_).Pass(), 37 scoped_ptr<base::TickClock>(testing_clock_).Pass(),
38 task_runner_, 38 task_runner_,
39 task_runner_, 39 task_runner_,
40 task_runner_, 40 task_runner_)),
41 GetLoggingConfigWithRawEventsAndStatsEnabled())),
42 first_rtp_timestamp_(0) {} 41 first_rtp_timestamp_(0) {}
43 42
44 void Init(EventMediaType event_media_type) { 43 void Init(EventMediaType event_media_type) {
45 DCHECK(!event_subscriber_); 44 DCHECK(!event_subscriber_);
46 event_subscriber_.reset(new EncodingEventSubscriber(event_media_type, 10)); 45 event_subscriber_.reset(new EncodingEventSubscriber(event_media_type, 10));
47 cast_environment_->Logging()->AddRawEventSubscriber( 46 cast_environment_->Logging()->AddRawEventSubscriber(
48 event_subscriber_.get()); 47 event_subscriber_.get());
49 } 48 }
50 49
51 virtual ~EncodingEventSubscriberTest() { 50 virtual ~EncodingEventSubscriberTest() {
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 555
557 FrameEventMap::iterator it = frame_events_.find(0); 556 FrameEventMap::iterator it = frame_events_.find(0);
558 ASSERT_NE(frame_events_.end(), it); 557 ASSERT_NE(frame_events_.end(), it);
559 558
560 it = frame_events_.find(30); 559 it = frame_events_.find(30);
561 ASSERT_NE(frame_events_.end(), it); 560 ASSERT_NE(frame_events_.end(), it);
562 } 561 }
563 562
564 } // namespace cast 563 } // namespace cast
565 } // namespace media 564 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/cast_environment.cc ('k') | media/cast/logging/logging.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698