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

Unified Diff: content/renderer/media/audio_renderer_mixer_manager_unittest.cc

Issue 381823003: Allow AudioRendererMixerInputs to be restarted after stopped. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments. Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/base/audio_renderer_mixer_input.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/audio_renderer_mixer_manager_unittest.cc
diff --git a/content/renderer/media/audio_renderer_mixer_manager_unittest.cc b/content/renderer/media/audio_renderer_mixer_manager_unittest.cc
index df6709d99138c47d7ec29ed1ec31eec0e35818b6..cb7293e6c9719b3438a721658e34bc5f44b4c447 100644
--- a/content/renderer/media/audio_renderer_mixer_manager_unittest.cc
+++ b/content/renderer/media/audio_renderer_mixer_manager_unittest.cc
@@ -133,20 +133,22 @@ TEST_F(AudioRendererMixerManagerTest, CreateInput) {
// Create two mixer inputs and ensure this doesn't instantiate any mixers yet.
EXPECT_EQ(mixer_count(), 0);
+ media::FakeAudioRenderCallback callback(0);
scoped_refptr<media::AudioRendererMixerInput> input(
manager_->CreateInput(kRenderViewId, kRenderFrameId));
+ input->Initialize(params, &callback);
EXPECT_EQ(mixer_count(), 0);
+ media::FakeAudioRenderCallback another_callback(1);
scoped_refptr<media::AudioRendererMixerInput> another_input(
manager_->CreateInput(kAnotherRenderViewId, kAnotherRenderFrameId));
+ another_input->Initialize(params, &another_callback);
EXPECT_EQ(mixer_count(), 0);
// Implicitly test that AudioRendererMixerInput was provided with the expected
// callbacks needed to acquire an AudioRendererMixer and remove it.
- media::FakeAudioRenderCallback callback(0);
- input->Initialize(params, &callback);
+ input->Start();
EXPECT_EQ(mixer_count(), 1);
- media::FakeAudioRenderCallback another_callback(1);
- another_input->Initialize(params, &another_callback);
+ another_input->Start();
EXPECT_EQ(mixer_count(), 2);
// Destroying the inputs should destroy the mixers.
« no previous file with comments | « no previous file | media/base/audio_renderer_mixer_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698