OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <utility> | 5 #include <utility> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 void SetUp() override { | 97 void SetUp() override { |
98 // Create fake sessions. | 98 // Create fake sessions. |
99 host_session_ = new FakeSession(); | 99 host_session_ = new FakeSession(); |
100 owned_client_session_.reset(new FakeSession()); | 100 owned_client_session_.reset(new FakeSession()); |
101 client_session_ = owned_client_session_.get(); | 101 client_session_ = owned_client_session_.get(); |
102 | 102 |
103 // Create Connection objects. | 103 // Create Connection objects. |
104 if (is_using_webrtc()) { | 104 if (is_using_webrtc()) { |
105 host_connection_.reset(new WebrtcConnectionToClient( | 105 host_connection_.reset(new WebrtcConnectionToClient( |
106 base::WrapUnique(host_session_), | 106 base::WrapUnique(host_session_), |
107 TransportContext::ForTests(protocol::TransportRole::SERVER))); | 107 TransportContext::ForTests(protocol::TransportRole::SERVER), |
| 108 message_loop_.task_runner())); |
108 client_connection_.reset(new WebrtcConnectionToHost()); | 109 client_connection_.reset(new WebrtcConnectionToHost()); |
109 | 110 |
110 } else { | 111 } else { |
111 host_connection_.reset(new IceConnectionToClient( | 112 host_connection_.reset(new IceConnectionToClient( |
112 base::WrapUnique(host_session_), | 113 base::WrapUnique(host_session_), |
113 TransportContext::ForTests(protocol::TransportRole::SERVER), | 114 TransportContext::ForTests(protocol::TransportRole::SERVER), |
114 message_loop_.task_runner())); | 115 message_loop_.task_runner())); |
115 client_connection_.reset(new IceConnectionToHost()); | 116 client_connection_.reset(new IceConnectionToHost()); |
116 } | 117 } |
117 | 118 |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 client_video_renderer_.GetFrameConsumer()->received_frames().size(), | 310 client_video_renderer_.GetFrameConsumer()->received_frames().size(), |
310 0U); | 311 0U); |
311 EXPECT_EQ(client_video_renderer_.GetVideoStub()->received_packets().size(), | 312 EXPECT_EQ(client_video_renderer_.GetVideoStub()->received_packets().size(), |
312 1U); | 313 1U); |
313 } | 314 } |
314 | 315 |
315 } | 316 } |
316 | 317 |
317 } // namespace protocol | 318 } // namespace protocol |
318 } // namespace remoting | 319 } // namespace remoting |
OLD | NEW |