| Index: media/audio/sounds/sounds_manager_unittest.cc
|
| diff --git a/media/audio/sounds/sounds_manager_unittest.cc b/media/audio/sounds/sounds_manager_unittest.cc
|
| index 6dfcf11939efa994248229f56e5c75048a7d684e..21f5c65356d7a2ee607af5db96dfa684178c0dc8 100644
|
| --- a/media/audio/sounds/sounds_manager_unittest.cc
|
| +++ b/media/audio/sounds/sounds_manager_unittest.cc
|
| @@ -7,10 +7,10 @@
|
| #include "base/compiler_specific.h"
|
| #include "base/logging.h"
|
| #include "base/macros.h"
|
| -#include "base/memory/scoped_ptr.h"
|
| -#include "base/message_loop/message_loop.h"
|
| #include "base/run_loop.h"
|
| #include "base/strings/string_piece.h"
|
| +#include "base/test/test_message_loop.h"
|
| +#include "base/thread_task_runner_handle.h"
|
| #include "media/audio/audio_manager.h"
|
| #include "media/audio/simple_sources.h"
|
| #include "media/audio/sounds/audio_stream_handler.h"
|
| @@ -26,13 +26,15 @@ class SoundsManagerTest : public testing::Test {
|
| ~SoundsManagerTest() override {}
|
|
|
| void SetUp() override {
|
| - audio_manager_.reset(AudioManager::CreateForTesting());
|
| + audio_manager_ =
|
| + AudioManager::CreateForTesting(base::ThreadTaskRunnerHandle::Get());
|
| SoundsManager::Create();
|
| + base::RunLoop().RunUntilIdle();
|
| }
|
|
|
| void TearDown() override {
|
| SoundsManager::Shutdown();
|
| - audio_manager_.reset();
|
| + base::RunLoop().RunUntilIdle();
|
| }
|
|
|
| void SetObserverForTesting(AudioStreamHandler::TestObserver* observer) {
|
| @@ -45,9 +47,8 @@ class SoundsManagerTest : public testing::Test {
|
| }
|
|
|
| private:
|
| - scoped_ptr<AudioManager> audio_manager_;
|
| -
|
| - base::MessageLoop message_loop_;
|
| + base::TestMessageLoop message_loop_;
|
| + ScopedAudioManagerPtr audio_manager_;
|
| };
|
|
|
| TEST_F(SoundsManagerTest, Play) {
|
|
|