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

Unified Diff: media/filters/fake_video_decoder_unittest.cc

Issue 395703002: Fold {Audio|Video}Decoder::Stop() into the dtor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only Created 6 years, 5 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/fake_video_decoder.cc ('k') | media/filters/ffmpeg_audio_decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/fake_video_decoder_unittest.cc
diff --git a/media/filters/fake_video_decoder_unittest.cc b/media/filters/fake_video_decoder_unittest.cc
index 2772b54ffbfc30f9e65342907238962575e7e131..3598a7a48edac090354d791401f048bfbd067d40 100644
--- a/media/filters/fake_video_decoder_unittest.cc
+++ b/media/filters/fake_video_decoder_unittest.cc
@@ -39,7 +39,7 @@ class FakeVideoDecoderTest
is_reset_pending_(false) {}
virtual ~FakeVideoDecoderTest() {
- Stop();
+ Destroy();
}
void InitializeWithConfig(const VideoDecoderConfig& config) {
@@ -197,8 +197,8 @@ class FakeVideoDecoderTest
ExpectResetResult(OK);
}
- void Stop() {
- decoder_->Stop();
+ void Destroy() {
+ decoder_.reset();
message_loop_.RunUntilIdle();
// All pending callbacks must have been fired.
@@ -365,35 +365,35 @@ TEST_P(FakeVideoDecoderTest, Reset_PendingDuringPendingRead) {
SatisfyReset();
}
-TEST_P(FakeVideoDecoderTest, Stop) {
+TEST_P(FakeVideoDecoderTest, Destroy) {
Initialize();
ReadOneFrame();
ExpectReadResult(OK);
- Stop();
+ Destroy();
}
-TEST_P(FakeVideoDecoderTest, Stop_DuringPendingInitialization) {
+TEST_P(FakeVideoDecoderTest, Destroy_DuringPendingInitialization) {
EnterPendingInitState();
- Stop();
+ Destroy();
}
-TEST_P(FakeVideoDecoderTest, Stop_DuringPendingRead) {
+TEST_P(FakeVideoDecoderTest, Destroy_DuringPendingRead) {
Initialize();
EnterPendingReadState();
- Stop();
+ Destroy();
}
-TEST_P(FakeVideoDecoderTest, Stop_DuringPendingReset) {
+TEST_P(FakeVideoDecoderTest, Destroy_DuringPendingReset) {
Initialize();
EnterPendingResetState();
- Stop();
+ Destroy();
}
-TEST_P(FakeVideoDecoderTest, Stop_DuringPendingReadAndPendingReset) {
+TEST_P(FakeVideoDecoderTest, Destroy_DuringPendingReadAndPendingReset) {
Initialize();
EnterPendingReadState();
EnterPendingResetState();
- Stop();
+ Destroy();
}
} // namespace media
« no previous file with comments | « media/filters/fake_video_decoder.cc ('k') | media/filters/ffmpeg_audio_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698