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

Unified Diff: remoting/protocol/jingle_session_unittest.cc

Issue 9455070: Remove the dependency to ws2_32.dll from talk_base::ThreadManager and talk_base::Thread. (Closed) Base URL: https://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 10 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/thread_wrapper.cc ('k') | third_party/libjingle/libjingle.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/jingle_session_unittest.cc
===================================================================
--- remoting/protocol/jingle_session_unittest.cc (revision 124320)
+++ remoting/protocol/jingle_session_unittest.cc (working copy)
@@ -81,8 +81,10 @@
class JingleSessionTest : public testing::Test {
public:
- JingleSessionTest()
- : message_loop_(talk_base::Thread::Current()) {
+ JingleSessionTest() {
+ talk_base::ThreadManager::Instance()->WrapCurrentThread();
+ message_loop_.reset(
+ new JingleThreadMessageLoop(talk_base::Thread::Current()));
}
// Helper method that handles OnIncomingSession().
@@ -113,7 +115,7 @@
virtual void TearDown() {
CloseSessions();
CloseSessionManager();
- message_loop_.RunAllPending();
+ message_loop_->RunAllPending();
}
void CloseSessions() {
@@ -224,7 +226,7 @@
base::Bind(&MockSessionCallback::OnStateChange,
base::Unretained(&client_connection_callback_)));
- message_loop_.RunAllPending();
+ message_loop_->RunAllPending();
}
void CreateChannel(bool expect_fail) {
@@ -238,7 +240,7 @@
.WillOnce(QuitThreadOnCounter(&counter));
EXPECT_CALL(host_channel_callback_, OnDone(_))
.WillOnce(QuitThreadOnCounter(&counter));
- message_loop_.Run();
+ message_loop_->Run();
if (expect_fail) {
// At least one socket should fail to connect.
@@ -249,7 +251,7 @@
}
}
- JingleThreadMessageLoop message_loop_;
+ scoped_ptr<JingleThreadMessageLoop> message_loop_;
scoped_ptr<FakeSignalStrategy> host_signal_strategy_;
scoped_ptr<FakeSignalStrategy> client_signal_strategy_;
@@ -305,7 +307,7 @@
base::Bind(&MockSessionCallback::OnStateChange,
base::Unretained(&client_connection_callback_)));
- message_loop_.RunAllPending();
+ message_loop_->RunAllPending();
}
// Verify that we can connect two endpoints with single-step authentication.
@@ -353,7 +355,7 @@
StreamConnectionTester tester(host_socket_.get(), client_socket_.get(),
kMessageSize, kMessages);
tester.Start();
- message_loop_.Run();
+ message_loop_->Run();
tester.CheckResults();
}
@@ -368,7 +370,7 @@
StreamConnectionTester tester(host_socket_.get(), client_socket_.get(),
kMessageSize, kMessages);
tester.Start();
- message_loop_.Run();
+ message_loop_->Run();
tester.CheckResults();
}
« no previous file with comments | « jingle/glue/thread_wrapper.cc ('k') | third_party/libjingle/libjingle.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698