OLD | NEW |
1 /** | 1 /** |
2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 // This file requires these functions to be defined globally by someone else: | 7 // This file requires these functions to be defined globally by someone else: |
8 // function handleMessage(peerConnection, message) | 8 // function handleMessage(peerConnection, message) |
9 // function createPeerConnection(stun_server, enableLogging) | 9 // function createPeerConnection(stun_server, enableLogging) |
10 // function setupCall(peerConnection) | 10 // function setupCall(peerConnection) |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 * @private | 66 * @private |
67 */ | 67 */ |
68 var gDtmfSender = null; | 68 var gDtmfSender = null; |
69 | 69 |
70 /** | 70 /** |
71 * We need a STUN server for some API calls. | 71 * We need a STUN server for some API calls. |
72 * @private | 72 * @private |
73 */ | 73 */ |
74 var STUN_SERVER = 'stun.l.google.com:19302'; | 74 var STUN_SERVER = 'stun.l.google.com:19302'; |
75 | 75 |
76 // Public interface to PyAuto test. | 76 // Public interface to tests. |
77 | 77 |
78 | 78 |
79 /** | 79 /** |
80 * Connects to the provided peerconnection_server. | 80 * Connects to the provided peerconnection_server. |
81 * | 81 * |
82 * @param{string} serverUrl The server URL in string form without an ending | 82 * @param{string} serverUrl The server URL in string form without an ending |
83 * slash, something like http://localhost:8888. | 83 * slash, something like http://localhost:8888. |
84 * @param{string} clientName The name to use when connecting to the server. | 84 * @param{string} clientName The name to use when connecting to the server. |
85 */ | 85 */ |
86 function connect(serverUrl, clientName) { | 86 function connect(serverUrl, clientName) { |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 /** @private */ | 555 /** @private */ |
556 function readResponseHeader_(request, key) { | 556 function readResponseHeader_(request, key) { |
557 var value = request.getResponseHeader(key) | 557 var value = request.getResponseHeader(key) |
558 if (value == null || value.length == 0) { | 558 if (value == null || value.length == 0) { |
559 addTestFailure('Received empty value ' + value + | 559 addTestFailure('Received empty value ' + value + |
560 ' for response header key ' + key + '.'); | 560 ' for response header key ' + key + '.'); |
561 return -1; | 561 return -1; |
562 } | 562 } |
563 return parseInt(value); | 563 return parseInt(value); |
564 } | 564 } |
OLD | NEW |