OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
3 // LICENSE file. | 3 // LICENSE file. |
4 // | 4 // |
5 // A FilterHost implementation based on gmock. Combined with setting a message | 5 // A FilterHost implementation based on gmock. Combined with setting a message |
6 // loop on a filter, permits single-threaded testing of filters without | 6 // loop on a filter, permits single-threaded testing of filters without |
7 // requiring a pipeline. | 7 // requiring a pipeline. |
8 | 8 |
9 #ifndef MEDIA_BASE_MOCK_FILTER_HOST_H_ | 9 #ifndef MEDIA_BASE_MOCK_FILTER_HOST_H_ |
10 #define MEDIA_BASE_MOCK_FILTER_HOST_H_ | 10 #define MEDIA_BASE_MOCK_FILTER_HOST_H_ |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
22 | 22 |
23 namespace media { | 23 namespace media { |
24 | 24 |
25 class MockFilterHost : public FilterHost { | 25 class MockFilterHost : public FilterHost { |
26 public: | 26 public: |
27 MockFilterHost() {} | 27 MockFilterHost() {} |
28 | 28 |
29 // FilterHost implementation. | 29 // FilterHost implementation. |
30 MOCK_METHOD0(InitializationComplete, void()); | 30 MOCK_METHOD0(InitializationComplete, void()); |
31 MOCK_METHOD1(Error, void(PipelineError error)); | 31 MOCK_METHOD1(SetError, void(PipelineError error)); |
32 MOCK_CONST_METHOD0(GetTime, base::TimeDelta()); | 32 MOCK_CONST_METHOD0(GetTime, base::TimeDelta()); |
33 MOCK_METHOD1(SetTime, void(base::TimeDelta time)); | 33 MOCK_METHOD1(SetTime, void(base::TimeDelta time)); |
34 MOCK_METHOD1(SetDuration, void(base::TimeDelta duration)); | 34 MOCK_METHOD1(SetDuration, void(base::TimeDelta duration)); |
35 MOCK_METHOD1(SetBufferedTime, void(base::TimeDelta buffered_time)); | 35 MOCK_METHOD1(SetBufferedTime, void(base::TimeDelta buffered_time)); |
36 MOCK_METHOD1(SetTotalBytes, void(int64 total_bytes)); | 36 MOCK_METHOD1(SetTotalBytes, void(int64 total_bytes)); |
37 MOCK_METHOD1(SetBufferedBytes, void(int64 buffered_bytes)); | 37 MOCK_METHOD1(SetBufferedBytes, void(int64 buffered_bytes)); |
38 MOCK_METHOD2(SetVideoSize, void(size_t width, size_t height)); | 38 MOCK_METHOD2(SetVideoSize, void(size_t width, size_t height)); |
39 | 39 |
40 private: | 40 private: |
41 DISALLOW_COPY_AND_ASSIGN(MockFilterHost); | 41 DISALLOW_COPY_AND_ASSIGN(MockFilterHost); |
42 }; | 42 }; |
43 | 43 |
44 } // namespace media | 44 } // namespace media |
45 | 45 |
46 #endif // MEDIA_BASE_MOCK_FILTER_HOST_H_ | 46 #endif // MEDIA_BASE_MOCK_FILTER_HOST_H_ |
OLD | NEW |