diff options
author | dalecurtis@chromium.org <dalecurtis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-30 21:53:48 +0000 |
---|---|---|
committer | dalecurtis@chromium.org <dalecurtis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-30 21:53:48 +0000 |
commit | c10660540a92b9b9871c123061303b4c1b7118d2 (patch) | |
tree | 7128dcf4b96ad903279161109017410a489257e3 /media/audio/mock_audio_source_callback.h | |
parent | dcd5d4d3c3bc357d98a143a4e91c59257f86f482 (diff) | |
download | chromium_src-c10660540a92b9b9871c123061303b4c1b7118d2.zip chromium_src-c10660540a92b9b9871c123061303b4c1b7118d2.tar.gz chromium_src-c10660540a92b9b9871c123061303b4c1b7118d2.tar.bz2 |
Factorize MockAudioSourceCallback out of many unittests.
BUG=none
TEST=tests still pass.
Review URL: https://codereview.chromium.org/140613007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248043 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/mock_audio_source_callback.h')
-rw-r--r-- | media/audio/mock_audio_source_callback.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/media/audio/mock_audio_source_callback.h b/media/audio/mock_audio_source_callback.h new file mode 100644 index 0000000..cbd3850 --- /dev/null +++ b/media/audio/mock_audio_source_callback.h @@ -0,0 +1,31 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef MEDIA_AUDIO_MOCK_AUDIO_SOURCE_CALLBACK_H_ +#define MEDIA_AUDIO_MOCK_AUDIO_SOURCE_CALLBACK_H_ + +#include "media/audio/audio_io.h" +#include "testing/gmock/include/gmock/gmock.h" + +namespace media { + +class MockAudioSourceCallback : public AudioOutputStream::AudioSourceCallback { + public: + MockAudioSourceCallback(); + virtual ~MockAudioSourceCallback(); + + MOCK_METHOD2(OnMoreData, int(AudioBus* audio_bus, + AudioBuffersState buffers_state)); + MOCK_METHOD3(OnMoreIOData, int(AudioBus* source, + AudioBus* dest, + AudioBuffersState buffers_state)); + MOCK_METHOD1(OnError, void(AudioOutputStream* stream)); + + private: + DISALLOW_COPY_AND_ASSIGN(MockAudioSourceCallback); +}; + +} // namespace media + +#endif // MEDIA_AUDIO_MOCK_AUDIO_SOURCE_CALLBACK_H_ |