| OLD | NEW |
| 1 | 1 |
| 2 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 2 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 3 <html> | 3 <html> |
| 4 <head> | 4 <head> |
| 5 <script src="../../resources/js-test.js"></script> | 5 <script src="../../resources/js-test.js"></script> |
| 6 </head> | 6 </head> |
| 7 <body> | 7 <body> |
| 8 <script> | 8 <script> |
| 9 description("Tests the RTCPeerConnection stats interface."); | 9 description("Tests the RTCPeerConnection stats interface."); |
| 10 | 10 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 testPassed("statsHandler2 was called"); | 71 testPassed("statsHandler2 was called"); |
| 72 verifyStats(status); | 72 verifyStats(status); |
| 73 shouldNotThrow('pc.close()'); | 73 shouldNotThrow('pc.close()'); |
| 74 shouldNotThrow('pc.getStats(statsHandler3)'); | 74 shouldNotThrow('pc.getStats(statsHandler3)'); |
| 75 } | 75 } |
| 76 | 76 |
| 77 function statsHandler3(status) | 77 function statsHandler3(status) |
| 78 { | 78 { |
| 79 testPassed("statsHandler3 was called"); | 79 testPassed("statsHandler3 was called"); |
| 80 verifyStats(status); | 80 verifyStats(status); |
| 81 // Silly non-MediaStreamTrack second argument should be interpreted as undef
ined. |
| 82 shouldNotThrow('pc.getStats(statsHandler4, 42)'); |
| 83 } |
| 84 |
| 85 function statsHandler4(status) { |
| 86 testPassed("statsHandler4 was called"); |
| 87 verifyStats(status); |
| 81 finishJSTest(); | 88 finishJSTest(); |
| 82 } | 89 } |
| 83 | 90 |
| 84 var startTime = new Date().getTime(); | 91 var startTime = new Date().getTime(); |
| 85 shouldNotThrow('pc = new webkitRTCPeerConnection(null)'); | 92 shouldNotThrow('pc = new webkitRTCPeerConnection(null)'); |
| 86 shouldNotThrow('pc.getStats(statsHandler1)'); | 93 shouldNotThrow('pc.getStats(statsHandler1)'); |
| 87 | 94 |
| 88 window.jsTestIsAsync = true; | 95 window.jsTestIsAsync = true; |
| 89 window.successfullyParsed = true; | 96 window.successfullyParsed = true; |
| 90 </script> | 97 </script> |
| 91 </body> | 98 </body> |
| 92 </html> | 99 </html> |
| OLD | NEW |