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

Side by Side Diff: content/browser/renderer_host/media/audio_renderer_host_unittest.cc

Issue 11878032: Plumb |input_channels| all the way to AudioManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/environment.h" 6 #include "base/environment.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/sync_socket.h" 10 #include "base/sync_socket.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 EXPECT_CALL(*host_, OnStreamCreated(kStreamId, _)) 205 EXPECT_CALL(*host_, OnStreamCreated(kStreamId, _))
206 .WillOnce(QuitMessageLoop(message_loop_.get())); 206 .WillOnce(QuitMessageLoop(message_loop_.get()));
207 207
208 // Send a create stream message to the audio output stream and wait until 208 // Send a create stream message to the audio output stream and wait until
209 // we receive the created message. 209 // we receive the created message.
210 host_->OnCreateStream(kStreamId, 210 host_->OnCreateStream(kStreamId,
211 media::AudioParameters( 211 media::AudioParameters(
212 media::AudioParameters::AUDIO_FAKE, 212 media::AudioParameters::AUDIO_FAKE,
213 media::CHANNEL_LAYOUT_STEREO, 213 media::CHANNEL_LAYOUT_STEREO,
214 media::AudioParameters::kAudioCDSampleRate, 16, 214 media::AudioParameters::kAudioCDSampleRate, 16,
215 media::AudioParameters::kAudioCDSampleRate / 10), 215 media::AudioParameters::kAudioCDSampleRate / 10));
216 0);
217 message_loop_->Run(); 216 message_loop_->Run();
218 217
219 // Simulate the renderer process associating a stream with a render view. 218 // Simulate the renderer process associating a stream with a render view.
220 EXPECT_CALL(mirroring_manager_, 219 EXPECT_CALL(mirroring_manager_,
221 RemoveDiverter(kRenderProcessId, MSG_ROUTING_NONE, _)) 220 RemoveDiverter(kRenderProcessId, MSG_ROUTING_NONE, _))
222 .RetiresOnSaturation(); 221 .RetiresOnSaturation();
223 EXPECT_CALL(mirroring_manager_, 222 EXPECT_CALL(mirroring_manager_,
224 AddDiverter(kRenderProcessId, kRenderViewId, NotNull())) 223 AddDiverter(kRenderProcessId, kRenderViewId, NotNull()))
225 .RetiresOnSaturation(); 224 .RetiresOnSaturation();
226 host_->OnAssociateStreamWithProducer(kStreamId, kRenderViewId); 225 host_->OnAssociateStreamWithProducer(kStreamId, kRenderViewId);
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 TEST_F(AudioRendererHostTest, SimulateErrorAndClose) { 387 TEST_F(AudioRendererHostTest, SimulateErrorAndClose) {
389 Create(); 388 Create();
390 Play(); 389 Play();
391 SimulateError(); 390 SimulateError();
392 Close(); 391 Close();
393 } 392 }
394 393
395 // TODO(hclam): Add tests for data conversation in low latency mode. 394 // TODO(hclam): Add tests for data conversation in low latency mode.
396 395
397 } // namespace content 396 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/audio_renderer_host.cc ('k') | content/common/media/audio_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698