OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/stl_util-inl.h" | 8 #include "base/stl_util-inl.h" |
9 #include "base/waitable_event.h" | 9 #include "base/waitable_event.h" |
10 #include "media/base/pipeline_impl.h" | 10 #include "media/base/pipeline_impl.h" |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 InitializeVideoDecoder(video_stream()); | 481 InitializeVideoDecoder(video_stream()); |
482 InitializeVideoRenderer(); | 482 InitializeVideoRenderer(); |
483 | 483 |
484 InitializePipeline(); | 484 InitializePipeline(); |
485 EXPECT_TRUE(pipeline_->IsInitialized()); | 485 EXPECT_TRUE(pipeline_->IsInitialized()); |
486 EXPECT_EQ(PIPELINE_OK, pipeline_->GetError()); | 486 EXPECT_EQ(PIPELINE_OK, pipeline_->GetError()); |
487 EXPECT_EQ(kDuration.ToInternalValue(), | 487 EXPECT_EQ(kDuration.ToInternalValue(), |
488 pipeline_->GetMediaDuration().ToInternalValue()); | 488 pipeline_->GetMediaDuration().ToInternalValue()); |
489 EXPECT_EQ(kTotalBytes, pipeline_->GetTotalBytes()); | 489 EXPECT_EQ(kTotalBytes, pipeline_->GetTotalBytes()); |
490 EXPECT_EQ(kBufferedBytes, pipeline_->GetBufferedBytes()); | 490 EXPECT_EQ(kBufferedBytes, pipeline_->GetBufferedBytes()); |
491 EXPECT_EQ(kDuration.ToInternalValue(), | 491 EXPECT_EQ(0, |
492 pipeline_->GetBufferedTime().ToInternalValue()); | 492 pipeline_->GetBufferedTime().ToInternalValue()); |
493 } | 493 } |
494 | 494 |
495 TEST_F(PipelineImplTest, DisableAudioRenderer) { | 495 TEST_F(PipelineImplTest, DisableAudioRenderer) { |
496 CreateAudioStream(); | 496 CreateAudioStream(); |
497 CreateVideoStream(); | 497 CreateVideoStream(); |
498 MockDemuxerStreamVector streams; | 498 MockDemuxerStreamVector streams; |
499 streams.push_back(audio_stream()); | 499 streams.push_back(audio_stream()); |
500 streams.push_back(video_stream()); | 500 streams.push_back(video_stream()); |
501 | 501 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 | 567 |
568 EXPECT_CALL(*mocks_->audio_renderer(), HasEnded()) | 568 EXPECT_CALL(*mocks_->audio_renderer(), HasEnded()) |
569 .WillOnce(Return(true)); | 569 .WillOnce(Return(true)); |
570 EXPECT_CALL(*mocks_->video_renderer(), HasEnded()) | 570 EXPECT_CALL(*mocks_->video_renderer(), HasEnded()) |
571 .WillOnce(Return(true)); | 571 .WillOnce(Return(true)); |
572 EXPECT_CALL(callbacks_, OnEnded()); | 572 EXPECT_CALL(callbacks_, OnEnded()); |
573 host->NotifyEnded(); | 573 host->NotifyEnded(); |
574 } | 574 } |
575 | 575 |
576 } // namespace media | 576 } // namespace media |
OLD | NEW |