Index: components/component_updater/timer_unittest.cc |
diff --git a/components/component_updater/timer_unittest.cc b/components/component_updater/timer_unittest.cc |
index 2c80e84d2a2acb7ac8d0dcd919844a4acfb629f5..c90ae0251470ce769b2699104112b89c922721a1 100644 |
--- a/components/component_updater/timer_unittest.cc |
+++ b/components/component_updater/timer_unittest.cc |
@@ -4,8 +4,8 @@ |
#include <string> |
-#include "base/message_loop/message_loop.h" |
#include "base/run_loop.h" |
+#include "base/test/scoped_task_environment.h" |
#include "base/time/time.h" |
#include "components/component_updater/timer.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -16,11 +16,13 @@ namespace component_updater { |
class ComponentUpdaterTimerTest : public testing::Test { |
public: |
- ComponentUpdaterTimerTest() {} |
+ ComponentUpdaterTimerTest() |
+ : scoped_task_environment_( |
+ base::test::ScopedTaskEnvironment::MainThreadType::UI) {} |
~ComponentUpdaterTimerTest() override {} |
private: |
- base::MessageLoopForUI message_loop_; |
+ base::test::ScopedTaskEnvironment scoped_task_environment_; |
}; |
TEST_F(ComponentUpdaterTimerTest, Start) { |