Commit cd77134f authored by Carlos Caballero's avatar Carlos Caballero Committed by Commit Bot

Use ScopedTaskEnvironment instead of MessageLoop in /extensions

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

Change-Id: I235f4f603407ea113d949297e550d4c75dbf94ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1649580
Commit-Queue: Carlos Caballero <carlscab@google.com>
Auto-Submit: Carlos Caballero <carlscab@google.com>
Reviewed-by: default avatarIstiaque Ahmed <lazyboy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#667176}
parent 710235f1
......@@ -5,7 +5,7 @@
#include <memory>
#include <vector>
#include "base/message_loop/message_loop.h"
#include "base/test/scoped_task_environment.h"
#include "extensions/browser/preload_check_group.h"
#include "extensions/browser/preload_check_test_util.h"
#include "testing/gmock/include/gmock/gmock.h"
......@@ -50,8 +50,8 @@ class PreloadCheckGroupTest : public testing::Test {
std::unique_ptr<PreloadCheckGroup> check_group_;
private:
// A message loop is required for the asynchronous tests.
base::MessageLoop message_loop_;
// Required for the asynchronous tests.
base::test::ScopedTaskEnvironment scoped_task_environment_;
};
// Tests multiple succeeding checks.
......
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