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

Unified Diff: device/u2f/u2f_sign_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_request_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/u2f/u2f_sign_unittest.cc
diff --git a/device/u2f/u2f_sign_unittest.cc b/device/u2f/u2f_sign_unittest.cc
index 95650cad6885b9400223ed4ca5f7289ee1c27e1d..fe53e38e43283c1b2fbe3209377cd278f5dc783f 100644
--- a/device/u2f/u2f_sign_unittest.cc
+++ b/device/u2f/u2f_sign_unittest.cc
@@ -5,6 +5,7 @@
#include <list>
#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"
@@ -16,7 +17,10 @@
namespace device {
class U2fSignTest : public testing::Test {
public:
- U2fSignTest() : io_thread_(base::TestIOThread::kAutoStart) {}
+ U2fSignTest()
+ : scoped_task_environment_(
+ base::test::ScopedTaskEnvironment::MainThreadType::UI),
+ io_thread_(base::TestIOThread::kAutoStart) {}
void SetUp() override {
MockHidService* hid_service = device_client_.hid_service();
@@ -24,7 +28,7 @@ class U2fSignTest : public testing::Test {
}
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_request_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698