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

Unified Diff: content/test/webrtc_audio_device_test.cc

Issue 66183002: Replace MessageLoopProxy with SingleThreadTaskRunner for the rest of media/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win and audio tests Created 6 years, 11 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 | « content/test/webrtc_audio_device_test.h ('k') | media/audio/alsa/alsa_output.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/webrtc_audio_device_test.cc
diff --git a/content/test/webrtc_audio_device_test.cc b/content/test/webrtc_audio_device_test.cc
index d56f7d0bc81879b616e29f81b57dfd1e99f5b1ce..3883443c320b317309187f2bc5a2ea99ad7628a1 100644
--- a/content/test/webrtc_audio_device_test.cc
+++ b/content/test/webrtc_audio_device_test.cc
@@ -8,7 +8,6 @@
#include "base/bind_helpers.h"
#include "base/compiler_specific.h"
#include "base/file_util.h"
-#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/test_timeouts.h"
@@ -399,20 +398,21 @@ bool MAYBE_WebRTCAudioDeviceTest::OnMessageReceived(
// Posts a final task to the IO message loop and waits for completion.
void MAYBE_WebRTCAudioDeviceTest::WaitForIOThreadCompletion() {
- WaitForMessageLoopCompletion(
- ChildProcess::current()->io_message_loop()->message_loop_proxy().get());
+ WaitForTaskRunnerCompletion(
+ ChildProcess::current()->io_message_loop()->message_loop_proxy());
}
void MAYBE_WebRTCAudioDeviceTest::WaitForAudioManagerCompletion() {
if (audio_manager_)
- WaitForMessageLoopCompletion(audio_manager_->GetMessageLoop().get());
+ WaitForTaskRunnerCompletion(audio_manager_->GetTaskRunner());
}
-void MAYBE_WebRTCAudioDeviceTest::WaitForMessageLoopCompletion(
- base::MessageLoopProxy* loop) {
+void MAYBE_WebRTCAudioDeviceTest::WaitForTaskRunnerCompletion(
+ const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) {
base::WaitableEvent* event = new base::WaitableEvent(false, false);
- loop->PostTask(FROM_HERE, base::Bind(&base::WaitableEvent::Signal,
- base::Unretained(event)));
+ task_runner->PostTask(
+ FROM_HERE,
+ base::Bind(&base::WaitableEvent::Signal, base::Unretained(event)));
if (event->TimedWait(TestTimeouts::action_max_timeout())) {
delete event;
} else {
« no previous file with comments | « content/test/webrtc_audio_device_test.h ('k') | media/audio/alsa/alsa_output.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698