Chromium Code Reviews| Index: media/test/pipeline_integration_test.cc |
| diff --git a/media/test/pipeline_integration_test.cc b/media/test/pipeline_integration_test.cc |
| index 1ae0ac8f800aad0933a274de404b0af6b7aaf366..bc200cb08c0c65051ea46c4d39e0851de6f5abab 100644 |
| --- a/media/test/pipeline_integration_test.cc |
| +++ b/media/test/pipeline_integration_test.cc |
| @@ -942,6 +942,45 @@ TEST_F(PipelineIntegrationTest, BasicPlaybackHashed) { |
| EXPECT_TRUE(demuxer_->GetTimelineOffset().is_null()); |
| } |
| +TEST_F(PipelineIntegrationTest, PlaybackWithAudioTrackDisabled) { |
| + ASSERT_EQ(PIPELINE_OK, Start("bear-320x240.webm", kHashed | kClockless)); |
| + |
| + std::vector<MediaTrack::Id> empty; |
| + pipeline_->OnEnabledAudioTracksChanged(empty); |
| + message_loop_.RunUntilIdle(); |
| + |
| + // Seek to flush the pipeline and ensure there's no prerolled audio data. |
| + ASSERT_TRUE(Seek(base::TimeDelta::FromSeconds(0))); |
| + Play(); |
| + |
| + ASSERT_TRUE(WaitUntilOnEnded()); |
| + |
| + // Verify that no audio has been rendered, since we disabled audio tracks. |
| + EXPECT_HASH_EQ(kNullAudioHash, GetAudioHash()); |
| +} |
| + |
| +TEST_F(PipelineIntegrationTest, PlaybackWithVideoTrackDisabled) { |
| + ASSERT_EQ(PIPELINE_OK, Start("bear-320x240.webm", kHashed | kClockless)); |
| + |
| + std::vector<MediaTrack::Id> empty; |
| + pipeline_->OnSelectedVideoTrackChanged(empty); |
| + message_loop_.RunUntilIdle(); |
| + |
| + // Seek to flush the pipeline and ensure there's no prerolled video data. |
| + ASSERT_TRUE(Seek(base::TimeDelta::FromSeconds(0))); |
| + |
| + // Reset the video hash in case some of the prerolled video frames have been |
| + // hashed already. |
| + ResetVideoHash(); |
| + |
| + Play(); |
| + |
| + ASSERT_TRUE(WaitUntilOnEnded()); |
| + |
| + // Verify that no audio has been rendered, since we disabled audio tracks. |
| + EXPECT_HASH_EQ(kNullVideoHash, GetVideoHash()); |
|
chcunningham
2016/06/29 22:49:13
These are a great start. Can you add some test for
chcunningham
2016/06/29 22:58:29
Ignore me - I see you did this in your latest PS
servolk
2016/06/29 23:40:13
Yep, added more complete tests in latest PS.
|
| +} |
| + |
| TEST_F(PipelineIntegrationTest, |
| MAYBE_CLOCKLESS(BasicPlaybackOpusOggTrimmingHashed)) { |
| ASSERT_EQ(PIPELINE_OK, |