| Index: chrome/browser/local_discovery/local_domain_resolver_unittest.cc
|
| diff --git a/chrome/browser/local_discovery/local_domain_resolver_unittest.cc b/chrome/browser/local_discovery/local_domain_resolver_unittest.cc
|
| index b66f2b4ddc3ba01addaee57f197e3b399179414d..241c3a14c580e6c24f5e19b8629cbcbd6e6fb87b 100644
|
| --- a/chrome/browser/local_discovery/local_domain_resolver_unittest.cc
|
| +++ b/chrome/browser/local_discovery/local_domain_resolver_unittest.cc
|
| @@ -5,6 +5,7 @@
|
| #include <stdint.h>
|
|
|
| #include "base/location.h"
|
| +#include "base/run_loop.h"
|
| #include "base/single_thread_task_runner.h"
|
| #include "base/threading/thread_task_runner_handle.h"
|
| #include "chrome/browser/local_discovery/service_discovery_client_impl.h"
|
| @@ -84,13 +85,11 @@ class LocalDomainResolverTest : public testing::Test {
|
| }
|
|
|
| void RunFor(base::TimeDelta time_period) {
|
| - base::CancelableCallback<void()> callback(
|
| - base::Bind(&base::MessageLoop::QuitWhenIdle,
|
| - base::Unretained(base::MessageLoop::current())));
|
| + base::RunLoop run_loop;
|
| + base::CancelableCallback<void()> callback(run_loop.QuitWhenIdleClosure());
|
| base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
|
| FROM_HERE, callback.callback(), time_period);
|
| -
|
| - base::MessageLoop::current()->Run();
|
| + run_loop.Run();
|
| callback.Cancel();
|
| }
|
|
|
|
|