| Index: components/component_updater/default_component_installer_unittest.cc
|
| diff --git a/components/component_updater/default_component_installer_unittest.cc b/components/component_updater/default_component_installer_unittest.cc
|
| index d9bb6d39d914ebb76477e9df44932ed54ed1971b..118990a633a023192aabd046c04edbf1c850b1ad 100644
|
| --- a/components/component_updater/default_component_installer_unittest.cc
|
| +++ b/components/component_updater/default_component_installer_unittest.cc
|
| @@ -10,9 +10,9 @@
|
| #include "base/callback.h"
|
| #include "base/macros.h"
|
| #include "base/memory/ref_counted.h"
|
| -#include "base/message_loop/message_loop.h"
|
| #include "base/run_loop.h"
|
| -#include "base/test/sequenced_worker_pool_owner.h"
|
| +#include "base/task_scheduler/post_task.h"
|
| +#include "base/test/scoped_task_environment.h"
|
| #include "base/version.h"
|
| #include "components/component_updater/component_updater_service.h"
|
| #include "components/component_updater/component_updater_service_internal.h"
|
| @@ -136,9 +136,7 @@ class DefaultComponentInstallerTest : public testing::Test {
|
| void RunThreads();
|
|
|
| private:
|
| - static const int kNumWorkerThreads_ = 2;
|
| -
|
| - base::MessageLoopForUI message_loop_;
|
| + base::test::ScopedTaskEnvironment scoped_task_environment_;
|
| base::RunLoop runloop_;
|
| base::Closure quit_closure_;
|
|
|
| @@ -150,14 +148,13 @@ class DefaultComponentInstallerTest : public testing::Test {
|
| };
|
|
|
| DefaultComponentInstallerTest::DefaultComponentInstallerTest()
|
| - : worker_pool_(
|
| - new base::SequencedWorkerPoolOwner(kNumWorkerThreads_, "test")) {
|
| + : scoped_task_environment_(
|
| + base::test::ScopedTaskEnvironment::MainThreadType::UI) {
|
| quit_closure_ = runloop_.QuitClosure();
|
|
|
| - auto pool = worker_pool_->pool();
|
| config_ = new TestConfigurator(
|
| - pool->GetSequencedTaskRunner(pool->GetSequenceToken()),
|
| - message_loop_.task_runner());
|
| + base::CreateSequencedTaskRunnerWithTraits({base::MayBlock()}),
|
| + base::ThreadTaskRunnerHandle::Get());
|
|
|
| update_client_ = new MockUpdateClient();
|
| EXPECT_CALL(update_client(), AddObserver(_)).Times(1);
|
|
|