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

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

Issue 1069253004: Fix MSE playback regression by not changing pipeline duration at EOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
« 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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 SetRendererExpectations(); 623 SetRendererExpectations();
624 StartPipelineAndExpect(PIPELINE_OK); 624 StartPipelineAndExpect(PIPELINE_OK);
625 625
626 AddTextStream(); 626 AddTextStream();
627 627
628 // The ended callback shouldn't run until all renderers have ended. 628 // The ended callback shouldn't run until all renderers have ended.
629 ended_cb_.Run(); 629 ended_cb_.Run();
630 message_loop_.RunUntilIdle(); 630 message_loop_.RunUntilIdle();
631 631
632 EXPECT_CALL(callbacks_, OnEnded()); 632 EXPECT_CALL(callbacks_, OnEnded());
633 // Since the |ended_cb_| is manually invoked above, the duration does not
634 // match the expected duration and is updated upon ended.
635 EXPECT_CALL(callbacks_, OnDurationChange());
636 text_stream()->SendEosNotification(); 633 text_stream()->SendEosNotification();
637 message_loop_.RunUntilIdle(); 634 message_loop_.RunUntilIdle();
638 } 635 }
639 636
640 TEST_F(PipelineTest, ErrorDuringSeek) { 637 TEST_F(PipelineTest, ErrorDuringSeek) {
641 CreateAudioStream(); 638 CreateAudioStream();
642 MockDemuxerStreamVector streams; 639 MockDemuxerStreamVector streams;
643 streams.push_back(audio_stream()); 640 streams.push_back(audio_stream());
644 641
645 SetDemuxerExpectations(&streams); 642 SetDemuxerExpectations(&streams);
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 1005
1009 INSTANTIATE_TEARDOWN_TEST(Error, InitDemuxer); 1006 INSTANTIATE_TEARDOWN_TEST(Error, InitDemuxer);
1010 INSTANTIATE_TEARDOWN_TEST(Error, InitRenderer); 1007 INSTANTIATE_TEARDOWN_TEST(Error, InitRenderer);
1011 INSTANTIATE_TEARDOWN_TEST(Error, Flushing); 1008 INSTANTIATE_TEARDOWN_TEST(Error, Flushing);
1012 INSTANTIATE_TEARDOWN_TEST(Error, Seeking); 1009 INSTANTIATE_TEARDOWN_TEST(Error, Seeking);
1013 INSTANTIATE_TEARDOWN_TEST(Error, Playing); 1010 INSTANTIATE_TEARDOWN_TEST(Error, Playing);
1014 1011
1015 INSTANTIATE_TEARDOWN_TEST(ErrorAndStop, Playing); 1012 INSTANTIATE_TEARDOWN_TEST(ErrorAndStop, Playing);
1016 1013
1017 } // namespace media 1014 } // 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