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>()); |
106 | 107 |
107 protected: | 108 protected: |
108 virtual ~MockDemuxerStream(); | 109 virtual ~MockDemuxerStream(); |
109 | 110 |
110 private: | 111 private: |
111 DISALLOW_COPY_AND_ASSIGN(MockDemuxerStream); | 112 DISALLOW_COPY_AND_ASSIGN(MockDemuxerStream); |
112 }; | 113 }; |
113 | 114 |
114 class MockVideoDecoder : public VideoDecoder { | 115 class MockVideoDecoder : public VideoDecoder { |
115 public: | 116 public: |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 public: | 308 public: |
308 MockStatisticsCB(); | 309 MockStatisticsCB(); |
309 ~MockStatisticsCB(); | 310 ~MockStatisticsCB(); |
310 | 311 |
311 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); | 312 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); |
312 }; | 313 }; |
313 | 314 |
314 } // namespace media | 315 } // namespace media |
315 | 316 |
316 #endif // MEDIA_BASE_MOCK_FILTERS_H_ | 317 #endif // MEDIA_BASE_MOCK_FILTERS_H_ |
OLD | NEW |