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

Unified Diff: chrome/browser/password_manager/native_backend_libsecret_unittest.cc

Issue 2851593002: Use ScopedTaskEnvironment instead of MessageLoopForUI in chrome tests. (Closed)
Patch Set: fix-build-error 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: chrome/browser/password_manager/native_backend_libsecret_unittest.cc
diff --git a/chrome/browser/password_manager/native_backend_libsecret_unittest.cc b/chrome/browser/password_manager/native_backend_libsecret_unittest.cc
index fe5fc8617a245968e71c99b7c3563c3edaa1ef1b..8b0314481ea3ea09b75791838a45325261577659 100644
--- a/chrome/browser/password_manager/native_backend_libsecret_unittest.cc
+++ b/chrome/browser/password_manager/native_backend_libsecret_unittest.cc
@@ -14,6 +14,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/test/scoped_task_environment.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "chrome/browser/password_manager/native_backend_libsecret.h"
@@ -273,7 +274,9 @@ class NativeBackendLibsecretTest : public testing::Test {
SYNCED,
};
- NativeBackendLibsecretTest() {}
+ NativeBackendLibsecretTest()
+ : scoped_task_environment_(
+ base::test::ScopedTaskEnvironment::MainThreadType::UI) {}
void SetUp() override {
ASSERT_FALSE(global_mock_libsecret_items);
@@ -598,7 +601,7 @@ class NativeBackendLibsecretTest : public testing::Test {
EXPECT_TRUE(global_mock_libsecret_items->empty());
}
- base::MessageLoopForUI message_loop_;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
// Provide some test forms to avoid having to set them up in each test.
PasswordForm form_google_;
« no previous file with comments | « chrome/browser/chromeos/settings/install_attributes_unittest.cc ('k') | chrome/browser/ui/app_list/search/history_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698