| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 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_ |
| 11 | 11 |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/scoped_ptr.h" | 14 #include "base/scoped_ptr.h" |
| 15 #include "base/waitable_event.h" | |
| 16 #include "media/base/factory.h" | 15 #include "media/base/factory.h" |
| 17 #include "media/base/filter_host.h" | 16 #include "media/base/filter_host.h" |
| 18 #include "media/base/filters.h" | 17 #include "media/base/filters.h" |
| 19 #include "media/base/media_format.h" | 18 #include "media/base/media_format.h" |
| 20 #include "testing/gmock/include/gmock/gmock.h" | 19 #include "testing/gmock/include/gmock/gmock.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
| 22 | 21 |
| 23 namespace media { | 22 namespace media { |
| 24 | 23 |
| 25 class MockFilterHost : public FilterHost { | 24 class MockFilterHost : public FilterHost { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 45 MOCK_METHOD1(SetCurrentReadPosition, void(int64 offset)); | 44 MOCK_METHOD1(SetCurrentReadPosition, void(int64 offset)); |
| 46 MOCK_METHOD0(GetCurrentReadPosition, int64()); | 45 MOCK_METHOD0(GetCurrentReadPosition, int64()); |
| 47 | 46 |
| 48 private: | 47 private: |
| 49 DISALLOW_COPY_AND_ASSIGN(MockFilterHost); | 48 DISALLOW_COPY_AND_ASSIGN(MockFilterHost); |
| 50 }; | 49 }; |
| 51 | 50 |
| 52 } // namespace media | 51 } // namespace media |
| 53 | 52 |
| 54 #endif // MEDIA_BASE_MOCK_FILTER_HOST_H_ | 53 #endif // MEDIA_BASE_MOCK_FILTER_HOST_H_ |
| OLD | NEW |