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/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "remoting/base/auto_thread_task_runner.h" | 8 #include "remoting/base/auto_thread_task_runner.h" |
9 #include "remoting/host/audio_capturer.h" | 9 #include "remoting/host/audio_capturer.h" |
10 #include "remoting/host/chromoting_host.h" | 10 #include "remoting/host/chromoting_host.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 EXPECT_CALL(*session_unowned1_, SetEventHandler(_)) | 96 EXPECT_CALL(*session_unowned1_, SetEventHandler(_)) |
97 .Times(AnyNumber()) | 97 .Times(AnyNumber()) |
98 .WillRepeatedly(SaveArg<0>(&session_unowned1_event_handler_)); | 98 .WillRepeatedly(SaveArg<0>(&session_unowned1_event_handler_)); |
99 EXPECT_CALL(*session_unowned2_, SetEventHandler(_)) | 99 EXPECT_CALL(*session_unowned2_, SetEventHandler(_)) |
100 .Times(AnyNumber()) | 100 .Times(AnyNumber()) |
101 .WillRepeatedly(SaveArg<0>(&session_unowned2_event_handler_)); | 101 .WillRepeatedly(SaveArg<0>(&session_unowned2_event_handler_)); |
102 EXPECT_CALL(*session1_, config()) | 102 EXPECT_CALL(*session1_, config()) |
103 .WillRepeatedly(ReturnRef(*session_config1_)); | 103 .WillRepeatedly(ReturnRef(*session_config1_)); |
104 EXPECT_CALL(*session2_, config()) | 104 EXPECT_CALL(*session2_, config()) |
105 .WillRepeatedly(ReturnRef(*session_config2_)); | 105 .WillRepeatedly(ReturnRef(*session_config2_)); |
| 106 EXPECT_CALL(*session_unowned1_, config()) |
| 107 .WillRepeatedly(ReturnRef(*session_config1_)); |
| 108 EXPECT_CALL(*session_unowned2_, config()) |
| 109 .WillRepeatedly(ReturnRef(*session_config2_)); |
106 | 110 |
107 owned_connection1_.reset( | 111 owned_connection1_.reset( |
108 new protocol::FakeConnectionToClient(make_scoped_ptr(session1_))); | 112 new protocol::FakeConnectionToClient(make_scoped_ptr(session1_))); |
109 owned_connection1_->set_host_stub(&host_stub1_); | 113 owned_connection1_->set_host_stub(&host_stub1_); |
110 connection1_ = owned_connection1_.get(); | 114 connection1_ = owned_connection1_.get(); |
111 connection1_->set_client_stub(&client_stub1_); | 115 connection1_->set_client_stub(&client_stub1_); |
112 | 116 |
113 owned_connection2_.reset( | 117 owned_connection2_.reset( |
114 new protocol::FakeConnectionToClient(make_scoped_ptr(session2_))); | 118 new protocol::FakeConnectionToClient(make_scoped_ptr(session2_))); |
115 owned_connection2_->set_host_stub(&host_stub2_); | 119 owned_connection2_->set_host_stub(&host_stub2_); |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 | 414 |
411 ExpectClientConnected(0); | 415 ExpectClientConnected(0); |
412 SimulateClientConnection(0, true, false); | 416 SimulateClientConnection(0, true, false); |
413 | 417 |
414 ExpectClientDisconnected(0); | 418 ExpectClientDisconnected(0); |
415 DisconnectAllClients(); | 419 DisconnectAllClients(); |
416 testing::Mock::VerifyAndClearExpectations(&host_status_observer_); | 420 testing::Mock::VerifyAndClearExpectations(&host_status_observer_); |
417 } | 421 } |
418 | 422 |
419 } // namespace remoting | 423 } // namespace remoting |
OLD | NEW |