test_bug895305.html (1148B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=895305 5 https://bugzilla.mozilla.org/show_bug.cgi?id=905320 6 --> 7 <head> 8 <meta charset='utf-8'> 9 <title>Regression test for bug 895305 and 905320 - TextTrack* leaks</title> 10 <script src="/tests/SimpleTest/SimpleTest.js"></script> 11 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 12 </head> 13 <body> 14 <p id="display"></p> 15 <div id="content" style="display: none"> 16 </div> 17 <pre id="test"> 18 <script class="testbody" type="text/javascript"> 19 SimpleTest.waitForExplicitFinish(); 20 21 var audio = document.createElement("audio"); 22 23 // Check leaking on TextTrackList objects. 24 /* global ttl, ttc */ 25 window.ttl = audio.textTracks; 26 ttl.addEventListener("click", function(){}); 27 28 // Check leaking on VTTCue objects. 29 window.ttc = new VTTCue(3, 4, "Test."); 30 ttc.addEventListener("click", function() {}); 31 32 // Check leaking on TextTrack objects. 33 audio.addTextTrack("subtitles", "label", "en-CA"); 34 ttl[0].addEventListener("click", function() {}); 35 36 ok(true); // Need to have at least one assertion for Mochitest to be happy. 37 SimpleTest.finish(); 38 </script> 39 </pre> 40 </body> 41 </html>