1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../../resources/js-test.js"></script>
8 description("Tests RTCPeerConnection createAnswer.");
12 function requestFailed3(reason
)
14 testFailed('createAnswer request failed.');
19 function requestSucceeded3()
21 testPassed('createAnswer request succeeded.');
26 function requestFailed2(reason
)
28 testFailed('setRemoteDescription request failed.');
33 function requestSucceeded2()
35 testPassed('setRemoteDescription request succeeded.');
37 shouldNotThrow('pc.createAnswer(requestSucceeded3, requestFailed3);');
40 function requestFailed1()
42 testPassed('createOffer request failed.');
44 sessionDescription
= new RTCSessionDescription({type
:"answer", sdp
:"remote"});
45 shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded2, requestFailed2);');
48 function requestSucceeded1(sd
)
50 testFailed('createOffer request succeeded.');
54 pc
= new webkitRTCPeerConnection(null, null);
55 pc
.createOffer(requestSucceeded1
, requestFailed1
);
57 window
.jsTestIsAsync
= true;
58 window
.successfullyParsed
= true;