blob: 46d5104d881c046aff08a27d9ab3571eb755d1be [file] [log] [blame]
Tests the RTCPeerConnection constructor.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS new webkitRTCPeerConnection(null); did not throw exception.
PASS new webkitRTCPeerConnection(null, null); did not throw exception.
PASS new webkitRTCPeerConnection(undefined); did not throw exception.
PASS new webkitRTCPeerConnection(undefined, undefined); did not throw exception.
PASS new webkitRTCPeerConnection(); threw exception TypeError: Not enough arguments.
PASS new webkitRTCPeerConnection(''); threw exception TypeError: Not an object..
PASS new webkitRTCPeerConnection(null, ''); threw exception TypeError: Not an object..
PASS new webkitRTCPeerConnection({iceServers:[]}, null); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[{url:'stun:foo.com'}]}, null); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'}]}, null); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'},{url:'stun:bar.com'}]}, null); did not throw exception.
PASS new webkitRTCPeerConnection({fooServers:[]}, null); threw exception TypeMismatchError: The type of an object was incompatible with the expected type of the parameter associated to the object..
PASS new webkitRTCPeerConnection({iceServers:true}, null); threw exception TypeMismatchError: The type of an object was incompatible with the expected type of the parameter associated to the object..
PASS new webkitRTCPeerConnection({iceServers:[1, 2, 3]}, null); threw exception TypeMismatchError: The type of an object was incompatible with the expected type of the parameter associated to the object..
PASS new webkitRTCPeerConnection({iceServers:[{}]}, null); threw exception TypeMismatchError: The type of an object was incompatible with the expected type of the parameter associated to the object..
PASS new webkitRTCPeerConnection({iceServers:[{url:'foo'}]}, null); threw exception TypeMismatchError: The type of an object was incompatible with the expected type of the parameter associated to the object..
PASS new webkitRTCPeerConnection(null, {mandatory:{valid_and_supported_1:1}}); did not throw exception.
PASS new webkitRTCPeerConnection(null, {mandatory:{valid_and_supported_1:1, valid_and_supported_2:1}}); did not throw exception.
PASS new webkitRTCPeerConnection(null, {optional:[{valid_and_supported_1:0}]}); did not throw exception.
PASS new webkitRTCPeerConnection(null, {optional:[{valid_and_supported_1:0},{valid_and_supported_2:0}]}); did not throw exception.
PASS new webkitRTCPeerConnection(null, {optional:[{valid_but_unsupported_1:0},{valid_but_unsupported_2:0}]}); did not throw exception.
PASS new webkitRTCPeerConnection(null, {mandatory:{valid_and_supported_1:66}}); threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS new webkitRTCPeerConnection(null, {mandatory:{invalid:1}}); threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS new webkitRTCPeerConnection(null, {mandatory:{valid_but_unsupported_1:1}}); threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS new webkitRTCPeerConnection(null, {mandatory:{valid_but_unsupported_1:1, valid_and_supported_1:1}}); threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS new webkitRTCPeerConnection(null, {optional:{valid_and_supported_1:0}}); threw exception TypeMismatchError: The type of an object was incompatible with the expected type of the parameter associated to the object..
PASS new webkitRTCPeerConnection(null, {optional:[{valid_and_supported_1:0,valid_and_supported_2:0}]}); threw exception TypeMismatchError: The type of an object was incompatible with the expected type of the parameter associated to the object..
PASS new webkitRTCPeerConnection(null, {optional:[{invalid:0}]}); threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS new webkitRTCPeerConnection(null, {valid_and_supported_1:1}); threw exception TypeMismatchError: The type of an object was incompatible with the expected type of the parameter associated to the object..
PASS new webkitRTCPeerConnection(null, {valid_but_unsupported_1:1}); threw exception TypeMismatchError: The type of an object was incompatible with the expected type of the parameter associated to the object..
PASS new webkitRTCPeerConnection(null, {valid_and_supported_2:1, mandatory:{valid_and_supported_1:1}}); threw exception TypeMismatchError: The type of an object was incompatible with the expected type of the parameter associated to the object..
PASS successfullyParsed is true
TEST COMPLETE