RTCPeerConnection methods can take dictionaries as input
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jan 2017 17:52:33 +0000 (17:52 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jan 2017 17:52:33 +0000 (17:52 +0000)
commit88b3b8210780a2793a24bf2ca64db2862a9907e2
tree58b7e9e0d0ba0d3621ef8cfb12addff89a0c113d
parent338bc22e2930c2411a9794bd6dadd25ee938c655
RTCPeerConnection methods can take dictionaries as input
https://bugs.webkit.org/show_bug.cgi?id=167590

Patch by Youenn Fablet <youenn@apple.com> on 2017-01-31
Reviewed by Alex Christensen.

Source/WebCore:

Test: webrtc/rtcpeerconnection-error-messages.html

Made addIceCandidate/setRemoteDescription/setLocalDescription take either dictionaries or objects as parameter.
Spec only mandates this for addIceCandidate, but sites may be using the old version for setRemoteDescription and setLocalDescription.

Updated RTCPeerConnection methods error messages.

* Modules/mediastream/RTCPeerConnection.js:
(getLocalStreams):
(getStreamById):
(addStream):
(createOffer):
(createAnswer):
(setLocalDescription):
(setRemoteDescription):
(addIceCandidate):
(getStats):
* Modules/mediastream/RTCPeerConnectionInternals.js:

LayoutTests:

Replacing fast/mediastream/RTCPeerConnection-js-built-ins-check-this.html by webrtc/rtcpeerconnection-error-messages.html.
It is a bit more thorough and does not hard code the error message.

* fast/mediastream/RTCPeerConnection-addIceCandidate-expected.txt:
* fast/mediastream/RTCPeerConnection-addIceCandidate.html:
* fast/mediastream/RTCPeerConnection-js-built-ins-check-this-expected.txt: Removed.
* fast/mediastream/RTCPeerConnection-js-built-ins-check-this.html: Removed.
* fast/mediastream/RTCPeerConnection-setLocalDescription-offer-expected.txt:
* fast/mediastream/RTCPeerConnection-setLocalDescription-offer.html:
* fast/mediastream/RTCPeerConnection-setRemoteDescription-offer-expected.txt:
* fast/mediastream/RTCPeerConnection-setRemoteDescription-offer.html:
* webrtc/rtcpeerconnection-error-messages-expected.txt: Added.
* webrtc/rtcpeerconnection-error-messages.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211436 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/mediastream/RTCPeerConnection-addIceCandidate-expected.txt
LayoutTests/fast/mediastream/RTCPeerConnection-addIceCandidate.html
LayoutTests/fast/mediastream/RTCPeerConnection-js-built-ins-check-this-expected.txt [deleted file]
LayoutTests/fast/mediastream/RTCPeerConnection-js-built-ins-check-this.html [deleted file]
LayoutTests/fast/mediastream/RTCPeerConnection-setLocalDescription-offer-expected.txt
LayoutTests/fast/mediastream/RTCPeerConnection-setLocalDescription-offer.html
LayoutTests/fast/mediastream/RTCPeerConnection-setRemoteDescription-offer-expected.txt
LayoutTests/fast/mediastream/RTCPeerConnection-setRemoteDescription-offer.html
LayoutTests/webrtc/rtcpeerconnection-error-messages-expected.txt [new file with mode: 0644]
LayoutTests/webrtc/rtcpeerconnection-error-messages.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/RTCPeerConnection.js
Source/WebCore/Modules/mediastream/RTCPeerConnectionInternals.js