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

Side by Side Diff: media/cast/audio_receiver/audio_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 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/bind.h" 5 #include "base/bind.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/test/simple_test_tick_clock.h" 8 #include "base/test/simple_test_tick_clock.h"
9 #include "media/cast/audio_receiver/audio_receiver.h" 9 #include "media/cast/audio_receiver/audio_receiver.h"
10 #include "media/cast/cast_defines.h" 10 #include "media/cast/cast_defines.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // Configure the audio receiver to use PCM16. 70 // Configure the audio receiver to use PCM16.
71 audio_config_.rtp_payload_type = 127; 71 audio_config_.rtp_payload_type = 127;
72 audio_config_.frequency = 16000; 72 audio_config_.frequency = 16000;
73 audio_config_.channels = 1; 73 audio_config_.channels = 1;
74 audio_config_.codec = kPcm16; 74 audio_config_.codec = kPcm16;
75 audio_config_.use_external_decoder = false; 75 audio_config_.use_external_decoder = false;
76 testing_clock_.Advance( 76 testing_clock_.Advance(
77 base::TimeDelta::FromMilliseconds(kStartMillisecond)); 77 base::TimeDelta::FromMilliseconds(kStartMillisecond));
78 task_runner_ = new test::FakeTaskRunner(&testing_clock_); 78 task_runner_ = new test::FakeTaskRunner(&testing_clock_);
79 cast_environment_ = new CastEnvironment(&testing_clock_, task_runner_, 79 cast_environment_ = new CastEnvironment(&testing_clock_, task_runner_,
80 task_runner_, task_runner_, task_runner_, task_runner_); 80 task_runner_, task_runner_, task_runner_, task_runner_,
81 GetDefaultCastLoggingConfig());
81 test_audio_encoder_callback_ = new TestAudioEncoderCallback(); 82 test_audio_encoder_callback_ = new TestAudioEncoderCallback();
82 } 83 }
83 84
84 void Configure(bool use_external_decoder) { 85 void Configure(bool use_external_decoder) {
85 audio_config_.use_external_decoder = use_external_decoder; 86 audio_config_.use_external_decoder = use_external_decoder;
86 receiver_.reset(new PeerAudioReceiver(cast_environment_, audio_config_, 87 receiver_.reset(new PeerAudioReceiver(cast_environment_, audio_config_,
87 &mock_transport_)); 88 &mock_transport_));
88 } 89 }
89 90
90 virtual ~AudioReceiverTest() {} 91 virtual ~AudioReceiverTest() {}
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 task_runner_->RunTasks(); 207 task_runner_->RunTasks();
207 EXPECT_EQ(3, test_audio_encoder_callback_->number_times_called()); 208 EXPECT_EQ(3, test_audio_encoder_callback_->number_times_called());
208 } 209 }
209 210
210 // TODO(mikhal): Add encoded frames. 211 // TODO(mikhal): Add encoded frames.
211 TEST_F(AudioReceiverTest, GetRawFrame) { 212 TEST_F(AudioReceiverTest, GetRawFrame) {
212 } 213 }
213 214
214 } // namespace cast 215 } // namespace cast
215 } // namespace media 216 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/audio_receiver/audio_receiver.cc ('k') | media/cast/audio_sender/audio_encoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698