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

Side by Side Diff: LayoutTests/http/tests/media/media-source/webkitmediasource-state-changes.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: 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 <script src="/media-resources/video-test.js"></script> 4 <script src="/media-resources/video-test.js"></script>
5 <script src="/media/resources/media-source/webm/segment-info.js"></scrip t> 5 <script src="/media/resources/media-source/webm/segment-info.js"></scrip t>
6 <script src="webkitmediasource-util.js"></script> 6 <script src="webkitmediasource-util.js"></script>
7 <script> 7 <script>
8 var segmentHelper = new MediaSourceTest.SegmentHelper(WebMSegmentInf o.testWebM); 8 var segmentHelper = new MediaSourceTest.SegmentHelper(WebMSegmentInf o.testWebM);
9 var seekTime = 1; 9 var seekTime = 1;
10 10
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 endTest(); 215 endTest();
216 } 216 }
217 217
218 function onLoad() 218 function onLoad()
219 { 219 {
220 findMediaElement(); 220 findMediaElement();
221 221
222 mediaSource = new WebKitMediaSource(); 222 mediaSource = new WebKitMediaSource();
223 223
224 waitForEventAndFail('error'); 224 waitForEventAndFail('error');
225 waitForEvent('playing');
226 waitForEvent('seeking'); 225 waitForEvent('seeking');
227 waitForEvent('seeked'); 226 waitForEvent('seeked');
228 waitForEvent('ended'); 227 waitForEvent('ended');
229 waitForEvent('emptied'); 228 waitForEvent('emptied');
230 229
231 mediaSource.addEventListener('webkitsourceopen', onSourceEvent); 230 mediaSource.addEventListener('webkitsourceopen', onSourceEvent);
232 mediaSource.addEventListener('webkitsourceended', onSourceEvent) ; 231 mediaSource.addEventListener('webkitsourceended', onSourceEvent) ;
233 mediaSource.addEventListener('webkitsourceclose', onSourceEvent) ; 232 mediaSource.addEventListener('webkitsourceclose', onSourceEvent) ;
234 233
235 mediaSource.addEventListener('webkitsourceopen', onFirstSourceOp en); 234 mediaSource.addEventListener('webkitsourceopen', onFirstSourceOp en);
236 235
237 MediaSourceTest.logSourceState(mediaSource); 236 MediaSourceTest.logSourceState(mediaSource);
238 segmentHelper.init(video, function(success) 237 segmentHelper.init(video, function(success)
239 { 238 {
240 if (!success) { 239 if (!success) {
241 failTest("Failed to load segment data"); 240 failTest("Failed to load segment data");
242 return; 241 return;
243 } 242 }
244 243
245 MediaSourceTest.setSrcToMediaSourceTestURL(video); 244 MediaSourceTest.setSrcToMediaSourceTestURL(video);
246 }); 245 });
247 } 246 }
248 </script> 247 </script>
249 </head> 248 </head>
250 <body onload="onLoad()"> 249 <body onload="onLoad()">
251 <video autoplay> </video> 250 <video autoplay> </video>
252 <p>Tests MediaSource API state transitions.</p> 251 <p>Tests MediaSource API state transitions.</p>
253 </body> 252 </body>
254 </html> 253 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698