OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 | 2 |
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 <script src="resources/compatibility.js"></script> |
6 <script src="resources/audio-testing.js"></script> | 7 <script src="resources/audio-testing.js"></script> |
7 </head> | 8 </head> |
8 | 9 |
9 <body> | 10 <body> |
10 <div id="description"></div> | 11 <div id="description"></div> |
11 <div id="console"></div> | 12 <div id="console"></div> |
12 | 13 |
13 <script> | 14 <script> |
14 description("Tests garbage collection of MediaElementAudioSourceNode."); | 15 description("Tests garbage collection of MediaElementAudioSourceNode."); |
15 | 16 |
16 function runTest() { | 17 function runTest() { |
17 if (window.testRunner) { | 18 if (window.testRunner) { |
18 testRunner.dumpAsText(); | 19 testRunner.dumpAsText(); |
19 } | 20 } |
20 | 21 |
21 audioElement = document.createElement("audio"); | 22 audioElement = document.createElement("audio"); |
22 context = new webkitOfflineAudioContext(1, 1000, 44100); | 23 context = new OfflineAudioContext(1, 1000, 44100); |
23 source = context.createMediaElementSource(audioElement); | 24 source = context.createMediaElementSource(audioElement); |
24 audioElement = null; | 25 audioElement = null; |
25 context = null; | 26 context = null; |
26 source = null; | 27 source = null; |
27 gc(); | 28 gc(); |
28 | 29 |
29 testPassed("MediaElementAudioSourceNode survived garbage collection."); | 30 testPassed("MediaElementAudioSourceNode survived garbage collection."); |
30 | 31 |
31 finishJSTest(); | 32 finishJSTest(); |
32 } | 33 } |
33 | 34 |
34 runTest(); | 35 runTest(); |
35 | 36 |
36 </script> | 37 </script> |
37 | 38 |
38 </body> | 39 </body> |
39 </html> | 40 </html> |
OLD | NEW |