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

Side by Side Diff: media/base/audio_renderer_mixer_input_unittest.cc

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 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
« no previous file with comments | « media/audio/linux/alsa_output.cc ('k') | media/base/decoder_buffer_unittest.cc » ('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 (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/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "media/base/audio_renderer_mixer.h" 7 #include "media/base/audio_renderer_mixer.h"
8 #include "media/base/audio_renderer_mixer_input.h" 8 #include "media/base/audio_renderer_mixer_input.h"
9 #include "media/base/fake_audio_render_callback.h" 9 #include "media/base/fake_audio_render_callback.h"
10 #include "media/base/mock_audio_renderer_sink.h" 10 #include "media/base/mock_audio_renderer_sink.h"
(...skipping 24 matching lines...) Expand all
35 mixer_input_ = new AudioRendererMixerInput( 35 mixer_input_ = new AudioRendererMixerInput(
36 base::Bind( 36 base::Bind(
37 &AudioRendererMixerInputTest::GetMixer, base::Unretained(this)), 37 &AudioRendererMixerInputTest::GetMixer, base::Unretained(this)),
38 base::Bind( 38 base::Bind(
39 &AudioRendererMixerInputTest::RemoveMixer, base::Unretained(this))); 39 &AudioRendererMixerInputTest::RemoveMixer, base::Unretained(this)));
40 } 40 }
41 41
42 AudioRendererMixer* GetMixer(const AudioParameters& params) { 42 AudioRendererMixer* GetMixer(const AudioParameters& params) {
43 if (!mixer_.get()) { 43 if (!mixer_.get()) {
44 scoped_refptr<MockAudioRendererSink> sink = new MockAudioRendererSink(); 44 scoped_refptr<MockAudioRendererSink> sink = new MockAudioRendererSink();
45 EXPECT_CALL(*sink, Start()); 45 EXPECT_CALL(*sink.get(), Start());
46 EXPECT_CALL(*sink, Stop()); 46 EXPECT_CALL(*sink.get(), Stop());
47 47
48 mixer_.reset(new AudioRendererMixer( 48 mixer_.reset(new AudioRendererMixer(
49 audio_parameters_, audio_parameters_, sink)); 49 audio_parameters_, audio_parameters_, sink));
50 } 50 }
51 return mixer_.get(); 51 return mixer_.get();
52 } 52 }
53 53
54 MOCK_METHOD1(RemoveMixer, void(const AudioParameters&)); 54 MOCK_METHOD1(RemoveMixer, void(const AudioParameters&));
55 55
56 protected: 56 protected:
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 TEST_F(AudioRendererMixerInputTest, StopBeforeInitializeOrStart) { 102 TEST_F(AudioRendererMixerInputTest, StopBeforeInitializeOrStart) {
103 // |mixer_input_| was initialized during construction. 103 // |mixer_input_| was initialized during construction.
104 mixer_input_->Stop(); 104 mixer_input_->Stop();
105 105
106 // Verify Stop() works without Initialize() or Start(). 106 // Verify Stop() works without Initialize() or Start().
107 CreateMixerInput(); 107 CreateMixerInput();
108 mixer_input_->Stop(); 108 mixer_input_->Stop();
109 } 109 }
110 110
111 } // namespace media 111 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/linux/alsa_output.cc ('k') | media/base/decoder_buffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698