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

Side by Side Diff: media/filters/pipeline_integration_test.cc

Issue 12224114: Guard against midstream audio configuration changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
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 "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
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 mid-stream are failed gracefully.
scherkus (not reviewing) 2013/02/12 02:16:56 s/are failed gracefully/fail gracefully/
DaleCurtis 2013/02/12 02:41:24 Done.
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698