| OLD | NEW |
| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/message_loop_proxy.h" | 7 #include "base/message_loop_proxy.h" |
| 8 #include "remoting/base/auto_thread_task_runner.h" | 8 #include "remoting/base/auto_thread_task_runner.h" |
| 9 #include "remoting/jingle_glue/mock_objects.h" | 9 #include "remoting/jingle_glue/mock_objects.h" |
| 10 #include "remoting/host/audio_capturer.h" | 10 #include "remoting/host/audio_capturer.h" |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 } else { | 253 } else { |
| 254 context_.network_task_runner()->PostTask( | 254 context_.network_task_runner()->PostTask( |
| 255 FROM_HERE, base::Bind(&ClientSession::OnConnectionClosed, | 255 FROM_HERE, base::Bind(&ClientSession::OnConnectionClosed, |
| 256 client, connection_ptr, | 256 client, connection_ptr, |
| 257 protocol::AUTHENTICATION_FAILED)); | 257 protocol::AUTHENTICATION_FAILED)); |
| 258 } | 258 } |
| 259 | 259 |
| 260 get_client(connection_index) = client; | 260 get_client(connection_index) = client; |
| 261 } | 261 } |
| 262 | 262 |
| 263 virtual void TearDown() OVERRIDE { |
| 264 // Make sure that the host has been properly deleted. |
| 265 DCHECK(host_.get() == NULL); |
| 266 } |
| 267 |
| 263 // Change the session route for |client1_|. | 268 // Change the session route for |client1_|. |
| 264 void ChangeSessionRoute(const std::string& channel_name, | 269 void ChangeSessionRoute(const std::string& channel_name, |
| 265 const protocol::TransportRoute& route) { | 270 const protocol::TransportRoute& route) { |
| 266 host_->OnSessionRouteChange(get_client(0), channel_name, route); | 271 host_->OnSessionRouteChange(get_client(0), channel_name, route); |
| 267 } | 272 } |
| 268 | 273 |
| 269 void DisconnectAllClients() { | 274 void DisconnectAllClients() { |
| 270 host_->DisconnectAllClients(); | 275 host_->DisconnectAllClients(); |
| 271 } | 276 } |
| 272 | 277 |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 ExpectClientDisconnected(0, true, video_packet_sent, | 676 ExpectClientDisconnected(0, true, video_packet_sent, |
| 672 InvokeWithoutArgs(this, &ChromotingHostTest::ShutdownHost)); | 677 InvokeWithoutArgs(this, &ChromotingHostTest::ShutdownHost)); |
| 673 EXPECT_CALL(host_status_observer_, OnShutdown()); | 678 EXPECT_CALL(host_status_observer_, OnShutdown()); |
| 674 | 679 |
| 675 host_->Start(xmpp_login_); | 680 host_->Start(xmpp_login_); |
| 676 SimulateClientConnection(0, true, false); | 681 SimulateClientConnection(0, true, false); |
| 677 message_loop_.Run(); | 682 message_loop_.Run(); |
| 678 } | 683 } |
| 679 | 684 |
| 680 } // namespace remoting | 685 } // namespace remoting |
| OLD | NEW |