| Index: jingle/notifier/base/xmpp_connection_unittest.cc
|
| diff --git a/jingle/notifier/base/xmpp_connection_unittest.cc b/jingle/notifier/base/xmpp_connection_unittest.cc
|
| index 0573363cf309cc528c4f9cffab7142855a9ecae2..3212abcbb8607ebd6b62b15716be237d4b8f664e 100644
|
| --- a/jingle/notifier/base/xmpp_connection_unittest.cc
|
| +++ b/jingle/notifier/base/xmpp_connection_unittest.cc
|
| @@ -11,7 +11,6 @@
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/message_loop/message_loop.h"
|
| -#include "base/message_loop/message_pump_default.h"
|
| #include "jingle/glue/mock_task.h"
|
| #include "jingle/glue/task_pump.h"
|
| #include "jingle/notifier/base/weak_xmpp_client.h"
|
| @@ -75,23 +74,19 @@ class MockXmppConnectionDelegate : public XmppConnection::Delegate {
|
| class XmppConnectionTest : public testing::Test {
|
| protected:
|
| XmppConnectionTest()
|
| - : mock_pre_xmpp_auth_(new MockPreXmppAuth()) {
|
| - scoped_ptr<base::MessagePump> pump(new base::MessagePumpDefault());
|
| - message_loop_.reset(new base::MessageLoop(pump.Pass()));
|
| -
|
| - url_request_context_getter_ = new net::TestURLRequestContextGetter(
|
| - message_loop_->message_loop_proxy());
|
| - }
|
| + : mock_pre_xmpp_auth_(new MockPreXmppAuth()),
|
| + url_request_context_getter_(new net::TestURLRequestContextGetter(
|
| + message_loop_.message_loop_proxy())) {}
|
|
|
| virtual ~XmppConnectionTest() {}
|
|
|
| virtual void TearDown() {
|
| // Clear out any messages posted by XmppConnection's destructor.
|
| - message_loop_->RunUntilIdle();
|
| + message_loop_.RunUntilIdle();
|
| }
|
|
|
| // Needed by XmppConnection.
|
| - scoped_ptr<base::MessageLoop> message_loop_;
|
| + base::MessageLoop message_loop_;
|
| MockXmppConnectionDelegate mock_xmpp_connection_delegate_;
|
| scoped_ptr<MockPreXmppAuth> mock_pre_xmpp_auth_;
|
| scoped_refptr<net::TestURLRequestContextGetter> url_request_context_getter_;
|
| @@ -117,7 +112,7 @@ TEST_F(XmppConnectionTest, ImmediateFailure) {
|
|
|
| // We need to do this *before* |xmpp_connection| gets destroyed or
|
| // our delegate won't be called.
|
| - message_loop_->RunUntilIdle();
|
| + message_loop_.RunUntilIdle();
|
| }
|
|
|
| TEST_F(XmppConnectionTest, PreAuthFailure) {
|
| @@ -136,7 +131,7 @@ TEST_F(XmppConnectionTest, PreAuthFailure) {
|
|
|
| // We need to do this *before* |xmpp_connection| gets destroyed or
|
| // our delegate won't be called.
|
| - message_loop_->RunUntilIdle();
|
| + message_loop_.RunUntilIdle();
|
| }
|
|
|
| TEST_F(XmppConnectionTest, FailureAfterPreAuth) {
|
| @@ -155,7 +150,7 @@ TEST_F(XmppConnectionTest, FailureAfterPreAuth) {
|
|
|
| // We need to do this *before* |xmpp_connection| gets destroyed or
|
| // our delegate won't be called.
|
| - message_loop_->RunUntilIdle();
|
| + message_loop_.RunUntilIdle();
|
| }
|
|
|
| TEST_F(XmppConnectionTest, RaisedError) {
|
| @@ -252,7 +247,7 @@ TEST_F(XmppConnectionTest, TasksDontRunAfterXmppConnectionDestructor) {
|
| }
|
|
|
| // This should destroy |task_pump|, but |task| still shouldn't run.
|
| - message_loop_->RunUntilIdle();
|
| + message_loop_.RunUntilIdle();
|
| }
|
|
|
| } // namespace notifier
|
|
|