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

Unified Diff: media/audio/mac/audio_device_listener_mac_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/audio/fake_audio_worker_unittest.cc ('k') | media/base/bind_to_current_loop_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/mac/audio_device_listener_mac_unittest.cc
diff --git a/media/audio/mac/audio_device_listener_mac_unittest.cc b/media/audio/mac/audio_device_listener_mac_unittest.cc
index 06894c819e9318a936ded1b5a10e1b8e4966cfa9..3b8384f608fff29ade7109f5153664c7cbcb9570 100644
--- a/media/audio/mac/audio_device_listener_mac_unittest.cc
+++ b/media/audio/mac/audio_device_listener_mac_unittest.cc
@@ -12,6 +12,8 @@
#include "base/bind_helpers.h"
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
+#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
#include "media/base/bind_to_current_loop.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -23,19 +25,20 @@ class AudioDeviceListenerMacTest : public testing::Test {
AudioDeviceListenerMacTest() {
// It's important to create the device listener from the message loop in
// order to ensure we don't end up with unbalanced TaskObserver calls.
- message_loop_.PostTask(FROM_HERE, base::Bind(
- &AudioDeviceListenerMacTest::CreateDeviceListener,
- base::Unretained(this)));
- message_loop_.RunUntilIdle();
+ message_loop_.task_runner()->PostTask(
+ FROM_HERE, base::Bind(&AudioDeviceListenerMacTest::CreateDeviceListener,
+ base::Unretained(this)));
+ base::RunLoop().RunUntilIdle();
}
virtual ~AudioDeviceListenerMacTest() {
// It's important to destroy the device listener from the message loop in
// order to ensure we don't end up with unbalanced TaskObserver calls.
- message_loop_.PostTask(FROM_HERE, base::Bind(
- &AudioDeviceListenerMacTest::DestroyDeviceListener,
- base::Unretained(this)));
- message_loop_.RunUntilIdle();
+ message_loop_.task_runner()->PostTask(
+ FROM_HERE,
+ base::Bind(&AudioDeviceListenerMacTest::DestroyDeviceListener,
+ base::Unretained(this)));
+ base::RunLoop().RunUntilIdle();
}
void CreateDeviceListener() {
@@ -83,7 +86,7 @@ TEST_F(AudioDeviceListenerMacTest, OutputDeviceChange) {
ASSERT_TRUE(ListenerIsValid());
EXPECT_CALL(*this, OnDeviceChange()).Times(1);
ASSERT_TRUE(SimulateDefaultOutputDeviceChange());
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
} // namespace media
« no previous file with comments | « media/audio/fake_audio_worker_unittest.cc ('k') | media/base/bind_to_current_loop_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698