OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef MEDIA_BASE_MOCK_CALLBACK_H_ | 5 #ifndef MEDIA_BASE_MOCK_CALLBACK_H_ |
6 #define MEDIA_BASE_MOCK_CALLBACK_H_ | 6 #define MEDIA_BASE_MOCK_CALLBACK_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "media/base/pipeline_status.h" | 9 #include "media/base/pipeline_status.h" |
10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 void ExpectRunAndDelete(PipelineStatus status); | 66 void ExpectRunAndDelete(PipelineStatus status); |
67 | 67 |
68 private: | 68 private: |
69 DISALLOW_COPY_AND_ASSIGN(MockStatusCallback); | 69 DISALLOW_COPY_AND_ASSIGN(MockStatusCallback); |
70 }; | 70 }; |
71 | 71 |
72 // Convenience functions that automatically create and set an expectation for | 72 // Convenience functions that automatically create and set an expectation for |
73 // the callback to run. | 73 // the callback to run. |
74 MockCallback* NewExpectedCallback(); | 74 MockCallback* NewExpectedCallback(); |
75 MockStatusCallback* NewExpectedStatusCallback(PipelineStatus status); | 75 MockStatusCallback* NewExpectedStatusCallback(PipelineStatus status); |
| 76 base::Callback<void(PipelineStatus)> NewExpectedStatusCB(PipelineStatus status); |
76 | 77 |
77 } // namespace media | 78 } // namespace media |
78 | 79 |
79 #endif // MEDIA_BASE_MOCK_CALLBACK_H_ | 80 #endif // MEDIA_BASE_MOCK_CALLBACK_H_ |
OLD | NEW |