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

Unified Diff: ui/base/ime/chromeos/ime_keyboard_x11_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/base/ime/chromeos/ime_keyboard_x11_unittest.cc
diff --git a/ui/base/ime/chromeos/ime_keyboard_x11_unittest.cc b/ui/base/ime/chromeos/ime_keyboard_x11_unittest.cc
index d1156a4576e0ab98c9cc666ca21ef3fc52a44f6c..323570555020c26e7c37d42e356e6ad5763f01e8 100644
--- a/ui/base/ime/chromeos/ime_keyboard_x11_unittest.cc
+++ b/ui/base/ime/chromeos/ime_keyboard_x11_unittest.cc
@@ -12,7 +12,7 @@
#include <string>
#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
+#include "base/test/scoped_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/x/x11_types.h"
@@ -24,8 +24,9 @@ namespace {
class ImeKeyboardTest : public testing::Test,
public ImeKeyboard::Observer {
public:
- ImeKeyboardTest() {
- }
+ ImeKeyboardTest()
+ : scoped_task_environment_(
+ base::test::ScopedTaskEnvironment::MainThreadType::UI) {}
void SetUp() override {
xkey_.reset(ImeKeyboard::Create());
@@ -48,7 +49,7 @@ class ImeKeyboardTest : public testing::Test,
}
std::unique_ptr<ImeKeyboard> xkey_;
- base::MessageLoopForUI message_loop_;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
bool caps_changed_;
};

Powered by Google App Engine
This is Rietveld 408576698