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

Unified Diff: components/autofill/core/browser/webdata/web_data_service_unittest.cc

Issue 2846723005: Use ScopedTaskEnvironment instead of MessageLoopForUI in components tests. (Closed)
Patch Set: fix-test-errors 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
« no previous file with comments | « components/arc/arc_session_runner_unittest.cc ('k') | components/bookmarks/browser/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/webdata/web_data_service_unittest.cc
diff --git a/components/autofill/core/browser/webdata/web_data_service_unittest.cc b/components/autofill/core/browser/webdata/web_data_service_unittest.cc
index 349e5a13cb00abc9473513cc18172cc7edb3292b..68e8dd0d259d5f684cc7539a722f9b0125ff9694 100644
--- a/components/autofill/core/browser/webdata/web_data_service_unittest.cc
+++ b/components/autofill/core/browser/webdata/web_data_service_unittest.cc
@@ -18,6 +18,7 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/synchronization/waitable_event.h"
+#include "base/test/scoped_task_environment.h"
#include "base/threading/thread.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
@@ -92,7 +93,10 @@ class MockAutofillWebDataServiceObserver
class WebDataServiceTest : public testing::Test {
public:
- WebDataServiceTest() : db_thread_("DBThread") {}
+ WebDataServiceTest()
+ : scoped_task_environment_(
+ base::test::ScopedTaskEnvironment::MainThreadType::UI),
+ db_thread_("DBThread") {}
protected:
void SetUp() override {
@@ -134,7 +138,7 @@ class WebDataServiceTest : public testing::Test {
done.Wait();
}
- base::MessageLoopForUI message_loop_;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
base::Thread db_thread_;
base::FilePath profile_dir_;
scoped_refptr<AutofillWebDataService> wds_;
« no previous file with comments | « components/arc/arc_session_runner_unittest.cc ('k') | components/bookmarks/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698