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

Side by Side Diff: jingle/notifier/base/xmpp_connection_unittest.cc

Issue 1179163002: Migrate callers of message_loop_proxy() to task_runner() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "jingle/notifier/base/xmpp_connection.h" 5 #include "jingle/notifier/base/xmpp_connection.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 }; 73 };
74 74
75 class XmppConnectionTest : public testing::Test { 75 class XmppConnectionTest : public testing::Test {
76 protected: 76 protected:
77 XmppConnectionTest() 77 XmppConnectionTest()
78 : mock_pre_xmpp_auth_(new MockPreXmppAuth()) { 78 : mock_pre_xmpp_auth_(new MockPreXmppAuth()) {
79 scoped_ptr<base::MessagePump> pump(new base::MessagePumpDefault()); 79 scoped_ptr<base::MessagePump> pump(new base::MessagePumpDefault());
80 message_loop_.reset(new base::MessageLoop(pump.Pass())); 80 message_loop_.reset(new base::MessageLoop(pump.Pass()));
81 81
82 url_request_context_getter_ = new net::TestURLRequestContextGetter( 82 url_request_context_getter_ = new net::TestURLRequestContextGetter(
83 message_loop_->message_loop_proxy()); 83 message_loop_->task_runner());
84 } 84 }
85 85
86 ~XmppConnectionTest() override {} 86 ~XmppConnectionTest() override {}
87 87
88 void TearDown() override { 88 void TearDown() override {
89 // Clear out any messages posted by XmppConnection's destructor. 89 // Clear out any messages posted by XmppConnection's destructor.
90 message_loop_->RunUntilIdle(); 90 message_loop_->RunUntilIdle();
91 } 91 }
92 92
93 // Needed by XmppConnection. 93 // Needed by XmppConnection.
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 .WillByDefault(Return(TASK_STATE_ERROR)); 249 .WillByDefault(Return(TASK_STATE_ERROR));
250 EXPECT_CALL(*task, ProcessStart()).Times(0); 250 EXPECT_CALL(*task, ProcessStart()).Times(0);
251 task->Start(); 251 task->Start();
252 } 252 }
253 253
254 // This should destroy |task_pump|, but |task| still shouldn't run. 254 // This should destroy |task_pump|, but |task| still shouldn't run.
255 message_loop_->RunUntilIdle(); 255 message_loop_->RunUntilIdle();
256 } 256 }
257 257
258 } // namespace notifier 258 } // namespace notifier
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_socket_thread.cc ('k') | jingle/notifier/listener/push_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698