OLD | NEW |
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 // A new breed of mock media filters, this time using gmock! Feel free to add | 5 // A new breed of mock media filters, this time using gmock! Feel free to add |
6 // actions if you need interesting side-effects. | 6 // actions if you need interesting side-effects. |
7 // | 7 // |
8 // Don't forget you can use StrictMock<> and NiceMock<> if you want the mock | 8 // Don't forget you can use StrictMock<> and NiceMock<> if you want the mock |
9 // filters to fail the test or do nothing when an unexpected method is called. | 9 // filters to fail the test or do nothing when an unexpected method is called. |
10 // http://code.google.com/p/googlemock/wiki/CookBook#Nice_Mocks_and_Strict_Mocks | 10 // http://code.google.com/p/googlemock/wiki/CookBook#Nice_Mocks_and_Strict_Mocks |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 class MockDemuxerStream : public DemuxerStream { | 96 class MockDemuxerStream : public DemuxerStream { |
97 public: | 97 public: |
98 MockDemuxerStream(); | 98 MockDemuxerStream(); |
99 | 99 |
100 // DemuxerStream implementation. | 100 // DemuxerStream implementation. |
101 MOCK_METHOD0(type, Type()); | 101 MOCK_METHOD0(type, Type()); |
102 MOCK_METHOD1(Read, void(const ReadCB& read_cb)); | 102 MOCK_METHOD1(Read, void(const ReadCB& read_cb)); |
103 MOCK_METHOD0(audio_decoder_config, const AudioDecoderConfig&()); | 103 MOCK_METHOD0(audio_decoder_config, const AudioDecoderConfig&()); |
104 MOCK_METHOD0(video_decoder_config, const VideoDecoderConfig&()); | 104 MOCK_METHOD0(video_decoder_config, const VideoDecoderConfig&()); |
105 MOCK_METHOD0(EnableBitstreamConverter, void()); | 105 MOCK_METHOD0(EnableBitstreamConverter, void()); |
106 MOCK_METHOD0(GetBufferedRanges, Ranges<base::TimeDelta>()); | |
107 | 106 |
108 protected: | 107 protected: |
109 virtual ~MockDemuxerStream(); | 108 virtual ~MockDemuxerStream(); |
110 | 109 |
111 private: | 110 private: |
112 DISALLOW_COPY_AND_ASSIGN(MockDemuxerStream); | 111 DISALLOW_COPY_AND_ASSIGN(MockDemuxerStream); |
113 }; | 112 }; |
114 | 113 |
115 class MockVideoDecoder : public VideoDecoder { | 114 class MockVideoDecoder : public VideoDecoder { |
116 public: | 115 public: |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 public: | 307 public: |
309 MockStatisticsCB(); | 308 MockStatisticsCB(); |
310 ~MockStatisticsCB(); | 309 ~MockStatisticsCB(); |
311 | 310 |
312 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); | 311 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); |
313 }; | 312 }; |
314 | 313 |
315 } // namespace media | 314 } // namespace media |
316 | 315 |
317 #endif // MEDIA_BASE_MOCK_FILTERS_H_ | 316 #endif // MEDIA_BASE_MOCK_FILTERS_H_ |
OLD | NEW |