Commit 59695fbd authored by Carlos Caballero's avatar Carlos Caballero Committed by Commit Bot

Use ScopedTaskEnvironment instead of MessageLoop in /components/tracing

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=eseckler@chromium.org

Change-Id: I1ed5e83463d74f354c44cf15bf9ea64199304d7b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1649507
Auto-Submit: Carlos Caballero <carlscab@google.com>
Reviewed-by: default avatarEric Seckler <eseckler@chromium.org>
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#667105}
parent b75e73ee
......@@ -7,9 +7,9 @@
#include "base/bind.h"
#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted_memory.h"
#include "base/message_loop/message_loop.h"
#include "base/pending_task.h"
#include "base/run_loop.h"
#include "base/test/scoped_task_environment.h"
#include "base/threading/thread.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/traced_value.h"
......@@ -90,7 +90,7 @@ class TraceEventPerfTest : public ::testing::Test {
}
private:
base::MessageLoop _message_loop;
base::test::ScopedTaskEnvironment scoped_task_environment;
};
TEST_F(TraceEventPerfTest, Submit_10000_TRACE_EVENT0) {
......
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