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 /** | 7 /** |
8 * Used as a shortcut. Moved to the top of the page due to race conditions. | 8 * Used as a shortcut. Moved to the top of the page due to race conditions. |
9 * @param {string} id is a case-sensitive string representing the unique ID of | 9 * @param {string} id is a case-sensitive string representing the unique ID of |
10 * the element being sought. | 10 * the element being sought. |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 help.style.display = 'none'; | 192 help.style.display = 'none'; |
193 } | 193 } |
194 | 194 |
195 function clearLog() { | 195 function clearLog() { |
196 $('messages').innerHTML = ''; | 196 $('messages').innerHTML = ''; |
197 $('debug').innerHTML = ''; | 197 $('debug').innerHTML = ''; |
198 } | 198 } |
199 | 199 |
200 /** | 200 /** |
201 * Prepopulate constraints from JS to the UI and setup callbacks in the scripts | 201 * Prepopulate constraints from JS to the UI and setup callbacks in the scripts |
202 * shared with PyAuto tests. Enumerates devices available via getUserMedia. | 202 * shared with browser tests or automated tests. Enumerates devices available |
| 203 * via getUserMedia. |
203 */ | 204 */ |
204 window.onload = function() { | 205 window.onload = function() { |
205 $('pc-createoffer-constraints').value = JSON.stringify( | 206 $('pc-createoffer-constraints').value = JSON.stringify( |
206 gCreateOfferConstraints, null, ' '); | 207 gCreateOfferConstraints, null, ' '); |
207 $('pc-createanswer-constraints').value = JSON.stringify( | 208 $('pc-createanswer-constraints').value = JSON.stringify( |
208 gCreateAnswerConstraints, null, ' '); | 209 gCreateAnswerConstraints, null, ' '); |
209 replaceReturnCallback(print_); | 210 replaceReturnCallback(print_); |
210 replaceDebugCallback(debug_); | 211 replaceDebugCallback(debug_); |
211 doNotAutoAddLocalStreamWhenCalled(); | 212 doNotAutoAddLocalStreamWhenCalled(); |
212 hookupDataChannelCallbacks_(); | 213 hookupDataChannelCallbacks_(); |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 } | 362 } |
362 | 363 |
363 /** @private */ | 364 /** @private */ |
364 function hookupDtmfSenderCallback_() { | 365 function hookupDtmfSenderCallback_() { |
365 setOnToneChange(function(tone) { | 366 setOnToneChange(function(tone) { |
366 debug('Sent DTMF tone: ' + tone.tone); | 367 debug('Sent DTMF tone: ' + tone.tone); |
367 $('dtmf-tones-sent').value = | 368 $('dtmf-tones-sent').value = |
368 tone.tone + '\n' + $('dtmf-tones-sent').value; | 369 tone.tone + '\n' + $('dtmf-tones-sent').value; |
369 }); | 370 }); |
370 } | 371 } |
OLD | NEW |