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

Side by Side Diff: webrtc/examples/androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java

Issue 2825313002: Espresso test for loopback video quality testing (Closed)
Patch Set: Rework colliderUrl as urlParameters Created 3 years, 7 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 /* 1 /*
2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2014 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 sendPostMessage(MessageType.LEAVE, leaveUrl, null); 124 sendPostMessage(MessageType.LEAVE, leaveUrl, null);
125 } 125 }
126 roomState = ConnectionState.CLOSED; 126 roomState = ConnectionState.CLOSED;
127 if (wsClient != null) { 127 if (wsClient != null) {
128 wsClient.disconnect(true); 128 wsClient.disconnect(true);
129 } 129 }
130 } 130 }
131 131
132 // Helper functions to get connection, post message and leave message URLs 132 // Helper functions to get connection, post message and leave message URLs
133 private String getConnectionUrl(RoomConnectionParameters connectionParameters) { 133 private String getConnectionUrl(RoomConnectionParameters connectionParameters) {
134 return connectionParameters.roomUrl + "/" + ROOM_JOIN + "/" + connectionPara meters.roomId; 134 String url = connectionParameters.roomUrl + "/" + ROOM_JOIN + "/" + connecti onParameters.roomId;
135 if (connectionParameters.urlParameters != null) {
136 url += "?" + connectionParameters.urlParameters;
137 }
138 return url;
135 } 139 }
136 140
137 private String getMessageUrl( 141 private String getMessageUrl(
138 RoomConnectionParameters connectionParameters, SignalingParameters signali ngParameters) { 142 RoomConnectionParameters connectionParameters, SignalingParameters signali ngParameters) {
139 return connectionParameters.roomUrl + "/" + ROOM_MESSAGE + "/" + connectionP arameters.roomId 143 return connectionParameters.roomUrl + "/" + ROOM_MESSAGE + "/" + connectionP arameters.roomId
140 + "/" + signalingParameters.clientId; 144 + "/" + signalingParameters.clientId;
141 } 145 }
142 146
143 private String getLeaveUrl( 147 private String getLeaveUrl(
144 RoomConnectionParameters connectionParameters, SignalingParameters signali ngParameters) { 148 RoomConnectionParameters connectionParameters, SignalingParameters signali ngParameters) {
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 jsonPut(json, "candidate", candidate.sdp); 414 jsonPut(json, "candidate", candidate.sdp);
411 return json; 415 return json;
412 } 416 }
413 417
414 // Converts a JSON candidate to a Java object. 418 // Converts a JSON candidate to a Java object.
415 IceCandidate toJavaCandidate(JSONObject json) throws JSONException { 419 IceCandidate toJavaCandidate(JSONObject json) throws JSONException {
416 return new IceCandidate( 420 return new IceCandidate(
417 json.getString("id"), json.getInt("label"), json.getString("candidate")) ; 421 json.getString("id"), json.getInt("label"), json.getString("candidate")) ;
418 } 422 }
419 } 423 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698