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

Unified Diff: media/filters/fake_video_decoder_unittest.cc

Issue 2086353002: Remove calls to deprecated MessageLoop methods in media. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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/decrypting_video_decoder_unittest.cc ('k') | media/filters/ffmpeg_demuxer_unittest.cc » ('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 4993891e0b89a0243e1dd6c1f1aad340d6fb87a1..2cb7f16535887ece7ba2ce70102fa5b23668d925 100644
--- a/media/filters/fake_video_decoder_unittest.cc
+++ b/media/filters/fake_video_decoder_unittest.cc
@@ -5,6 +5,7 @@
#include "base/bind.h"
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
+#include "base/run_loop.h"
#include "media/base/decoder_buffer.h"
#include "media/base/mock_filters.h"
#include "media/base/test_helpers.h"
@@ -52,7 +53,7 @@ class FakeVideoDecoderTest
decoder_->Initialize(
config, false, nullptr, NewExpectedBoolCB(success),
base::Bind(&FakeVideoDecoderTest::FrameReady, base::Unretained(this)));
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
current_config_ = config;
}
@@ -67,7 +68,7 @@ class FakeVideoDecoderTest
void SatisfyInit() {
decoder_->SatisfyInit();
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
// Callback for VideoDecoder::Decode().
@@ -136,7 +137,7 @@ class FakeVideoDecoderTest
decoder_->Decode(
buffer,
base::Bind(&FakeVideoDecoderTest::DecodeDone, base::Unretained(this)));
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
void ReadOneFrame() {
@@ -162,7 +163,7 @@ class FakeVideoDecoderTest
void SatisfyDecodeAndExpect(CallbackResult result) {
decoder_->SatisfyDecode();
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
ExpectReadResult(result);
}
@@ -193,7 +194,7 @@ class FakeVideoDecoderTest
is_reset_pending_ = true;
decoder_->Reset(base::Bind(&FakeVideoDecoderTest::OnDecoderReset,
base::Unretained(this)));
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
ExpectResetResult(result);
}
@@ -204,13 +205,13 @@ class FakeVideoDecoderTest
void SatisfyReset() {
decoder_->SatisfyReset();
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
ExpectResetResult(OK);
}
void Destroy() {
decoder_.reset();
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
// All pending callbacks must have been fired.
DCHECK_EQ(pending_decode_requests_, 0);
@@ -334,7 +335,7 @@ TEST_P(FakeVideoDecoderTest, ReadWithHold_DecodingDelay) {
Decode();
decoder_->SatisfySingleDecode();
++num_decodes_satisfied;
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
DCHECK_EQ(num_decoded_frames_, 1);
« no previous file with comments | « media/filters/decrypting_video_decoder_unittest.cc ('k') | media/filters/ffmpeg_demuxer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698