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

Unified Diff: ui/events/gesture_detection/filtered_gesture_provider_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/gesture_detection/filtered_gesture_provider_unittest.cc
diff --git a/ui/events/gesture_detection/filtered_gesture_provider_unittest.cc b/ui/events/gesture_detection/filtered_gesture_provider_unittest.cc
index d3e10f637dbea59549228a9054b4e446e27da460..a4b9e6faf03c6609fa283789ee4690b6f4ee62b2 100644
--- a/ui/events/gesture_detection/filtered_gesture_provider_unittest.cc
+++ b/ui/events/gesture_detection/filtered_gesture_provider_unittest.cc
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/message_loop/message_loop.h"
-#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/gesture_detection/filtered_gesture_provider.h"
sadrul 2017/04/28 15:36:03 newline after
+#include "base/test/scoped_task_environment.h"
+#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/test/motion_event_test_utils.h"
namespace ui {
@@ -12,14 +12,16 @@ namespace ui {
class FilteredGestureProviderTest : public GestureProviderClient,
public testing::Test {
public:
- FilteredGestureProviderTest() {}
+ FilteredGestureProviderTest()
+ : scoped_task_environment_(
+ base::test::ScopedTaskEnvironment::MainThreadType::UI) {}
~FilteredGestureProviderTest() override {}
// GestureProviderClient implementation.
void OnGestureEvent(const GestureEventData&) override {}
private:
- base::MessageLoopForUI message_loop_;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
};
// Single touch drag test: After touch-start, the moved_beyond_slop_region bit
« no previous file with comments | « ui/base/ime/chromeos/ime_keyboard_x11_unittest.cc ('k') | ui/events/gesture_detection/gesture_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698