830abb384fb28e9a31d5ae0ceee0e6cf1b2bfef1
[WebKit-https.git] / LayoutTests / webaudio / mediaelementaudiosourcenode-gc.html
1 <!DOCTYPE html>
2
3 <html>
4 <head>
5 <script src="../fast/js/resources/js-test-pre.js"></script>
6 <script src="resources/audio-testing.js"></script>
7 </head>
8
9 <body>
10 <div id="description"></div>
11 <div id="console"></div>
12
13 <script>
14 description("Tests garbage collection of MediaElementAudioSourceNode.");
15
16 function runTest() {
17     if (window.testRunner) {
18         testRunner.dumpAsText();
19     }
20
21     audioElement = document.createElement("audio");
22     context = new webkitAudioContext(1, 1000, 44100);
23     source = context.createMediaElementSource(audioElement);
24     audioElement = null;
25     context = null;
26     source = null;
27     gc();
28
29     testPassed("MediaElementAudioSourceNode survived garbage collection.");
30
31     finishJSTest();
32 }
33
34 runTest();
35
36 </script>
37
38 <script src="../fast/js/resources/js-test-post.js"></script>
39 </body>
40 </html>