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

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

Issue 377003002: Pipeline: Call clock_->SetTime() right before StartPlayingFrom(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix PipelineTest.Seek Created 6 years, 5 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') | no next file » | 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/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/test/simple_test_tick_clock.h" 10 #include "base/test/simple_test_tick_clock.h"
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 streams.push_back(audio_stream()); 507 streams.push_back(audio_stream());
508 streams.push_back(video_stream()); 508 streams.push_back(video_stream());
509 509
510 InitializeDemuxer(&streams, base::TimeDelta::FromSeconds(3000)); 510 InitializeDemuxer(&streams, base::TimeDelta::FromSeconds(3000));
511 InitializeAudioRenderer(audio_stream()); 511 InitializeAudioRenderer(audio_stream());
512 InitializeVideoRenderer(video_stream()); 512 InitializeVideoRenderer(video_stream());
513 513
514 // Initialize then seek! 514 // Initialize then seek!
515 InitializePipeline(PIPELINE_OK); 515 InitializePipeline(PIPELINE_OK);
516 516
517 AddTextStream();
518 message_loop_.RunUntilIdle(); 517 message_loop_.RunUntilIdle();
519 518
520 // Every filter should receive a call to Seek(). 519 // Every filter should receive a call to Seek().
521 base::TimeDelta expected = base::TimeDelta::FromSeconds(2000); 520 base::TimeDelta expected = base::TimeDelta::FromSeconds(2000);
522 ExpectSeek(expected, false); 521 ExpectSeek(expected, false);
523 DoSeek(expected); 522 DoSeek(expected);
524 } 523 }
525 524
526 TEST_F(PipelineTest, SetVolume) { 525 TEST_F(PipelineTest, SetVolume) {
527 CreateAudioStream(); 526 CreateAudioStream();
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 INSTANTIATE_TEARDOWN_TEST(Error, InitDemuxer); 1130 INSTANTIATE_TEARDOWN_TEST(Error, InitDemuxer);
1132 INSTANTIATE_TEARDOWN_TEST(Error, InitAudioRenderer); 1131 INSTANTIATE_TEARDOWN_TEST(Error, InitAudioRenderer);
1133 INSTANTIATE_TEARDOWN_TEST(Error, InitVideoRenderer); 1132 INSTANTIATE_TEARDOWN_TEST(Error, InitVideoRenderer);
1134 INSTANTIATE_TEARDOWN_TEST(Error, Flushing); 1133 INSTANTIATE_TEARDOWN_TEST(Error, Flushing);
1135 INSTANTIATE_TEARDOWN_TEST(Error, Seeking); 1134 INSTANTIATE_TEARDOWN_TEST(Error, Seeking);
1136 INSTANTIATE_TEARDOWN_TEST(Error, Playing); 1135 INSTANTIATE_TEARDOWN_TEST(Error, Playing);
1137 1136
1138 INSTANTIATE_TEARDOWN_TEST(ErrorAndStop, Playing); 1137 INSTANTIATE_TEARDOWN_TEST(ErrorAndStop, Playing);
1139 1138
1140 } // namespace media 1139 } // namespace media
OLDNEW
« no previous file with comments | « media/base/pipeline.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698