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

Side by Side Diff: remoting/test/test_chromoting_client.cc

Issue 1008043003: Adding Test Fixture for initial test cases for the App Remoting Test Driver. Also includes the pub… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
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 "remoting/test/test_chromoting_client.h" 5 #include "remoting/test/test_chromoting_client.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 13 matching lines...) Expand all
24 #include "remoting/protocol/negotiating_client_authenticator.h" 24 #include "remoting/protocol/negotiating_client_authenticator.h"
25 #include "remoting/protocol/network_settings.h" 25 #include "remoting/protocol/network_settings.h"
26 #include "remoting/protocol/session_config.h" 26 #include "remoting/protocol/session_config.h"
27 #include "remoting/protocol/third_party_client_authenticator.h" 27 #include "remoting/protocol/third_party_client_authenticator.h"
28 #include "remoting/signaling/xmpp_signal_strategy.h" 28 #include "remoting/signaling/xmpp_signal_strategy.h"
29 #include "remoting/test/remote_host_info_fetcher.h" 29 #include "remoting/test/remote_host_info_fetcher.h"
30 #include "remoting/test/test_video_renderer.h" 30 #include "remoting/test/test_video_renderer.h"
31 31
32 namespace { 32 namespace {
33 33
34 const char kAppRemotingCapabilities[] =
35 "rateLimitResizeRequests desktopShape sendInitialResolution googleDrive";
36
34 const char kXmppHostName[] = "talk.google.com"; 37 const char kXmppHostName[] = "talk.google.com";
35 const int kXmppPortNumber = 5222; 38 const int kXmppPortNumber = 5222;
36 39
37 // Used as the TokenFetcherCallback for App Remoting sessions. 40 // Used as the TokenFetcherCallback for App Remoting sessions.
38 void FetchThirdPartyToken( 41 void FetchThirdPartyToken(
39 const std::string& authorization_token, 42 const std::string& authorization_token,
40 const std::string& shared_secret, 43 const std::string& shared_secret,
41 const GURL& token_url, 44 const GURL& token_url,
42 const std::string& host_public_key, 45 const std::string& host_public_key,
43 const std::string& scope, 46 const std::string& scope,
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 protocol::FetchSecretCallback fetch_secret_callback; 208 protocol::FetchSecretCallback fetch_secret_callback;
206 scoped_ptr<protocol::Authenticator> authenticator( 209 scoped_ptr<protocol::Authenticator> authenticator(
207 new protocol::NegotiatingClientAuthenticator( 210 new protocol::NegotiatingClientAuthenticator(
208 std::string(), // client_pairing_id 211 std::string(), // client_pairing_id
209 std::string(), // shared_secret 212 std::string(), // shared_secret
210 std::string(), // authentication_tag 213 std::string(), // authentication_tag
211 fetch_secret_callback, token_fetcher.Pass(), auth_methods)); 214 fetch_secret_callback, token_fetcher.Pass(), auth_methods));
212 215
213 chromoting_client_->Start(signal_strategy_.get(), authenticator.Pass(), 216 chromoting_client_->Start(signal_strategy_.get(), authenticator.Pass(),
214 transport_factory.Pass(), remote_host_info.host_jid, 217 transport_factory.Pass(), remote_host_info.host_jid,
215 std::string() // capabilities 218 kAppRemotingCapabilities);
216 );
217 } 219 }
218 220
219 void TestChromotingClient::EndConnection() { 221 void TestChromotingClient::EndConnection() {
220 // Clearing out the client will close the connection. 222 // Clearing out the client will close the connection.
221 chromoting_client_.reset(); 223 chromoting_client_.reset();
222 224
223 // The signal strategy object must outlive the client so destroy it next. 225 // The signal strategy object must outlive the client so destroy it next.
224 signal_strategy_.reset(); 226 signal_strategy_.reset();
225 227
226 // The connection state will be updated when the chromoting client was 228 // The connection state will be updated when the chromoting client was
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 DVLOG(1) << "TestChromotingClient::InjectClipboardEvent() Called"; 333 DVLOG(1) << "TestChromotingClient::InjectClipboardEvent() Called";
332 } 334 }
333 335
334 void TestChromotingClient::SetCursorShape( 336 void TestChromotingClient::SetCursorShape(
335 const protocol::CursorShapeInfo& cursor_shape) { 337 const protocol::CursorShapeInfo& cursor_shape) {
336 DVLOG(1) << "TestChromotingClient::SetCursorShape() Called"; 338 DVLOG(1) << "TestChromotingClient::SetCursorShape() Called";
337 } 339 }
338 340
339 } // namespace test 341 } // namespace test
340 } // namespace remoting 342 } // namespace remoting
OLDNEW
« remoting/test/remote_host_info_fetcher.cc ('K') | « remoting/test/test_chromoting_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698