39 lines
2.3 KiB
Plaintext
39 lines
2.3 KiB
Plaintext
Tests RTCSessionDescription.
|
|
|
|
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
|
|
|
|
|
|
PASS sessionDescription = new RTCSessionDescription(initializer); did not throw exception.
|
|
PASS sessionDescription.type is "offer"
|
|
PASS sessionDescription.sdp is "foobar"
|
|
PASS JSON.stringify(sessionDescription.toJSON()) is "{\"type\":\"offer\",\"sdp\":\"foobar\"}"
|
|
*** Attributes are read-only.
|
|
PASS sessionDescription.type = 'answer' did not throw exception.
|
|
PASS sessionDescription.type is 'offer'
|
|
PASS sessionDescription.sdp = 'football' did not throw exception.
|
|
PASS sessionDescription.sdp is 'foobar'
|
|
*** Argument is mandatory
|
|
PASS new RTCSessionDescription(); threw exception TypeError: Not enough arguments.
|
|
*** Dictionary member type is required
|
|
PASS new RTCSessionDescription({}); threw exception TypeError: Member RTCSessionDescriptionInit.type is required and must be an instance of RTCSdpType.
|
|
PASS new RTCSessionDescription({sdp:'x'}); threw exception TypeError: Member RTCSessionDescriptionInit.type is required and must be an instance of RTCSdpType.
|
|
PASS new RTCSessionDescription({foo:'bar'}); threw exception TypeError: Member RTCSessionDescriptionInit.type is required and must be an instance of RTCSdpType.
|
|
PASS new RTCSessionDescription({type:'offer'}); did not throw exception.
|
|
PASS new RTCSessionDescription(null); threw exception TypeError: Member RTCSessionDescriptionInit.type is required and must be an instance of RTCSdpType.
|
|
PASS new RTCSessionDescription(5); threw exception TypeError: Type error.
|
|
PASS new RTCSessionDescription('foobar'); threw exception TypeError: Type error.
|
|
PASS new RTCSessionDescription({type:'foobar', sdp:'x'}); threw exception TypeError: Type error.
|
|
*** Valid types
|
|
PASS sessionDescription = new RTCSessionDescription({type:'offer', sdp:'x'}); did not throw exception.
|
|
PASS sessionDescription.type is 'offer'
|
|
PASS sessionDescription = new RTCSessionDescription({type:'answer', sdp:'x'}); did not throw exception.
|
|
PASS sessionDescription.type is 'answer'
|
|
PASS sessionDescription = new RTCSessionDescription({type:'pranswer', sdp:'x'}); did not throw exception.
|
|
PASS sessionDescription.type is 'pranswer'
|
|
PASS sessionDescription = new RTCSessionDescription({type:'rollback', sdp:'x'}); did not throw exception.
|
|
PASS sessionDescription.type is 'rollback'
|
|
PASS successfullyParsed is true
|
|
|
|
TEST COMPLETE
|
|
|