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_; |