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

Unified Diff: media/test/pipeline_integration_test.cc

Issue 2269313002: Fix DCHECK when track status changes in non-playing state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed one more DCHECK + added a unit test Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« media/renderers/renderer_impl.cc ('K') | « media/renderers/renderer_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/test/pipeline_integration_test.cc
diff --git a/media/test/pipeline_integration_test.cc b/media/test/pipeline_integration_test.cc
index 2a0e72a9bb72857cfd58fd310139a1df15e04fee..9b0ea1c1a9e56c25cfdb9db5f1eedfba2c5cecea 100644
--- a/media/test/pipeline_integration_test.cc
+++ b/media/test/pipeline_integration_test.cc
@@ -1021,6 +1021,24 @@ TEST_F(PipelineIntegrationTest, PlaybackWithVideoTrackDisabledThenEnabled) {
EXPECT_HASH_EQ("fd59357dfd9c144ab4fb8181b2de32c3", GetVideoHash());
}
+TEST_F(PipelineIntegrationTest, TrackStatusChangesAfterPipelineEnded) {
+ ASSERT_EQ(PIPELINE_OK, Start("bear-320x240.webm", kHashed));
+ Play();
+ ASSERT_TRUE(WaitUntilOnEnded());
chcunningham 2016/08/24 22:16:53 Is the expectation that waiting until ended will c
servolk 2016/08/24 22:46:32 No, we don't need suspend to happen. After pipelin
chcunningham 2016/08/25 20:45:54 I don't think this transition to stopped is happen
+ std::vector<MediaTrack::Id> track_ids;
+ // Disable audio track.
+ pipeline_->OnEnabledAudioTracksChanged(track_ids);
+ // Re-enable audio track.
+ track_ids.push_back("2");
+ pipeline_->OnEnabledAudioTracksChanged(track_ids);
+ // Disable video track.
+ track_ids.clear();
+ pipeline_->OnSelectedVideoTrackChanged(track_ids);
+ // Re-enable video track.
+ track_ids.push_back("1");
+ pipeline_->OnSelectedVideoTrackChanged(track_ids);
+}
+
TEST_F(PipelineIntegrationTest,
MAYBE_CLOCKLESS(BasicPlaybackOpusOggTrimmingHashed)) {
ASSERT_EQ(PIPELINE_OK,
« media/renderers/renderer_impl.cc ('K') | « media/renderers/renderer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698