Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / media / media-source / mediasource-sourcebufferlist-crash.html
blob040d19f156addf59485dc84b11eed17151450d72
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="/js-test-resources/js-test.js"></script>
5 <script src="/media-resources/video-test.js"></script>
6 <script type="text/javascript">
7 function onSourceOpen(e)
9 consoleWrite("Calling addSourceBuffer()");
10 e.target.addSourceBuffer('video/webm;codecs="vp8"');
12 consoleWrite("Running garbage collector to cleanup the SourceBuffer reference returned by addSourceBuffer()");
13 gc();
15 document.querySelector('#v').src = "";
18 function onSourceClose(e)
20 consoleWrite("onSourceClose");
21 endTest();
24 function main()
26 var video = document.querySelector('#v');
27 var mediaSource = new MediaSource();
29 mediaSource.addEventListener('sourceopen', onSourceOpen);
30 mediaSource.addEventListener('sourceclose', onSourceClose);
32 video.src = URL.createObjectURL(mediaSource);
34 </script>
35 </head>
36 <body onload="main()">
37 <video id="v"></video>
38 <p>Verify that we don't crash on close if the MediaSource.sourceBuffers holds the last reference to its SourceBuffer objects.</p>
39 </body>
40 </html>