Commit 25f990da authored by Carlos Caballero's avatar Carlos Caballero Committed by Commit Bot

Use ScopedTaskEnvironment instead of MessageLoop

MessageLoop will go away, eventually.

ScopedTaskEnvironment will per default start a ThreadPool, which should
be fine in most of the cases. If you belive your test needs to make sure
that no ThreadPool runs let me know and I will update the patch.

BUG=891670
This CL was uploaded by git cl split.

R=dalecurtis@chromium.org

Change-Id: Ib1c83dfc5dd51f2944a78ef4841af6d548aecfca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1635816Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Commit-Queue: Carlos Caballero <carlscab@google.com>
Auto-Submit: Carlos Caballero <carlscab@google.com>
Cr-Commit-Position: refs/heads/master@{#665084}
parent b3f8aa7c
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "services/audio/public/cpp/audio_system_to_service_adapter.h" #include "services/audio/public/cpp/audio_system_to_service_adapter.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "base/test/mock_callback.h" #include "base/test/mock_callback.h"
#include "base/test/scoped_task_environment.h" #include "base/test/scoped_task_environment.h"
#include "media/audio/audio_system_test_util.h" #include "media/audio/audio_system_test_util.h"
...@@ -70,7 +69,7 @@ class AudioSystemToServiceAdapterTestBase : public testing::Test { ...@@ -70,7 +69,7 @@ class AudioSystemToServiceAdapterTestBase : public testing::Test {
// AudioSystem conformance tests won't set expecnations. // AudioSystem conformance tests won't set expecnations.
NiceMock<MockFunction<void(void)>> system_info_bind_requested_; NiceMock<MockFunction<void(void)>> system_info_bind_requested_;
base::MessageLoop message_loop_; base::test::ScopedTaskEnvironment scoped_task_environment_;
std::unique_ptr<media::MockAudioManager> audio_manager_; std::unique_ptr<media::MockAudioManager> audio_manager_;
std::unique_ptr<mojom::SystemInfo> system_info_impl_; std::unique_ptr<mojom::SystemInfo> system_info_impl_;
std::unique_ptr<mojo::Receiver<mojom::SystemInfo>> system_info_receiver_; std::unique_ptr<mojo::Receiver<mojom::SystemInfo>> system_info_receiver_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment