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