diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-27 16:40:40 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-27 16:40:40 +0000 |
commit | 5a40f6beda09a0f259c7c4b7aa249e26612c5285 (patch) | |
tree | 8e1e496b52010d7463a10695ea917110df4fbe20 /media | |
parent | 3dda5b0f1bb73a437ca6e6f2741580451030ac25 (diff) | |
download | chromium_src-5a40f6beda09a0f259c7c4b7aa249e26612c5285.zip chromium_src-5a40f6beda09a0f259c7c4b7aa249e26612c5285.tar.gz chromium_src-5a40f6beda09a0f259c7c4b7aa249e26612c5285.tar.bz2 |
GTTF: more FRIEND_TEST_ALL_PREFIXES
TEST=compile
BUG=44549
Review URL: http://codereview.chromium.org/3064007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53793 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/audio/linux/alsa_output.h | 45 | ||||
-rw-r--r-- | media/base/pipeline_impl.h | 5 | ||||
-rw-r--r-- | media/filters/audio_renderer_algorithm_ola.h | 14 | ||||
-rw-r--r-- | media/filters/bitstream_converter.h | 10 | ||||
-rw-r--r-- | media/filters/ffmpeg_demuxer.h | 4 | ||||
-rw-r--r-- | media/filters/ffmpeg_video_decoder.h | 15 | ||||
-rw-r--r-- | media/filters/file_data_source.h | 8 |
7 files changed, 56 insertions, 45 deletions
diff --git a/media/audio/linux/alsa_output.h b/media/audio/linux/alsa_output.h index 6bc7de9..0fb5ac5 100644 --- a/media/audio/linux/alsa_output.h +++ b/media/audio/linux/alsa_output.h @@ -32,12 +32,12 @@ #include <string> +#include "base/gtest_prod_util.h" #include "base/lock.h" #include "base/ref_counted.h" #include "base/scoped_ptr.h" #include "base/thread.h" #include "media/audio/audio_io.h" -#include "testing/gtest/include/gtest/gtest_prod.h" namespace media { class SeekableBuffer; @@ -91,26 +91,29 @@ class AlsaPcmOutputStream : private: friend class base::RefCountedThreadSafe<AlsaPcmOutputStream>; friend class AlsaPcmOutputStreamTest; - FRIEND_TEST(AlsaPcmOutputStreamTest, AutoSelectDevice_DeviceSelect); - FRIEND_TEST(AlsaPcmOutputStreamTest, AutoSelectDevice_FallbackDevices); - FRIEND_TEST(AlsaPcmOutputStreamTest, AutoSelectDevice_HintFail); - FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket); - FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket_Negative); - FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket_StopStream); - FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket_Underrun); - FRIEND_TEST(AlsaPcmOutputStreamTest, BufferPacket_FullBuffer); - FRIEND_TEST(AlsaPcmOutputStreamTest, ConstructedState); - FRIEND_TEST(AlsaPcmOutputStreamTest, LatencyFloor); - FRIEND_TEST(AlsaPcmOutputStreamTest, OpenClose); - FRIEND_TEST(AlsaPcmOutputStreamTest, PcmOpenFailed); - FRIEND_TEST(AlsaPcmOutputStreamTest, PcmSetParamsFailed); - FRIEND_TEST(AlsaPcmOutputStreamTest, ScheduleNextWrite); - FRIEND_TEST(AlsaPcmOutputStreamTest, ScheduleNextWrite_StopStream); - FRIEND_TEST(AlsaPcmOutputStreamTest, StartStop); - FRIEND_TEST(AlsaPcmOutputStreamTest, WritePacket_FinishedPacket); - FRIEND_TEST(AlsaPcmOutputStreamTest, WritePacket_NormalPacket); - FRIEND_TEST(AlsaPcmOutputStreamTest, WritePacket_StopStream); - FRIEND_TEST(AlsaPcmOutputStreamTest, WritePacket_WriteFails); + FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, + AutoSelectDevice_DeviceSelect); + FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, + AutoSelectDevice_FallbackDevices); + FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, AutoSelectDevice_HintFail); + FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, BufferPacket); + FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, BufferPacket_Negative); + FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, BufferPacket_StopStream); + FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, BufferPacket_Underrun); + FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, BufferPacket_FullBuffer); + FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, ConstructedState); + FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, LatencyFloor); + FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, OpenClose); + FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, PcmOpenFailed); + FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, PcmSetParamsFailed); + FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, ScheduleNextWrite); + FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, + ScheduleNextWrite_StopStream); + FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, StartStop); + FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, WritePacket_FinishedPacket); + FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, WritePacket_NormalPacket); + FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, WritePacket_StopStream); + FRIEND_TEST_ALL_PREFIXES(AlsaPcmOutputStreamTest, WritePacket_WriteFails); virtual ~AlsaPcmOutputStream(); diff --git a/media/base/pipeline_impl.h b/media/base/pipeline_impl.h index 92bec7a..a590b47 100644 --- a/media/base/pipeline_impl.h +++ b/media/base/pipeline_impl.h @@ -11,6 +11,7 @@ #include <string> #include <vector> +#include "base/gtest_prod_util.h" #include "base/message_loop.h" #include "base/ref_counted.h" #include "base/scoped_ptr.h" @@ -19,7 +20,6 @@ #include "media/base/clock_impl.h" #include "media/base/filter_host.h" #include "media/base/pipeline.h" -#include "testing/gtest/include/gtest/gtest_prod.h" namespace media { @@ -414,7 +414,8 @@ class PipelineImpl : public Pipeline, public FilterHost { typedef std::vector<base::Thread*> FilterThreadVector; FilterThreadVector filter_threads_; - FRIEND_TEST(PipelineImplTest, GetBufferedTime); + FRIEND_TEST_ALL_PREFIXES(PipelineImplTest, GetBufferedTime); + DISALLOW_COPY_AND_ASSIGN(PipelineImpl); }; diff --git a/media/filters/audio_renderer_algorithm_ola.h b/media/filters/audio_renderer_algorithm_ola.h index 0dff39f..ac98f684 100644 --- a/media/filters/audio_renderer_algorithm_ola.h +++ b/media/filters/audio_renderer_algorithm_ola.h @@ -14,8 +14,8 @@ #ifndef MEDIA_FILTERS_AUDIO_RENDERER_ALGORITHM_OLA_H_ #define MEDIA_FILTERS_AUDIO_RENDERER_ALGORITHM_OLA_H_ +#include "base/gtest_prod_util.h" #include "media/filters/audio_renderer_algorithm_base.h" -#include "testing/gtest/include/gtest/gtest_prod.h" namespace media { @@ -30,10 +30,14 @@ class AudioRendererAlgorithmOLA : public AudioRendererAlgorithmBase { virtual void set_playback_rate(float new_rate); private: - FRIEND_TEST(AudioRendererAlgorithmOLATest, FillBuffer_NormalRate); - FRIEND_TEST(AudioRendererAlgorithmOLATest, FillBuffer_DoubleRate); - FRIEND_TEST(AudioRendererAlgorithmOLATest, FillBuffer_HalfRate); - FRIEND_TEST(AudioRendererAlgorithmOLATest, FillBuffer_QuarterRate); + FRIEND_TEST_ALL_PREFIXES(AudioRendererAlgorithmOLATest, + FillBuffer_NormalRate); + FRIEND_TEST_ALL_PREFIXES(AudioRendererAlgorithmOLATest, + FillBuffer_DoubleRate); + FRIEND_TEST_ALL_PREFIXES(AudioRendererAlgorithmOLATest, + FillBuffer_HalfRate); + FRIEND_TEST_ALL_PREFIXES(AudioRendererAlgorithmOLATest, + FillBuffer_QuarterRate); // Aligns |value| to a channel and sample boundary. void AlignToSampleBoundary(uint32* value); diff --git a/media/filters/bitstream_converter.h b/media/filters/bitstream_converter.h index d52a4b2..7417209 100644 --- a/media/filters/bitstream_converter.h +++ b/media/filters/bitstream_converter.h @@ -13,10 +13,9 @@ #include <string> #include "base/basictypes.h" +#include "base/gtest_prod_util.h" #include "base/logging.h" -#include "testing/gtest/include/gtest/gtest_prod.h" - // FFmpeg types. struct AVBitStreamFilterContext; struct AVCodecContext; @@ -66,9 +65,10 @@ class FFmpegBitstreamConverter : public BitstreamConverter { virtual bool ConvertPacket(AVPacket* packet); private: - FRIEND_TEST(BitstreamConverterTest, ConvertPacket_FailedFilter); - FRIEND_TEST(BitstreamConverterTest, ConvertPacket_Success); - FRIEND_TEST(BitstreamConverterTest, ConvertPacket_SuccessInPlace); + FRIEND_TEST_ALL_PREFIXES(BitstreamConverterTest, ConvertPacket_FailedFilter); + FRIEND_TEST_ALL_PREFIXES(BitstreamConverterTest, ConvertPacket_Success); + FRIEND_TEST_ALL_PREFIXES(BitstreamConverterTest, + ConvertPacket_SuccessInPlace); std::string filter_name_; AVBitStreamFilterContext* stream_filter_; diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h index 5f6d29f..1d754bd 100644 --- a/media/filters/ffmpeg_demuxer.h +++ b/media/filters/ffmpeg_demuxer.h @@ -26,6 +26,7 @@ #include <vector> #include "base/callback.h" +#include "base/gtest_prod_util.h" #include "base/waitable_event.h" #include "media/base/buffers.h" #include "media/base/factory.h" @@ -33,7 +34,6 @@ #include "media/base/media_format.h" #include "media/filters/ffmpeg_glue.h" #include "media/filters/ffmpeg_interfaces.h" -#include "testing/gtest/include/gtest/gtest_prod.h" // FFmpeg forward declarations. struct AVFormatContext; @@ -150,7 +150,7 @@ class FFmpegDemuxer : public Demuxer, // Only allow a factory to create this class. friend class FilterFactoryImpl0<FFmpegDemuxer>; friend class MockFFmpegDemuxer; - FRIEND_TEST(FFmpegDemuxerTest, ProtocolRead); + FRIEND_TEST_ALL_PREFIXES(FFmpegDemuxerTest, ProtocolRead); FFmpegDemuxer(); virtual ~FFmpegDemuxer(); diff --git a/media/filters/ffmpeg_video_decoder.h b/media/filters/ffmpeg_video_decoder.h index a66f5e5..65c4b75 100644 --- a/media/filters/ffmpeg_video_decoder.h +++ b/media/filters/ffmpeg_video_decoder.h @@ -5,11 +5,11 @@ #ifndef MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ #define MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ +#include "base/gtest_prod_util.h" #include "base/time.h" #include "media/base/pts_heap.h" #include "media/base/video_frame.h" #include "media/filters/decoder_base.h" -#include "testing/gtest/include/gtest/gtest_prod.h" // FFmpeg types. struct AVRational; @@ -41,11 +41,14 @@ class FFmpegVideoDecoder : public DecoderBase<VideoDecoder, VideoFrame> { friend class FilterFactoryImpl1<FFmpegVideoDecoder, VideoDecodeEngine*>; friend class DecoderPrivateMock; friend class FFmpegVideoDecoderTest; - FRIEND_TEST(FFmpegVideoDecoderTest, FindPtsAndDuration); - FRIEND_TEST(FFmpegVideoDecoderTest, DoDecode_EnqueueVideoFrameError); - FRIEND_TEST(FFmpegVideoDecoderTest, DoDecode_FinishEnqueuesEmptyFrames); - FRIEND_TEST(FFmpegVideoDecoderTest, DoDecode_TestStateTransition); - FRIEND_TEST(FFmpegVideoDecoderTest, DoSeek); + FRIEND_TEST_ALL_PREFIXES(FFmpegVideoDecoderTest, FindPtsAndDuration); + FRIEND_TEST_ALL_PREFIXES(FFmpegVideoDecoderTest, + DoDecode_EnqueueVideoFrameError); + FRIEND_TEST_ALL_PREFIXES(FFmpegVideoDecoderTest, + DoDecode_FinishEnqueuesEmptyFrames); + FRIEND_TEST_ALL_PREFIXES(FFmpegVideoDecoderTest, + DoDecode_TestStateTransition); + FRIEND_TEST_ALL_PREFIXES(FFmpegVideoDecoderTest, DoSeek); // The TimeTuple struct is used to hold the needed timestamp data needed for // enqueuing a video frame. diff --git a/media/filters/file_data_source.h b/media/filters/file_data_source.h index 182d5be..4457890 100644 --- a/media/filters/file_data_source.h +++ b/media/filters/file_data_source.h @@ -7,9 +7,9 @@ #include <string> +#include "base/gtest_prod_util.h" #include "base/lock.h" #include "media/base/filters.h" -#include "testing/gtest/include/gtest/gtest_prod.h" namespace media { @@ -38,9 +38,9 @@ class FileDataSource : public DataSource { // // TODO(scherkus): I'm getting tired of these factories getting in the way // of my tests!!! - FRIEND_TEST(FileDataSourceTest, OpenFile); - FRIEND_TEST(FileDataSourceTest, ReadData); - FRIEND_TEST(FileDataSourceTest, Seek); + FRIEND_TEST_ALL_PREFIXES(FileDataSourceTest, OpenFile); + FRIEND_TEST_ALL_PREFIXES(FileDataSourceTest, ReadData); + FRIEND_TEST_ALL_PREFIXES(FileDataSourceTest, Seek); friend class FilterFactoryImpl0<FileDataSource>; FileDataSource(); virtual ~FileDataSource(); |