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

Side by Side Diff: LayoutTests/media/track/track-cues-missed.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 <html> 2 <html>
3 <head> 3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 5
6 <script src=../media-file.js></script> 6 <script src=../media-file.js></script>
7 <script src=../video-test.js></script> 7 <script src=../video-test.js></script>
8 <script> 8 <script>
9 var videoCanPlayThrough = false; 9 var videoCanPlayThrough = false;
10 var trackLoaded = false; 10 var trackLoaded = false;
(...skipping 30 matching lines...) Expand all
41 testExpected("testTrack.track.cues.getCueById(cueCount).text", c urrentCue.text, "=="); 41 testExpected("testTrack.track.cues.getCueById(cueCount).text", c urrentCue.text, "==");
42 testExpected("currentCue.id", cueCount); 42 testExpected("currentCue.id", cueCount);
43 43
44 if (event.type == 'exit') { 44 if (event.type == 'exit') {
45 cueCount++; 45 cueCount++;
46 } 46 }
47 } 47 }
48 48
49 waitForEvent('ended', endTest); 49 waitForEvent('ended', endTest);
50 50
51 waitForEvent('canplaythrough', function() { 51 waitForEventOnce('canplaythrough', function() {
52 video.currentTime = 5.00; 52 video.currentTime = 5.00;
53 videoCanPlayThrough = true; 53 videoCanPlayThrough = true;
54 54
55 runTests(); 55 runTests();
56 }); 56 });
57 57
58 function loaded() 58 function loaded()
59 { 59 {
60 trackLoaded = true; 60 trackLoaded = true;
61 61
62 runTests(); 62 runTests();
63 }; 63 };
64 64
65 function bodyLoaded() 65 function bodyLoaded()
66 { 66 {
67 findMediaElement(); 67 findMediaElement();
68 video.src = findMediaFile("video", "../content/test"); 68 video.src = findMediaFile("video", "../content/test");
69 } 69 }
70 </script> 70 </script>
71 </head> 71 </head>
72 <body onload="bodyLoaded()"> 72 <body onload="bodyLoaded()">
73 <p>Tests that events are triggered for missed (skipped) cues during norm al playback.</p> 73 <p>Tests that events are triggered for missed (skipped) cues during norm al playback.</p>
74 <video controls> 74 <video controls>
75 <track id="testTrack" src="captions-webvtt/missed-cues.vtt" onload=" loaded()" default> 75 <track id="testTrack" src="captions-webvtt/missed-cues.vtt" onload=" loaded()" default>
76 </video> 76 </video>
77 </body> 77 </body>
78 </html> 78 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698