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

Unified Diff: media/filters/chunk_demuxer_unittest.cc

Issue 2825863002: Fix status notifications for FFmpegDemuxerStream with a pending read (Closed)
Patch Set: Add a comment explaining FlushBuffers Created 3 years, 8 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
« no previous file with comments | « no previous file | media/filters/ffmpeg_demuxer.cc » ('j') | 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 7653ee79bcdacedc8c6453f4420d64e8daa479fc..e3f4ffa4cff6ed1a76a3e8f17708e20dfc29b36e 100644
--- a/media/filters/chunk_demuxer_unittest.cc
+++ b/media/filters/chunk_demuxer_unittest.cc
@@ -4677,11 +4677,23 @@ TEST_F(ChunkDemuxerTest, StreamStatusNotifications) {
ChunkDemuxerStream* audio_stream =
static_cast<ChunkDemuxerStream*>(GetStream(DemuxerStream::AUDIO));
EXPECT_NE(nullptr, audio_stream);
- CheckStreamStatusNotifications(demuxer_.get(), audio_stream);
ChunkDemuxerStream* video_stream =
static_cast<ChunkDemuxerStream*>(GetStream(DemuxerStream::VIDEO));
EXPECT_NE(nullptr, video_stream);
+
+ // Verify stream status changes without pending read.
+ CheckStreamStatusNotifications(demuxer_.get(), audio_stream);
+ CheckStreamStatusNotifications(demuxer_.get(), video_stream);
+
+ // Verify stream status changes with pending read.
+ bool read_done = false;
+ audio_stream->Read(base::Bind(&OnReadDone_EOSExpected, &read_done));
+ CheckStreamStatusNotifications(demuxer_.get(), audio_stream);
+ EXPECT_TRUE(read_done);
+ read_done = false;
+ video_stream->Read(base::Bind(&OnReadDone_EOSExpected, &read_done));
CheckStreamStatusNotifications(demuxer_.get(), video_stream);
+ EXPECT_TRUE(read_done);
}
TEST_F(ChunkDemuxerTest, MultipleIds) {
« no previous file with comments | « no previous file | media/filters/ffmpeg_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698