OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
5 | |
6 <script src=../media-file.js></script> | |
7 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 | |
8 (Please avoid writing new tests using video-test.js) --> | |
9 <script src=../video-test.js></script> | |
10 <script> | |
11 | |
12 function forceGC() | |
13 { | |
14 if (window.GCController) | |
15 return GCController.collectAll(); | |
16 | |
17 // Force garbage collection | |
18 for (var ndx = 0; ndx < 99000; ndx++) | |
19 var str = new String("1234"); | |
20 } | |
21 | |
22 function start() | |
23 { | |
24 findMediaElement(); | |
25 | |
26 consoleWrite("** Add a custom property to a track."); | |
27 testExpected("video.textTracks.length", 1); | |
28 run("video.textTracks.myProperty = 'chicken salad!'"); | |
29 testExpected("video.textTracks.length", 1); | |
30 testExpected("video.textTracks.myProperty", "chicken salad!"); | |
31 | |
32 consoleWrite("<br>** Force garbage collection."); | |
33 forceGC(); | |
34 testExpected("video.textTracks.length", 1); | |
35 testExpected("video.textTracks.myProperty", "chicken salad!"); | |
36 | |
37 consoleWrite(""); | |
38 endTest(); | |
39 } | |
40 | |
41 </script> | |
42 </head> | |
43 <body onload="start()"> | |
44 <p>Ensure that a TrackList won't be collected if it has custom propertie
s.</p> | |
45 <video> | |
46 <track> | |
47 </video> | |
48 </body> | |
49 </html> | |
OLD | NEW |