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

Side by Side Diff: remoting/protocol/jingle_session_unittest.cc

Issue 9549029: Set incoming_only flag on the host side when NAT traversal is disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unittests Created 8 years, 9 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 | Annotate | Revision Log
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 "remoting/protocol/jingle_session.h" 5 #include "remoting/protocol/jingle_session.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 scoped_ptr<AuthenticatorFactory> factory( 140 scoped_ptr<AuthenticatorFactory> factory(
141 new FakeHostAuthenticatorFactory(auth_round_trips, auth_action, true)); 141 new FakeHostAuthenticatorFactory(auth_round_trips, auth_action, true));
142 host_server_->set_authenticator_factory(factory.Pass()); 142 host_server_->set_authenticator_factory(factory.Pass());
143 143
144 EXPECT_CALL(client_server_listener_, OnSessionManagerReady()) 144 EXPECT_CALL(client_server_listener_, OnSessionManagerReady())
145 .Times(1); 145 .Times(1);
146 client_server_.reset(new JingleSessionManager( 146 client_server_.reset(new JingleSessionManager(
147 scoped_ptr<TransportFactory>(new LibjingleTransportFactory()))); 147 scoped_ptr<TransportFactory>(new LibjingleTransportFactory())));
148 client_server_->Init(client_signal_strategy_.get(), 148 client_server_->Init(client_signal_strategy_.get(),
149 &client_server_listener_, NetworkSettings()); 149 &client_server_listener_, NetworkSettings(
150 TransportConfig::NAT_TRAVERSAL_OUTGOING));
150 } 151 }
151 152
152 void CloseSessionManager() { 153 void CloseSessionManager() {
153 if (host_server_.get()) { 154 if (host_server_.get()) {
154 host_server_->Close(); 155 host_server_->Close();
155 host_server_.reset(); 156 host_server_.reset();
156 } 157 }
157 if (client_server_.get()) { 158 if (client_server_.get()) {
158 client_server_->Close(); 159 client_server_->Close();
159 client_server_.reset(); 160 client_server_.reset();
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 TEST_F(JingleSessionTest, TestFailedChannelAuth) { 377 TEST_F(JingleSessionTest, TestFailedChannelAuth) {
377 CreateSessionManagers(1, FakeAuthenticator::ACCEPT); 378 CreateSessionManagers(1, FakeAuthenticator::ACCEPT);
378 ASSERT_NO_FATAL_FAILURE( 379 ASSERT_NO_FATAL_FAILURE(
379 InitiateConnection(1, FakeAuthenticator::REJECT_CHANNEL, false)); 380 InitiateConnection(1, FakeAuthenticator::REJECT_CHANNEL, false));
380 381
381 ASSERT_NO_FATAL_FAILURE(CreateChannel(true)); 382 ASSERT_NO_FATAL_FAILURE(CreateChannel(true));
382 } 383 }
383 384
384 } // namespace protocol 385 } // namespace protocol
385 } // namespace remoting 386 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/jingle_session_manager.cc ('k') | remoting/protocol/libjingle_transport_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698