Commit 10399622 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=maxmorin@chromium.org

Change-Id: Ia7812103242968ac29a9055488c9d10e285d9b1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1635823
Auto-Submit: Carlos Caballero <carlscab@google.com>
Reviewed-by: default avatarMax Morin <maxmorin@chromium.org>
Commit-Queue: Max Morin <maxmorin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665063}
parent 90897f3d
......@@ -8,9 +8,9 @@
#include "base/bind.h"
#include "base/memory/read_only_shared_memory_region.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/sync_socket.h"
#include "base/test/scoped_task_environment.h"
#include "media/audio/audio_input_controller.h"
#include "mojo/public/cpp/system/platform_handle.h"
#include "testing/gmock/include/gmock/gmock.h"
......@@ -172,7 +172,7 @@ class MojoAudioInputStreamTest : public Test {
.WillOnce(SaveArg<0>(&delegate_event_handler_));
}
base::MessageLoop loop_;
base::test::ScopedTaskEnvironment scoped_task_environment_;
base::CancelableSyncSocket local_;
std::unique_ptr<TestCancelableSyncSocket> foreign_socket_;
base::ReadOnlySharedMemoryRegion mem_;
......
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