Commit fd515459 authored by Carlos Caballero's avatar Carlos Caballero Committed by Commit Bot

Use ScopedTaskEnvironment instead of MessageLoop in /ui/base/ime/mojo/ime_struct_traits_unittest.cc

MessageLoop will go away, eventually.

ScopedTaskEnvironment will per default start a ThreadPool, which should
be fine in most of the cases. If you belive your test needs to make sure
that no ThreadPool runs let me know and I will update the patch.

BUG=891670
This CL was uploaded by git cl split.

R=kenrb@chromium.org

Change-Id: I121cbc069435b3dbbfbe0fc58d930333d07c1d55
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1649736
Auto-Submit: Carlos Caballero <carlscab@google.com>
Reviewed-by: default avatarKen Buchanan <kenrb@chromium.org>
Commit-Queue: Ken Buchanan <kenrb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#667119}
parent 0fd1415b
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
#include <utility> #include <utility>
#include "base/message_loop/message_loop.h"
#include "base/stl_util.h" #include "base/stl_util.h"
#include "base/test/scoped_task_environment.h"
#include "mojo/public/cpp/bindings/binding_set.h" #include "mojo/public/cpp/bindings/binding_set.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/ime/mojo/ime_struct_traits_test.mojom.h" #include "ui/base/ime/mojo/ime_struct_traits_test.mojom.h"
...@@ -35,7 +35,9 @@ class IMEStructTraitsTest : public testing::Test, ...@@ -35,7 +35,9 @@ class IMEStructTraitsTest : public testing::Test,
std::move(callback).Run(in); std::move(callback).Run(in);
} }
base::MessageLoop loop_; // A MessageLoop is needed for Mojo IPC to work. base::test::ScopedTaskEnvironment
scoped_task_environment_; // A MessageLoop is needed for Mojo IPC to
// work.
mojo::BindingSet<mojom::IMEStructTraitsTest> traits_test_bindings_; mojo::BindingSet<mojom::IMEStructTraitsTest> traits_test_bindings_;
DISALLOW_COPY_AND_ASSIGN(IMEStructTraitsTest); DISALLOW_COPY_AND_ASSIGN(IMEStructTraitsTest);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment