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

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

Issue 2590293004: RTCPeerConnection.getStats: Whitelist updated after spec changed. (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 | « no previous file | 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 2016 The Chromium Authors. All rights reserved. 2 * Copyright 2016 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 * Maps "RTCStats.type" values to descriptions of whitelisted (allowed to be 8 * Maps "RTCStats.type" values to descriptions of whitelisted (allowed to be
9 * exposed to the web) RTCStats-derived dictionaries described below. 9 * exposed to the web) RTCStats-derived dictionaries described below.
10 * @private 10 * @private
(...skipping 10 matching lines...) Expand all
21 associateStatsId: 'string', 21 associateStatsId: 'string',
22 isRemote: 'boolean', 22 isRemote: 'boolean',
23 mediaType: 'string', 23 mediaType: 'string',
24 mediaTrackId: 'string', 24 mediaTrackId: 'string',
25 transportId: 'string', 25 transportId: 'string',
26 codecId: 'string', 26 codecId: 'string',
27 firCount: 'number', 27 firCount: 'number',
28 pliCount: 'number', 28 pliCount: 'number',
29 nackCount: 'number', 29 nackCount: 'number',
30 sliCount: 'number', 30 sliCount: 'number',
31 qpSum: 'number',
31 }); 32 });
32 33
33 /* 34 /*
34 * RTCCodecStats 35 * RTCCodecStats
35 * https://w3c.github.io/webrtc-stats/#codec-dict* 36 * https://w3c.github.io/webrtc-stats/#codec-dict*
36 * @private 37 * @private
37 */ 38 */
38 var kRTCCodecStats = new RTCStats_(null, { 39 var kRTCCodecStats = new RTCStats_(null, {
39 payloadType: 'number', 40 payloadType: 'number',
40 codec: 'string', 41 codec: 'string',
(...skipping 18 matching lines...) Expand all
59 packetsDiscarded: 'number', 60 packetsDiscarded: 'number',
60 packetsRepaired: 'number', 61 packetsRepaired: 'number',
61 burstPacketsLost: 'number', 62 burstPacketsLost: 'number',
62 burstPacketsDiscarded: 'number', 63 burstPacketsDiscarded: 'number',
63 burstLossCount: 'number', 64 burstLossCount: 'number',
64 burstDiscardCount: 'number', 65 burstDiscardCount: 'number',
65 burstLossRate: 'number', 66 burstLossRate: 'number',
66 burstDiscardRate: 'number', 67 burstDiscardRate: 'number',
67 gapLossRate: 'number', 68 gapLossRate: 'number',
68 gapDiscardRate: 'number', 69 gapDiscardRate: 'number',
70 framesDecoded: 'number',
69 }); 71 });
70 gStatsWhitelist.set('inbound-rtp', kRTCInboundRTPStreamStats); 72 gStatsWhitelist.set('inbound-rtp', kRTCInboundRTPStreamStats);
71 73
72 /* 74 /*
73 * RTCOutboundRTPStreamStats 75 * RTCOutboundRTPStreamStats
74 * https://w3c.github.io/webrtc-stats/#outboundrtpstats-dict* 76 * https://w3c.github.io/webrtc-stats/#outboundrtpstats-dict*
75 * @private 77 * @private
76 */ 78 */
77 var kRTCOutboundRTPStreamStats = new RTCStats_(kRTCRTPStreamStats, { 79 var kRTCOutboundRTPStreamStats = new RTCStats_(kRTCRTPStreamStats, {
78 packetsSent: 'number', 80 packetsSent: 'number',
79 bytesSent: 'number', 81 bytesSent: 'number',
80 targetBitrate: 'number', 82 targetBitrate: 'number',
81 roundTripTime: 'number', 83 roundTripTime: 'number',
84 framesEncoded: 'number',
82 }); 85 });
83 gStatsWhitelist.set('outbound-rtp', kRTCOutboundRTPStreamStats); 86 gStatsWhitelist.set('outbound-rtp', kRTCOutboundRTPStreamStats);
84 87
85 /* 88 /*
86 * RTCPeerConnectionStats 89 * RTCPeerConnectionStats
87 * https://w3c.github.io/webrtc-stats/#pcstats-dict* 90 * https://w3c.github.io/webrtc-stats/#pcstats-dict*
88 * @private 91 * @private
89 */ 92 */
90 var kRTCPeerConnectionStats = new RTCStats_(null, { 93 var kRTCPeerConnectionStats = new RTCStats_(null, {
91 dataChannelsOpened: 'number', 94 dataChannelsOpened: 'number',
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 remoteCertificateId: 'string', 166 remoteCertificateId: 'string',
164 }); 167 });
165 gStatsWhitelist.set('transport', kRTCTransportStats); 168 gStatsWhitelist.set('transport', kRTCTransportStats);
166 169
167 /* 170 /*
168 * RTCIceCandidateStats 171 * RTCIceCandidateStats
169 * https://w3c.github.io/webrtc-stats/#icecandidate-dict* 172 * https://w3c.github.io/webrtc-stats/#icecandidate-dict*
170 * @private 173 * @private
171 */ 174 */
172 var kRTCIceCandidateStats = new RTCStats_(null, { 175 var kRTCIceCandidateStats = new RTCStats_(null, {
176 transportId: 'string',
177 isRemote: 'boolean',
173 ip: 'string', 178 ip: 'string',
174 port: 'number', 179 port: 'number',
175 protocol: 'string', 180 protocol: 'string',
176 candidateType: 'string', 181 candidateType: 'string',
177 priority: 'number', 182 priority: 'number',
178 url: 'string', 183 url: 'string',
184 deleted: 'boolean',
179 }); 185 });
180 gStatsWhitelist.set('local-candidate', kRTCIceCandidateStats); 186 gStatsWhitelist.set('local-candidate', kRTCIceCandidateStats);
181 gStatsWhitelist.set('remote-candidate', kRTCIceCandidateStats); 187 gStatsWhitelist.set('remote-candidate', kRTCIceCandidateStats);
182 188
183 /* 189 /*
184 * RTCIceCandidatePairStats 190 * RTCIceCandidatePairStats
185 * https://w3c.github.io/webrtc-stats/#candidatepair-dict* 191 * https://w3c.github.io/webrtc-stats/#candidatepair-dict*
186 * @private 192 * @private
187 */ 193 */
188 var kRTCIceCandidatePairStats = new RTCStats_(null, { 194 var kRTCIceCandidatePairStats = new RTCStats_(null, {
189 transportId: 'string', 195 transportId: 'string',
190 localCandidateId: 'string', 196 localCandidateId: 'string',
191 remoteCandidateId: 'string', 197 remoteCandidateId: 'string',
192 state: 'string', 198 state: 'string',
193 priority: 'number', 199 priority: 'number',
194 nominated: 'boolean', 200 nominated: 'boolean',
195 writable: 'boolean', 201 writable: 'boolean',
196 readable: 'boolean', 202 readable: 'boolean',
197 bytesSent: 'number', 203 bytesSent: 'number',
198 bytesReceived: 'number', 204 bytesReceived: 'number',
199 totalRoundTripTime: 'number', 205 totalRoundTripTime: 'number',
200 currentRoundTripTime: 'number', 206 currentRoundTripTime: 'number',
201 // TODO(hbos): *Rtt have been renamed to *RoundTripTime, both listed at the
202 // moment. As soon as https://codereview.webrtc.org/2576383002/ has rolled in,
203 // remove the *Rtt ones. crbug.com/627816
204 totalRtt: 'number',
205 currentRtt: 'number',
206 availableOutgoingBitrate: 'number', 207 availableOutgoingBitrate: 'number',
207 availableIncomingBitrate: 'number', 208 availableIncomingBitrate: 'number',
208 requestsReceived: 'number', 209 requestsReceived: 'number',
209 requestsSent: 'number', 210 requestsSent: 'number',
210 responsesReceived: 'number', 211 responsesReceived: 'number',
211 responsesSent: 'number', 212 responsesSent: 'number',
212 retransmissionsReceived: 'number', 213 retransmissionsReceived: 'number',
213 retransmissionsSent: 'number', 214 retransmissionsSent: 'number',
214 consentRequestsReceived: 'number', 215 consentRequestsReceived: 'number',
215 consentRequestsSent: 'number', 216 consentRequestsSent: 'number',
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 if (typeof(element) !== elementType) { 357 if (typeof(element) !== elementType) {
357 throw failTest('stats.' + propertyName + ' should have a different ' + 358 throw failTest('stats.' + propertyName + ' should have a different ' +
358 'type according to the whitelist (an element of the array has ' + 359 'type according to the whitelist (an element of the array has ' +
359 'the incorrect type): ' + JSON.stringify(stats[propertyName]) + 360 'the incorrect type): ' + JSON.stringify(stats[propertyName]) +
360 ' vs ' + whitelistedStats[propertyName]); 361 ' vs ' + whitelistedStats[propertyName]);
361 } 362 }
362 } 363 }
363 } 364 }
364 } 365 }
365 } 366 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698