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

Issue 2706563003: Create the API that returns the RTCConfiguration of the PeerConnection.

Created:
3 years, 10 months ago by zhihuang1
Modified:
3 years, 6 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, mlamouri+watch-test-runner_chromium.org, posciak+watch_chromium.org, blink-reviews, jam, feature-media-reviews_chromium.org, dglazkov+blink, darin-cc_chromium.org, haraken, einbinder+watch-test-runner_chromium.org, kinuko+watch, blink-reviews-api_chromium.org, jochen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Create the API that returns the RTCConfiguration of the PeerConnection. Returns the last configuration applied via setConfiguration, or if setConfiguration hasn't been called, the configuration the RTCPeerConnection was constructed with. Intent to ship thread: https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/R_NKBRbDzhE/8gaX7HCjFgAJ BUG=chromium:587453

Patch Set 1 : Wire up the getConfiguration() #

Patch Set 2 : Fix the build. #

Patch Set 3 : rebaselining #

Total comments: 7

Patch Set 4 : Verify the certificate. #

Patch Set 5 : rebaselining again #

Total comments: 35

Patch Set 6 : Response to the CR comments. #

Total comments: 6

Patch Set 7 : Fix the issues in data type conversion. #

Total comments: 3

Patch Set 8 : Merge. #

Patch Set 9 : rebaselining #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+249 lines, -212 lines) Patch
M content/browser/webrtc/webrtc_browsertest.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M content/renderer/media/rtc_peer_connection_handler.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/media/rtc_peer_connection_handler.cc View 1 2 3 4 5 6 7 6 chunks +74 lines, -7 lines 0 comments Download
M content/shell/test_runner/mock_webrtc_peer_connection_handler.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/shell/test_runner/mock_webrtc_peer_connection_handler.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -0 lines 0 comments Download
A + content/test/data/media/peerconnection-setAndGetConfiguration.html View 1 2 3 4 5 6 7 3 chunks +84 lines, -22 lines 2 comments Download
D content/test/data/media/peerconnection-setConfiguration.html View 1 2 3 4 5 6 7 1 chunk +0 lines, -173 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/webrtc/rtcpeerconnection/rtcpeerconnection-idl-expected.txt View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp View 1 2 3 4 5 6 7 3 chunks +61 lines, -1 line 1 comment Download
M third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.idl View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/ActiveConnectionThrottlingTest.cpp View 1 2 3 4 5 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/WebRTCConfiguration.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 63 (39 generated)
zhihuang1
Please take a look. Thanks!
3 years, 9 months ago (2017-03-02 19:43:08 UTC) #18
Taylor_Brandstetter
lgtm; just needs chromium/blink reviewers. https://codereview.chromium.org/2706563003/diff/80001/content/renderer/media/rtc_peer_connection_handler.cc File content/renderer/media/rtc_peer_connection_handler.cc (right): https://codereview.chromium.org/2706563003/diff/80001/content/renderer/media/rtc_peer_connection_handler.cc#newcode311 content/renderer/media/rtc_peer_connection_handler.cc:311: webrtc::PeerConnectionInterface::IceServer ice_server = Can ...
3 years, 9 months ago (2017-03-02 22:30:45 UTC) #19
zhihuang1
Hi, Please take a look. Thanks. https://codereview.chromium.org/2706563003/diff/80001/content/renderer/media/rtc_peer_connection_handler.cc File content/renderer/media/rtc_peer_connection_handler.cc (right): https://codereview.chromium.org/2706563003/diff/80001/content/renderer/media/rtc_peer_connection_handler.cc#newcode311 content/renderer/media/rtc_peer_connection_handler.cc:311: webrtc::PeerConnectionInterface::IceServer ice_server = ...
3 years, 9 months ago (2017-03-09 19:13:33 UTC) #24
tommi (sloooow) - chröme
nice - I've got only minor questions/suggestions https://codereview.chromium.org/2706563003/diff/120001/content/renderer/media/rtc_peer_connection_handler.cc File content/renderer/media/rtc_peer_connection_handler.cc (left): https://codereview.chromium.org/2706563003/diff/120001/content/renderer/media/rtc_peer_connection_handler.cc#oldcode260 content/renderer/media/rtc_peer_connection_handler.cc:260: default: just ...
3 years, 9 months ago (2017-03-09 19:37:08 UTC) #25
dcheng
https://codereview.chromium.org/2706563003/diff/120001/content/renderer/media/rtc_peer_connection_handler.cc File content/renderer/media/rtc_peer_connection_handler.cc (right): https://codereview.chromium.org/2706563003/diff/120001/content/renderer/media/rtc_peer_connection_handler.cc#newcode299 content/renderer/media/rtc_peer_connection_handler.cc:299: void GetBlinkRtcConfiguration( Nit: might be more clearly named ToBlinkRtcConfiguration, ...
3 years, 9 months ago (2017-03-09 21:36:54 UTC) #28
Taylor_Brandstetter
https://codereview.chromium.org/2706563003/diff/120001/content/renderer/media/rtc_peer_connection_handler.cc File content/renderer/media/rtc_peer_connection_handler.cc (left): https://codereview.chromium.org/2706563003/diff/120001/content/renderer/media/rtc_peer_connection_handler.cc#oldcode260 content/renderer/media/rtc_peer_connection_handler.cc:260: default: On 2017/03/09 19:37:07, tommi - chröme wrote: > ...
3 years, 9 months ago (2017-03-09 22:54:30 UTC) #29
zhihuang1
Hi, Please take another look. Thanks! https://codereview.chromium.org/2706563003/diff/120001/content/renderer/media/rtc_peer_connection_handler.cc File content/renderer/media/rtc_peer_connection_handler.cc (right): https://codereview.chromium.org/2706563003/diff/120001/content/renderer/media/rtc_peer_connection_handler.cc#newcode299 content/renderer/media/rtc_peer_connection_handler.cc:299: void GetBlinkRtcConfiguration( On ...
3 years, 9 months ago (2017-03-10 03:20:43 UTC) #34
dmazzoni
rubberstamp lgtm for test_runner
3 years, 9 months ago (2017-03-10 19:33:08 UTC) #37
dcheng
https://codereview.chromium.org/2706563003/diff/120001/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp File third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp (right): https://codereview.chromium.org/2706563003/diff/120001/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp#newcode326 third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp:326: iceServers.push_back(WebRTCIceServer{urls, username, credential}); On 2017/03/10 03:20:43, zhihuang1 wrote: > ...
3 years, 9 months ago (2017-03-10 19:54:00 UTC) #38
Taylor_Brandstetter
https://codereview.chromium.org/2706563003/diff/120001/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp File third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp (right): https://codereview.chromium.org/2706563003/diff/120001/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp#newcode326 third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp:326: iceServers.push_back(WebRTCIceServer{urls, username, credential}); On 2017/03/10 19:54:00, dcheng wrote: > ...
3 years, 9 months ago (2017-03-10 20:06:03 UTC) #39
dcheng
On 2017/03/10 20:06:03, Taylor_Brandstetter wrote: > https://codereview.chromium.org/2706563003/diff/120001/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp > File third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp > (right): > > https://codereview.chromium.org/2706563003/diff/120001/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp#newcode326 ...
3 years, 9 months ago (2017-03-10 20:12:37 UTC) #40
zhihuang1
Please take another look. Thanks! https://codereview.chromium.org/2706563003/diff/170001/content/renderer/media/rtc_peer_connection_handler.cc File content/renderer/media/rtc_peer_connection_handler.cc (right): https://codereview.chromium.org/2706563003/diff/170001/content/renderer/media/rtc_peer_connection_handler.cc#newcode1523 content/renderer/media/rtc_peer_connection_handler.cc:1523: ToBlinkRtcConfiguration(webrtc_config, &blink_config); On 2017/03/10 ...
3 years, 9 months ago (2017-03-11 00:40:34 UTC) #41
dcheng
lgtm with nit addressed https://codereview.chromium.org/2706563003/diff/190001/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp File third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp (right): https://codereview.chromium.org/2706563003/diff/190001/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp#newcode326 third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp:326: iceServers.push_back(WebRTCIceServer{urls, username, credential}); Nit: omit ...
3 years, 9 months ago (2017-03-11 07:14:46 UTC) #42
zhihuang1
https://codereview.chromium.org/2706563003/diff/190001/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp File third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp (right): https://codereview.chromium.org/2706563003/diff/190001/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp#newcode326 third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp:326: iceServers.push_back(WebRTCIceServer{urls, username, credential}); On 2017/03/11 07:14:46, dcheng wrote: > ...
3 years, 9 months ago (2017-03-13 18:50:53 UTC) #43
dcheng
https://codereview.chromium.org/2706563003/diff/190001/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp File third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp (right): https://codereview.chromium.org/2706563003/diff/190001/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp#newcode326 third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp:326: iceServers.push_back(WebRTCIceServer{urls, username, credential}); On 2017/03/13 18:50:53, zhihuang1 wrote: > ...
3 years, 9 months ago (2017-03-14 05:37:51 UTC) #44
zhihuang1
Hi Tommi, Please take another look. Thanks!
3 years, 9 months ago (2017-03-15 17:45:06 UTC) #45
tommi (sloooow) - chröme
lgtm
3 years, 9 months ago (2017-03-15 18:28:19 UTC) #46
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/2706563003/230001
3 years, 9 months ago (2017-03-16 20:28:46 UTC) #53
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/387496)
3 years, 9 months ago (2017-03-16 20:38:44 UTC) #55
zhihuang1
Hi Philip, Please take a look. The LayoutTests part needs to be reviewed. Thanks!
3 years, 9 months ago (2017-03-16 20:44:34 UTC) #57
zhihuang1
Please take a look. Thanks!
3 years, 9 months ago (2017-03-17 17:48:20 UTC) #59
foolip
I think that more test coverage around various kinds of normalization would be good. The ...
3 years, 9 months ago (2017-03-21 08:37:15 UTC) #61
Taylor_Brandstetter
On 2017/03/21 08:37:15, foolip OOO until May 29 wrote: > I think that more test ...
3 years, 7 months ago (2017-05-25 21:13:59 UTC) #62
foolip
3 years, 6 months ago (2017-05-29 15:58:25 UTC) #63
On 2017/05/25 21:13:59, Taylor_Brandstetter wrote:
> On 2017/03/21 08:37:15, foolip OOO until May 29 wrote:
> > I think that more test coverage around various kinds of normalization would
be
> > good.
> > 
> > The spec has an internal "[[ configuration]]" slot which is updated in two
> > places and used in the definition of the getConfiguration() getter: "When
this
> > method is called, the user agent must return the RTCConfiguration object
> stored
> > in the [[ configuration]] internal slot."
> > 
> > The way that Web IDL works, that returned RTCConfiguration object would then
> get
> > converted into an ECMAScript object, so that a new object is returned each
> time.
> > That's what this implementation will end up doing, but it would be easy to
> > misinterpret the spec to mean returning the same ECMAScript object every
time,
> > so guarding against that with a test would be good.
> > 
> > For the RTCConfiguration dictionary members that have default values, can
you
> > test that if they are not passed at all to setConfiguration(), the object
> > returned from getConfiguration() still has them and that their value is the
> > default value?
> > 
> > For the dictionary members that don't have default values, can you test that
> not
> > passing them to setConfiguration() results in them not existing at all on
the
> > object returned from getConfiguration()? That would fail for iceServers
> > currently I believe. If you can't tell what the spec requires, spec fixes
are
> in
> > order.
> > 
> >
>
https://codereview.chromium.org/2706563003/diff/230001/content/test/data/medi...
> > File content/test/data/media/peerconnection-setAndGetConfiguration.html
> (right):
> > 
> >
>
https://codereview.chromium.org/2706563003/diff/230001/content/test/data/medi...
> > content/test/data/media/peerconnection-setAndGetConfiguration.html:24:
> function
> > testSetAndGetConfiguration() {
> > It looks like much of this could be tested in web-platform-tests and thus
> > benefit the second implementer. It's not yet a requirement to use
> > web-platform-tests just because it's possible, but if you'd like to write as
> > much of the tests in LayoutTetst/external/wpt/webrtc as possible, I'd be
happy
> > to review. (Changes will be automatically exported.)
> > 
> >
>
https://codereview.chromium.org/2706563003/diff/230001/content/test/data/medi...
> > content/test/data/media/peerconnection-setAndGetConfiguration.html:207:
> > assertEquals(server1['urls'].length, server2['urls'].length);
> > I think this will fail due to normalization if the input isn't a list of
URLs
> > but a single URL.
> > 
> >
>
https://codereview.chromium.org/2706563003/diff/230001/third_party/WebKit/Sou...
> > File third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
> > (right):
> > 
> >
>
https://codereview.chromium.org/2706563003/diff/230001/third_party/WebKit/Sou...
> > third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp:844:
> > urls.setStringSequence(urlStrings);
> > There's some normalization here that isn't spelled out in the spec. The
> > configuration `{ "iceServers": [{ "urls": "stuns:stun.example.org" }] }`
would
> > become `{ "iceServers": [{ "urls": ["stuns:stun.example.org"] }] }` (array
of
> 1
> > URL) and actually so would `{ "iceServers": [{ "url":
"stuns:stun.example.org"
> > }] }` (url in singular, not plural).
> > 
> > Can you update the spec to clearly define what should happen here and make
> sure
> > the tests cover that?
> 
> Sorry for responding so late, but I don't think this is an issue from a
> standards perspective.
> 
> The singular "url" parameter isn't part of the standard; it's just something
we
> support for backwards compatibility.
> 
> And the spec already has a normalization step:
> 
> "If server.urls is a string, let server.urls be a list consisting of just that
> string."
> 
> So, if setConfiguration is called with { "urls": "stuns:stun.example.org" },
I'd
> expect getConfiguration to return { "urls": ["stuns:stun.example.org"] }.

OK, good, that's step 11.2 of
https://w3c.github.io/webrtc-pc/#set-pc-configuration

Can you add a test for that case? Maybe in
LayoutTests/external/wpt/RTCPeerConnection-getConfiguration.html? :)

Powered by Google App Engine
This is Rietveld 408576698