1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../../resources/js-test.js"></script>
8 description("Tests RTCPeerConnection remoteDescription.");
12 function requestFailed2()
14 testPassed('requestFailed was called.');
16 shouldBeEqualToString('pc.remoteDescription.type', "answer");
17 shouldBeEqualToString('pc.remoteDescription.sdp', "remote");
19 shouldBeEqualToString('pc.remoteDescription.type', "answer");
20 shouldBeEqualToString('pc.remoteDescription.sdp', "remote");
25 function requestSucceeded2()
27 testFailed('requestSucceeded was called.');
31 function requestFailed1()
33 testFailed('requestFailed was called.');
37 function requestSucceeded1()
39 testPassed('requestSucceeded was called.');
41 sessionDescription
= new RTCSessionDescription({type
:"offer", sdp
:"local"});
42 shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded2, requestFailed2);');
45 pc
= new webkitRTCPeerConnection(null, null);
46 var sessionDescription
= new RTCSessionDescription({type
:"answer", sdp
:"remote"});
47 shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded1, requestFailed1);');
50 window
.jsTestIsAsync
= true;
51 window
.successfullyParsed
= true;