Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(799)

Unified Diff: ui/gfx/animation/slide_animation_unittest.cc

Issue 2849603003: Use ScopedTaskEnvironment instead of MessageLoopForUI in ui tests. (Closed)
Patch Set: CR-add-newline-after-include Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/gfx/animation/slide_animation_unittest.cc
diff --git a/ui/gfx/animation/slide_animation_unittest.cc b/ui/gfx/animation/slide_animation_unittest.cc
index 9eb88d286034908cfb00239d4af5a81d8fac85fd..5de1700906ab43cb49401ad7d8ef04a495cd74a6 100644
--- a/ui/gfx/animation/slide_animation_unittest.cc
+++ b/ui/gfx/animation/slide_animation_unittest.cc
@@ -7,6 +7,7 @@
#include <memory>
#include "base/macros.h"
+#include "base/test/scoped_task_environment.h"
#include "base/time/time.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/animation/test_animation_delegate.h"
@@ -35,8 +36,13 @@ class SlideAnimation::TestApi {
////////////////////////////////////////////////////////////////////////////////
// SlideAnimationTest
class SlideAnimationTest: public testing::Test {
+ protected:
+ SlideAnimationTest()
+ : scoped_task_environment_(
+ base::test::ScopedTaskEnvironment::MainThreadType::UI) {}
+
private:
- base::MessageLoopForUI message_loop_;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
};
// Tests animation construction.

Powered by Google App Engine
This is Rietveld 408576698