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

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

Issue 4653005: Move FilterType into MediaFilterCollection (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed windows build buster & presubmit check failure Created 10 years, 1 month 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/base/pipeline_impl.cc ('k') | media/tools/player_wtl/movie.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) 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 #include <vector> 5 #include <vector>
6 6
7 #include "media/base/mock_filters.h" 7 #include "media/base/mock_filters.h"
8 #include "media/base/mock_task.h" 8 #include "media/base/mock_task.h"
9 #include "media/filters/decoder_base.h" 9 #include "media/filters/decoder_base.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 class MockDecoderImpl : public media::DecoderBase< 61 class MockDecoderImpl : public media::DecoderBase<
62 MockDecoder, MockDecoderOutput> { 62 MockDecoder, MockDecoderOutput> {
63 public: 63 public:
64 MockDecoderImpl() { 64 MockDecoderImpl() {
65 media_format_.SetAsString(media::MediaFormat::kMimeType, "mock"); 65 media_format_.SetAsString(media::MediaFormat::kMimeType, "mock");
66 } 66 }
67 67
68 virtual ~MockDecoderImpl() {} 68 virtual ~MockDecoderImpl() {}
69 69
70 virtual media::FilterType filter_type() const {
71 return media::FILTER_VIDEO_DECODER;
72 }
73
74 // DecoderBase Implementations. 70 // DecoderBase Implementations.
75 MOCK_METHOD3(DoInitialize, 71 MOCK_METHOD3(DoInitialize,
76 void(media::DemuxerStream* demuxer_stream, 72 void(media::DemuxerStream* demuxer_stream,
77 bool* success, 73 bool* success,
78 Task* done_cb)); 74 Task* done_cb));
79 MOCK_METHOD1(DoStop, void(Task* done_cb)); 75 MOCK_METHOD1(DoStop, void(Task* done_cb));
80 MOCK_METHOD2(DoSeek, void(base::TimeDelta time, Task* done_cb)); 76 MOCK_METHOD2(DoSeek, void(base::TimeDelta time, Task* done_cb));
81 MOCK_METHOD1(DoDecode, void(media::Buffer* input)); 77 MOCK_METHOD1(DoDecode, void(media::Buffer* input));
82 78
83 private: 79 private:
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // Stop. 157 // Stop.
162 EXPECT_CALL(*decoder, DoStop(_)) 158 EXPECT_CALL(*decoder, DoStop(_))
163 .WillOnce(WithArg<0>(InvokeRunnable())); 159 .WillOnce(WithArg<0>(InvokeRunnable()));
164 EXPECT_CALL(callback, OnFilterCallback()); 160 EXPECT_CALL(callback, OnFilterCallback());
165 EXPECT_CALL(callback, OnCallbackDestroyed()); 161 EXPECT_CALL(callback, OnCallbackDestroyed());
166 decoder->Stop(callback.NewCallback()); 162 decoder->Stop(callback.NewCallback());
167 message_loop.RunAllPending(); 163 message_loop.RunAllPending();
168 } 164 }
169 165
170 } // namespace media 166 } // namespace media
OLDNEW
« no previous file with comments | « media/base/pipeline_impl.cc ('k') | media/tools/player_wtl/movie.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698