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

Issue 2489673003: RTCPeerConnection.getStats: Whitelist of stats in unittest. (Closed)

Created:
4 years, 1 month ago by hbos_chromium
Modified:
4 years ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, phoglund+watch_chromium.org, mcasas+watch+vc_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

RTCPeerConnection.getStats: Whitelist of stats in unittest. The promise-based getStats automatically translates WebRTC layer stats to JavaScript dictionary objects. The whitelist is meant to prevent leaking stats to the web platform that don't have an associated Chromium CL explicitly allowing it to be exposed (by updating the whitelist). The whitelist describes RTCStats-derived dictionary objects according to the spec[1]. A stats object returned by getStats must have a known "type" and any member it has must exist in the whitelist with the correct type. Note that this only prevents stats from being exposed to the web that would be returned by getStats in the scenario tested for in this unittest. In a future CL we will make sure that ALL stats in the whitelist are returned by the test to ensure sufficient test coverage and update the unittest if that is not the case. [1] https://w3c.github.io/webrtc-stats/ BUG=627816 Committed: https://crrev.com/4a9a590c838590a32b0a9cf5112ea2fb615a8f58 Cr-Commit-Position: refs/heads/master@{#434471}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Using JSON instead of semicolon separated string list #

Patch Set 3 : Updated a comment #

Total comments: 6

Patch Set 4 : Addressed nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+356 lines, -25 lines) Patch
M chrome/browser/media/webrtc/webrtc_browsertest.cc View 1 2 3 1 chunk +10 lines, -1 line 0 comments Download
M chrome/browser/media/webrtc/webrtc_browsertest_base.h View 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/media/webrtc/webrtc_browsertest_base.cc View 1 3 chunks +31 lines, -3 lines 0 comments Download
M chrome/test/data/webrtc/peerconnection_getstats.js View 1 2 3 1 chunk +311 lines, -20 lines 0 comments Download

Messages

Total messages: 32 (14 generated)
hbos_chromium
Please take a look, hta and phoglund
4 years, 1 month ago (2016-11-09 14:04:57 UTC) #5
hbos_chromium
Please take a look, hta and phoglund
4 years, 1 month ago (2016-11-09 14:04:58 UTC) #6
phoglund_chromium
Just a minor comment. https://codereview.chromium.org/2489673003/diff/20001/chrome/test/data/webrtc/peerconnection_getstats.js File chrome/test/data/webrtc/peerconnection_getstats.js (right): https://codereview.chromium.org/2489673003/diff/20001/chrome/test/data/webrtc/peerconnection_getstats.js#newcode254 chrome/test/data/webrtc/peerconnection_getstats.js:254: returnToTest('ok-' + iterableToSemicolonList(statsTypes.values())); I'd recommend ...
4 years, 1 month ago (2016-11-09 15:50:10 UTC) #9
hbos_chromium
PTAL phoglund, hta. https://codereview.chromium.org/2489673003/diff/20001/chrome/test/data/webrtc/peerconnection_getstats.js File chrome/test/data/webrtc/peerconnection_getstats.js (right): https://codereview.chromium.org/2489673003/diff/20001/chrome/test/data/webrtc/peerconnection_getstats.js#newcode254 chrome/test/data/webrtc/peerconnection_getstats.js:254: returnToTest('ok-' + iterableToSemicolonList(statsTypes.values())); On 2016/11/09 15:50:10, ...
4 years, 1 month ago (2016-11-09 17:24:32 UTC) #10
hbos_chromium
Note: We'll still want to have a whitelist filter, removing non-whitelisted stats on the way ...
4 years, 1 month ago (2016-11-09 17:48:16 UTC) #13
phoglund_chromium
lgtm https://codereview.chromium.org/2489673003/diff/60001/chrome/browser/media/webrtc/webrtc_browsertest_base.cc File chrome/browser/media/webrtc/webrtc_browsertest_base.cc (right): https://codereview.chromium.org/2489673003/diff/60001/chrome/browser/media/webrtc/webrtc_browsertest_base.cc#newcode124 chrome/browser/media/webrtc/webrtc_browsertest_base.cc:124: std::vector<std::string> JsonArrayToVectorOfStrings( Ok, I think this ended up ...
4 years, 1 month ago (2016-11-10 09:01:39 UTC) #14
hbos_chromium
Please take a look, hta. https://codereview.chromium.org/2489673003/diff/60001/chrome/browser/media/webrtc/webrtc_browsertest_base.cc File chrome/browser/media/webrtc/webrtc_browsertest_base.cc (right): https://codereview.chromium.org/2489673003/diff/60001/chrome/browser/media/webrtc/webrtc_browsertest_base.cc#newcode124 chrome/browser/media/webrtc/webrtc_browsertest_base.cc:124: std::vector<std::string> JsonArrayToVectorOfStrings( On 2016/11/10 ...
4 years, 1 month ago (2016-11-10 09:29:20 UTC) #15
hta - Chromium
Hm. I'm starting to think this is genuinely hard. The easiest place to see hardness ...
4 years, 1 month ago (2016-11-14 10:03:06 UTC) #16
hbos_chromium
I don't think it supports testing dictionary members at all? https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/resources/idlharness.js?q=idlharness.js&sq=package:chromium&dr&l=586 And I see it's ...
4 years, 1 month ago (2016-11-18 11:08:26 UTC) #17
hta - Chromium
On 2016/11/18 11:08:26, hbos_chromium wrote: > I don't think it supports testing dictionary members at ...
4 years, 1 month ago (2016-11-19 04:52:40 UTC) #18
hbos_chromium
On 2016/11/19 04:52:40, hta - Chromium wrote: > On 2016/11/18 11:08:26, hbos_chromium wrote: > > ...
4 years ago (2016-11-24 13:12:24 UTC) #19
hbos_chromium
On 2016/11/24 13:12:24, hbos_chromium wrote: > On 2016/11/19 04:52:40, hta - Chromium wrote: > > ...
4 years ago (2016-11-24 13:14:32 UTC) #20
hbos_chromium
Alternative: https://codereview.chromium.org/2530873002/
4 years ago (2016-11-24 14:39:29 UTC) #21
hta - Chromium
lgtm (with misgivings about the maintenance burden). note - CLs that modify this test are ...
4 years ago (2016-11-24 16:12:14 UTC) #22
hbos_chromium
https://codereview.chromium.org/2489673003/diff/60001/chrome/test/data/webrtc/peerconnection_getstats.js File chrome/test/data/webrtc/peerconnection_getstats.js (right): https://codereview.chromium.org/2489673003/diff/60001/chrome/test/data/webrtc/peerconnection_getstats.js#newcode264 chrome/test/data/webrtc/peerconnection_getstats.js:264: * Returns to test a complete list of whitelisted ...
4 years ago (2016-11-25 09:23:38 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2489673003/80001
4 years ago (2016-11-25 09:24:04 UTC) #27
commit-bot: I haz the power
Committed patchset #4 (id:80001)
4 years ago (2016-11-25 10:20:07 UTC) #30
commit-bot: I haz the power
4 years ago (2016-11-25 10:21:56 UTC) #32
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/4a9a590c838590a32b0a9cf5112ea2fb615a8f58
Cr-Commit-Position: refs/heads/master@{#434471}

Powered by Google App Engine
This is Rietveld 408576698