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

Side by Side Diff: media/cast/audio_sender/audio_sender_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
« no previous file with comments | « media/cast/audio_sender/audio_sender.cc ('k') | media/cast/cast.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 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/bind_helpers.h" 6 #include "base/bind_helpers.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/base/media.h" 9 #include "media/base/media.h"
10 #include "media/cast/audio_sender/audio_sender.h" 10 #include "media/cast/audio_sender/audio_sender.h"
(...skipping 16 matching lines...) Expand all
27 protected: 27 protected:
28 AudioSenderTest() { 28 AudioSenderTest() {
29 InitializeMediaLibraryForTesting(); 29 InitializeMediaLibraryForTesting();
30 testing_clock_.Advance( 30 testing_clock_.Advance(
31 base::TimeDelta::FromMilliseconds(kStartMillisecond)); 31 base::TimeDelta::FromMilliseconds(kStartMillisecond));
32 } 32 }
33 33
34 virtual void SetUp() { 34 virtual void SetUp() {
35 task_runner_ = new test::FakeTaskRunner(&testing_clock_); 35 task_runner_ = new test::FakeTaskRunner(&testing_clock_);
36 cast_environment_ = new CastEnvironment(&testing_clock_, task_runner_, 36 cast_environment_ = new CastEnvironment(&testing_clock_, task_runner_,
37 task_runner_, task_runner_, task_runner_, task_runner_); 37 task_runner_, task_runner_, task_runner_, task_runner_,
38 GetDefaultCastLoggingConfig());
38 audio_config_.codec = kOpus; 39 audio_config_.codec = kOpus;
39 audio_config_.use_external_encoder = false; 40 audio_config_.use_external_encoder = false;
40 audio_config_.frequency = kDefaultAudioSamplingRate; 41 audio_config_.frequency = kDefaultAudioSamplingRate;
41 audio_config_.channels = 2; 42 audio_config_.channels = 2;
42 audio_config_.bitrate = kDefaultAudioEncoderBitrate; 43 audio_config_.bitrate = kDefaultAudioEncoderBitrate;
43 audio_config_.rtp_payload_type = 127; 44 audio_config_.rtp_payload_type = 127;
44 45
45 audio_sender_.reset( 46 audio_sender_.reset(
46 new AudioSender(cast_environment_, audio_config_, &mock_transport_)); 47 new AudioSender(cast_environment_, audio_config_, &mock_transport_));
47 } 48 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 93
93 // Make sure that we send at least one RTCP packet. 94 // Make sure that we send at least one RTCP packet.
94 base::TimeDelta max_rtcp_timeout = 95 base::TimeDelta max_rtcp_timeout =
95 base::TimeDelta::FromMilliseconds(1 + kDefaultRtcpIntervalMs * 3 / 2); 96 base::TimeDelta::FromMilliseconds(1 + kDefaultRtcpIntervalMs * 3 / 2);
96 testing_clock_.Advance(max_rtcp_timeout); 97 testing_clock_.Advance(max_rtcp_timeout);
97 task_runner_->RunTasks(); 98 task_runner_->RunTasks();
98 } 99 }
99 100
100 } // namespace cast 101 } // namespace cast
101 } // namespace media 102 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/audio_sender/audio_sender.cc ('k') | media/cast/cast.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698