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

Unified Diff: device/u2f/u2f_request_unittest.cc

Issue 2849613002: Use ScopedTaskEnvironment instead of MessageLoopForUI in device tests. (Closed)
Patch Set: self-review 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 | « device/u2f/u2f_register_unittest.cc ('k') | device/u2f/u2f_sign_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/u2f/u2f_request_unittest.cc
diff --git a/device/u2f/u2f_request_unittest.cc b/device/u2f/u2f_request_unittest.cc
index 9775d86e67bc0a6de55f2c04d6b011ed43c16a49..718e83805a2270938211a5471a7441e1cfdce146 100644
--- a/device/u2f/u2f_request_unittest.cc
+++ b/device/u2f/u2f_request_unittest.cc
@@ -6,6 +6,7 @@
#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
+#include "base/test/scoped_task_environment.h"
#include "base/test/test_io_thread.h"
#include "device/base/mock_device_client.h"
#include "device/hid/mock_hid_service.h"
@@ -65,10 +66,13 @@ class TestResponseCallback {
class U2fRequestTest : public testing::Test {
public:
- U2fRequestTest() : io_thread_(base::TestIOThread::kAutoStart) {}
+ U2fRequestTest()
+ : scoped_task_environment_(
+ base::test::ScopedTaskEnvironment::MainThreadType::UI),
+ io_thread_(base::TestIOThread::kAutoStart) {}
protected:
- base::MessageLoopForUI message_loop_;
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
base::TestIOThread io_thread_;
device::MockDeviceClient device_client_;
};
« no previous file with comments | « device/u2f/u2f_register_unittest.cc ('k') | device/u2f/u2f_sign_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698