| Index: dbus/end_to_end_async_unittest.cc
|
| diff --git a/dbus/end_to_end_async_unittest.cc b/dbus/end_to_end_async_unittest.cc
|
| index fb8030bf4cb86d0d4f5202cf562e24faaafdfa0b..d306c7a27e714ea5aaf62210e037699c9ccda0e6 100644
|
| --- a/dbus/end_to_end_async_unittest.cc
|
| +++ b/dbus/end_to_end_async_unittest.cc
|
| @@ -9,6 +9,7 @@
|
| #include "base/bind.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/message_loop/message_loop.h"
|
| +#include "base/run_loop.h"
|
| #include "base/stl_util.h"
|
| #include "base/test/test_timeouts.h"
|
| #include "base/threading/thread.h"
|
| @@ -77,7 +78,7 @@ class EndToEndAsyncTest : public testing::Test {
|
| base::Bind(&EndToEndAsyncTest::OnConnected,
|
| base::Unretained(this)));
|
| // Wait until the object proxy is connected to the signal.
|
| - message_loop_.Run();
|
| + base::RunLoop().Run();
|
|
|
| // Connect to the "Test2" signal of "org.chromium.TestInterface" from
|
| // the remote object. There was a bug where we were emitting error
|
| @@ -92,7 +93,7 @@ class EndToEndAsyncTest : public testing::Test {
|
| base::Bind(&EndToEndAsyncTest::OnConnected,
|
| base::Unretained(this)));
|
| // Wait until the object proxy is connected to the signal.
|
| - message_loop_.Run();
|
| + base::RunLoop().Run();
|
|
|
| // Create a second object proxy for the root object.
|
| root_object_proxy_ = bus_->GetObjectProxy("org.chromium.TestService",
|
| @@ -109,7 +110,7 @@ class EndToEndAsyncTest : public testing::Test {
|
| base::Bind(&EndToEndAsyncTest::OnConnected,
|
| base::Unretained(this)));
|
| // Wait until the root object proxy is connected to the signal.
|
| - message_loop_.Run();
|
| + base::RunLoop().Run();
|
| }
|
|
|
| virtual void TearDown() {
|
| @@ -172,7 +173,7 @@ class EndToEndAsyncTest : public testing::Test {
|
| // Wait for the give number of responses.
|
| void WaitForResponses(size_t num_responses) {
|
| while (response_strings_.size() < num_responses) {
|
| - message_loop_.Run();
|
| + base::RunLoop().Run();
|
| }
|
| }
|
|
|
| @@ -194,7 +195,7 @@ class EndToEndAsyncTest : public testing::Test {
|
| // Wait for the given number of errors.
|
| void WaitForErrors(size_t num_errors) {
|
| while (error_names_.size() < num_errors) {
|
| - message_loop_.Run();
|
| + base::RunLoop().Run();
|
| }
|
| }
|
|
|
| @@ -251,7 +252,7 @@ class EndToEndAsyncTest : public testing::Test {
|
| // Wait for the hey signal to be received.
|
| void WaitForTestSignal() {
|
| // OnTestSignal() will quit the message loop.
|
| - message_loop_.Run();
|
| + base::RunLoop().Run();
|
| }
|
|
|
| base::MessageLoop message_loop_;
|
| @@ -540,7 +541,7 @@ TEST_F(EndToEndAsyncTest, EmptyResponseCallback) {
|
| message_loop_.PostDelayedTask(FROM_HERE,
|
| base::MessageLoop::QuitClosure(),
|
| TestTimeouts::tiny_timeout());
|
| - message_loop_.Run();
|
| + base::RunLoop().Run();
|
| // We cannot tell if the empty callback is called, but at least we can
|
| // check if the test does not crash.
|
| }
|
| @@ -584,7 +585,7 @@ TEST_F(EndToEndAsyncTest, DisconnectedSignal) {
|
| base::Bind(&Bus::ClosePrivateConnection,
|
| base::Unretained(bus_.get())));
|
| // OnDisconnected callback quits message loop.
|
| - message_loop_.Run();
|
| + base::RunLoop().Run();
|
| EXPECT_EQ(1, on_disconnected_call_count_);
|
| }
|
|
|
| @@ -608,7 +609,7 @@ class SignalMultipleHandlerTest : public EndToEndAsyncTest {
|
| base::Bind(&SignalMultipleHandlerTest::OnAdditionalConnected,
|
| base::Unretained(this)));
|
| // Wait until the object proxy is connected to the signal.
|
| - message_loop_.Run();
|
| + base::RunLoop().Run();
|
| }
|
|
|
| protected:
|
|
|