| Index: net/dns/dns_config_service_posix_unittest.cc
|
| diff --git a/net/dns/dns_config_service_posix_unittest.cc b/net/dns/dns_config_service_posix_unittest.cc
|
| index c1ade5308049d9a4cb6fb6604920ff3dbd044bcc..35fcbab3500040aa45c7526d1af6708c6136ac09 100644
|
| --- a/net/dns/dns_config_service_posix_unittest.cc
|
| +++ b/net/dns/dns_config_service_posix_unittest.cc
|
| @@ -4,9 +4,12 @@
|
|
|
| #include <resolv.h>
|
|
|
| +#include <memory>
|
| +
|
| #include "base/cancelable_callback.h"
|
| #include "base/files/file_util.h"
|
| -#include "base/message_loop/message_loop.h"
|
| +#include "base/memory/ptr_util.h"
|
| +#include "base/run_loop.h"
|
| #include "base/sys_byteorder.h"
|
| #include "base/test/test_timeouts.h"
|
| #include "base/threading/platform_thread.h"
|
| @@ -208,7 +211,7 @@ class DnsConfigServicePosixTest : public testing::Test {
|
| void OnConfigChanged(const DnsConfig& config) {
|
| EXPECT_TRUE(config.IsValid());
|
| seen_config_ = true;
|
| - base::MessageLoop::current()->QuitWhenIdle();
|
| + run_loop_->QuitWhenIdle();
|
| }
|
|
|
| void WriteMockHostsFile(const char* hosts_string) {
|
| @@ -267,7 +270,8 @@ class DnsConfigServicePosixTest : public testing::Test {
|
|
|
| void ExpectChange() {
|
| EXPECT_FALSE(seen_config_);
|
| - base::MessageLoop::current()->Run();
|
| + run_loop_ = base::MakeUnique<base::RunLoop>();
|
| + run_loop_->Run();
|
| EXPECT_TRUE(seen_config_);
|
| seen_config_ = false;
|
| }
|
| @@ -277,6 +281,7 @@ class DnsConfigServicePosixTest : public testing::Test {
|
| base::FilePath temp_file_;
|
| std::unique_ptr<DnsConfigServicePosix> service_;
|
| DnsConfig test_config_;
|
| + std::unique_ptr<base::RunLoop> run_loop_;
|
| };
|
|
|
| TEST_F(DnsConfigServicePosixTest, SeenChangeSinceNetworkChange) {
|
|
|