[WebRTC] Validating RTCConfiguration according to the spec
authorthiago.lacerda@openbossa.org <thiago.lacerda@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Feb 2014 21:00:36 +0000 (21:00 +0000)
committerthiago.lacerda@openbossa.org <thiago.lacerda@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Feb 2014 21:00:36 +0000 (21:00 +0000)
commit82aa7d702a1fdd447902f3518951e3be83636dbf
treee59426f34c9aba479741d68affdecedb33924429
parent7121f298a42f83d993574d3e1fdc173ec7829120
[WebRTC] Validating RTCConfiguration according to the spec
https://bugs.webkit.org/show_bug.cgi?id=129182

Reviewed by Eric Carlson.

Spec states that:
    - iceServers should not be an empty list
    - the entry in the configuration dictionary is "urls", instead of "url"
    - urls can be either a list or a string
Fixing all that in RTCConfiguration validation when creating a RTCPeerConnection

Source/WebCore:

Existing tests were updated.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::appendIceServer): Added.
(WebCore::processIceServer): Added.
(WebCore::RTCPeerConnection::parseConfiguration):

LayoutTests:

* fast/mediastream/RTCPeerConnection-AddRemoveStream.html:
* fast/mediastream/RTCPeerConnection-createAnswer.html:
* fast/mediastream/RTCPeerConnection-createOffer.html:
* fast/mediastream/RTCPeerConnection-datachannel.html:
* fast/mediastream/RTCPeerConnection-dtmf.html:
* fast/mediastream/RTCPeerConnection-events.html:
* fast/mediastream/RTCPeerConnection-expected.txt:
* fast/mediastream/RTCPeerConnection-have-local-answer.html:
* fast/mediastream/RTCPeerConnection-have-local-offer.html:
* fast/mediastream/RTCPeerConnection-have-local-pranswer.html:
* fast/mediastream/RTCPeerConnection-have-remote-offer.html:
* fast/mediastream/RTCPeerConnection-have-remote-pranswer.html:
* fast/mediastream/RTCPeerConnection-ice-expected.txt:
* fast/mediastream/RTCPeerConnection-ice.html:
* fast/mediastream/RTCPeerConnection-localDescription.html:
* fast/mediastream/RTCPeerConnection-onnegotiationneeded.html:
* fast/mediastream/RTCPeerConnection-remoteDescription.html:
* fast/mediastream/RTCPeerConnection-stable.html:
* fast/mediastream/RTCPeerConnection-state-expected.txt:
* fast/mediastream/RTCPeerConnection-state.html:
* fast/mediastream/RTCPeerConnection-stats-expected.txt:
* fast/mediastream/RTCPeerConnection-stats.html:
* fast/mediastream/RTCPeerConnection-statsSelector-expected.txt:
* fast/mediastream/RTCPeerConnection-statsSelector.html:
* fast/mediastream/RTCPeerConnection.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164602 268f45cc-cd09-0410-ab3c-d52691b4dbfc
28 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/mediastream/RTCPeerConnection-AddRemoveStream.html
LayoutTests/fast/mediastream/RTCPeerConnection-createAnswer.html
LayoutTests/fast/mediastream/RTCPeerConnection-createOffer.html
LayoutTests/fast/mediastream/RTCPeerConnection-datachannel.html
LayoutTests/fast/mediastream/RTCPeerConnection-dtmf.html
LayoutTests/fast/mediastream/RTCPeerConnection-events.html
LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt
LayoutTests/fast/mediastream/RTCPeerConnection-have-local-answer.html
LayoutTests/fast/mediastream/RTCPeerConnection-have-local-offer.html
LayoutTests/fast/mediastream/RTCPeerConnection-have-local-pranswer.html
LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-offer.html
LayoutTests/fast/mediastream/RTCPeerConnection-have-remote-pranswer.html
LayoutTests/fast/mediastream/RTCPeerConnection-ice-expected.txt
LayoutTests/fast/mediastream/RTCPeerConnection-ice.html
LayoutTests/fast/mediastream/RTCPeerConnection-localDescription.html
LayoutTests/fast/mediastream/RTCPeerConnection-onnegotiationneeded.html
LayoutTests/fast/mediastream/RTCPeerConnection-remoteDescription.html
LayoutTests/fast/mediastream/RTCPeerConnection-stable.html
LayoutTests/fast/mediastream/RTCPeerConnection-state-expected.txt
LayoutTests/fast/mediastream/RTCPeerConnection-state.html
LayoutTests/fast/mediastream/RTCPeerConnection-stats-expected.txt
LayoutTests/fast/mediastream/RTCPeerConnection-stats.html
LayoutTests/fast/mediastream/RTCPeerConnection-statsSelector-expected.txt
LayoutTests/fast/mediastream/RTCPeerConnection-statsSelector.html
LayoutTests/fast/mediastream/RTCPeerConnection.html
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp