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

Unified Diff: ui/events/gestures/gesture_provider_aura_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/events/gestures/gesture_provider_aura_unittest.cc
diff --git a/ui/events/gestures/gesture_provider_aura_unittest.cc b/ui/events/gestures/gesture_provider_aura_unittest.cc
index 27cbec69351bd1c1c1803abc894d983196f02021..0b263dc64120bf66c3920a0da8218b073930acb7 100644
--- a/ui/events/gestures/gesture_provider_aura_unittest.cc
+++ b/ui/events/gestures/gesture_provider_aura_unittest.cc
@@ -6,7 +6,7 @@
#include <memory>
-#include "base/message_loop/message_loop.h"
+#include "base/test/scoped_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/event_utils.h"
@@ -15,7 +15,9 @@ namespace ui {
class GestureProviderAuraTest : public testing::Test,
public GestureProviderAuraClient {
public:
- GestureProviderAuraTest() {}
+ GestureProviderAuraTest()
+ : scoped_task_environment_(
+ base::test::ScopedTaskEnvironment::MainThreadType::UI) {}
~GestureProviderAuraTest() override {}
@@ -34,7 +36,7 @@ class GestureProviderAuraTest : public testing::Test,
private:
std::unique_ptr<GestureConsumer> consumer_;
std::unique_ptr<GestureProviderAura> provider_;
- base::MessageLoopForUI message_loop_;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
};
TEST_F(GestureProviderAuraTest, IgnoresExtraPressEvents) {

Powered by Google App Engine
This is Rietveld 408576698