| OLD | NEW |
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 | 2 |
| 3 <html> | 3 <html> |
| 4 <body> | 4 <body> |
| 5 | 5 |
| 6 <p>Tests that we don't garbage collect playing audio object or event listener.</
p> | 6 <p>Tests that we don't garbage collect playing audio object or event listener.</
p> |
| 7 <p>According to http://www.whatwg.org/specs/web-apps/current-work/multipage/the-
video-element.html,<br /> | 7 <p>According to http://www.whatwg.org/specs/web-apps/current-work/multipage/the-
video-element.html,<br /> |
| 8 "4.8.10.8 Playing the media resource",<br /> | 8 "4.8.10.8 Playing the media resource",<br /> |
| 9 "Media elements must not stop playing just because all references to them have | 9 "Media elements must not stop playing just because all references to them have |
| 10 been removed; only once a media element is in a state where no further audio | 10 been removed; only once a media element is in a state where no further audio |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 gc(); | 43 gc(); |
| 44 } | 44 } |
| 45 } else { | 45 } else { |
| 46 num_players --; | 46 num_players --; |
| 47 if (num_players == 0) | 47 if (num_players == 0) |
| 48 start(); | 48 start(); |
| 49 else | 49 else |
| 50 finish(); | 50 finish(); |
| 51 } | 51 } |
| 52 }); | 52 }); |
| 53 a.addEventListener('canplaythrough', function() { | 53 |
| 54 waitForEvent('canplaythrough', function() { |
| 54 a.currentTime = a.duration - 0.35; | 55 a.currentTime = a.duration - 0.35; |
| 55 a.play(); | 56 a.play(); |
| 56 }); | 57 }, false, true, a, true); |
| 57 } | 58 } |
| 58 | 59 |
| 59 start(); | 60 start(); |
| 60 | 61 |
| 61 </script> | 62 </script> |
| 62 </body> | 63 </body> |
| 63 </html> | 64 </html> |
| OLD | NEW |