Changeset 164839 in webkit
- Timestamp:
- Feb 27, 2014 3:58:28 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r164830 r164839 1 2014-02-27 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> 2 3 [WebRTC] Removing MediaConstraints argument from RTCPeerConnection addStream, updateIce methods and constructor 4 https://bugs.webkit.org/show_bug.cgi?id=129449 5 6 Reviewed by Eric Carlson. 7 8 According to WebRTC editor's draft, MediaConstraints will no longer be an argument of those methods and 9 constructor. 10 11 * fast/mediastream/RTCPeerConnection-AddRemoveStream-expected.txt: 12 * fast/mediastream/RTCPeerConnection-AddRemoveStream.html: 13 * fast/mediastream/RTCPeerConnection-expected.txt: 14 * fast/mediastream/RTCPeerConnection.html: 15 1 16 2014-02-27 Brian Burg <bburg@apple.com> 2 17 -
trunk/LayoutTests/fast/mediastream/RTCPeerConnection-AddRemoveStream-expected.txt
r160181 r164839 5 5 6 6 PASS Got a stream. 7 PASS pc.addStream( stream, {mandatory:{invalid:1}}) threw exception Error: SyntaxError: DOM Exception 12.7 PASS pc.addStream(null) threw exception Error: TypeMismatchError: DOM Exception 17. 8 8 PASS pc.getLocalStreams().length is 0 9 9 PASS Got another stream. -
trunk/LayoutTests/fast/mediastream/RTCPeerConnection-AddRemoveStream.html
r164602 r164839 78 78 pc = new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}); 79 79 pc.onnegotiationneeded = onErroneousNegotiationNeeded; 80 shouldThrow("pc.addStream( stream, {mandatory:{invalid:1}})");80 shouldThrow("pc.addStream(null)"); 81 81 82 82 shouldBe('pc.getLocalStreams().length', '0'); -
trunk/LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt
r164602 r164839 4 4 5 5 6 PASS new webkitRTCPeerConnection(null); threw exception TypeError: First argument of RTCPeerConnection must be a valid Dictionary. 7 PASS new webkitRTCPeerConnection(null, null); threw exception TypeError: First argument of RTCPeerConnection must be a valid Dictionary. 8 PASS new webkitRTCPeerConnection(undefined); threw exception TypeError: First argument of RTCPeerConnection must be a valid Dictionary. 9 PASS new webkitRTCPeerConnection(undefined, undefined); threw exception TypeError: First argument of RTCPeerConnection must be a valid Dictionary. 6 PASS new webkitRTCPeerConnection(null); threw exception TypeError: RTCPeerConnection argument must be a valid Dictionary. 7 PASS new webkitRTCPeerConnection(undefined); threw exception TypeError: RTCPeerConnection argument must be a valid Dictionary. 10 8 PASS new webkitRTCPeerConnection(); threw exception TypeError: Not enough arguments. 11 PASS new webkitRTCPeerConnection(''); threw exception TypeError: First argument of RTCPeerConnection must be a valid Dictionary. 12 PASS new webkitRTCPeerConnection(null, ''); threw exception TypeError: First argument of RTCPeerConnection must be a valid Dictionary. 9 PASS new webkitRTCPeerConnection(''); threw exception TypeError: RTCPeerConnection argument must be a valid Dictionary. 13 10 PASS new webkitRTCPeerConnection({}); threw exception TypeError: Invalid RTCPeerConnection constructor arguments. 14 PASS new webkitRTCPeerConnection({}, ''); threw exception TypeError: Optional constraints argument of RTCPeerConnection must be a valid Dictionary. 15 PASS new webkitRTCPeerConnection({}, null); threw exception TypeError: Optional constraints argument of RTCPeerConnection must be a valid Dictionary. 16 PASS new webkitRTCPeerConnection({}, {}); threw exception TypeError: Invalid RTCPeerConnection constructor arguments. 17 PASS new webkitRTCPeerConnection('', {}); threw exception TypeError: First argument of RTCPeerConnection must be a valid Dictionary. 18 PASS new webkitRTCPeerConnection(null, {}); threw exception TypeError: First argument of RTCPeerConnection must be a valid Dictionary. 19 PASS new webkitRTCPeerConnection(undefined, {}); threw exception TypeError: First argument of RTCPeerConnection must be a valid Dictionary. 20 PASS new webkitRTCPeerConnection({iceServers:[]}, null); threw exception TypeError: Optional constraints argument of RTCPeerConnection must be a valid Dictionary. 21 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}, null); threw exception TypeError: Optional constraints argument of RTCPeerConnection must be a valid Dictionary. 22 PASS new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', credential:'x'}]}, null); threw exception TypeError: Optional constraints argument of RTCPeerConnection must be a valid Dictionary. 23 PASS new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', credential:'x'},{url:'stun:bar.com'}]}, null); threw exception TypeError: Optional constraints argument of RTCPeerConnection must be a valid Dictionary. 24 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com', username:'user'}]}, null); threw exception TypeError: Optional constraints argument of RTCPeerConnection must be a valid Dictionary. 25 PASS new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'}]}, null); threw exception TypeError: Optional constraints argument of RTCPeerConnection must be a valid Dictionary. 26 PASS new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'},{urls:'stun:bar.com', username:'user2', credential:'x'}]}, null); threw exception TypeError: Optional constraints argument of RTCPeerConnection must be a valid Dictionary. 11 PASS new webkitRTCPeerConnection({iceServers:[]}); threw exception TypeError: Error creating RTCPeerConnection. 27 12 PASS new webkitRTCPeerConnection({iceServers:[{url:'stun:foo.com'}]}); threw exception TypeError: Error creating RTCPeerConnection. 28 13 PASS new webkitRTCPeerConnection({iceServers:[{urls:'http:foo.com'}]}); threw exception TypeError: Error creating RTCPeerConnection. 29 PASS new webkitRTCPeerConnection({iceServers:[]}); threw exception TypeError: Error creating RTCPeerConnection.30 14 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}); did not throw exception. 31 15 PASS new webkitRTCPeerConnection({iceServers:[{urls:['stun:foo.com', 'turn:foo.com']}]}); did not throw exception. 16 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}, {urls:['stun:foo.com', 'turn:bar.com']}]}); did not throw exception. 32 17 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}], iceTransports:'none'}); did not throw exception. 33 18 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}], iceTransports:'relay'}); did not throw exception. … … 48 33 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}], iceTransports:'all', requestIdentity:'no'}); did not throw exception. 49 34 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}], iceTransports:'all', requestIdentity:'ifconfigured'}); did not throw exception. 50 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}, {}); did not throw exception. 51 PASS new webkitRTCPeerConnection({iceServers:[{urls:['stun:foo.com', 'turn:bar.com']}]}, {}); did not throw exception. 52 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}, {urls:['stun:foo.com', 'turn:bar.com']}]}, {}); did not throw exception. 53 PASS new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', credential:'x'}]}, {}); did not throw exception. 54 PASS new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', credential:'x'},{urls:'stun:bar.com'}]}, {}); did not throw exception. 55 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com', username:'user'}]}, {}); did not throw exception. 56 PASS new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'}]}, {}); did not throw exception. 57 PASS new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'},{urls:'stun:bar.com', username:'user2', credential:'x'}]}, {}); did not throw exception. 58 PASS new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'},{urls:['stun:bar.com', 'turn:foo.com', 'turn:foo2.com'], username:'user2', credential:'x'}]}, {}); did not throw exception. 59 PASS new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {}); did not throw exception. 60 PASS new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', credential:'x'},{urls:'stun:bar.com'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {}); did not throw exception. 61 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com', username:'user'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {}); did not throw exception. 62 PASS new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {}); did not throw exception. 63 PASS new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'},{urls:'stun:bar.com', username:'user2', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {}); did not throw exception. 64 PASS new webkitRTCPeerConnection({fooServers:[]}, {}); threw exception TypeError: Invalid RTCPeerConnection constructor arguments. 65 PASS new webkitRTCPeerConnection({iceServers:true}, {}); threw exception TypeError: Invalid RTCPeerConnection constructor arguments. 66 PASS new webkitRTCPeerConnection({iceServers:[1, 2, 3]}, {}); threw exception TypeError: Invalid RTCPeerConnection constructor arguments. 67 PASS new webkitRTCPeerConnection({iceServers:[{}]}, {}); threw exception TypeError: Error creating RTCPeerConnection. 68 PASS new webkitRTCPeerConnection({iceServers:[{urls:'foo'}]}, {}); threw exception TypeError: Error creating RTCPeerConnection. 69 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}, {mandatory:true}); threw exception TypeError: Invalid RTCPeerConnection constructor arguments. 70 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}, {optional:false}); threw exception TypeError: Invalid RTCPeerConnection constructor arguments. 71 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}, {optional:{}}); threw exception TypeError: Invalid RTCPeerConnection constructor arguments. 72 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}, {mandatory:{valid_and_supported_1:1}}); did not throw exception. 73 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}, {mandatory:{valid_and_supported_1:1, valid_and_supported_2:1}}); did not throw exception. 74 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}, {optional:[{valid_and_supported_1:0}]}); did not throw exception. 75 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}, {optional:[{valid_and_supported_1:0},{valid_and_supported_2:0}]}); did not throw exception. 76 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}, {optional:[{valid_but_unsupported_1:0},{valid_but_unsupported_2:0}]}); did not throw exception. 77 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}, {urls:['stun:bar.com', 'turn:foo.com']}]}, {mandatory:{valid_and_supported_1:1}}); did not throw exception. 78 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}, {urls:['stun:bar.com', 'turn:foo.com']}]}, {mandatory:{valid_and_supported_1:1, valid_and_supported_2:1}}); did not throw exception. 79 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}, {urls:['stun:bar.com', 'turn:foo.com']}]}, {optional:[{valid_and_supported_1:0}]}); did not throw exception. 80 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}, {urls:['stun:bar.com', 'turn:foo.com']}]}, {optional:[{valid_and_supported_1:0},{valid_and_supported_2:0}]}); did not throw exception. 81 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}, {urls:['stun:bar.com', 'turn:foo.com']}]}, {optional:[{valid_but_unsupported_1:0},{valid_but_unsupported_2:0}]}); did not throw exception. 82 PASS new webkitRTCPeerConnection({iceServers:[]}, {mandatory:{valid_and_supported_1:66}}); threw exception TypeError: Error creating RTCPeerConnection. 83 PASS new webkitRTCPeerConnection({iceServers:[]}, {mandatory:{invalid:1}}); threw exception TypeError: Error creating RTCPeerConnection. 84 PASS new webkitRTCPeerConnection({iceServers:[]}, {mandatory:{valid_but_unsupported_1:1}}); threw exception TypeError: Error creating RTCPeerConnection. 85 PASS new webkitRTCPeerConnection({iceServers:[]}, {mandatory:{valid_but_unsupported_1:1, valid_and_supported_1:1}}); threw exception TypeError: Error creating RTCPeerConnection. 86 PASS new webkitRTCPeerConnection({iceServers:[]}, {optional:{valid_and_supported_1:0}}); threw exception TypeError: Error creating RTCPeerConnection. 87 PASS new webkitRTCPeerConnection({iceServers:[]}, {optional:[{valid_and_supported_1:0,valid_and_supported_2:0}]}); threw exception TypeError: Error creating RTCPeerConnection. 88 PASS new webkitRTCPeerConnection({iceServers:[]}, {optional:[{invalid:0}]}); threw exception TypeError: Error creating RTCPeerConnection. 89 PASS new webkitRTCPeerConnection({iceServers:[]}, {valid_and_supported_1:1}); threw exception TypeError: Error creating RTCPeerConnection. 90 PASS new webkitRTCPeerConnection({iceServers:[]}, {valid_but_unsupported_1:1}); threw exception TypeError: Error creating RTCPeerConnection. 91 PASS new webkitRTCPeerConnection({iceServers:[]}, {valid_and_supported_2:1, mandatory:{valid_and_supported_1:1}}); threw exception TypeError: Error creating RTCPeerConnection. 35 PASS new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', credential:'x'}]}); did not throw exception. 36 PASS new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', credential:'x'},{urls:'stun:bar.com'}]}); did not throw exception. 37 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com', username:'user'}]}); did not throw exception. 38 PASS new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'}]}); did not throw exception. 39 PASS new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'},{urls:'stun:bar.com', username:'user2', credential:'x'}]}); did not throw exception. 40 PASS new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'},{urls:['stun:bar.com', 'turn:foo.com', 'turn:foo2.com'], username:'user2', credential:'x'}]}); did not throw exception. 41 PASS new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'}); did not throw exception. 42 PASS new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', credential:'x'},{urls:'stun:bar.com'}], iceTransports:'all', requestIdentity:'ifconfigured'}); did not throw exception. 43 PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com', username:'user'}], iceTransports:'all', requestIdentity:'ifconfigured'}); did not throw exception. 44 PASS new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'}); did not throw exception. 45 PASS new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'},{urls:'stun:bar.com', username:'user2', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'}); did not throw exception. 46 PASS new webkitRTCPeerConnection({fooServers:[]}); threw exception TypeError: Invalid RTCPeerConnection constructor arguments. 47 PASS new webkitRTCPeerConnection({iceServers:true}); threw exception TypeError: Invalid RTCPeerConnection constructor arguments. 48 PASS new webkitRTCPeerConnection({iceServers:[1, 2, 3]}); threw exception TypeError: Invalid RTCPeerConnection constructor arguments. 49 PASS new webkitRTCPeerConnection({iceServers:[{}]}); threw exception TypeError: Error creating RTCPeerConnection. 50 PASS new webkitRTCPeerConnection({iceServers:[{urls:'foo'}]}); threw exception TypeError: Error creating RTCPeerConnection. 92 51 PASS successfullyParsed is true 93 52 -
trunk/LayoutTests/fast/mediastream/RTCPeerConnection.html
r164602 r164839 9 9 10 10 shouldThrow("new webkitRTCPeerConnection(null);"); 11 shouldThrow("new webkitRTCPeerConnection(null, null);");12 11 shouldThrow("new webkitRTCPeerConnection(undefined);"); 13 shouldThrow("new webkitRTCPeerConnection(undefined, undefined);");14 12 shouldThrow("new webkitRTCPeerConnection();"); 15 13 shouldThrow("new webkitRTCPeerConnection('');"); 16 shouldThrow("new webkitRTCPeerConnection(null, '');");17 14 shouldThrow("new webkitRTCPeerConnection({});"); 18 shouldThrow("new webkitRTCPeerConnection({}, '');"); 19 shouldThrow("new webkitRTCPeerConnection({}, null);"); 20 shouldThrow("new webkitRTCPeerConnection({}, {});"); 21 shouldThrow("new webkitRTCPeerConnection('', {});"); 22 shouldThrow("new webkitRTCPeerConnection(null, {});"); 23 shouldThrow("new webkitRTCPeerConnection(undefined, {});"); 24 shouldThrow("new webkitRTCPeerConnection({iceServers:[]}, null);"); 25 shouldThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}, null);"); 26 shouldThrow("new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', credential:'x'}]}, null);"); 27 shouldThrow("new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', credential:'x'},{url:'stun:bar.com'}]}, null);"); 28 shouldThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com', username:'user'}]}, null);"); 29 shouldThrow("new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'}]}, null);"); 30 shouldThrow("new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'},{urls:'stun:bar.com', username:'user2', credential:'x'}]}, null);") 15 shouldThrow("new webkitRTCPeerConnection({iceServers:[]});"); 31 16 shouldThrow("new webkitRTCPeerConnection({iceServers:[{url:'stun:foo.com'}]});"); 32 17 shouldThrow("new webkitRTCPeerConnection({iceServers:[{urls:'http:foo.com'}]});"); 33 shouldThrow("new webkitRTCPeerConnection({iceServers:[]});");34 18 35 19 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});"); 36 20 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:['stun:foo.com', 'turn:foo.com']}]});"); 21 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}, {urls:['stun:foo.com', 'turn:bar.com']}]});"); 37 22 38 23 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}], iceTransports:'none'});"); … … 55 40 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}], iceTransports:'all', requestIdentity:'ifconfigured'});"); 56 41 57 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}, {});"); 58 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:['stun:foo.com', 'turn:bar.com']}]}, {});"); 59 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}, {urls:['stun:foo.com', 'turn:bar.com']}]}, {});"); 60 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', credential:'x'}]}, {});"); 61 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', credential:'x'},{urls:'stun:bar.com'}]}, {});"); 62 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com', username:'user'}]}, {});"); 63 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'}]}, {});"); 64 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'},{urls:'stun:bar.com', username:'user2', credential:'x'}]}, {});"); 65 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'},{urls:['stun:bar.com', 'turn:foo.com', 'turn:foo2.com'], username:'user2', credential:'x'}]}, {});"); 42 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', credential:'x'}]});"); 43 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', credential:'x'},{urls:'stun:bar.com'}]});"); 44 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com', username:'user'}]});"); 45 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'}]});"); 46 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'},{urls:'stun:bar.com', username:'user2', credential:'x'}]});"); 47 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'},{urls:['stun:bar.com', 'turn:foo.com', 'turn:foo2.com'], username:'user2', credential:'x'}]});"); 66 48 67 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'} , {});");68 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', credential:'x'},{urls:'stun:bar.com'}], iceTransports:'all', requestIdentity:'ifconfigured'} , {});");69 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com', username:'user'}], iceTransports:'all', requestIdentity:'ifconfigured'} , {});");70 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'} , {});");71 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'},{urls:'stun:bar.com', username:'user2', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'} , {});");49 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'});"); 50 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', credential:'x'},{urls:'stun:bar.com'}], iceTransports:'all', requestIdentity:'ifconfigured'});"); 51 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com', username:'user'}], iceTransports:'all', requestIdentity:'ifconfigured'});"); 52 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'});"); 53 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'turn:foo.com', username:'user', credential:'x'},{urls:'stun:bar.com', username:'user2', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'});"); 72 54 73 shouldThrow("new webkitRTCPeerConnection({fooServers:[]}, {});"); 74 shouldThrow("new webkitRTCPeerConnection({iceServers:true}, {});"); 75 shouldThrow("new webkitRTCPeerConnection({iceServers:[1, 2, 3]}, {});"); 76 shouldThrow("new webkitRTCPeerConnection({iceServers:[{}]}, {});"); 77 shouldThrow("new webkitRTCPeerConnection({iceServers:[{urls:'foo'}]}, {});"); 78 shouldThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}, {mandatory:true});"); 79 shouldThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}, {optional:false});"); 80 shouldThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}, {optional:{}});"); 81 82 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}, {mandatory:{valid_and_supported_1:1}});"); 83 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}, {mandatory:{valid_and_supported_1:1, valid_and_supported_2:1}});"); 84 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}, {optional:[{valid_and_supported_1:0}]});"); 85 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}, {optional:[{valid_and_supported_1:0},{valid_and_supported_2:0}]});"); 86 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}, {optional:[{valid_but_unsupported_1:0},{valid_but_unsupported_2:0}]});"); 87 88 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}, {urls:['stun:bar.com', 'turn:foo.com']}]}, {mandatory:{valid_and_supported_1:1}});"); 89 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}, {urls:['stun:bar.com', 'turn:foo.com']}]}, {mandatory:{valid_and_supported_1:1, valid_and_supported_2:1}});"); 90 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}, {urls:['stun:bar.com', 'turn:foo.com']}]}, {optional:[{valid_and_supported_1:0}]});"); 91 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}, {urls:['stun:bar.com', 'turn:foo.com']}]}, {optional:[{valid_and_supported_1:0},{valid_and_supported_2:0}]});"); 92 shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}, {urls:['stun:bar.com', 'turn:foo.com']}]}, {optional:[{valid_but_unsupported_1:0},{valid_but_unsupported_2:0}]});"); 93 94 shouldThrow("new webkitRTCPeerConnection({iceServers:[]}, {mandatory:{valid_and_supported_1:66}});"); 95 shouldThrow("new webkitRTCPeerConnection({iceServers:[]}, {mandatory:{invalid:1}});"); 96 shouldThrow("new webkitRTCPeerConnection({iceServers:[]}, {mandatory:{valid_but_unsupported_1:1}});"); 97 shouldThrow("new webkitRTCPeerConnection({iceServers:[]}, {mandatory:{valid_but_unsupported_1:1, valid_and_supported_1:1}});"); 98 shouldThrow("new webkitRTCPeerConnection({iceServers:[]}, {optional:{valid_and_supported_1:0}});"); 99 shouldThrow("new webkitRTCPeerConnection({iceServers:[]}, {optional:[{valid_and_supported_1:0,valid_and_supported_2:0}]});"); 100 shouldThrow("new webkitRTCPeerConnection({iceServers:[]}, {optional:[{invalid:0}]});"); 101 shouldThrow("new webkitRTCPeerConnection({iceServers:[]}, {valid_and_supported_1:1});"); 102 shouldThrow("new webkitRTCPeerConnection({iceServers:[]}, {valid_but_unsupported_1:1});"); 103 shouldThrow("new webkitRTCPeerConnection({iceServers:[]}, {valid_and_supported_2:1, mandatory:{valid_and_supported_1:1}});"); 55 shouldThrow("new webkitRTCPeerConnection({fooServers:[]});"); 56 shouldThrow("new webkitRTCPeerConnection({iceServers:true});"); 57 shouldThrow("new webkitRTCPeerConnection({iceServers:[1, 2, 3]});"); 58 shouldThrow("new webkitRTCPeerConnection({iceServers:[{}]});"); 59 shouldThrow("new webkitRTCPeerConnection({iceServers:[{urls:'foo'}]});"); 104 60 </script> 105 61 <script src="../../resources/js-test-post.js"></script> -
trunk/Source/WebCore/ChangeLog
r164837 r164839 1 2014-02-27 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> 2 3 [WebRTC] Removing MediaConstraints argument from RTCPeerConnection addStream, updateIce methods and constructor 4 https://bugs.webkit.org/show_bug.cgi?id=129449 5 6 Reviewed by Eric Carlson. 7 8 According to WebRTC editor's draft, MediaConstraints will no longer be an argument of those methods and 9 constructor. 10 11 Existing tests were updated. 12 13 * Modules/mediastream/RTCPeerConnection.cpp: 14 (WebCore::RTCPeerConnection::create): 15 (WebCore::RTCPeerConnection::RTCPeerConnection): 16 (WebCore::RTCPeerConnection::updateIce): 17 (WebCore::RTCPeerConnection::addStream): 18 * Modules/mediastream/RTCPeerConnection.h: 19 * Modules/mediastream/RTCPeerConnection.idl: 20 * bindings/js/JSRTCPeerConnectionCustom.cpp: 21 (WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection): 22 * platform/mediastream/RTCPeerConnectionHandler.h: 23 * platform/mock/RTCPeerConnectionHandlerMock.cpp: 24 (WebCore::RTCPeerConnectionHandlerMock::initialize): 25 (WebCore::RTCPeerConnectionHandlerMock::updateIce): 26 (WebCore::RTCPeerConnectionHandlerMock::addStream): 27 * platform/mock/RTCPeerConnectionHandlerMock.h: 28 1 29 2014-02-27 Radu Stavila <stavila@adobe.com> 2 30 -
trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
r164602 r164839 153 153 } 154 154 155 PassRefPtr<RTCPeerConnection> RTCPeerConnection::create(ScriptExecutionContext& context, const Dictionary& rtcConfiguration, const Dictionary& mediaConstraints,ExceptionCode& ec)155 PassRefPtr<RTCPeerConnection> RTCPeerConnection::create(ScriptExecutionContext& context, const Dictionary& rtcConfiguration, ExceptionCode& ec) 156 156 { 157 157 RefPtr<RTCConfiguration> configuration = parseConfiguration(rtcConfiguration, ec); … … 159 159 return nullptr; 160 160 161 RefPtr<MediaConstraints> constraints = MediaConstraintsImpl::create(mediaConstraints, ec); 162 if (ec) 163 return nullptr; 164 165 RefPtr<RTCPeerConnection> peerConnection = adoptRef(new RTCPeerConnection(context, configuration.release(), constraints.release(), ec)); 161 RefPtr<RTCPeerConnection> peerConnection = adoptRef(new RTCPeerConnection(context, configuration.release(), ec)); 166 162 peerConnection->suspendIfNeeded(); 167 163 if (ec) … … 171 167 } 172 168 173 RTCPeerConnection::RTCPeerConnection(ScriptExecutionContext& context, PassRefPtr<RTCConfiguration> configuration, PassRefPtr<MediaConstraints> constraints,ExceptionCode& ec)169 RTCPeerConnection::RTCPeerConnection(ScriptExecutionContext& context, PassRefPtr<RTCConfiguration> configuration, ExceptionCode& ec) 174 170 : ActiveDOMObject(&context) 175 171 , m_signalingState(SignalingStateStable) … … 194 190 document.frame()->loader().client().dispatchWillStartUsingPeerConnectionHandler(m_peerHandler.get()); 195 191 196 if (!m_peerHandler->initialize(configuration , constraints)) {192 if (!m_peerHandler->initialize(configuration)) { 197 193 ec = NOT_SUPPORTED_ERR; 198 194 return; … … 346 342 } 347 343 348 void RTCPeerConnection::updateIce(const Dictionary& rtcConfiguration, const Dictionary& mediaConstraints,ExceptionCode& ec)344 void RTCPeerConnection::updateIce(const Dictionary& rtcConfiguration, ExceptionCode& ec) 349 345 { 350 346 if (m_signalingState == SignalingStateClosed) { … … 357 353 return; 358 354 359 RefPtr<MediaConstraints> constraints = MediaConstraintsImpl::create(mediaConstraints, ec); 360 if (ec) 361 return; 362 363 bool valid = m_peerHandler->updateIce(configuration, constraints); 355 bool valid = m_peerHandler->updateIce(configuration); 364 356 if (!valid) 365 357 ec = SYNTAX_ERR; … … 444 436 } 445 437 446 void RTCPeerConnection::addStream(PassRefPtr<MediaStream> prpStream, const Dictionary& mediaConstraints,ExceptionCode& ec)438 void RTCPeerConnection::addStream(PassRefPtr<MediaStream> prpStream, ExceptionCode& ec) 447 439 { 448 440 if (m_signalingState == SignalingStateClosed) { … … 460 452 return; 461 453 462 RefPtr<MediaConstraints> constraints = MediaConstraintsImpl::create(mediaConstraints, ec); 463 if (ec) 464 return; 465 466 bool valid = m_peerHandler->addStream(stream->privateStream(), constraints); 454 bool valid = m_peerHandler->addStream(stream->privateStream()); 467 455 if (!valid) 468 456 ec = SYNTAX_ERR; -
trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h
r162158 r164839 62 62 class RTCPeerConnection final : public RefCounted<RTCPeerConnection>, public ScriptWrappable, public RTCPeerConnectionHandlerClient, public EventTargetWithInlineData, public ActiveDOMObject, public MediaStream::Observer { 63 63 public: 64 static PassRefPtr<RTCPeerConnection> create(ScriptExecutionContext&, const Dictionary& rtcConfiguration, const Dictionary& mediaConstraints,ExceptionCode&);64 static PassRefPtr<RTCPeerConnection> create(ScriptExecutionContext&, const Dictionary& rtcConfiguration, ExceptionCode&); 65 65 ~RTCPeerConnection(); 66 66 … … 77 77 String signalingState() const; 78 78 79 void updateIce(const Dictionary& rtcConfiguration, const Dictionary& mediaConstraints,ExceptionCode&);79 void updateIce(const Dictionary& rtcConfiguration, ExceptionCode&); 80 80 81 81 void addIceCandidate(RTCIceCandidate*, PassRefPtr<VoidCallback>, PassRefPtr<RTCPeerConnectionErrorCallback>, ExceptionCode&); … … 91 91 MediaStream* getStreamById(const String& streamId); 92 92 93 void addStream(PassRefPtr<MediaStream>, const Dictionary& mediaConstraints,ExceptionCode&);93 void addStream(PassRefPtr<MediaStream>, ExceptionCode&); 94 94 95 95 void removeStream(PassRefPtr<MediaStream>, ExceptionCode&); … … 135 135 136 136 private: 137 RTCPeerConnection(ScriptExecutionContext&, PassRefPtr<RTCConfiguration>, PassRefPtr<MediaConstraints>,ExceptionCode&);137 RTCPeerConnection(ScriptExecutionContext&, PassRefPtr<RTCConfiguration>, ExceptionCode&); 138 138 139 139 static PassRefPtr<RTCConfiguration> parseConfiguration(const Dictionary& configuration, ExceptionCode&); -
trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl
r160553 r164839 33 33 Conditional=MEDIA_STREAM, 34 34 ActiveDOMObject, 35 CustomConstructor(Dictionary rtc IceServers, optional Dictionary mediaConstraints),35 CustomConstructor(Dictionary rtcConfiguration), 36 36 ConstructorCallWith=ScriptExecutionContext, 37 37 ConstructorRaisesException, … … 52 52 readonly attribute DOMString signalingState; 53 53 54 [RaisesException] void updateIce(optional Dictionary configuration , optional Dictionary mediaConstraints);54 [RaisesException] void updateIce(optional Dictionary configuration); 55 55 56 56 [RaisesException] void addIceCandidate(RTCIceCandidate candidate, VoidCallback successCallback, RTCPeerConnectionErrorCallback failureCallback); … … 63 63 MediaStream getStreamById(DOMString streamId); 64 64 65 [StrictTypeChecking, RaisesException] void addStream(MediaStream stream , optional Dictionary mediaConstraints);65 [StrictTypeChecking, RaisesException] void addStream(MediaStream stream); 66 66 [StrictTypeChecking, RaisesException] void removeStream(MediaStream stream); 67 67 -
trunk/Source/WebCore/bindings/js/JSRTCPeerConnectionCustom.cpp
r158964 r164839 48 48 49 49 if (!rtcConfiguration.isObject()) 50 return throwVMError(exec, createTypeError(exec, "First argument of RTCPeerConnection must be a valid Dictionary")); 51 52 Dictionary mediaConstraints; 53 if (exec->argumentCount() > 1) { 54 mediaConstraints = Dictionary(exec, exec->argument(1)); 55 if (!mediaConstraints.isObject()) 56 return throwVMError(exec, createTypeError(exec, "Optional constraints argument of RTCPeerConnection must be a valid Dictionary")); 57 58 if (exec->hadException()) 59 return JSValue::encode(jsUndefined()); 60 } 50 return throwVMError(exec, createTypeError(exec, "RTCPeerConnection argument must be a valid Dictionary")); 61 51 62 52 JSRTCPeerConnectionConstructor* jsConstructor = jsCast<JSRTCPeerConnectionConstructor*>(exec->callee()); … … 65 55 return throwVMError(exec, createReferenceError(exec, "RTCPeerConnection constructor associated document is unavailable")); 66 56 67 RefPtr<RTCPeerConnection> peerConnection = RTCPeerConnection::create(*scriptExecutionContext, rtcConfiguration, mediaConstraints,ec);57 RefPtr<RTCPeerConnection> peerConnection = RTCPeerConnection::create(*scriptExecutionContext, rtcConfiguration, ec); 68 58 if (ec == TYPE_MISMATCH_ERR) { 69 59 setDOMException(exec, ec); -
trunk/Source/WebCore/platform/mediastream/RTCPeerConnectionHandler.h
r160553 r164839 81 81 static const AtomicString& internalErrorName(); 82 82 83 virtual bool initialize(PassRefPtr<RTCConfiguration> , PassRefPtr<MediaConstraints>) = 0;83 virtual bool initialize(PassRefPtr<RTCConfiguration>) = 0; 84 84 85 85 virtual void createOffer(PassRefPtr<RTCSessionDescriptionRequest>, PassRefPtr<MediaConstraints>) = 0; … … 89 89 virtual PassRefPtr<RTCSessionDescriptionDescriptor> localDescription() = 0; 90 90 virtual PassRefPtr<RTCSessionDescriptionDescriptor> remoteDescription() = 0; 91 virtual bool updateIce(PassRefPtr<RTCConfiguration> , PassRefPtr<MediaConstraints>) = 0;91 virtual bool updateIce(PassRefPtr<RTCConfiguration>) = 0; 92 92 virtual bool addIceCandidate(PassRefPtr<RTCVoidRequest>, PassRefPtr<RTCIceCandidateDescriptor>) = 0; 93 virtual bool addStream(PassRefPtr<MediaStreamPrivate> , PassRefPtr<MediaConstraints>) = 0;93 virtual bool addStream(PassRefPtr<MediaStreamPrivate>) = 0; 94 94 virtual void removeStream(PassRefPtr<MediaStreamPrivate>) = 0; 95 95 virtual void getStats(PassRefPtr<RTCStatsRequest>) = 0; -
trunk/Source/WebCore/platform/mock/RTCPeerConnectionHandlerMock.cpp
r160693 r164839 52 52 } 53 53 54 bool RTCPeerConnectionHandlerMock::initialize(PassRefPtr<RTCConfiguration> , PassRefPtr<MediaConstraints> constraints)54 bool RTCPeerConnectionHandlerMock::initialize(PassRefPtr<RTCConfiguration>) 55 55 { 56 String invalidQuery = MediaConstraintsMock::verifyConstraints(constraints);57 if (!invalidQuery.isEmpty())58 return false;59 60 56 RefPtr<IceConnectionNotifier> notifier = adoptRef(new IceConnectionNotifier(m_client, RTCPeerConnectionHandlerClient::IceConnectionStateCompleted, RTCPeerConnectionHandlerClient::IceGatheringStateComplete)); 61 57 m_timerEvents.append(adoptRef(new TimerEvent(this, notifier))); … … 144 140 } 145 141 146 bool RTCPeerConnectionHandlerMock::updateIce(PassRefPtr<RTCConfiguration> , PassRefPtr<MediaConstraints>)142 bool RTCPeerConnectionHandlerMock::updateIce(PassRefPtr<RTCConfiguration>) 147 143 { 148 144 return true; … … 156 152 } 157 153 158 bool RTCPeerConnectionHandlerMock::addStream(PassRefPtr<MediaStreamPrivate> , PassRefPtr<MediaConstraints> constraints)154 bool RTCPeerConnectionHandlerMock::addStream(PassRefPtr<MediaStreamPrivate>) 159 155 { 160 String invalidQuery = MediaConstraintsMock::verifyConstraints(constraints);161 if (!invalidQuery.isEmpty())162 return false;163 164 156 // Spec states that every time a stream is added, a negotiationneeded event must be fired. 165 157 m_client->negotiationNeeded(); -
trunk/Source/WebCore/platform/mock/RTCPeerConnectionHandlerMock.h
r162158 r164839 42 42 virtual ~RTCPeerConnectionHandlerMock() { } 43 43 44 virtual bool initialize(PassRefPtr<RTCConfiguration> , PassRefPtr<MediaConstraints>) override;44 virtual bool initialize(PassRefPtr<RTCConfiguration>) override; 45 45 46 46 virtual void createOffer(PassRefPtr<RTCSessionDescriptionRequest>, PassRefPtr<MediaConstraints>) override; … … 50 50 virtual PassRefPtr<RTCSessionDescriptionDescriptor> localDescription() override; 51 51 virtual PassRefPtr<RTCSessionDescriptionDescriptor> remoteDescription() override; 52 virtual bool updateIce(PassRefPtr<RTCConfiguration> , PassRefPtr<MediaConstraints>) override;52 virtual bool updateIce(PassRefPtr<RTCConfiguration>) override; 53 53 virtual bool addIceCandidate(PassRefPtr<RTCVoidRequest>, PassRefPtr<RTCIceCandidateDescriptor>) override; 54 virtual bool addStream(PassRefPtr<MediaStreamPrivate> , PassRefPtr<MediaConstraints>) override;54 virtual bool addStream(PassRefPtr<MediaStreamPrivate>) override; 55 55 virtual void removeStream(PassRefPtr<MediaStreamPrivate>) override; 56 56 virtual void getStats(PassRefPtr<RTCStatsRequest>) override;
Note: See TracChangeset
for help on using the changeset viewer.