Commit 40a59316 authored by Ilia Samsonov's avatar Ilia Samsonov Committed by Commit Bot

Fix FetchUrlTest memory leak.

FetchUrlTest calls mojo::core::Init() for each test.
This is uneccessary and causing failure on exit in asan builder.

Bug: 1018424
Change-Id: I61d66a532dfcc08987ba18df7e1cee18be657a90
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1966694Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Commit-Queue: Ilia Samsonov <isamsonov@google.com>
Cr-Commit-Position: refs/heads/master@{#724558}
parent cdd241df
......@@ -49,8 +49,6 @@ class FetchUrlTest : public testing::Test,
FROM_HERE, base::BindOnce(&FetchUrlTest::InitOnIO,
base::Unretained(this), &event));
mojo::core::Init();
event.Wait();
}
......@@ -63,6 +61,8 @@ class FetchUrlTest : public testing::Test,
event.Wait();
}
static void SetUpTestSuite() { mojo::core::Init(); }
void InitOnIO(base::WaitableEvent* event) {
scoped_refptr<URLRequestContextGetter> context_getter =
new URLRequestContextGetter(io_thread_.task_runner());
......
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