Changeset 164372 in webkit
- Timestamp:
- Feb 19, 2014 10:48:35 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r164371 r164372 1 2014-02-19 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> 2 3 [WebRTC] Updating RTCConfiguration to match WebRTC editor's draft of 01/27/2014 4 https://bugs.webkit.org/show_bug.cgi?id=129000 5 6 Adding RTCIceTransports and RTCIdentityOption to RTCConfiguration object. 7 8 Reviewed by Eric Carlson. 9 10 * fast/mediastream/RTCPeerConnection-expected.txt: 11 * fast/mediastream/RTCPeerConnection.html: 12 1 13 2014-02-19 Mark Hahnenberg <mhahnenberg@apple.com> 2 14 -
trunk/LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt
r159823 r164372 26 26 PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', username:'user', credential:'x'},{url:'stun:bar.com', username:'user2', credential:'x'}]}, null); threw exception TypeError: Optional constraints argument of RTCPeerConnection must be a valid Dictionary. 27 27 PASS new webkitRTCPeerConnection({iceServers:[]}); did not throw exception. 28 PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'none'}); did not throw exception. 29 PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'relay'}); did not throw exception. 30 PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'all'}); did not throw exception. 31 PASS new webkitRTCPeerConnection({iceServers:[], requestIdentity:'yes'}); did not throw exception. 32 PASS new webkitRTCPeerConnection({iceServers:[], requestIdentity:'no'}); did not throw exception. 33 PASS new webkitRTCPeerConnection({iceServers:[], requestIdentity:'ifconfigured'}); did not throw exception. 34 PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'foo', requestIdentity:'bar'}); did not throw exception. 35 PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'none', requestIdentity:'bar'}); did not throw exception. 36 PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'foo', requestIdentity:'no'}); did not throw exception. 37 PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'none', requestIdentity:'yes'}); did not throw exception. 38 PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'none', requestIdentity:'no'}); did not throw exception. 39 PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'none', requestIdentity:'ifconfigured'}); did not throw exception. 40 PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'relay', requestIdentity:'yes'}); did not throw exception. 41 PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'relay', requestIdentity:'no'}); did not throw exception. 42 PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'relay', requestIdentity:'ifconfigured'}); did not throw exception. 43 PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'all', requestIdentity:'yes'}); did not throw exception. 44 PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'all', requestIdentity:'no'}); did not throw exception. 45 PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'all', requestIdentity:'ifconfigured'}); did not throw exception. 28 46 PASS new webkitRTCPeerConnection({iceServers:[]}, {}); did not throw exception. 29 47 PASS new webkitRTCPeerConnection({iceServers:[{url:'stun:foo.com'}]}, {}); did not throw exception. … … 33 51 PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', username:'user', credential:'x'}]}, {}); did not throw exception. 34 52 PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', username:'user', credential:'x'},{url:'stun:bar.com', username:'user2', credential:'x'}]}, {}); did not throw exception. 53 PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {}); did not throw exception. 54 PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'},{url:'stun:bar.com'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {}); did not throw exception. 55 PASS new webkitRTCPeerConnection({iceServers:[{url:'stun:foo.com', username:'user'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {}); did not throw exception. 56 PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', username:'user', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {}); did not throw exception. 57 PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', username:'user', credential:'x'},{url:'stun:bar.com', username:'user2', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {}); did not throw exception. 35 58 PASS new webkitRTCPeerConnection({fooServers:[]}, {}); threw exception TypeError: Invalid RTCPeerConnection constructor arguments. 36 59 PASS new webkitRTCPeerConnection({iceServers:true}, {}); threw exception TypeError: Invalid RTCPeerConnection constructor arguments. -
trunk/LayoutTests/fast/mediastream/RTCPeerConnection.html
r158987 r164372 31 31 32 32 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[]});"); 33 34 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'none'});"); 35 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'relay'});"); 36 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'all'});"); 37 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], requestIdentity:'yes'});"); 38 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], requestIdentity:'no'});"); 39 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], requestIdentity:'ifconfigured'});"); 40 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'foo', requestIdentity:'bar'});"); 41 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'none', requestIdentity:'bar'});"); 42 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'foo', requestIdentity:'no'});"); 43 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'none', requestIdentity:'yes'});"); 44 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'none', requestIdentity:'no'});"); 45 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'none', requestIdentity:'ifconfigured'});"); 46 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'relay', requestIdentity:'yes'});"); 47 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'relay', requestIdentity:'no'});"); 48 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'relay', requestIdentity:'ifconfigured'});"); 49 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'all', requestIdentity:'yes'});"); 50 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'all', requestIdentity:'no'});"); 51 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'all', requestIdentity:'ifconfigured'});"); 52 33 53 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[]}, {});"); 34 54 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'stun:foo.com'}]}, {});"); … … 38 58 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', username:'user', credential:'x'}]}, {});"); 39 59 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', username:'user', credential:'x'},{url:'stun:bar.com', username:'user2', credential:'x'}]}, {});"); 60 61 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {});"); 62 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'},{url:'stun:bar.com'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {});"); 63 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'stun:foo.com', username:'user'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {});"); 64 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', username:'user', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {});"); 65 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', username:'user', credential:'x'},{url:'stun:bar.com', username:'user2', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {});"); 40 66 41 67 shouldThrow("new webkitRTCPeerConnection({fooServers:[]}, {});"); -
trunk/Source/WebCore/ChangeLog
r164369 r164372 1 2014-02-19 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> 2 3 [WebRTC] Updating RTCConfiguration to match WebRTC editor's draft of 01/27/2014 4 https://bugs.webkit.org/show_bug.cgi?id=129000 5 6 Reviewed by Eric Carlson. 7 8 Adding RTCIceTransports and RTCIdentityOption to RTCConfiguration object. 9 10 Existing test was updated. 11 12 * Modules/mediastream/RTCPeerConnection.cpp: 13 (WebCore::RTCPeerConnection::parseConfiguration): Taking into account iceTransports and requestIdentity 14 parameters. 15 * platform/mediastream/RTCConfiguration.h: 16 (WebCore::RTCConfiguration::iceTransports): Added. 17 (WebCore::RTCConfiguration::setIceTransports): Added. 18 (WebCore::RTCConfiguration::requestIdentity): Added. 19 (WebCore::RTCConfiguration::setRequestIdentity): Added. 20 (WebCore::RTCConfiguration::RTCConfiguration): Initialize iceTransports and requestIdentity with the default 21 values. 22 1 23 2014-02-19 Antti Koivisto <antti@apple.com> 2 24 -
trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
r164361 r164372 86 86 } 87 87 88 String iceTransports; 89 String requestIdentity; 90 configuration.get("iceTransports", iceTransports); 91 configuration.get("requestIdentity", requestIdentity); 92 88 93 RefPtr<RTCConfiguration> rtcConfiguration = RTCConfiguration::create(); 94 95 rtcConfiguration->setIceTransports(iceTransports); 96 rtcConfiguration->setRequestIdentity(requestIdentity); 89 97 90 98 for (size_t i = 0; i < numberOfServers; ++i) { -
trunk/Source/WebCore/platform/mediastream/RTCConfiguration.h
r157653 r164372 75 75 size_t numberOfServers() { return m_servers.size(); } 76 76 RTCIceServer* server(size_t index) { return m_servers[index].get(); } 77 const String& iceTransports() const { return m_iceTransports; } 78 void setIceTransports(const String& iceTransports) 79 { 80 if (iceTransports == "none" || iceTransports == "relay" || iceTransports == "all") 81 m_iceTransports = iceTransports; 82 } 83 const String& requestIdentity() const { return m_requestIdentity; } 84 void setRequestIdentity(const String& requestIdentity) 85 { 86 if (requestIdentity == "yes" || requestIdentity == "no" || requestIdentity == "ifconfigured") 87 m_requestIdentity = requestIdentity; 88 } 77 89 78 90 private: 79 RTCConfiguration() { } 91 RTCConfiguration() 92 : m_iceTransports("all") 93 , m_requestIdentity("ifconfigured") 94 { 95 } 80 96 81 97 Vector<RefPtr<RTCIceServer>> m_servers; 98 String m_iceTransports; 99 String m_requestIdentity; 82 100 }; 83 101
Note: See TracChangeset
for help on using the changeset viewer.