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

Unified Diff: media/audio/win/audio_low_latency_output_win_unittest.cc

Issue 2211473003: Remove calls to deprecated MessageLoop methods on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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/win/audio_low_latency_output_win_unittest.cc
diff --git a/media/audio/win/audio_low_latency_output_win_unittest.cc b/media/audio/win/audio_low_latency_output_win_unittest.cc
index d6c09c214b4375132ceb81c9883880a9a7e8d0bf..b714b1dd42f66b7e605465cc25b405defbb98559 100644
--- a/media/audio/win/audio_low_latency_output_win_unittest.cc
+++ b/media/audio/win/audio_low_latency_output_win_unittest.cc
@@ -15,6 +15,8 @@
#include "base/files/file_util.h"
#include "base/message_loop/message_loop.h"
#include "base/path_service.h"
+#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/test/test_timeouts.h"
#include "base/time/time.h"
#include "base/win/scoped_com_initializer.h"
@@ -235,11 +237,11 @@ class WASAPIAudioOutputStreamTest : public ::testing::Test {
WASAPIAudioOutputStreamTest() {
audio_manager_ =
AudioManager::CreateForTesting(message_loop_.task_runner());
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
~WASAPIAudioOutputStreamTest() override {
audio_manager_.reset();
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
protected:
@@ -400,10 +402,10 @@ TEST_F(WASAPIAudioOutputStreamTest, ValidPacketSize) {
.WillRepeatedly(Return(0));
aos->Start(&source);
- message_loop_.PostDelayedTask(FROM_HERE,
- base::MessageLoop::QuitWhenIdleClosure(),
- TestTimeouts::action_timeout());
- message_loop_.Run();
+ message_loop_.task_runner()->PostDelayedTask(
+ FROM_HERE, base::MessageLoop::QuitWhenIdleClosure(),
+ TestTimeouts::action_timeout());
+ base::RunLoop().Run();
aos->Stop();
aos->Close();
}
@@ -590,10 +592,10 @@ TEST_F(WASAPIAudioOutputStreamTest,
.WillRepeatedly(Return(aosw.samples_per_packet()));
aos->Start(&source);
- message_loop_.PostDelayedTask(FROM_HERE,
- base::MessageLoop::QuitWhenIdleClosure(),
- TestTimeouts::action_timeout());
- message_loop_.Run();
+ message_loop_.task_runner()->PostDelayedTask(
+ FROM_HERE, base::MessageLoop::QuitWhenIdleClosure(),
+ TestTimeouts::action_timeout());
+ base::RunLoop().Run();
aos->Stop();
aos->Close();
}
@@ -623,10 +625,10 @@ TEST_F(WASAPIAudioOutputStreamTest,
.WillRepeatedly(Return(aosw.samples_per_packet()));
aos->Start(&source);
- message_loop_.PostDelayedTask(FROM_HERE,
- base::MessageLoop::QuitWhenIdleClosure(),
- TestTimeouts::action_timeout());
- message_loop_.Run();
+ message_loop_.task_runner()->PostDelayedTask(
+ FROM_HERE, base::MessageLoop::QuitWhenIdleClosure(),
+ TestTimeouts::action_timeout());
+ base::RunLoop().Run();
aos->Stop();
aos->Close();
}
« no previous file with comments | « media/audio/win/audio_low_latency_input_win_unittest.cc ('k') | media/audio/win/audio_output_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698