OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <script> | 7 <script> |
8 description("Tests RTCPeerConnection remoteDescription."); | 8 description("Tests RTCPeerConnection remoteDescription."); |
9 | 9 |
10 var pc = null; | 10 var pc = null; |
(...skipping 20 matching lines...) Expand all Loading... |
31 function requestFailed1() | 31 function requestFailed1() |
32 { | 32 { |
33 testFailed('requestFailed was called.'); | 33 testFailed('requestFailed was called.'); |
34 finishJSTest(); | 34 finishJSTest(); |
35 } | 35 } |
36 | 36 |
37 function requestSucceeded1() | 37 function requestSucceeded1() |
38 { | 38 { |
39 testPassed('requestSucceeded was called.'); | 39 testPassed('requestSucceeded was called.'); |
40 | 40 |
| 41 sessionDescription = pc.remoteDescription; |
| 42 shouldBeTrue('pc.remoteDescription === sessionDescription'); |
41 sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"}); | 43 sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"}); |
42 shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded
2, requestFailed2);'); | 44 shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded
2, requestFailed2);'); |
43 } | 45 } |
44 | 46 |
45 pc = new webkitRTCPeerConnection(null, null); | 47 pc = new webkitRTCPeerConnection(null, null); |
46 var sessionDescription = new RTCSessionDescription({type:"answer", sdp:"remote"}
); | 48 var sessionDescription = new RTCSessionDescription({type:"answer", sdp:"remote"}
); |
47 shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded1, r
equestFailed1);'); | 49 shouldNotThrow('pc.setRemoteDescription(sessionDescription, requestSucceeded1, r
equestFailed1);'); |
48 | 50 |
49 | 51 |
50 window.jsTestIsAsync = true; | 52 window.jsTestIsAsync = true; |
51 window.successfullyParsed = true; | 53 window.successfullyParsed = true; |
52 </script> | 54 </script> |
53 </body> | 55 </body> |
54 </html> | 56 </html> |
OLD | NEW |