OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 <html> |
| 3 <head> |
| 4 <script src="../../resources/js-test.js"></script> |
| 5 </head> |
| 6 <body> |
| 7 <script> |
| 8 description("Test cloning mediastreams onended."); |
| 9 |
| 10 var cloned_stream; |
| 11 |
| 12 function onStreamEnded() { |
| 13 testPassed('Stream ended.'); |
| 14 finishJSTest(); |
| 15 } |
| 16 |
| 17 function onTrackAdded() { |
| 18 testPassed('Mock test track added.'); |
| 19 shouldBe('cloned_stream.getVideoTracks().length', '1'); |
| 20 cloned_stream.getVideoTracks()[0].stop(); |
| 21 } |
| 22 |
| 23 function run(s) { |
| 24 cloned_stream = new webkitMediaStream(); |
| 25 cloned_stream.onaddtrack = onTrackAdded; |
| 26 cloned_stream.onended = onStreamEnded; |
| 27 } |
| 28 |
| 29 run(); |
| 30 |
| 31 window.jsTestIsAsync = true; |
| 32 window.successfullyParsed = true; |
| 33 </script> |
| 34 </body> |
| 35 </html> |
OLD | NEW |