OLD | NEW |
---|---|
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 Loading... | |
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/04 02:04:41
Same comment as PipelineIntegrationTest.
Srirama
2014/12/04 03:16:46
Sorry, i couldn't get what you mean by.
DaleCurtis
2014/12/04 19:10:43
I meant don't add an EXPECT_CALL that won't always
| |
623 // an OnDurationChange event fired again on OnEnded event if required. | |
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 Loading... | |
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 |
OLD | NEW |