WebRTC: Update RTCIceCandidate
authoradam.bergkvist@ericsson.com <adam.bergkvist@ericsson.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Mar 2016 10:52:20 +0000 (10:52 +0000)
committeradam.bergkvist@ericsson.com <adam.bergkvist@ericsson.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Mar 2016 10:52:20 +0000 (10:52 +0000)
commit25013066e1b80ca11bdb4c04e95ab6aa919e2192
tree8fc6dce729179cf5616d1bad39513975a5b2d8fe
parentf1f6b2168854e41df61871a181c2e28c262d94f2
WebRTC: Update RTCIceCandidate
https://bugs.webkit.org/show_bug.cgi?id=155535

Reviewed by Eric Carlson.

Source/WebCore:

Update the RTCIceCandidate constructor procedure to match the WebRTC 1.0 specification [1].
In short: The "candidate" init dictionary member is required. At least one of the dictionary
members "sdpMid" and "sdpMLine" needs to be present; the corresponding attribute of the
other, is initialized to null.

[1] https://w3c.github.io/webrtc-pc/archives/20160215/webrtc.html

Tests: Updated fast/mediastream/RTCIceCandidate.htm

* Modules/mediastream/RTCIceCandidate.cpp:
(WebCore::RTCIceCandidate::create):
(WebCore::RTCIceCandidate::RTCIceCandidate):
* Modules/mediastream/RTCIceCandidate.h:
(WebCore::RTCIceCandidate::sdpMLineIndex):
(WebCore::RTCIceCandidate::setSdpMLineIndex):
* Modules/mediastream/RTCIceCandidate.idl:
* bindings/js/JSRTCIceCandidateCustom.cpp:
(WebCore::JSRTCIceCandidate::sdpMid):
(WebCore::JSRTCIceCandidate::sdpMLineIndex):

LayoutTests:

RTCIceCandidate.html is updated to test the new construction behavior and the nullable
attributes. The remaining updated tests simply construct an RTCIceCandidate to be used for
test purposes.

* fast/mediastream/RTCIceCandidate-expected.txt:
* fast/mediastream/RTCIceCandidate.html:
* fast/mediastream/RTCPeerConnection-closed-state.html:
* fast/mediastream/RTCPeerConnection-overloaded-operations-expected.txt:
* fast/mediastream/RTCPeerConnection-overloaded-operations-params-expected.txt:
* fast/mediastream/RTCPeerConnection-overloaded-operations-params.html:
* fast/mediastream/RTCPeerConnection-overloaded-operations.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@198325 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/mediastream/RTCIceCandidate-expected.txt
LayoutTests/fast/mediastream/RTCIceCandidate.html
LayoutTests/fast/mediastream/RTCPeerConnection-closed-state.html
LayoutTests/fast/mediastream/RTCPeerConnection-overloaded-operations-expected.txt
LayoutTests/fast/mediastream/RTCPeerConnection-overloaded-operations-params-expected.txt
LayoutTests/fast/mediastream/RTCPeerConnection-overloaded-operations-params.html
LayoutTests/fast/mediastream/RTCPeerConnection-overloaded-operations.html
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/RTCIceCandidate.cpp
Source/WebCore/Modules/mediastream/RTCIceCandidate.h
Source/WebCore/Modules/mediastream/RTCIceCandidate.idl
Source/WebCore/bindings/js/JSRTCIceCandidateCustom.cpp