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

Side by Side Diff: LayoutTests/http/tests/media/media-source/mediasource-sourcebufferlist-crash.html

Issue 245893002: Improve unprefixed MediaSource test coverage. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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="/js-test-resources/js-test.js"></script> 4 <script src="/js-test-resources/js-test.js"></script>
5 <script src="/media-resources/video-test.js"></script> 5 <script src="/media-resources/video-test.js"></script>
6 <script type="text/javascript"> 6 <script type="text/javascript">
7 function onSourceOpen(e) 7 function onSourceOpen(e)
8 { 8 {
9 consoleWrite("Calling addSourceBuffer()"); 9 consoleWrite("Calling addSourceBuffer()");
10 e.target.addSourceBuffer('video/webm;codecs="vp8"'); 10 e.target.addSourceBuffer('video/webm;codecs="vp8"');
11 11
12 consoleWrite("Running garbage collector to cleanup the SourceBuf fer reference returned by addSourceBuffer()"); 12 consoleWrite("Running garbage collector to cleanup the SourceBuf fer reference returned by addSourceBuffer()");
13 gc(); 13 gc();
14 14
15 document.querySelector('#v').src = ""; 15 document.querySelector('#v').src = "";
16 } 16 }
17 17
18 function onSourceClose(e) 18 function onSourceClose(e)
19 { 19 {
20 consoleWrite("onSourceClose"); 20 consoleWrite("onSourceClose");
21 endTest(); 21 endTest();
22 } 22 }
23 23
24 function main() 24 function main()
25 { 25 {
26 var video = document.querySelector('#v'); 26 var video = document.querySelector('#v');
27 var mediaSource = new WebKitMediaSource(); 27 var mediaSource = new MediaSource();
28 28
29 mediaSource.addEventListener('webkitsourceopen', onSourceOpen); 29 mediaSource.addEventListener('sourceopen', onSourceOpen);
30 mediaSource.addEventListener('webkitsourceclose', onSourceClose) ; 30 mediaSource.addEventListener('sourceclose', onSourceClose);
31 31
32 video.src = URL.createObjectURL(mediaSource); 32 video.src = URL.createObjectURL(mediaSource);
33 } 33 }
34 </script> 34 </script>
35 </head> 35 </head>
36 <body onload="main()"> 36 <body onload="main()">
37 <video id="v"></video> 37 <video id="v"></video>
38 <p>Verify that we don't crash on close if the MediaSource.sourceBuffers ho lds the last reference to its SourceBuffer objects.</p> 38 <p>Verify that we don't crash on close if the MediaSource.sourceBuffers ho lds the last reference to its SourceBuffer objects.</p>
39 </body> 39 </body>
40 </html> 40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698