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

Unified Diff: ui/aura/mus/os_exchange_data_provider_mus_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/aura/mus/os_exchange_data_provider_mus_unittest.cc
diff --git a/ui/aura/mus/os_exchange_data_provider_mus_unittest.cc b/ui/aura/mus/os_exchange_data_provider_mus_unittest.cc
index c252d0992ecf6b3133682f512eb434c9bc9692cb..304715ed1071acc41936bf96b342fb1d5ea8c5b3 100644
--- a/ui/aura/mus/os_exchange_data_provider_mus_unittest.cc
+++ b/ui/aura/mus/os_exchange_data_provider_mus_unittest.cc
@@ -8,9 +8,9 @@
#include "base/files/file_util.h"
#include "base/memory/ptr_util.h"
-#include "base/message_loop/message_loop.h"
#include "base/pickle.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/test/scoped_task_environment.h"
#include "build/build_config.h"
#include "net/base/filename_util.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -34,7 +34,9 @@ class OSExchangeDataProviderMusTest
: public PlatformTest,
public ui::OSExchangeDataProviderFactory::Factory {
public:
- OSExchangeDataProviderMusTest() {}
+ OSExchangeDataProviderMusTest()
+ : scoped_task_environment_(
+ base::test::ScopedTaskEnvironment::MainThreadType::UI) {}
// Overridden from PlatformTest:
void SetUp() override {
@@ -56,7 +58,7 @@ class OSExchangeDataProviderMusTest
private:
ui::OSExchangeDataProviderFactory::Factory* old_factory_ = nullptr;
- base::MessageLoopForUI message_loop_;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
};
TEST_F(OSExchangeDataProviderMusTest, StringDataGetAndSet) {

Powered by Google App Engine
This is Rietveld 408576698