Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(509)

Unified Diff: jingle/notifier/base/xmpp_connection_unittest.cc

Issue 354673005: Revert "[Mac] Reland r276808 Use a native MessagePump instead of a MessagePumpDefault" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « jingle/glue/chrome_async_socket_unittest.cc ('k') | tools/valgrind/memcheck/suppressions_mac.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « jingle/glue/chrome_async_socket_unittest.cc ('k') | tools/valgrind/memcheck/suppressions_mac.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698