Fix/improve external/wpt/webrtc/RTCPeerConnection-addTrack.https.html.
Updated all tests to use promise_tests(), async/await and added cleanup
logic for pc.close() in tests that did not already have that.
Replaced broken test:
'addTrack with existing sender with null track, same kind, and
sendrecv direction should create new sender'
With:
'addTrack with existing sender that has not been used to send should
reuse the sender',
'addTrack with existing sender that has been used to send should
create new sender'
Per-spec[1], if a sender has not been used to send (currentDirection
never having had the value 'sendrecv' or 'sendonly') it may be reused,
so the original test was incorrect.
The new tests make sure that in the original scenario the sender IS
reused, and in the case where the sender has been used a new sender is
created instead of reusing, even if the original sender is no longer
sending.
In Unified Plan[2], all tests PASS.
[1] Step 7 of
https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-addtrack
[2] Work-in-Progress CL
https://chromium-review.googlesource.com/c/chromium/src/+/1025771
Bug: 777617
Change-Id: I2b07bc03d84add30999e0e017bf008fbc9e9f89a
Reviewed-on: https://chromium-review.googlesource.com/1100828
Commit-Queue: Henrik Boström <hbos@chromium.org>
Reviewed-by:
Guido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567592}
Showing
This diff is collapsed.
Please register or sign in to comment