Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: media/filters/decoder_base_unittest.cc

Issue 7062013: Move media library AutoTaskRunner to base and rename ScopedTaskRunner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add innocuous but critical BASE_API modifier to ScopedTaskRunner declaration. Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/filters/decoder_base.h ('k') | media/filters/ffmpeg_audio_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 AutoTaskRunner done_runner(arg2); 56 base::ScopedTaskRunner 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
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
OLDNEW
« no previous file with comments | « media/filters/decoder_base.h ('k') | media/filters/ffmpeg_audio_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698