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

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

Issue 2528253002: Revert of 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 /**
112 * Asks this page to create a local offer. 103 * Asks this page to create a local offer.
113 * 104 *
114 * Returns a string on the format ok-(JSON encoded session description). 105 * Returns a string on the format ok-(JSON encoded session description).
115 * 106 *
116 * @param {!Object} constraints Any createOffer constraints. 107 * @param {!Object} constraints Any createOffer constraints.
117 */ 108 */
118 function createLocalOffer(constraints) { 109 function createLocalOffer(constraints) {
119 peerConnection_().createOffer( 110 peerConnection_().createOffer(
120 function(localOffer) { 111 function(localOffer) {
121 success('createOffer'); 112 success('createOffer');
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 function parseJson_(json) { 413 function parseJson_(json) {
423 // Escape since the \r\n in the SDP tend to get unescaped. 414 // Escape since the \r\n in the SDP tend to get unescaped.
424 jsonWithEscapedLineBreaks = json.replace(/\r\n/g, '\\r\\n'); 415 jsonWithEscapedLineBreaks = json.replace(/\r\n/g, '\\r\\n');
425 try { 416 try {
426 return JSON.parse(jsonWithEscapedLineBreaks); 417 return JSON.parse(jsonWithEscapedLineBreaks);
427 } catch (exception) { 418 } catch (exception) {
428 failTest('Failed to parse JSON: ' + jsonWithEscapedLineBreaks + ', got ' + 419 failTest('Failed to parse JSON: ' + jsonWithEscapedLineBreaks + ', got ' +
429 exception); 420 exception);
430 } 421 }
431 } 422 }
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