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

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

Issue 740663002: Relanding 'Ignore seek operations to the current time in pause state' patch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplified GetMediaTime() as per review Created 6 years 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
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 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 SetRendererExpectations(); 612 SetRendererExpectations();
613 StartPipelineAndExpect(PIPELINE_OK); 613 StartPipelineAndExpect(PIPELINE_OK);
614 614
615 AddTextStream(); 615 AddTextStream();
616 616
617 // The ended callback shouldn't run until all renderers have ended. 617 // The ended callback shouldn't run until all renderers have ended.
618 ended_cb_.Run(); 618 ended_cb_.Run();
619 message_loop_.RunUntilIdle(); 619 message_loop_.RunUntilIdle();
620 620
621 EXPECT_CALL(callbacks_, OnEnded()); 621 EXPECT_CALL(callbacks_, OnEnded());
622 // There are cases where duration is reported wrong initially, so there is
DaleCurtis 2014/12/02 18:14:05 Hmm, doesn't this add a bunch of log spam / error
Srirama 2014/12/03 14:43:02 I thought about it initially but after seeing the
DaleCurtis 2014/12/04 02:04:41 If there's just a few tests which trigger this OnD
Srirama 2014/12/04 03:16:46 will check it.
623 // an onDurationChange event fired again on OnEnded event if required.
DaleCurtis 2014/12/02 18:14:05 s/onDuration/OnDuration/
Srirama 2014/12/03 14:43:02 Done.
624 EXPECT_CALL(callbacks_, OnDurationChange());
622 text_stream()->SendEosNotification(); 625 text_stream()->SendEosNotification();
623 message_loop_.RunUntilIdle(); 626 message_loop_.RunUntilIdle();
624 } 627 }
625 628
626 TEST_F(PipelineTest, ErrorDuringSeek) { 629 TEST_F(PipelineTest, ErrorDuringSeek) {
627 CreateAudioStream(); 630 CreateAudioStream();
628 MockDemuxerStreamVector streams; 631 MockDemuxerStreamVector streams;
629 streams.push_back(audio_stream()); 632 streams.push_back(audio_stream());
630 633
631 SetDemuxerExpectations(&streams); 634 SetDemuxerExpectations(&streams);
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 996
994 INSTANTIATE_TEARDOWN_TEST(Error, InitDemuxer); 997 INSTANTIATE_TEARDOWN_TEST(Error, InitDemuxer);
995 INSTANTIATE_TEARDOWN_TEST(Error, InitRenderer); 998 INSTANTIATE_TEARDOWN_TEST(Error, InitRenderer);
996 INSTANTIATE_TEARDOWN_TEST(Error, Flushing); 999 INSTANTIATE_TEARDOWN_TEST(Error, Flushing);
997 INSTANTIATE_TEARDOWN_TEST(Error, Seeking); 1000 INSTANTIATE_TEARDOWN_TEST(Error, Seeking);
998 INSTANTIATE_TEARDOWN_TEST(Error, Playing); 1001 INSTANTIATE_TEARDOWN_TEST(Error, Playing);
999 1002
1000 INSTANTIATE_TEARDOWN_TEST(ErrorAndStop, Playing); 1003 INSTANTIATE_TEARDOWN_TEST(ErrorAndStop, Playing);
1001 1004
1002 } // namespace media 1005 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698