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

Unified Diff: remoting/test/test_chromoting_client.cc

Issue 2542343004: Updating the Chromoting Test Driver to target the test environment (Closed)
Patch Set: Addressing feedback Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/test/test_chromoting_client.h ('k') | remoting/test/test_chromoting_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/test/test_chromoting_client.cc
diff --git a/remoting/test/test_chromoting_client.cc b/remoting/test/test_chromoting_client.cc
index cdbb8d97d3b6534df455166754de617e02ea354b..85b214a3dae1e279b5d19e0214e4f95cee574022 100644
--- a/remoting/test/test_chromoting_client.cc
+++ b/remoting/test/test_chromoting_client.cc
@@ -35,7 +35,8 @@ namespace test {
namespace {
const char kXmppHostName[] = "talk.google.com";
-const int kXmppPortNumber = 5222;
+const int kProdXmppPortNumber = 5222;
+const int kTestXmppPortNumber = 19316;
// Used as the TokenFetcherCallback for App Remoting sessions.
void FetchThirdPartyToken(
@@ -76,6 +77,7 @@ TestChromotingClient::~TestChromotingClient() {
}
void TestChromotingClient::StartConnection(
+ bool use_test_api_values,
const ConnectionSetupInfo& connection_setup_info) {
// Required to establish a connection to the host.
jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop();
@@ -105,8 +107,9 @@ void TestChromotingClient::StartConnection(
if (!signal_strategy_) {
XmppSignalStrategy::XmppServerConfig xmpp_server_config;
xmpp_server_config.host = kXmppHostName;
- xmpp_server_config.port = kXmppPortNumber;
- xmpp_server_config.use_tls = true;
+ xmpp_server_config.port =
+ use_test_api_values ? kTestXmppPortNumber : kProdXmppPortNumber;
+ xmpp_server_config.use_tls = !use_test_api_values;
xmpp_server_config.username = connection_setup_info.user_name;
xmpp_server_config.auth_token = connection_setup_info.access_token;
« no previous file with comments | « remoting/test/test_chromoting_client.h ('k') | remoting/test/test_chromoting_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698