| 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 "media/filters/pipeline_integration_test_base.h" | 5 #include "media/filters/pipeline_integration_test_base.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds()); | 653 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds()); |
| 654 // The second video was not added, so its time has not been added. | 654 // The second video was not added, so its time has not been added. |
| 655 EXPECT_EQ(k640IsoCencFileDurationMs, | 655 EXPECT_EQ(k640IsoCencFileDurationMs, |
| 656 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds()); | 656 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds()); |
| 657 | 657 |
| 658 Play(); | 658 Play(); |
| 659 | 659 |
| 660 EXPECT_EQ(PIPELINE_ERROR_DECODE, WaitUntilEndedOrError()); | 660 EXPECT_EQ(PIPELINE_ERROR_DECODE, WaitUntilEndedOrError()); |
| 661 source.Abort(); | 661 source.Abort(); |
| 662 } | 662 } |
| 663 |
| 664 // Verify files which change configuration midstream fail gracefully. |
| 665 TEST_F(PipelineIntegrationTest, MidStreamConfigChangesFail) { |
| 666 ASSERT_TRUE(Start( |
| 667 GetTestDataFilePath("midstream_config_change.mp3"), PIPELINE_OK)); |
| 668 Play(); |
| 669 ASSERT_EQ(WaitUntilEndedOrError(), PIPELINE_ERROR_DECODE); |
| 670 } |
| 671 |
| 663 #endif | 672 #endif |
| 664 | 673 |
| 665 TEST_F(PipelineIntegrationTest, BasicPlayback_16x9AspectRatio) { | 674 TEST_F(PipelineIntegrationTest, BasicPlayback_16x9AspectRatio) { |
| 666 ASSERT_TRUE(Start(GetTestDataFilePath("bear-320x240-16x9-aspect.webm"), | 675 ASSERT_TRUE(Start(GetTestDataFilePath("bear-320x240-16x9-aspect.webm"), |
| 667 PIPELINE_OK)); | 676 PIPELINE_OK)); |
| 668 Play(); | 677 Play(); |
| 669 ASSERT_TRUE(WaitUntilOnEnded()); | 678 ASSERT_TRUE(WaitUntilOnEnded()); |
| 670 } | 679 } |
| 671 | 680 |
| 672 TEST_F(PipelineIntegrationTest, EncryptedPlayback_WebM) { | 681 TEST_F(PipelineIntegrationTest, EncryptedPlayback_WebM) { |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 867 // back. | 876 // back. |
| 868 // Disabled since it might crash or corrupt heap, see http://crbug.com/173333 | 877 // Disabled since it might crash or corrupt heap, see http://crbug.com/173333 |
| 869 TEST_F(PipelineIntegrationTest, DISABLED_BasicPlayback_VP9_Opus_WebM) { | 878 TEST_F(PipelineIntegrationTest, DISABLED_BasicPlayback_VP9_Opus_WebM) { |
| 870 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp9-opus.webm"), | 879 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp9-opus.webm"), |
| 871 PIPELINE_OK)); | 880 PIPELINE_OK)); |
| 872 Play(); | 881 Play(); |
| 873 ASSERT_TRUE(WaitUntilOnEnded()); | 882 ASSERT_TRUE(WaitUntilOnEnded()); |
| 874 } | 883 } |
| 875 | 884 |
| 876 } // namespace media | 885 } // namespace media |
| OLD | NEW |