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

Side by Side Diff: chrome/test/data/webrtc/peerconnection.js

Issue 934793002: Made WebRTC AQ test two-way, adjusted volume on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@threading_fake_device
Patch Set: Also re-enabling test on mac (since this patch fixes that test) Created 5 years, 10 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
« no previous file with comments | « chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * Copyright 2014 The Chromium Authors. All rights reserved. 2 * Copyright 2014 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 * We need a STUN server for some API calls. 8 * We need a STUN server for some API calls.
9 * @private 9 * @private
10 */ 10 */
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 peerConnection_().addIceCandidate(new RTCIceCandidate(iceCandidate, 202 peerConnection_().addIceCandidate(new RTCIceCandidate(iceCandidate,
203 function() { success_('addIceCandidate'); }, 203 function() { success_('addIceCandidate'); },
204 function(error) { failure_('addIceCandidate', error); } 204 function(error) { failure_('addIceCandidate', error); }
205 )); 205 ));
206 }); 206 });
207 207
208 returnToTest('ok-received-candidates'); 208 returnToTest('ok-received-candidates');
209 } 209 }
210 210
211 /** 211 /**
212 * Sets the mute state of the selected media element.
213 *
214 * Returns ok-muted on success.
215 *
216 * @param elementId The id of the element to mute.
217 * @param muted The mute state to set.
218 */
219 function setMediaElementMuted(elementId, muted) {
220 var element = document.getElementById(elementId);
221 if (!element)
222 throw failTest('Cannot mute ' + elementId + '; does not exist.');
223 element.muted = muted;
224 returnToTest('ok-muted');
225 }
226
227 /**
212 * Returns 228 * Returns
213 */ 229 */
214 function hasSeenCryptoInSdp() { 230 function hasSeenCryptoInSdp() {
215 returnToTest(gHasSeenCryptoInSdp); 231 returnToTest(gHasSeenCryptoInSdp);
216 } 232 }
217 233
218 // Internals. 234 // Internals.
219 235
220 /** @private */ 236 /** @private */
221 function createPeerConnection_(stun_server) { 237 function createPeerConnection_(stun_server) {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 function parseJson_(json) { 324 function parseJson_(json) {
309 // Escape since the \r\n in the SDP tend to get unescaped. 325 // Escape since the \r\n in the SDP tend to get unescaped.
310 jsonWithEscapedLineBreaks = json.replace(/\r\n/g, '\\r\\n'); 326 jsonWithEscapedLineBreaks = json.replace(/\r\n/g, '\\r\\n');
311 try { 327 try {
312 return JSON.parse(jsonWithEscapedLineBreaks); 328 return JSON.parse(jsonWithEscapedLineBreaks);
313 } catch (exception) { 329 } catch (exception) {
314 failTest('Failed to parse JSON: ' + jsonWithEscapedLineBreaks + ', got ' + 330 failTest('Failed to parse JSON: ' + jsonWithEscapedLineBreaks + ', got ' +
315 exception); 331 exception);
316 } 332 }
317 } 333 }
OLDNEW
« no previous file with comments | « chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698