OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../resources/js-test.js"></script> | 4 <script src="../resources/js-test.js"></script> |
5 <script src="resources/compatibility.js"></script> | 5 <script src="resources/compatibility.js"></script> |
6 <script src="resources/audio-testing.js"></script> | 6 <script src="resources/audio-testing.js"></script> |
7 </head> | 7 </head> |
8 <body> | 8 <body> |
9 <script> | 9 <script> |
10 description("Verifies that for .mediaElement getters, a wrapper that corresponds
to the actual element is created."); | 10 description("Verifies that for .mediaElement getters, a wrapper that corresponds
to the actual element is created."); |
11 | 11 |
12 var source; | 12 var source; |
13 function testMediaWrapper(kind) { | 13 function testMediaWrapper(kind) { |
14 var element = document.createElement(kind); | 14 var element = document.createElement(kind); |
15 var context = new webkitOfflineAudioContext(1, 1000, 44100); | 15 var context = new OfflineAudioContext(1, 1000, 44100); |
16 | 16 |
17 source = context.createMediaElementSource(element); | 17 source = context.createMediaElementSource(element); |
18 element = context = null; | 18 element = context = null; |
19 gc(); | 19 gc(); |
20 shouldBeUndefined('source.mediaElement.nonExistentProperty'); | 20 shouldBeUndefined('source.mediaElement.nonExistentProperty'); |
21 source = null; | 21 source = null; |
22 } | 22 } |
23 | 23 |
24 testMediaWrapper('audio'); | 24 testMediaWrapper('audio'); |
25 testMediaWrapper('video'); | 25 testMediaWrapper('video'); |
26 </script> | 26 </script> |
27 </body> | 27 </body> |
28 </html> | 28 </html> |
OLD | NEW |