Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: LayoutTests/media/audio-garbage-collect.html

Issue 17395006: Fix LayoutTests that assume canplay, playing, and canplaythrough will only fire once. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix event-attributes expectations. Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698