Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update RTCPeerConnection-helper.js #14417

Merged

Conversation

youennf
Copy link
Contributor

@youennf youennf commented Dec 7, 2018

Take RTCPeerConnection-helper.js changes from #13499
This contains changes that should not affect existing tests but might be required to land new tests or modified tests from #13499.

Compared to #13499, no change have been made yet to createDataChannelPair since this seems to change behavior of existing tests.
A separate PR could be envisioned to land these changes separately.

@youennf
Copy link
Contributor Author

youennf commented Dec 7, 2018

@lgrahl, PTAL

@lgrahl
Copy link

lgrahl commented Dec 7, 2018

Looks good to me.

One thing: Considering the amount of effort put into this work, I would prefer the commit in the three PRs being authored by myself (git commit --author "Lennart Grahl <[email protected]>") and having you as a co-author if desired. Please also include the original PR number in the commit message. Otherwise the context is lost. Thanks!

@lgrahl lgrahl mentioned this pull request Dec 8, 2018
1 task
@youennf youennf force-pushed the update-RTCPeerConnection-helper.js branch from c115aba to d81df6d Compare December 8, 2018 22:58
@youennf youennf force-pushed the update-RTCPeerConnection-helper.js branch from d81df6d to c7baefa Compare December 8, 2018 23:00
@alvestrand
Copy link
Contributor

@jan-ivar will suggest a better way to handle early candidates at callee than the one proposed here.

@lgrahl
Copy link

lgrahl commented Dec 11, 2018

@jan-ivar I would like to get my tests finally merged and a breaking change to this (which has been carefully crafted to not break anything else) may need further refactoring of my tests which I would really like to avoid. Unless this would radically improve things, I'd suggest to merge this for now and do the refactoring later.

webrtc/RTCPeerConnection-helper.js Outdated Show resolved Hide resolved
@youennf
Copy link
Contributor Author

youennf commented Dec 19, 2018

This PR no longer changes any ICE candidate processing.
@jan-ivar, does this address all your concerns?

@foolip
Copy link
Member

foolip commented Dec 20, 2018

This PR is blocked on the required "Travis CI - Pull Request" check after #14499. In order to trigger it, I will close and reopen this PR.

@foolip foolip closed this Dec 20, 2018
@foolip foolip reopened this Dec 20, 2018
Copy link
Member

@jan-ivar jan-ivar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code is not broken, but note my reservations.

remotePc.setLocalDescription(answer),
localPc.setRemoteDescription(answer)]))
// between two local peer connections
async function doSignalingHandshake(localPc, remotePc, options={}) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, but I dislike helpers options when they turn into replacement APIs.

doSignalingHandshake(pc1, pc2, {modfiyOffer: offer => myRegExp(offer)});

The above produces a false positive, due to my typo (did you catch it?), a problem the spec API does not have:

await pc1.setLocalDescription(myRegExp(await pc1.createOffer()));
await pc2.setRemoteDescription(pc1.localDescription);
await pc2.setLocalDescription(await pc2.createAnswer());
await pc1.setRemoteDescription(pc2.localDescription);

The above is appropriate for the (few) who need to mangle SDP IMHO. If not, I'd prefer the more typo-safe:

doSignalingHandshakeModifyOfferAnswer(pc1, pc2, offer => myRegExp(offer), answer => answer);

As to plain doSignalingHandshake, once crbug 740501 is fixed, could we use the spec-provided API instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doSignalingHandshakeModifyOfferAnswer seems better to me as well.
Let's merge this PR for now, that will allow making progress on merging the data channel tests.
We can improve on it later as a refactoring PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed #14633 to track the refactoring PR.

@youennf youennf merged commit b75b876 into web-platform-tests:master Dec 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants