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

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

Issue 4991003: Revert 66125 -- Broke Windows build - Move FilterType into MediaFilterCollect... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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_x11/player_x11.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
70 // DecoderBase Implementations. 74 // DecoderBase Implementations.
71 MOCK_METHOD3(DoInitialize, 75 MOCK_METHOD3(DoInitialize,
72 void(media::DemuxerStream* demuxer_stream, 76 void(media::DemuxerStream* demuxer_stream,
73 bool* success, 77 bool* success,
74 Task* done_cb)); 78 Task* done_cb));
75 MOCK_METHOD1(DoStop, void(Task* done_cb)); 79 MOCK_METHOD1(DoStop, void(Task* done_cb));
76 MOCK_METHOD2(DoSeek, void(base::TimeDelta time, Task* done_cb)); 80 MOCK_METHOD2(DoSeek, void(base::TimeDelta time, Task* done_cb));
77 MOCK_METHOD1(DoDecode, void(media::Buffer* input)); 81 MOCK_METHOD1(DoDecode, void(media::Buffer* input));
78 82
79 private: 83 private:
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // Stop. 161 // Stop.
158 EXPECT_CALL(*decoder, DoStop(_)) 162 EXPECT_CALL(*decoder, DoStop(_))
159 .WillOnce(WithArg<0>(InvokeRunnable())); 163 .WillOnce(WithArg<0>(InvokeRunnable()));
160 EXPECT_CALL(callback, OnFilterCallback()); 164 EXPECT_CALL(callback, OnFilterCallback());
161 EXPECT_CALL(callback, OnCallbackDestroyed()); 165 EXPECT_CALL(callback, OnCallbackDestroyed());
162 decoder->Stop(callback.NewCallback()); 166 decoder->Stop(callback.NewCallback());
163 message_loop.RunAllPending(); 167 message_loop.RunAllPending();
164 } 168 }
165 169
166 } // namespace media 170 } // namespace media
OLDNEW
« no previous file with comments | « media/base/pipeline_impl.cc ('k') | media/tools/player_x11/player_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698