Fri, 16 Jan 2015 04:50:19 +0100
Replace accessor implementation with direct member state manipulation, by
request https://trac.torproject.org/projects/tor/ticket/9701#comment:32
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 type="text/javascript" src="/MochiKit/MochiKit.js"></script>
11 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
12 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
13 </head>
14 <body>
15 <p id="display"></p>
16 <div id="content" style="display: none">
17 </div>
18 <pre id="test">
19 <script class="testbody" type="text/javascript">
20 SimpleTest.waitForExplicitFinish();
21 SpecialPowers.pushPrefEnv({"set": [["media.webvtt.enabled", true]]},
22 function() {
23 var audio = document.createElement("audio");
24 // Check leaking on TextTrackList objects.
25 window.ttl = audio.textTracks;
26 ttl.addEventListener("click", function(){}, false);
28 // Check leaking on VTTCue objects.
29 window.ttc = new VTTCue(3, 4, "Test.");
30 ttc.addEventListener("click", function() {}, false);
32 // Check leaking on TextTrack objects.
33 audio.addTextTrack("subtitles", "label", "en-CA");
34 ttl[0].addEventListener("click", function() {}, false);
36 ok(true); // Need to have at least one assertion for Mochitest to be happy.
37 SimpleTest.finish();
38 }
39 );
40 </script>
41 </pre>
42 </body>
43 </html>