Chromium Code Reviews| Index: chromeos/cryptohome/system_salt_getter_unittest.cc |
| diff --git a/chromeos/cryptohome/system_salt_getter_unittest.cc b/chromeos/cryptohome/system_salt_getter_unittest.cc |
| index 5234129b35e84d77f733d3f6933c0a463ef08253..59ce31f2fac8126084197fbcd9113a34719fdbb7 100644 |
| --- a/chromeos/cryptohome/system_salt_getter_unittest.cc |
| +++ b/chromeos/cryptohome/system_salt_getter_unittest.cc |
| @@ -5,8 +5,8 @@ |
| #include "chromeos/cryptohome/system_salt_getter.h" |
| #include "base/bind.h" |
| -#include "base/message_loop/message_loop.h" |
| #include "base/run_loop.h" |
| +#include "base/test/scoped_task_environment.h" |
| #include "chromeos/dbus/dbus_thread_manager.h" |
| #include "chromeos/dbus/fake_cryptohome_client.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| @@ -22,7 +22,10 @@ void CopySystemSalt(std::string* out_system_salt, |
| class SystemSaltGetterTest : public testing::Test { |
| protected: |
| - SystemSaltGetterTest() : fake_cryptohome_client_(NULL) {} |
| + SystemSaltGetterTest() |
| + : scoped_task_environment_( |
| + base::test::ScopedTaskEnvironment::MainThreadType::UI), |
| + fake_cryptohome_client_(NULL) {} |
|
stevenjb
2017/04/27 18:39:10
nit: nullptr while we are here... bonus points for
fdoray
2017/04/27 20:35:03
Done.
|
| void SetUp() override { |
| fake_cryptohome_client_ = new FakeCryptohomeClient; |
| @@ -40,7 +43,7 @@ class SystemSaltGetterTest : public testing::Test { |
| DBusThreadManager::Shutdown(); |
| } |
| - base::MessageLoopForUI message_loop_; |
| + base::test::ScopedTaskEnvironment scoped_task_environment_; |
| FakeCryptohomeClient* fake_cryptohome_client_; |
| }; |