| 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 #include <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "media/base/data_buffer.h" | 8 #include "media/base/data_buffer.h" |
| 9 #include "media/base/mock_callback.h" | 9 #include "media/base/mock_callback.h" |
| 10 #include "media/base/mock_filters.h" | 10 #include "media/base/mock_filters.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 MOCK_METHOD2(DoSeek, void(base::TimeDelta time, Task* done_cb)); | 46 MOCK_METHOD2(DoSeek, void(base::TimeDelta time, Task* done_cb)); |
| 47 MOCK_METHOD1(DoDecode, void(Buffer* input)); | 47 MOCK_METHOD1(DoDecode, void(Buffer* input)); |
| 48 | 48 |
| 49 private: | 49 private: |
| 50 FRIEND_TEST(DecoderBaseTest, FlowControl); | 50 FRIEND_TEST(DecoderBaseTest, FlowControl); |
| 51 | 51 |
| 52 DISALLOW_COPY_AND_ASSIGN(MockDecoderImpl); | 52 DISALLOW_COPY_AND_ASSIGN(MockDecoderImpl); |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 ACTION(Initialize) { | 55 ACTION(Initialize) { |
| 56 base::ScopedTaskRunner done_runner(arg2); | 56 AutoTaskRunner done_runner(arg2); |
| 57 *arg1 = true; | 57 *arg1 = true; |
| 58 } | 58 } |
| 59 | 59 |
| 60 ACTION_P(SaveDecodeRequest, list) { | 60 ACTION_P(SaveDecodeRequest, list) { |
| 61 scoped_refptr<Buffer> buffer(arg0); | 61 scoped_refptr<Buffer> buffer(arg0); |
| 62 list->push_back(buffer); | 62 list->push_back(buffer); |
| 63 } | 63 } |
| 64 | 64 |
| 65 ACTION(CompleteDemuxRequest) { | 65 ACTION(CompleteDemuxRequest) { |
| 66 arg0.Run(new DataBuffer(0)); | 66 arg0.Run(new DataBuffer(0)); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 message_loop.RunAllPending(); | 125 message_loop.RunAllPending(); |
| 126 | 126 |
| 127 // Stop. | 127 // Stop. |
| 128 EXPECT_CALL(*decoder, DoStop(_)) | 128 EXPECT_CALL(*decoder, DoStop(_)) |
| 129 .WillOnce(WithArg<0>(InvokeRunnable())); | 129 .WillOnce(WithArg<0>(InvokeRunnable())); |
| 130 decoder->Stop(NewExpectedCallback()); | 130 decoder->Stop(NewExpectedCallback()); |
| 131 message_loop.RunAllPending(); | 131 message_loop.RunAllPending(); |
| 132 } | 132 } |
| 133 | 133 |
| 134 } // namespace media | 134 } // namespace media |
| OLD | NEW |