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

Side by Side Diff: media/base/pipeline_unittest.cc

Issue 10855051: Use enum instead of string in MessageLoopFactory::GetMessageLoop* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 4 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/base/pipeline.cc ('k') | media/filters/ffmpeg_audio_decoder.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/threading/simple_thread.h" 10 #include "base/threading/simple_thread.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 // TODO(scherkus): even though some filters are initialized on separate 86 // TODO(scherkus): even though some filters are initialized on separate
87 // threads these test aren't flaky... why? It's because filters' Initialize() 87 // threads these test aren't flaky... why? It's because filters' Initialize()
88 // is executed on |message_loop_| and the mock filters instantly call 88 // is executed on |message_loop_| and the mock filters instantly call
89 // InitializationComplete(), which keeps the pipeline humming along. If 89 // InitializationComplete(), which keeps the pipeline humming along. If
90 // either filters don't call InitializationComplete() immediately or filter 90 // either filters don't call InitializationComplete() immediately or filter
91 // initialization is moved to a separate thread this test will become flaky. 91 // initialization is moved to a separate thread this test will become flaky.
92 class PipelineTest : public ::testing::Test { 92 class PipelineTest : public ::testing::Test {
93 public: 93 public:
94 PipelineTest() 94 PipelineTest()
95 : pipeline_(new Pipeline(&message_loop_, new MediaLog())) { 95 : pipeline_(new Pipeline(message_loop_.message_loop_proxy(),
96 new MediaLog())) {
96 mocks_.reset(new MockFilterCollection()); 97 mocks_.reset(new MockFilterCollection());
97 98
98 // InitializeDemuxer() adds overriding expectations for expected non-NULL 99 // InitializeDemuxer() adds overriding expectations for expected non-NULL
99 // streams. 100 // streams.
100 DemuxerStream* null_pointer = NULL; 101 DemuxerStream* null_pointer = NULL;
101 EXPECT_CALL(*mocks_->demuxer(), GetStream(_)) 102 EXPECT_CALL(*mocks_->demuxer(), GetStream(_))
102 .WillRepeatedly(Return(null_pointer)); 103 .WillRepeatedly(Return(null_pointer));
103 104
104 EXPECT_CALL(*mocks_->demuxer(), GetStartTime()) 105 EXPECT_CALL(*mocks_->demuxer(), GetStartTime())
105 .WillRepeatedly(Return(base::TimeDelta())); 106 .WillRepeatedly(Return(base::TimeDelta()));
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1295 INSTANTIATE_TEARDOWN_TEST(Error, InitAudioRenderer); 1296 INSTANTIATE_TEARDOWN_TEST(Error, InitAudioRenderer);
1296 INSTANTIATE_TEARDOWN_TEST(Error, InitVideoRenderer); 1297 INSTANTIATE_TEARDOWN_TEST(Error, InitVideoRenderer);
1297 INSTANTIATE_TEARDOWN_TEST(Error, Pausing); 1298 INSTANTIATE_TEARDOWN_TEST(Error, Pausing);
1298 INSTANTIATE_TEARDOWN_TEST(Error, Flushing); 1299 INSTANTIATE_TEARDOWN_TEST(Error, Flushing);
1299 INSTANTIATE_TEARDOWN_TEST(Error, Seeking); 1300 INSTANTIATE_TEARDOWN_TEST(Error, Seeking);
1300 INSTANTIATE_TEARDOWN_TEST(Error, Prerolling); 1301 INSTANTIATE_TEARDOWN_TEST(Error, Prerolling);
1301 INSTANTIATE_TEARDOWN_TEST(Error, Starting); 1302 INSTANTIATE_TEARDOWN_TEST(Error, Starting);
1302 INSTANTIATE_TEARDOWN_TEST(Error, Playing); 1303 INSTANTIATE_TEARDOWN_TEST(Error, Playing);
1303 1304
1304 } // namespace media 1305 } // namespace media
OLDNEW
« no previous file with comments | « media/base/pipeline.cc ('k') | media/filters/ffmpeg_audio_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698