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

Side by Side Diff: media/cast/audio_receiver/audio_decoder_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
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/test/simple_test_tick_clock.h" 5 #include "base/test/simple_test_tick_clock.h"
6 #include "media/cast/audio_receiver/audio_decoder.h" 6 #include "media/cast/audio_receiver/audio_decoder.h"
7 #include "media/cast/cast_environment.h" 7 #include "media/cast/cast_environment.h"
8 #include "media/cast/test/fake_single_thread_task_runner.h" 8 #include "media/cast/test/fake_single_thread_task_runner.h"
9 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gmock/include/gmock/gmock.h"
10 10
(...skipping 16 matching lines...) Expand all
27 class AudioDecoderTest : public ::testing::Test { 27 class AudioDecoderTest : public ::testing::Test {
28 protected: 28 protected:
29 AudioDecoderTest() { 29 AudioDecoderTest() {
30 testing_clock_ = new base::SimpleTestTickClock(); 30 testing_clock_ = new base::SimpleTestTickClock();
31 testing_clock_->Advance(base::TimeDelta::FromMilliseconds(1234)); 31 testing_clock_->Advance(base::TimeDelta::FromMilliseconds(1234));
32 task_runner_ = new test::FakeSingleThreadTaskRunner(testing_clock_); 32 task_runner_ = new test::FakeSingleThreadTaskRunner(testing_clock_);
33 cast_environment_ = 33 cast_environment_ =
34 new CastEnvironment(scoped_ptr<base::TickClock>(testing_clock_).Pass(), 34 new CastEnvironment(scoped_ptr<base::TickClock>(testing_clock_).Pass(),
35 task_runner_, 35 task_runner_,
36 task_runner_, 36 task_runner_,
37 task_runner_, 37 task_runner_);
38 GetDefaultCastReceiverLoggingConfig());
39 } 38 }
40 virtual ~AudioDecoderTest() {} 39 virtual ~AudioDecoderTest() {}
41 40
42 void Configure(const AudioReceiverConfig& audio_config) { 41 void Configure(const AudioReceiverConfig& audio_config) {
43 audio_decoder_.reset( 42 audio_decoder_.reset(
44 new AudioDecoder(cast_environment_, audio_config, &cast_feedback_)); 43 new AudioDecoder(cast_environment_, audio_config, &cast_feedback_));
45 } 44 }
46 45
47 TestRtpPayloadFeedback cast_feedback_; 46 TestRtpPayloadFeedback cast_feedback_;
48 // Owned by CastEnvironment. 47 // Owned by CastEnvironment.
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 for (size_t i = 100 * audio_config.channels; i < audio_frame.samples.size(); 208 for (size_t i = 100 * audio_config.channels; i < audio_frame.samples.size();
210 ++i) { 209 ++i) {
211 EXPECT_NEAR(0x3412, audio_frame.samples[i], 400); 210 EXPECT_NEAR(0x3412, audio_frame.samples[i], 400);
212 if (0x3412 == audio_frame.samples[i]) 211 if (0x3412 == audio_frame.samples[i])
213 count++; 212 count++;
214 } 213 }
215 } 214 }
216 215
217 } // namespace cast 216 } // namespace cast
218 } // namespace media 217 } // namespace media
OLDNEW
« no previous file with comments | « chrome/renderer/media/cast_transport_sender_ipc.cc ('k') | media/cast/audio_receiver/audio_receiver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698