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

Unified Diff: media/filters/chunk_demuxer_unittest.cc

Issue 11088067: Clear source_id_{audio,video}_ after RemoveId. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | « 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 8aa0d764e0cf7f93fd8aa67d5ed876bbfa1eaa78..915bcf7640c878c4eff131d990c17baab8d690f2 100644
--- a/media/filters/chunk_demuxer_unittest.cc
+++ b/media/filters/chunk_demuxer_unittest.cc
@@ -1551,6 +1551,17 @@ TEST_F(ChunkDemuxerTest, TestRemoveId) {
GenerateSingleStreamExpectedReads(0, 4, video, kVideoBlockDuration);
}
+// Test that removing an ID immediately after adding it does not interfere with
+// quota for new IDs in the future.
+TEST_F(ChunkDemuxerTest, TestRemoveAndAddId) {
+ std::string audio_id_1 = "audio1";
+ ASSERT_TRUE(AddId(audio_id_1, true, false) == ChunkDemuxer::kOk);
+ demuxer_->RemoveId(audio_id_1);
+
+ std::string audio_id_2 = "audio2";
+ ASSERT_TRUE(AddId(audio_id_2, true, false) == ChunkDemuxer::kOk);
+}
+
TEST_F(ChunkDemuxerTest, TestSeekCanceled) {
ASSERT_TRUE(InitDemuxer(true, true, false));
« 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