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

Unified Diff: media/base/filter_collection_unittest.cc

Issue 10918022: Move AudioDecoder initialization into AudioRenderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
Index: media/base/filter_collection_unittest.cc
diff --git a/media/base/filter_collection_unittest.cc b/media/base/filter_collection_unittest.cc
index 514d96c6c71478871ae9d384448d4309112432ef..471b5e70acda2be27ac1bef01d87a6bd7abc7994 100644
--- a/media/base/filter_collection_unittest.cc
+++ b/media/base/filter_collection_unittest.cc
@@ -21,45 +21,21 @@ class FilterCollectionTest : public ::testing::Test {
};
TEST_F(FilterCollectionTest, SelectXXXMethods) {
- scoped_refptr<AudioDecoder> audio_decoder;
+ scoped_refptr<AudioRenderer> audio_renderer;
- collection_.SelectAudioDecoder(&audio_decoder);
- EXPECT_FALSE(audio_decoder);
+ collection_.SelectAudioRenderer(&audio_renderer);
+ EXPECT_FALSE(audio_renderer);
- // Add an audio decoder.
- collection_.AddAudioDecoder(mock_filters_.audio_decoder());
+ // Add an audio renderer.
+ collection_.AddAudioRenderer(mock_filters_.audio_renderer());
- // Verify that we can select the audio decoder.
- collection_.SelectAudioDecoder(&audio_decoder);
- EXPECT_TRUE(audio_decoder);
+ // Verify that we can select the audio renderer.
+ collection_.SelectAudioRenderer(&audio_renderer);
+ EXPECT_TRUE(audio_renderer);
// Verify that we can't select it again since only one has been added.
- collection_.SelectAudioDecoder(&audio_decoder);
- EXPECT_FALSE(audio_decoder);
-}
-
-TEST_F(FilterCollectionTest, MultipleFiltersOfSameType) {
- scoped_refptr<AudioDecoder> audio_decoder_a(new MockAudioDecoder());
- scoped_refptr<AudioDecoder> audio_decoder_b(new MockAudioDecoder());
-
- scoped_refptr<AudioDecoder> audio_decoder;
-
- collection_.AddAudioDecoder(audio_decoder_a.get());
- collection_.AddAudioDecoder(audio_decoder_b.get());
-
- // Verify that first SelectAudioDecoder() returns audio_decoder_a.
- collection_.SelectAudioDecoder(&audio_decoder);
- EXPECT_TRUE(audio_decoder);
- EXPECT_EQ(audio_decoder, audio_decoder_a);
-
- // Verify that second SelectAudioDecoder() returns audio_decoder_b.
- collection_.SelectAudioDecoder(&audio_decoder);
- EXPECT_TRUE(audio_decoder);
- EXPECT_EQ(audio_decoder, audio_decoder_b);
-
- // Verify that third SelectAudioDecoder() returns nothing.
- collection_.SelectAudioDecoder(&audio_decoder);
- EXPECT_FALSE(audio_decoder);
+ collection_.SelectAudioRenderer(&audio_renderer);
+ EXPECT_FALSE(audio_renderer);
}
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698