Index: ui/views/animation/bounds_animator_unittest.cc |
diff --git a/ui/views/animation/bounds_animator_unittest.cc b/ui/views/animation/bounds_animator_unittest.cc |
index 39fcf7452f0dc6acd56e22b9f9fd90ba2c381818..000c0c3efbc91ab83270ef2f32981274e8ac20ad 100644 |
--- a/ui/views/animation/bounds_animator_unittest.cc |
+++ b/ui/views/animation/bounds_animator_unittest.cc |
@@ -6,6 +6,7 @@ |
#include "base/macros.h" |
#include "base/run_loop.h" |
+#include "base/test/scoped_task_environment.h" |
#include "testing/gtest/include/gtest/gtest.h" |
#include "ui/gfx/animation/slide_animation.h" |
#include "ui/gfx/animation/test_animation_delegate.h" |
@@ -91,7 +92,11 @@ class TestView : public View { |
class BoundsAnimatorTest : public testing::Test { |
public: |
- BoundsAnimatorTest() : child_(new TestView()), animator_(&parent_) { |
+ BoundsAnimatorTest() |
+ : scoped_task_environment_( |
+ base::test::ScopedTaskEnvironment::MainThreadType::UI), |
+ child_(new TestView()), |
+ animator_(&parent_) { |
parent_.AddChildView(child_); |
} |
@@ -100,7 +105,7 @@ class BoundsAnimatorTest : public testing::Test { |
TestBoundsAnimator* animator() { return &animator_; } |
private: |
- base::MessageLoopForUI message_loop_; |
+ base::test::ScopedTaskEnvironment scoped_task_environment_; |
TestView parent_; |
TestView* child_; // Owned by |parent_|. |
TestBoundsAnimator animator_; |