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

Unified Diff: media/audio/audio_input_controller_unittest.cc

Issue 2132593002: Remove remaining calls to deprecated MessageLoop methods on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: h264_vt_encoder_unittest.cc Created 4 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
Index: media/audio/audio_input_controller_unittest.cc
diff --git a/media/audio/audio_input_controller_unittest.cc b/media/audio/audio_input_controller_unittest.cc
index 4dab5f7d3af9934ea67528f0c0657159e8c27118..6b98fb3681ef57356e5b5dd76f3cc75e86143b01 100644
--- a/media/audio/audio_input_controller_unittest.cc
+++ b/media/audio/audio_input_controller_unittest.cc
@@ -26,9 +26,8 @@ static const int kBitsPerSample = 16;
static const ChannelLayout kChannelLayout = CHANNEL_LAYOUT_STEREO;
static const int kSamplesPerPacket = kSampleRate / 10;
-// Posts base::MessageLoop::QuitWhenIdleClosure() on specified message loop.
-ACTION_P(QuitMessageLoop, loop_or_proxy) {
- loop_or_proxy->PostTask(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
+ACTION_P(QuitRunLoop, run_loop) {
+ run_loop->QuitWhenIdle();
}
// Posts base::MessageLoop::QuitWhenIdleClosure() on specified message loop
@@ -89,11 +88,13 @@ class AudioInputControllerTest : public testing::Test {
// Test AudioInputController for create and close without recording audio.
TEST_F(AudioInputControllerTest, CreateAndClose) {
+ base::RunLoop run_loop;
+
MockAudioInputControllerEventHandler event_handler;
// OnCreated() will be posted once.
EXPECT_CALL(event_handler, OnCreated(NotNull()))
- .WillOnce(QuitMessageLoop(&message_loop_));
+ .WillOnce(QuitRunLoop(&run_loop));
AudioParameters params(AudioParameters::AUDIO_FAKE, kChannelLayout,
kSampleRate, kBitsPerSample, kSamplesPerPacket);
@@ -104,7 +105,7 @@ TEST_F(AudioInputControllerTest, CreateAndClose) {
ASSERT_TRUE(controller.get());
// Wait for OnCreated() to fire.
- base::RunLoop().Run();
+ run_loop.Run();
// Close the AudioInputController synchronously.
CloseAudioController(controller.get());
« no previous file with comments | « jingle/notifier/base/xmpp_connection_unittest.cc ('k') | media/audio/mac/audio_low_latency_input_mac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698