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

Side by Side Diff: remoting/host/client_session_unittest.cc

Issue 1673723002: Use IpcVideoFrameCapturer on network thread instead of capturer thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « remoting/host/client_session.cc ('k') | remoting/host/desktop_process.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/host/client_session.h" 5 #include "remoting/host/client_session.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // Mock protocol::ConnectionToClient APIs called directly by ClientSession. 181 // Mock protocol::ConnectionToClient APIs called directly by ClientSession.
182 // HostStub is not touched by ClientSession, so we can safely pass nullptr. 182 // HostStub is not touched by ClientSession, so we can safely pass nullptr.
183 scoped_ptr<protocol::FakeConnectionToClient> connection( 183 scoped_ptr<protocol::FakeConnectionToClient> connection(
184 new protocol::FakeConnectionToClient(std::move(session))); 184 new protocol::FakeConnectionToClient(std::move(session)));
185 connection->set_client_stub(&client_stub_); 185 connection->set_client_stub(&client_stub_);
186 connection_ = connection.get(); 186 connection_ = connection.get();
187 187
188 client_session_.reset(new ClientSession( 188 client_session_.reset(new ClientSession(
189 &session_event_handler_, 189 &session_event_handler_,
190 task_runner_, // Audio thread. 190 task_runner_, // Audio thread.
191 task_runner_, // Input thread.
192 task_runner_, // Capture thread.
193 task_runner_, // Encode thread.
194 task_runner_, // Network thread.
195 task_runner_, // UI thread.
196 std::move(connection), desktop_environment_factory_.get(), 191 std::move(connection), desktop_environment_factory_.get(),
197 base::TimeDelta(), nullptr, extensions_)); 192 base::TimeDelta(), nullptr, extensions_));
198 } 193 }
199 194
200 void ClientSessionTest::ConnectClientSession() { 195 void ClientSessionTest::ConnectClientSession() {
201 EXPECT_CALL(session_event_handler_, OnSessionAuthenticated(_)); 196 EXPECT_CALL(session_event_handler_, OnSessionAuthenticated(_));
202 EXPECT_CALL(session_event_handler_, OnSessionChannelsConnected(_)); 197 EXPECT_CALL(session_event_handler_, OnSessionChannelsConnected(_));
203 198
204 // Stubs should be set only after connection is authenticated. 199 // Stubs should be set only after connection is authenticated.
205 EXPECT_FALSE(connection_->clipboard_stub()); 200 EXPECT_FALSE(connection_->clipboard_stub());
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 512
518 client_session_->DisconnectSession(protocol::OK); 513 client_session_->DisconnectSession(protocol::OK);
519 client_session_.reset(); 514 client_session_.reset();
520 515
521 // ext1 was instantiated and wrapped the video capturer. 516 // ext1 was instantiated and wrapped the video capturer.
522 EXPECT_TRUE(extension.was_instantiated()); 517 EXPECT_TRUE(extension.was_instantiated());
523 EXPECT_TRUE(extension.has_wrapped_video_capturer()); 518 EXPECT_TRUE(extension.has_wrapped_video_capturer());
524 } 519 }
525 520
526 } // namespace remoting 521 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/client_session.cc ('k') | remoting/host/desktop_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698