| 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 the RTCPeerConnection Ice functionality."); | 8 description("Tests the RTCPeerConnection Ice functionality."); |
| 9 | 9 |
| 10 var pc = null; | 10 var pc = null; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 { | 29 { |
| 30 testFailed("addIceCandidateFailue was called."); | 30 testFailed("addIceCandidateFailue was called."); |
| 31 finishJSTest(); | 31 finishJSTest(); |
| 32 } | 32 } |
| 33 | 33 |
| 34 function onIceChange1() | 34 function onIceChange1() |
| 35 { | 35 { |
| 36 if (pc.iceConnectionState === "completed") { | 36 if (pc.iceConnectionState === "completed") { |
| 37 testPassed("iceConnectionState is completed"); | 37 testPassed("iceConnectionState is completed"); |
| 38 iceCandidate = new RTCIceCandidate({candidate:"nano nano"}); | 38 iceCandidate = new RTCIceCandidate({candidate:"nano nano"}); |
| 39 shouldThrow('pc.addIceCandidate(null, null, null);'); | 39 shouldThrow('pc.addIceCandidate(null, addIceCandidateSuccess, addIceCand
idateFailure);'); |
| 40 shouldThrow('pc.addIceCandidate(iceCandidate, null, null);'); | 40 shouldThrow('pc.addIceCandidate(iceCandidate, null, addIceCandidateFailu
re);'); |
| 41 shouldThrow('pc.addIceCandidate(iceCandidate, addIceCandidateSuccess, nu
ll);'); | 41 shouldThrow('pc.addIceCandidate(iceCandidate, addIceCandidateSuccess, nu
ll);'); |
| 42 shouldNotThrow('pc.addIceCandidate(iceCandidate, addIceCandidateSuccess,
addIceCandidateFailure);'); | 42 shouldNotThrow('pc.addIceCandidate(iceCandidate, addIceCandidateSuccess,
addIceCandidateFailure);'); |
| 43 } | 43 } |
| 44 } | 44 } |
| 45 | 45 |
| 46 shouldNotThrow('pc = new webkitRTCPeerConnection(null, null);'); | 46 shouldNotThrow('pc = new webkitRTCPeerConnection(null, null);'); |
| 47 pc.oniceconnectionstatechange = onIceChange1; | 47 pc.oniceconnectionstatechange = onIceChange1; |
| 48 | 48 |
| 49 window.jsTestIsAsync = true; | 49 window.jsTestIsAsync = true; |
| 50 window.successfullyParsed = true; | 50 window.successfullyParsed = true; |
| 51 </script> | 51 </script> |
| 52 </body> | 52 </body> |
| 53 </html> | 53 </html> |
| OLD | NEW |