[web-platform-tests] Pull Request: Add tests for setting session descriptions

wpt-pr-bot has just labeled a pull request from soareschen for https://github.com/w3c/web-platform-tests as "wg-webrtc":

== Add tests for setting session descriptions ==
This is a work in progress for testing the behavior of `RTCPeerConnection` when setting local/remote session descriptions. Since the test is quite complex I am submitting this now to gather some early feedback.

Currently basic testing is done on setting local/remote offer/answer. More tests will be added for testing rollback and provisional offer/answer.

One challenge I find is the lack of simple way to compare the SDP content to match it against an expected SDP. e.g. checking that the `localDescription`'s SDP is the same as the SDP passed to `setLocalDescription()`. The reason is that when calling `setLocalDescription()`, the agent starts gathering ice candidate in the background and then modify its SDP as soon as ice candidate become available. Thus by the time the promise callback is invoked, the internal SDP might already have been different from that SDP that was passed to it.

The lazy solution for this is to simply don't test for the SDP content at all. But if anyone have better ways to compare the SDP please do share it here.

<!-- Reviewable:start -->

<!-- Reviewable:end -->


See https://github.com/w3c/web-platform-tests/pull/5847

Received on Monday, 8 May 2017 10:41:20 UTC