| Index: base/threading/thread_unittest.cc
|
| diff --git a/base/threading/thread_unittest.cc b/base/threading/thread_unittest.cc
|
| index a89768e9d0a2690e97f6f1dc786ed097450d69d2..f4d024f1a26a79fb53ac599ff5ba3c8202727da8 100644
|
| --- a/base/threading/thread_unittest.cc
|
| +++ b/base/threading/thread_unittest.cc
|
| @@ -7,8 +7,7 @@
|
| #include <vector>
|
|
|
| #include "base/bind.h"
|
| -#include "base/location.h"
|
| -#include "base/single_thread_task_runner.h"
|
| +#include "base/message_loop/message_loop.h"
|
| #include "base/third_party/dynamic_annotations/dynamic_annotations.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "testing/platform_test.h"
|
| @@ -145,7 +144,7 @@
|
| EXPECT_TRUE(a.IsRunning());
|
|
|
| bool was_invoked = false;
|
| - a.task_runner()->PostTask(FROM_HERE, base::Bind(&ToggleValue, &was_invoked));
|
| + a.message_loop()->PostTask(FROM_HERE, base::Bind(&ToggleValue, &was_invoked));
|
|
|
| // wait for the task to run (we could use a kernel event here
|
| // instead to avoid busy waiting, but this is sufficient for
|
| @@ -166,12 +165,14 @@
|
| // Test that all events are dispatched before the Thread object is
|
| // destroyed. We do this by dispatching a sleep event before the
|
| // event that will toggle our sentinel value.
|
| - a.task_runner()->PostTask(
|
| - FROM_HERE, base::Bind(static_cast<void (*)(base::TimeDelta)>(
|
| - &base::PlatformThread::Sleep),
|
| - base::TimeDelta::FromMilliseconds(20)));
|
| - a.task_runner()->PostTask(FROM_HERE,
|
| - base::Bind(&ToggleValue, &was_invoked));
|
| + a.message_loop()->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(
|
| + static_cast<void (*)(base::TimeDelta)>(
|
| + &base::PlatformThread::Sleep),
|
| + base::TimeDelta::FromMilliseconds(20)));
|
| + a.message_loop()->PostTask(FROM_HERE, base::Bind(&ToggleValue,
|
| + &was_invoked));
|
| }
|
| EXPECT_TRUE(was_invoked);
|
| }
|
| @@ -220,7 +221,7 @@
|
|
|
| // Register an observer that writes into |captured_events| once the
|
| // thread's message loop is destroyed.
|
| - t.task_runner()->PostTask(
|
| + t.message_loop()->PostTask(
|
| FROM_HERE, base::Bind(&RegisterDestructionObserver,
|
| base::Unretained(&loop_destruction_observer)));
|
|
|
|
|