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

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

Issue 2527273003: WebRtcBrowserTest: Include all stats in getStats. (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/media/webrtc/webrtc_browsertest_base.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 * The one and only peer connection in this page. 8 * The one and only peer connection in this page.
9 * @private 9 * @private
10 */ 10 */
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 * video codec, e.g. the first one in the list on the 'm=video' SDP offer 93 * video codec, e.g. the first one in the list on the 'm=video' SDP offer
94 * line. |videoCodec| is the case-sensitive codec name, e.g. 'VP8' or 94 * line. |videoCodec| is the case-sensitive codec name, e.g. 'VP8' or
95 * 'H264'. 95 * 'H264'.
96 */ 96 */
97 function forceVideoCodec(videoCodec) { 97 function forceVideoCodec(videoCodec) {
98 gDefaultVideoCodec = videoCodec; 98 gDefaultVideoCodec = videoCodec;
99 returnToTest('ok-forced'); 99 returnToTest('ok-forced');
100 } 100 }
101 101
102 /** 102 /**
103 * Creates a data channel with the specified label.
104 * Returns 'ok-created' to test.
105 */
106 function createDataChannel(label) {
107 peerConnection_().createDataChannel(label);
108 returnToTest('ok-created');
109 }
110
111 /**
103 * Asks this page to create a local offer. 112 * Asks this page to create a local offer.
104 * 113 *
105 * Returns a string on the format ok-(JSON encoded session description). 114 * Returns a string on the format ok-(JSON encoded session description).
106 * 115 *
107 * @param {!Object} constraints Any createOffer constraints. 116 * @param {!Object} constraints Any createOffer constraints.
108 */ 117 */
109 function createLocalOffer(constraints) { 118 function createLocalOffer(constraints) {
110 peerConnection_().createOffer( 119 peerConnection_().createOffer(
111 function(localOffer) { 120 function(localOffer) {
112 success('createOffer'); 121 success('createOffer');
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 function parseJson_(json) { 422 function parseJson_(json) {
414 // Escape since the \r\n in the SDP tend to get unescaped. 423 // Escape since the \r\n in the SDP tend to get unescaped.
415 jsonWithEscapedLineBreaks = json.replace(/\r\n/g, '\\r\\n'); 424 jsonWithEscapedLineBreaks = json.replace(/\r\n/g, '\\r\\n');
416 try { 425 try {
417 return JSON.parse(jsonWithEscapedLineBreaks); 426 return JSON.parse(jsonWithEscapedLineBreaks);
418 } catch (exception) { 427 } catch (exception) {
419 failTest('Failed to parse JSON: ' + jsonWithEscapedLineBreaks + ', got ' + 428 failTest('Failed to parse JSON: ' + jsonWithEscapedLineBreaks + ', got ' +
420 exception); 429 exception);
421 } 430 }
422 } 431 }
OLDNEW
« no previous file with comments | « chrome/browser/media/webrtc/webrtc_browsertest_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698