Changeset 118586 in webkit
- Timestamp:
- May 25, 2012 4:31:39 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r118585 r118586 1 2012-05-25 Tommy Widenflycht <tommyw@google.com> 2 3 MediaStream API: Make sure IceCallback is valid for PeerConnection00 4 https://bugs.webkit.org/show_bug.cgi?id=87480 5 6 Reviewed by Adam Barth. 7 8 * fast/mediastream/constructors-expected.txt: 9 * fast/mediastream/constructors.html: 10 1 11 2012-05-25 Mike West <mkwst@chromium.org> 2 12 -
trunk/LayoutTests/fast/mediastream/constructors-expected.txt
r115651 r118586 8 8 PASS typeof IceCandidate === 'function' is true 9 9 PASS new webkitPeerConnection00('STUN foobar.com:12345', function(){}); did not throw exception. 10 PASS new webkitPeerConnection00('STUN foobar.com:12345'); threw exception TypeError: Not enough arguments. 11 PASS new webkitPeerConnection00('STUN foobar.com:12345', null); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17. 12 PASS new webkitPeerConnection00('STUN foobar.com:12345', undefined); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17. 13 PASS new webkitPeerConnection00('STUN foobar.com:12345', 'STUN'); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17. 10 14 PASS new SessionDescription(''); did not throw exception. 11 15 PASS new IceCandidate('', ''); did not throw exception. -
trunk/LayoutTests/fast/mediastream/constructors.html
r115651 r118586 11 11 description("Tests the JSEP PeerConnection related constructors."); 12 12 13 function shouldNotThrow(expression)14 {15 try {16 eval(expression);17 testPassed(expression + " did not throw exception.");18 } catch(e) {19 testFailed(expression + " should not throw exception. Threw exception " + e);20 }21 }22 23 13 shouldBeTrue("typeof webkitPeerConnection00 === 'function'"); 24 14 shouldBeTrue("typeof SessionDescription === 'function'"); … … 26 16 27 17 shouldNotThrow("new webkitPeerConnection00('STUN foobar.com:12345', function(){});"); 18 shouldThrow("new webkitPeerConnection00('STUN foobar.com:12345');"); 19 shouldThrow("new webkitPeerConnection00('STUN foobar.com:12345', null);"); 20 shouldThrow("new webkitPeerConnection00('STUN foobar.com:12345', undefined);"); 21 shouldThrow("new webkitPeerConnection00('STUN foobar.com:12345', 'STUN');"); 22 28 23 shouldNotThrow("new SessionDescription('');"); 29 24 shouldNotThrow("new IceCandidate('', '');"); -
trunk/Source/WebCore/ChangeLog
r118585 r118586 1 2012-05-25 Tommy Widenflycht <tommyw@google.com> 2 3 MediaStream API: Make sure IceCallback is valid for PeerConnection00 4 https://bugs.webkit.org/show_bug.cgi?id=87480 5 6 Reviewed by Adam Barth. 7 8 Existing tests have been extended to cover this change. 9 10 * Modules/mediastream/PeerConnection00.cpp: 11 (WebCore::PeerConnection00::create): 12 * Modules/mediastream/PeerConnection00.h: 13 * Modules/mediastream/PeerConnection00.idl: 14 1 15 2012-05-25 Mike West <mkwst@chromium.org> 2 16 -
trunk/Source/WebCore/Modules/mediastream/PeerConnection00.cpp
r116675 r118586 50 50 namespace WebCore { 51 51 52 PassRefPtr<PeerConnection00> PeerConnection00::create(ScriptExecutionContext* context, const String& serverConfiguration, PassRefPtr<IceCallback> iceCallback) 53 { 52 PassRefPtr<PeerConnection00> PeerConnection00::create(ScriptExecutionContext* context, const String& serverConfiguration, PassRefPtr<IceCallback> iceCallback, ExceptionCode& ec) 53 { 54 if (!iceCallback) { 55 ec = TYPE_MISMATCH_ERR; 56 return 0; 57 } 54 58 RefPtr<PeerConnection00> peerConnection = adoptRef(new PeerConnection00(context, serverConfiguration, iceCallback)); 55 59 peerConnection->suspendIfNeeded(); -
trunk/Source/WebCore/Modules/mediastream/PeerConnection00.h
r116127 r118586 87 87 }; 88 88 89 static PassRefPtr<PeerConnection00> create(ScriptExecutionContext*, const String& serverConfiguration, PassRefPtr<IceCallback> );89 static PassRefPtr<PeerConnection00> create(ScriptExecutionContext*, const String& serverConfiguration, PassRefPtr<IceCallback>, ExceptionCode&); 90 90 ~PeerConnection00(); 91 91 -
trunk/Source/WebCore/Modules/mediastream/PeerConnection00.idl
r116127 r118586 36 36 Constructor(in DOMString serverConfiguration, in [Callback] IceCallback iceCallback), 37 37 CallWith=ScriptExecutionContext, 38 ConstructorRaisesException, 38 39 EventTarget 39 40 ] PeerConnection00 {
Note: See TracChangeset
for help on using the changeset viewer.