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

Unified Diff: media/filters/chunk_demuxer_unittest.cc

Issue 11669011: Fix ChunkDemuxer to handle a Shutdown() call before Initialize() is called. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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
« no previous file with comments | « media/filters/chunk_demuxer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/chunk_demuxer_unittest.cc
diff --git a/media/filters/chunk_demuxer_unittest.cc b/media/filters/chunk_demuxer_unittest.cc
index 32e068c56f791a745c8a8b1fab075bf4f99456b5..21de615b2d4fa0553a2229641cefd2f92106bde8 100644
--- a/media/filters/chunk_demuxer_unittest.cc
+++ b/media/filters/chunk_demuxer_unittest.cc
@@ -2515,4 +2515,14 @@ TEST_F(ChunkDemuxerTest, TestAppendAfterEndOfStream) {
demuxer_->EndOfStream(PIPELINE_OK);
}
+// Test receiving a Shutdown() call before we get an Initialize()
+// call. This can happen if video element gets destroyed before
+// the pipeline has a chance to initialize the demuxer.
+TEST_F(ChunkDemuxerTest, TestShutdownBeforeInitialize) {
+ demuxer_->Shutdown();
+ demuxer_->Initialize(
+ &host_, CreateInitDoneCB(DEMUXER_ERROR_COULD_NOT_OPEN));
+ message_loop_.RunUntilIdle();
+}
+
} // namespace media
« no previous file with comments | « media/filters/chunk_demuxer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698